Public report of NLRWindSystems/WISDEM, 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, 13:57 UTC · Survey ID cd_ab768597391b4e91b35ff731f72c2f66

NLRWindSystems/WISDEM

Measured 17 November 2026, 13:56 UTC, at code version 54353f0

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

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

A medium codebase: 67,258 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.6 person-years · Weakest lens: Production Readiness, 35.7

Findings by how serious they are

31 critical 617 serious 21 minor

11 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, 13:56 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 ▸

41of 41 dimensions measured by tools.
658of 669 findings point to an exact file and line, so you can open each one in the code. The other 11 concern the repository as a whole, such as missing documentation.
41dimensions across 5 lenses, read from 67,258 lines of product code in 1 project.
Chapters

Executive summary

NLRWindSystems/WISDEM falls short of our standard for production because its Dependencies dimensions are rated Critical, and we found no automated security scanning of the code, its secrets or its dependencies. It scores 51.1 out of 100, which alone would earn Adequate, but it is rated Weak: a rating can't sit more than one step above its weakest group.

Production Readiness, at 35.7, is the weakest lens and counts most in the score. The best first step for the work it takes is fixing the package under a licence on your banned list, worth about 4.7 points. Adding automated security scanning would lift Production Readiness itself, worth about 7.4 points. Raising Production Readiness to 70 would lift the score to about 64.1.

Twenty-one pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Six weaknesses in the code could be used by an attacker, and two places in the code run text as code, which an attacker could use. Pinning each tool to an exact version, fixing the weaknesses the scanner points to and replacing text run as code with direct calls would close these risks. The package under a licence on your banned list needs replacing, or clearing with your legal team.

The product code is 67,258 lines, about €87,000 to rebuild.

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

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

If Production Readiness rose from 35.7 to 70, the lowest score rated Strong, the score would rise from 51.1 to about 64.1.

Code composition: what the lines of code are
Product code 73%Tests 27%
Rebuild cost: about €87,000 · Estimate
Cost to rebuild€29,000 to €140,000, for 481 to 1,525 hours of work, about 0.6 person-years for 1 to 2 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 51. 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: 67,258 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 1 Banned license finding(s) in License Compliance.
Raises the score by about 4.7 points · Low effort · License Compliance
2
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 7.4 points · Medium effort · Security & performance tooling
3
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with pyproject.toml.
Raises the score by about 3.3 points · Low effort · ADR Quality

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 €87,000 to build again, about 0.6 person-years of work. Its weakest lens is Production Readiness, at 35.7 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Banned license finding(s) in License Compliance. Of all the actions in this report, it raises the score most for the work it takes: about 4.7 points for low effort, because it clears the 1 License Compliance 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 5.5 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 14% on every change. The history of the code shows how much it changes: about 425 lines over the last 90 days, which is about 1,724 lines a year. At that pace, the extra work comes to an estimated 0.3 to 1.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

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

110 modules, with 9 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; 70 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 (global)2 docs.docstrings3 docs.scripts4 setup5 wisdem6 wisdem.ccblade7 wisdem.ccblade.Polar8 wisdem.ccblade.ccblade9 wisdem.ccblade.ccblade_component10 wisdem.ccblade.polar_file11 wisdem.commonse12 wisdem.commonse.akima13 wisdem.commonse.cross_sections14 wisdem.commonse.csystem15 wisdem.commonse.cylinder_member16 wisdem.commonse.distribution17 wisdem.commonse.environment18 wisdem.commonse.turbine_class19 wisdem.commonse.turbine_constraints20 wisdem.commonse.utilities21 wisdem.commonse.utilization_constraints22 wisdem.commonse.utilization_dnvgl23 wisdem.commonse.utilization_eurocode24 wisdem.commonse.wind_wave_drag25 wisdem.drivetrainse26 wisdem.drivetrainse.converter27 wisdem.drivetrainse.drive_components28 wisdem.drivetrainse.drive_structure29 wisdem.drivetrainse.drivetrain30 wisdem.drivetrainse.gearbox31 wisdem.landbosse.model.CostModule32 wisdem.landbosse.model.CollectionCost33 wisdem.landbosse.model.DevelopmentCost34 wisdem.landbosse.model.ErectionCost35 wisdem.landbosse.model.FoundationCost36 wisdem.landbosse.model.GridConnectionCost37 wisdem.landbosse.model.SitePreparationCost38 wisdem.landbosse.model.SubstationCost39 wisdem.landbosse.model.TransportCost40 wisdem.landbosse.model.TurbineCost
1 (global)
2 docs.docstrings
3 docs.scripts
4 setup
5 wisdem
6 wisdem.ccblade
7 wisdem.ccblade.Polar
8 wisdem.ccblade.ccblade
9 wisdem.ccblade.ccblade_component
10 wisdem.ccblade.polar_file
11 wisdem.commonse
12 wisdem.commonse.akima
13 wisdem.commonse.cross_sections
14 wisdem.commonse.csystem
15 wisdem.commonse.cylinder_member
16 wisdem.commonse.distribution
17 wisdem.commonse.environment
18 wisdem.commonse.turbine_class
19 wisdem.commonse.turbine_constraints
20 wisdem.commonse.utilities
21 wisdem.commonse.utilization_constraints
22 wisdem.commonse.utilization_dnvgl
23 wisdem.commonse.utilization_eurocode
24 wisdem.commonse.wind_wave_drag
25 wisdem.drivetrainse
26 wisdem.drivetrainse.converter
27 wisdem.drivetrainse.drive_components
28 wisdem.drivetrainse.drive_structure
29 wisdem.drivetrainse.drivetrain
30 wisdem.drivetrainse.gearbox
31 wisdem.landbosse.model.CostModule
32 wisdem.landbosse.model.CollectionCost1
33 wisdem.landbosse.model.DevelopmentCost1
34 wisdem.landbosse.model.ErectionCost1
35 wisdem.landbosse.model.FoundationCost1
36 wisdem.landbosse.model.GridConnectionCost1
37 wisdem.landbosse.model.SitePreparationCost1
38 wisdem.landbosse.model.SubstationCost1
39 wisdem.landbosse.model.TransportCost1
40 wisdem.landbosse.model.TurbineCost1
Uses a module listed above itPart of a loopThe module itself
1 (global)2 docs.docstrings3 docs.scripts4 setup5 wisdem6 wisdem.ccblade7 wisdem.ccblade.Polar8 wisdem.ccblade.ccblade9 wisdem.ccblade.ccblade_component10 wisdem.ccblade.polar_file11 wisdem.commonse12 wisdem.commonse.akima13 wisdem.commonse.cross_sections14 wisdem.commonse.csystem15 wisdem.commonse.cylinder_member16 wisdem.commonse.distribution17 wisdem.commonse.environment18 wisdem.commonse.turbine_class19 wisdem.commonse.turbine_constraints20 wisdem.commonse.utilities21 wisdem.commonse.utilization_constraints22 wisdem.commonse.utilization_dnvgl23 wisdem.commonse.utilization_eurocode24 wisdem.commonse.wind_wave_drag25 wisdem.drivetrainse26 wisdem.drivetrainse.converter27 wisdem.drivetrainse.drive_components28 wisdem.drivetrainse.drive_structure29 wisdem.drivetrainse.drivetrain30 wisdem.drivetrainse.gearbox31 wisdem.landbosse.model.CostModule32 wisdem.landbosse.model.CollectionCost33 wisdem.landbosse.model.DevelopmentCost34 wisdem.landbosse.model.ErectionCost35 wisdem.landbosse.model.FoundationCost36 wisdem.landbosse.model.GridConnectionCost37 wisdem.landbosse.model.SitePreparationCost38 wisdem.landbosse.model.SubstationCost39 wisdem.landbosse.model.TransportCost40 wisdem.landbosse.model.TurbineCost(global)1docs.docstrings2docs.scripts3setup4wisdem5wisdem.ccblade6wisdem.ccblade.Polar7wisdem.ccblade.ccblade8wisdem.ccblade.ccblade_component9wisdem.ccblade.polar_file10wisdem.commonse11wisdem.commonse.akima12wisdem.commonse.cross_sections13wisdem.commonse.csystem14wisdem.commonse.cylinder_member15wisdem.commonse.distribution16wisdem.commonse.environment17wisdem.commonse.turbine_class18wisdem.commonse.turbine_constraints19wisdem.commonse.utilities20wisdem.commonse.utilization_constraints21wisdem.commonse.utilization_dnvgl22wisdem.commonse.utilization_eurocode23wisdem.commonse.wind_wave_drag24wisdem.drivetrainse25wisdem.drivetrainse.converter26wisdem.drivetrainse.drive_components27wisdem.drivetrainse.drive_structure28wisdem.drivetrainse.drivetrain29wisdem.drivetrainse.gearbox30wisdem.landbosse.model.CostModule31wisdem.landbosse.model.CollectionCost32wisdem.landbosse.model.DevelopmentCost33wisdem.landbosse.model.ErectionCost34wisdem.landbosse.model.FoundationCost35wisdem.landbosse.model.GridConnectionCost36wisdem.landbosse.model.SitePreparationCost37wisdem.landbosse.model.SubstationCost38wisdem.landbosse.model.TransportCost39wisdem.landbosse.model.TurbineCost40111111111+70 more modules (most-connected shown)

At a glance — Code Health · 59.4 · Adequate · gated by D2 ·

At a glance — Architecture · 99.4 · Exemplary ·

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

At a glance — Readiness · 35.7 · Weak · gated by D12, P3 ·

At a glance — Security · 68.4 · 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 — Injection30High / Critical
A03:2025 — Software Supply Chain Failures5Medium

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; Resolve the 1 Banned license finding(s) in License Compliance; Resolve the 1 No ADRs found finding(s) in ADR Quality — start with pyproject.toml.

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

Do thisHelpsEffortDimension
Resolve the 1 Banned license finding(s) in License Compliance.+4.7 ptsLowLicense Compliance
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.+7.4 ptsMediumSecurity & performance tooling
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with pyproject.toml.+3.3 ptsLowADR Quality
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.+2.5 ptsMediumArchitecture documentation
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.+2.3 ptsMediumDeployment & Rollback
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+2.3 ptsMediumRelease Hygiene
Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (6).+1.0 ptsLowStatic Analysis (SAST)
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with wombat_api.py.+0.9 ptsLowKnowledge Freshness

File quality

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

FileScoreBandWorst signal
REDACTED1.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.9SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
wisdem/drivetrainse/drive_structure.py5.5MixedGod Classes: FileTooLong: drivetrainse/drive_structure.py
wisdem/wombat/wombat_api.py6.0MixedExplicit Debt: TodoComment
wisdem/glue_code/gc_WT_InitModel.py6.0MixedExplicit Debt: TodoComment
wisdem/glue_code/gc_WT_DataStruc.py6.0MixedExplicit Debt: TodoComment
wisdem/ccblade/polar_file.py6.0MixedExplicit Debt: TodoComment
wisdem/commonse/cylinder_member.py6.0MixedExplicit Debt: TodoComment
wisdem/drivetrainse/generator_models.py6.0MixedExplicit Debt: TodoComment
wisdem/ccblade/Polar.py6.0MixedExplicit Debt: TodoComment
wisdem/commonse/utilities.py6.0MixedExplicit Debt: TodoComment
wisdem/optimization_drivers/nsga2/algo_nsga2.py6.0MixedExplicit Debt: TodoComment
wisdem/nrelcsm/nrel_csm_orig.py6.0MixedExplicit Debt: TodoComment
wisdem/drivetrainse/drive_components.py6.0MixedExplicit Debt: TodoComment
wisdem/landbosse/model/SitePreparationCost.py6.0MixedExplicit Debt: TodoComment
wisdem/optimization_drivers/nsga2_driver.py6.0MixedExplicit Debt: TodoComment
wisdem/fixed_bottomse/jacket.py6.0MixedExplicit Debt: TodoComment

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

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

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

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

Could not be resolved — 11

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 41 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

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

What we checked — 41 dimensions across the health lenses
D1D2D3D4D6D12D13D14D15D16D17D19D20D28D29D34D35D36D44AX10AX3AX4AX6M1M2M3P1P10P2P3P4P6X12X17X19X23X27X28X3X30X4

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, 658 of 669 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 01a1e9cb-d39e-77c5-bddd-5261def6d572.

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 (its dependency install failed (pip exit 1: no error line printed), so its suite was not run against dependencies it does not declare). 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 -p no:warnings --disable-warnings --cov`) 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, 72 test files), but it was not re-run: its dependency install failed (pip exit 1: no error line printed), so its suite was not run against dependencies it does not declare. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (setup.py), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • 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)` (66083 LoC, 440 module-visible types across 27 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.
  • 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 this repository's Python, c, fortran is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Python, c, fortran is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • 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 C, Fortran, 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.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • 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.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • 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").
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a 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.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity5.0 / 10Adequate✓ Tool-verified

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

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

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

50 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was PoseOptimization.set_constraints at 112.

PoseOptimization.set_constraints (cyclomatic 112)wisdem/glue_code/gc_PoseOptimization.py:872
WombatWisdem.compile_inputs (cyclomatic 102)wisdem/wombat/wombat_api.py:679
WindTurbineOntologyPython.update_ontology (cyclomatic 91)wisdem/glue_code/gc_LoadInputs.py:822
PoseOptimization.set_design_variables (cyclomatic 82)wisdem/glue_code/gc_PoseOptimization.py:413
WT_RNTA.setup (cyclomatic 74)wisdem/glue_code/glue_code.py:84

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

What to do

  1. Bring the 16 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with PoseOptimization.set_constraints (cyclomatic 112), WombatWisdem.compile_inputs (cyclomatic 102), WindTurbineOntologyPython.update_ontology (cyclomatic 91). — 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 16 together lifts Cyclomatic Complexity from 5.0 to about 7.0/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

D2 · Cognitive Complexity2.0 / 10Critical✓ 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 2.0 / 10 · rule-coverage 100% · ceiling Prevented

85 method(s) exceeded the cognitive complexity threshold of 15; the worst was WindTurbineOntologyPython.update_ontology at 249.

WindTurbineOntologyPython.update_ontology (cognitive 249)wisdem/glue_code/gc_LoadInputs.py:822
gc_WT_InitModel.assign_blade_structural_layers_values (cognitive 236)wisdem/glue_code/gc_WT_InitModel.py:320
gc_WT_InitModel.assign_floating_values (cognitive 169)wisdem/glue_code/gc_WT_InitModel.py:1131
PoseOptimization.set_design_variables (cognitive 166)wisdem/glue_code/gc_PoseOptimization.py:413
RunPreComp.compute (cognitive 146)wisdem/rotorse/rotor_elasticity.py:295

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

What to do

  1. Bring the 16 bodies over 60 down to 60 or less in Cognitive Complexity — start with WindTurbineOntologyPython.update_ontology (cognitive 249), gc_WT_InitModel.assign_blade_structural_layers_values (cognitive 236), gc_WT_InitModel.assign_floating_values (cognitive 169). — 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 16 together lifts Cognitive Complexity from 2.0 to about 4.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

D3 · God Classes7.8 / 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 7.8 / 10 · rule-coverage 100% · ceiling Prevented

30 over-large unit(s) detected — types, modules or files that carry too much.

FileTooLong: rotorse/blade_cost.py · ×30wisdem/rotorse/blade_cost.py

What to do

  1. Resolve the 30 FileTooLong finding(s) in God Classes — start with blade_cost.py, gc_WT_DataStruc.py, generator_models.py. — One of this dimension's main actionable groups (30 warning-level).

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

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

290 duplicated block group(s) detected. 12.2 % of the production lines (8,229 of 67,258) are in a reported copy. A further 45 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (7 lines × 2) · ×19setup.py:56
Duplicated block (6 lines × 2) · ×12wisdem/drivetrainse/generator_models.py:2072
Duplicated block (9 lines × 2) · ×11wisdem/commonse/cylinder_member.py:1629
Duplicated block (5 lines × 2) · ×11wisdem/commonse/cylinder_member.py:1597
Duplicated block (8 lines × 2) · ×10wisdem/ccblade/Polar.py:944

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

What to do

  1. Resolve the 19 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with gc_LoadInputs.py (3), blade_cost.py (3), ccblade_component.py (2). — One of this dimension's main actionable groups (19 warning-level).
  2. Resolve the 12 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with generator_models.py (2), gc_PoseOptimization.py (2), rotor_elasticity.py. — One of this dimension's main actionable groups (12 warning-level).
  3. Resolve the 11 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with monopile.py (2), wind_wave_drag.py (2), cylinder_member.py. — One of this dimension's main actionable groups (11 warning-level).

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

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

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

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

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

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

1 of 40 classes have LCOM4 above 3.

Low cohesion: NSGA2Driver (LCOM4 4)wisdem/optimization_drivers/nsga2_driver.py:37

What to do

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

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

D12 · Dependency Hygiene10.0 0.6 / 10Critical✓ Tool-verified

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

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

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

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

Outdated: moorpy

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

D13 · Secret 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

Secret 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 139 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 16 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (123 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. 26 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 Apache-2.0, which is its own choice and is not judged here.

Banned license: text-unidecode

What to do

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

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

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

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

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

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

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

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

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

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

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

6 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is wisdem/drivetrainse/drive_structure.py. Counted over 93 of the 129 production source files in this repository: 33 are under the ~2,400-byte size floor this dimension measures over, and the remaining 3 have no attributable history left to measure.

Off-boarding risk: anonymized user #1 · ×2

✓ On the Gold path — maintain.

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

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

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

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

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

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

TodoComment · ×94wisdem/wombat/wombat_api.py:18
XxxCommentREDACTED:20
HackCommentdocs/scripts/latex-fix.py:37

What to do

  1. Resolve the 94 TodoComment finding(s) in Explicit Debt — start with cylinder_member.py (13), Polar.py (11), SitePreparationCost.py (7). — One of this dimension's main actionable groups (94 warning-level).
  2. Resolve the 1 XxxComment finding(s) in Explicit Debt — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 HackComment finding(s) in Explicit Debt — start with latex-fix.py. — One of this dimension's main actionable groups (1 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. 67 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

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

No architecture decision records were found.

No ADRs foundpyproject.toml:107

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with pyproject.toml. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)2.4 / 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 2.4 / 10 · rule-coverage 100% · ceiling Documented

30 finding(s): 0 critical, 29 high, 1 medium, 0 low. 21 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. semgrep hit a parse error in 4 file(s) — `docs/docstrings/variable_guide.json`, `wisdem/pyframe3dd/src/NRutil.c` (line 490, line 515, line 540, …), `wisdem/pyframe3dd/src/microstran/vec3.h` (line 38, line 40, line 41, …), `wisdem/pyframe3dd/src/py_main.c` (line 76) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (6). — One of this dimension's main actionable groups (6 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
  3. No action in Static Analysis (SAST) — all 21 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 (21 issue-level, 0 of them charged here).

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

D34 · Knowledge Freshness9.7 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

Orphaned knowledgewisdem/wombat/wombat_api.py:1
Orphaned file · ×2wisdem/optimization_drivers/dakota_driver.py:1
Further orphaned files (smaller)

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with wombat_api.py. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 2 Orphaned file finding(s) in Knowledge Freshness — start with dakota_driver.py, fast_nondom_sort.py. — One of this dimension's main actionable groups (2 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling10.0 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: drive_structure.py↔layout.py 54%; gc_RunTools.py↔runWISDEM.py 52%

Change coupling: drive_structure.py ↔ layout.py · ×2wisdem/drivetrainse/drive_structure.py:1

What to do

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

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

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

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

2/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

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

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 16 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 composition10.0 / 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.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

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.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

P3 · Security & performance 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:4
  • `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:50

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.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
P6 · Release Hygiene5.0 / 10Adequate✓ 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.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
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.

X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified

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

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

  • `remove_numpy` is public and takes `fst_vt: dict` from its caller, and it calls itself at line 336 (`remove_numpy`) with a piece of `fst_vt` — and nowhere in `remove_numpy` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `remove_numpy` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — wisdem/inputs/validation.py:336

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X19 · Unrestored process-global state4.8 / 10Weak✓ Tool-verified

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.

  • `_run_program` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process working directory (changed at line 318, put back at line 324) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path. — REDACTED:313

What to do

  • Each finding names the statement that changes the process-global value and the statement that puts it back. Confirm from the two that nothing between them is protected — then prefer removing the mutation over widening the restore: a working directory or an environment variable passed to the operation that needs it (the `cwd` and `env` options of `child_process`, or of `Deno.Command`) is scoped to that operation, which is what the save-and-restore was trying to approximate. Where the global genuinely must move, a `try`/`finally` is the least that makes the restore unconditional. In Python the same holds for `os.chdir`, `os.environ` and `sys.stdout`: pass `cwd=`/`env=` to `subprocess`, or use `contextlib.chdir`/`redirect_stdout`, rather than moving the global by hand.
X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

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

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

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 handling5.5 / 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.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×4) — wisdem/rotorse/geometry_tools/geom_tools.py:70, wisdem/postprocessing/compare_designs.py:697, wisdem/floatingse/floating_frame.py:517, …
  • `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. (×6) — REDACTED:375, wisdem/glue_code/gc_LoadInputs.py:332, wisdem/commonse/utilization_api.py:203, …
  • `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. — wisdem/glue_code/gc_PoseOptimization.py:790

What to do

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

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

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

X4 · Structured logging5.4 / 10Adequate✓ 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.

  • `warning` at line 1468 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — wisdem/glue_code/gc_WT_InitModel.py:1468
  • `warning` at line 513 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — wisdem/floatingse/floating_system.py:513
  • `debug` at line 113 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — wisdem/commonse/utilities.py:113
  • `debug` at line 120 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — wisdem/commonse/utilities.py:120
  • `debug` at line 130 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — wisdem/commonse/utilities.py:130
  • `debug` at line 142 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — wisdem/commonse/utilities.py:142

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.4Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture99.4ExemplaryStrongest area.
Maturity62.7Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness35.7Weak — gated by D12, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security68.4Adequate — 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.

  • 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 — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 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.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 72 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
  • 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 — ~24328 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
  • 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.
  • D21 Naming Consistency — D21 withholds its sibling role token rows: 1 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; comments in this repository's .py source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • 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.
  • 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
  • M4 Documentation accuracy — Not applicable: the 67 current-state document(s) make no claim of a kind M4 checks. 6 claim(s) of kinds M4 does not check were not checked (path 5, environment variable 1); M4 checks only links and versions and artefact counts.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • 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 applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no C# was loaded; this repository's Python was read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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 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.
  • 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 — 31 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
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D14 · License Compliance · Banned license · ×1
  • Banned license: text-unidecode — `text-unidecode` 1.3 is published on PyPI under `GPL-2.0-or-later`, 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.
D34 · Knowledge Freshness · Orphaned knowledge · ×1
  • Orphaned knowledge wisdem/wombat/wombat_api.py:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Serious — 617 finding(s)
D17 · Explicit Debt · TodoComment · ×94
  • TodoComment wisdem/wombat/wombat_api.py:18 — # TODO: Should the random seed or generator be provided to the interface? — 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 wisdem/wombat/wombat_api.py:745 — # TODO: determine if additional turbines should be allowed — 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 wisdem/test/test_towerse/test_tower.py:360 — # two load cases. TODO: use a case iterator — 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 wisdem/test/test_fixed_bottomse/test_monopile.py:435 — # two load cases. TODO: use a case iterator — 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 examples/05_tower_monopile/monopile_direct.py:159 — # two load cases. TODO: use a case iterator — 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 examples/05_tower_monopile/tower_direct.py:141 — # two load cases. TODO: use a case iterator — 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 wisdem/test/test_landbosse/test_ManagementCost.py:27 — # TODO: Refactor the parts of the filenames to the top of the file. Do not hardcode. — 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 wisdem/rotorse/rotor.py:234 — # TODO YL: move it back when constr is available for user defined blade elastic properties — 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 wisdem/rotorse/rotor_structure.py:500 — # TODO verify if this is correct — 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 wisdem/rotorse/rotor_structure.py:728 — # Can update with rotor_elasticity later 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 wisdem/rotorse/rotor_structure.py:729 — # Can update with rotor_elasticity later 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 wisdem/rotorse/rotor_structure.py:1222 — # TODO YL: no constr component, remove the above conditional when the constr component is enabled for user defined blade — 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 wisdem/precomp/composite_section.py:43 — # TODO: copy materials (for now it never changes so I'm not looking at it) — 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 wisdem/precomp/precomp.py:331 — # TODO: lower surface may be the compression one — 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 wisdem/optimization_drivers/nsga2_driver.py:71 — # TODO: is this necessary??? — 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 wisdem/optimization_drivers/nsga2_driver.py:89 — # TODO: implement — 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 wisdem/optimization_drivers/nsga2_driver.py:376 — # TODO: delete? — 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 wisdem/optimization_drivers/nsga2/algo_nsga2.py:361 — # TODO: figure out how to pass the map object and still have it work — 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 wisdem/nrelcsm/nrel_csm_mass_2015.py:564 — # TODO: no variable speed mass; ignore for now — 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 wisdem/nrelcsm/nrel_csm_mass_2015.py:642 — # TODO: ignoring controls and electronics mass for now — 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 wisdem/nrelcsm/nrel_csm_mass_2015.py:680 — # TODO: there is no base hardware mass model in the old model. Cost is not dependent on mass. — 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 wisdem/nrelcsm/nrel_csm_orig.py:1552 — # *= self.multiplier # TODO: add to gradients — 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 wisdem/nrelcsm/nrel_csm_orig.py:1812 — # TODO: add to gradients — 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 wisdem/nrelcsm/nrel_csm_orig.py:2051 — # TODO: transition and deep water options if applicable — 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 wisdem/nrelcsm/nrel_csm_orig.py:2063 — # TODO: transition and deep water options if applicable — 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.
  • + 69 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×30
  • FileTooLong: rotorse/blade_cost.py wisdem/rotorse/blade_cost.py — FileTooLong — 3117 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2617 over it, 6.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: glue_code/gc_WT_DataStruc.py wisdem/glue_code/gc_WT_DataStruc.py — FileTooLong — 2561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2061 over it, 5.12× 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: drivetrainse/generator_models.py wisdem/drivetrainse/generator_models.py — FileTooLong — 2227 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1727 over it, 4.45× 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: commonse/cylinder_member.py wisdem/commonse/cylinder_member.py — FileTooLong — 1928 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1428 over it, 3.86× 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: glue_code/gc_WT_InitModel.py wisdem/glue_code/gc_WT_InitModel.py — FileTooLong — 1504 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1004 over it, 3.01× 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: nrelcsm/nrel_csm_orig.py wisdem/nrelcsm/nrel_csm_orig.py — FileTooLong — 1503 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1003 over it, 3.01× 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: glue_code/gc_LoadInputs.py wisdem/glue_code/gc_LoadInputs.py — FileTooLong — 1268 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 768 over it, 2.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: ccblade/ccblade.py wisdem/ccblade/ccblade.py — FileTooLong — 1260 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 760 over it, 2.52× 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: rotorse/rotor_elasticity.py wisdem/rotorse/rotor_elasticity.py — FileTooLong — 1230 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 730 over it, 2.46× 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: ccblade/Polar.py wisdem/ccblade/Polar.py — FileTooLong — 1147 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 647 over it, 2.29× 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: glue_code/gc_PoseOptimization.py wisdem/glue_code/gc_PoseOptimization.py — FileTooLong — 1063 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 563 over it, 2.13× 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: rotorse/rotor_structure.py wisdem/rotorse/rotor_structure.py — FileTooLong — 894 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 394 over it, 1.79× 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: ccblade/ccblade_component.py wisdem/ccblade/ccblade_component.py — FileTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 387 over it, 1.77× 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: glue_code/glue_code.py wisdem/glue_code/glue_code.py — FileTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 387 over it, 1.77× 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: rotorse/rotor_power.py wisdem/rotorse/rotor_power.py — FileTooLong — 837 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 337 over it, 1.67× 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: drivetrainse/drive_structure.py wisdem/drivetrainse/drive_structure.py — FileTooLong — 823 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 323 over it, 1.65× 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: wombat/wombat_api.py wisdem/wombat/wombat_api.py — FileTooLong — 811 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 311 over it, 1.62× 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: model/ErectionCost.py wisdem/landbosse/model/ErectionCost.py — FileTooLong — 728 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 228 over it, 1.46× 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: fixed_bottomse/monopile.py wisdem/fixed_bottomse/monopile.py — FileTooLong — 653 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 153 over it, 1.31× 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: postprocessing/compare_designs.py wisdem/postprocessing/compare_designs.py — FileTooLong — 640 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 140 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.
  • FileTooLong: commonse/wind_wave_drag.py wisdem/commonse/wind_wave_drag.py — FileTooLong — 632 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 132 over it, 1.26× 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: model/CollectionCost.py wisdem/landbosse/model/CollectionCost.py — FileTooLong — 624 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 124 over it, 1.25× 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: nrelcsm/nrel_csm_cost_2015.py wisdem/nrelcsm/nrel_csm_cost_2015.py — FileTooLong — 602 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 102 over it, 1.20× 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: orbit/orbit_api.py wisdem/orbit/orbit_api.py — FileTooLong — 601 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 101 over it, 1.20× 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: drivetrainse/drive_components.py wisdem/drivetrainse/drive_components.py — FileTooLong — 570 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 70 over it, 1.14× 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.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×19
  • Duplicated block (7 lines × 2) setup.py:56 — setup.py:56-62 | setup.py:69-75 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `setup.py:55` calls `makedirs` and `setup.py:68` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) wisdem/ccblade/ccblade_component.py:956 — wisdem/ccblade/ccblade_component.py:956-962 | wisdem/ccblade/ccblade_component.py:1108-1114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) wisdem/commonse/cross_sections.py:303 — wisdem/commonse/cross_sections.py:303-309 | wisdem/commonse/cross_sections.py:356-362 — 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 `wisdem/commonse/cross_sections.py:303` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) wisdem/commonse/cylinder_member.py:1689 — wisdem/commonse/cylinder_member.py:1689-1695 | wisdem/commonse/cylinder_member.py:1844-1850 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) wisdem/commonse/wind_wave_drag.py:290 — wisdem/commonse/wind_wave_drag.py:290-296 | wisdem/commonse/wind_wave_drag.py:440-446 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) wisdem/commonse/wind_wave_drag.py:636 — wisdem/commonse/wind_wave_drag.py:636-642 | wisdem/commonse/wind_wave_drag.py:853-859 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) wisdem/drivetrainse/drive_components.py:395 — wisdem/drivetrainse/drive_components.py:395-401 | wisdem/drivetrainse/drive_components.py:468-474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) wisdem/drivetrainse/generator_models.py:2038 — wisdem/drivetrainse/generator_models.py:2038-2044 | wisdem/drivetrainse/generator_models.py:3506-3512 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) wisdem/drivetrainse/generator_models.py:3480 — wisdem/drivetrainse/generator_models.py:3480-3486 | wisdem/drivetrainse/generator_models.py:3531-3537 — 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 `wisdem/drivetrainse/generator_models.py:3480` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) wisdem/glue_code/gc_LoadInputs.py:398 — wisdem/glue_code/gc_LoadInputs.py:398-404 | wisdem/glue_code/gc_LoadInputs.py:405-411 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) wisdem/glue_code/gc_LoadInputs.py:1284 — wisdem/glue_code/gc_LoadInputs.py:1284-1290 | wisdem/glue_code/gc_LoadInputs.py:1296-1302 — 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 `wisdem/glue_code/gc_LoadInputs.py:1284` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) wisdem/precomp/properties.py:137 — wisdem/precomp/properties.py:137-143 | wisdem/precomp/properties.py:145-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) wisdem/rotorse/blade_cost.py:2812 — wisdem/rotorse/blade_cost.py:2812-2818 | wisdem/rotorse/blade_cost.py:3011-3017 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) wisdem/rotorse/blade_cost.py:3730 — wisdem/rotorse/blade_cost.py:3730-3736 | wisdem/rotorse/blade_cost.py:3738-3744 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) wisdem/rotorse/blade_cost.py:3976 — wisdem/rotorse/blade_cost.py:3976-3982 | wisdem/rotorse/rotor.py:188-194 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/rotorse/blade_cost.py:3976` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) wisdem/ccblade/ccblade_component.py:508 — wisdem/ccblade/ccblade_component.py:508-514 | wisdem/ccblade/ccblade_component.py:516-522 — 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 `wisdem/ccblade/ccblade_component.py:508` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) wisdem/precomp/properties.py:167 — wisdem/precomp/properties.py:167-173 | wisdem/precomp/properties.py:175-181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) wisdem/drivetrainse/drive_structure.py:999 — wisdem/drivetrainse/drive_structure.py:999-1005 | wisdem/drivetrainse/drive_structure.py:1389-1395 — 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 `wisdem/drivetrainse/drive_structure.py:999` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) wisdem/glue_code/gc_LoadInputs.py:213 — wisdem/glue_code/gc_LoadInputs.py:213-219 | wisdem/glue_code/gc_LoadInputs.py:223-229 — 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) · ×12
  • Duplicated block (6 lines × 2) wisdem/drivetrainse/generator_models.py:2072 — wisdem/drivetrainse/generator_models.py:2072-2077 | wisdem/drivetrainse/generator_models.py:3536-3541 — 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 `wisdem/drivetrainse/generator_models.py:2072` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) wisdem/drivetrainse/generator_models.py:2228 — wisdem/drivetrainse/generator_models.py:2228-2233 | wisdem/drivetrainse/generator_models.py:2643-2648 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `wisdem/drivetrainse/generator_models.py:2227` calls `add_input` and `wisdem/drivetrainse/generator_models.py:2642` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) wisdem/glue_code/gc_PoseOptimization.py:1006 — wisdem/glue_code/gc_PoseOptimization.py:1006-1011 | wisdem/glue_code/gc_PoseOptimization.py:1023-1028 — 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 `wisdem/glue_code/gc_PoseOptimization.py:1006` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) wisdem/rotorse/rotor_elasticity.py:1433 — wisdem/rotorse/rotor_elasticity.py:1433-1438 | wisdem/rotorse/rotor_elasticity.py:1472-1478 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) wisdem/commonse/cross_sections.py:328 — wisdem/commonse/cross_sections.py:328-333 | wisdem/commonse/cross_sections.py:379-384 — 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 `wisdem/commonse/cross_sections.py:328` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) wisdem/commonse/environment.py:264 — wisdem/commonse/environment.py:264-269 | wisdem/commonse/environment.py:278-283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) wisdem/fixed_bottomse/monopile.py:539 — wisdem/fixed_bottomse/monopile.py:539-544 | wisdem/fixed_bottomse/monopile.py:557-562 — 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 `wisdem/fixed_bottomse/monopile.py:539` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) wisdem/glue_code/gc_LoadInputs.py:1343 — wisdem/glue_code/gc_LoadInputs.py:1343-1348 | wisdem/glue_code/gc_LoadInputs.py:1355-1360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) wisdem/glue_code/gc_PoseOptimization.py:1337 — wisdem/glue_code/gc_PoseOptimization.py:1337-1342 | wisdem/glue_code/gc_PoseOptimization.py:1344-1349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) wisdem/commonse/turbine_constraints.py:61 — wisdem/commonse/turbine_constraints.py:61-66 | wisdem/rotorse/rotor_structure.py:972-977 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) wisdem/fixed_bottomse/jacket.py:527 — wisdem/fixed_bottomse/jacket.py:527-532 | wisdem/floatingse/floating_frame.py:284-289 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) wisdem/nrelcsm/nrel_csm_orig.py:1739 — wisdem/nrelcsm/nrel_csm_orig.py:1739-1744 | wisdem/nrelcsm/nrel_csm_orig.py:1765-1770 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×11
  • Duplicated block (9 lines × 2) wisdem/commonse/cylinder_member.py:1629 — wisdem/commonse/cylinder_member.py:1629-1637 | wisdem/commonse/cylinder_member.py:1648-1656 — 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) wisdem/drivetrainse/drive_structure.py:853 — wisdem/drivetrainse/drive_structure.py:853-861 | wisdem/drivetrainse/drive_structure.py:1230-1238 — 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) wisdem/drivetrainse/generator_models.py:1609 — wisdem/drivetrainse/generator_models.py:1609-1617 | wisdem/drivetrainse/generator_models.py:2006-2014 — 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 `wisdem/drivetrainse/generator_models.py:1609` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) wisdem/fixed_bottomse/monopile.py:689 — wisdem/fixed_bottomse/monopile.py:689-697 | wisdem/towerse/tower.py:421-429 — before extracting anything, compare `wisdem/fixed_bottomse/monopile.py` and `wisdem/towerse/tower.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) wisdem/fixed_bottomse/monopile.py:853 — wisdem/fixed_bottomse/monopile.py:853-861 | wisdem/towerse/tower.py:641-649 — before extracting anything, compare `wisdem/fixed_bottomse/monopile.py` and `wisdem/towerse/tower.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) wisdem/glue_code/gc_PoseOptimization.py:757 — wisdem/glue_code/gc_PoseOptimization.py:757-765 | wisdem/glue_code/gc_PoseOptimization.py:766-774 — 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) wisdem/landbosse/model/ErectionCost.py:497 — wisdem/landbosse/model/ErectionCost.py:497-505 | wisdem/landbosse/model/ErectionCost.py:640-648 — 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) wisdem/commonse/wind_wave_drag.py:298 — wisdem/commonse/wind_wave_drag.py:298-306 | wisdem/commonse/wind_wave_drag.py:450-458 — 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) wisdem/glue_code/gc_LoadInputs.py:302 — wisdem/glue_code/gc_LoadInputs.py:302-310 | wisdem/glue_code/gc_LoadInputs.py:350-358 — 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 `wisdem/glue_code/gc_LoadInputs.py:302` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) wisdem/commonse/cross_sections.py:318 — wisdem/commonse/cross_sections.py:318-326 | wisdem/commonse/cross_sections.py:369-377 — 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 `wisdem/commonse/cross_sections.py:318` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) wisdem/commonse/wind_wave_drag.py:644 — wisdem/commonse/wind_wave_drag.py:644-652 | wisdem/commonse/wind_wave_drag.py:861-869 — 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 × 2) · ×11
  • Duplicated block (5 lines × 2) wisdem/commonse/cylinder_member.py:1597 — wisdem/commonse/cylinder_member.py:1597-1601 | wisdem/commonse/cylinder_member.py:1775-1779 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) wisdem/commonse/cylinder_member.py:2338 — wisdem/commonse/cylinder_member.py:2338-2342 | wisdem/commonse/cylinder_member.py:2515-2519 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) wisdem/fixed_bottomse/jacket.py:171 — wisdem/fixed_bottomse/jacket.py:171-175 | wisdem/fixed_bottomse/monopile.py:321-325 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) wisdem/floatingse/mooring.py:174 — wisdem/floatingse/mooring.py:174-178 | wisdem/floatingse/mooring.py:343-347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) wisdem/precomp/precomp.py:291 — wisdem/precomp/precomp.py:291-295 | wisdem/precomp/precomp.py:298-302 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) wisdem/ccblade/Polar.py:1497 — wisdem/ccblade/Polar.py:1497-1501 | wisdem/ccblade/Polar.py:1510-1514 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) wisdem/drivetrainse/drive_structure.py:143 — wisdem/drivetrainse/drive_structure.py:143-147 | wisdem/drivetrainse/drive_structure.py:483-487 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/drivetrainse/drive_structure.py:148` calls `add_input`, `zeros` and `wisdem/drivetrainse/drive_structure.py:488` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) wisdem/floatingse/floating_system.py:132 — wisdem/floatingse/floating_system.py:132-136 | wisdem/floatingse/floating_system.py:316-320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) wisdem/floatingse/visualize.py:318 — wisdem/floatingse/visualize.py:318-322 | wisdem/floatingse/visualize.py:329-333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) wisdem/rotorse/blade_cost.py:1841 — wisdem/rotorse/blade_cost.py:1841-1845 | wisdem/rotorse/blade_cost.py:1958-1962 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) wisdem/wombat/wombat_api.py:762 — wisdem/wombat/wombat_api.py:762-766 | wisdem/wombat/wombat_api.py:896-900 — 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) · ×10
  • Duplicated block (8 lines × 2) wisdem/ccblade/Polar.py:944 — wisdem/ccblade/Polar.py:944-951 | wisdem/ccblade/Polar.py:953-960 — 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) wisdem/ccblade/ccblade.py:382 — wisdem/ccblade/ccblade.py:382-389 | wisdem/ccblade/ccblade.py:438-445 — 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) wisdem/ccblade/ccblade_component.py:840 — wisdem/ccblade/ccblade_component.py:840-847 | wisdem/ccblade/ccblade_component.py:992-999 — 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) wisdem/drivetrainse/drive_structure.py:839 — wisdem/drivetrainse/drive_structure.py:839-846 | wisdem/drivetrainse/drive_structure.py:1215-1222 — 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) wisdem/drivetrainse/generator_models.py:1644 — wisdem/drivetrainse/generator_models.py:1644-1651 | wisdem/drivetrainse/generator_models.py:2089-2096 — 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) wisdem/landbosse/model/CollectionCost.py:802 — wisdem/landbosse/model/CollectionCost.py:802-809 | wisdem/landbosse/model/ErectionCost.py:557-564 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) wisdem/landbosse/model/ErectionCost.py:546 — wisdem/landbosse/model/ErectionCost.py:546-553 | wisdem/landbosse/model/ErectionCost.py:671-678 — 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 `wisdem/landbosse/model/ErectionCost.py:546` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) wisdem/precomp/composite_section.py:72 — wisdem/precomp/composite_section.py:72-80 | wisdem/precomp/composite_section.py:85-92 — 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) wisdem/drivetrainse/drive_structure.py:987 — wisdem/drivetrainse/drive_structure.py:987-994 | wisdem/drivetrainse/drive_structure.py:1378-1385 — 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) wisdem/glue_code/gc_WT_DataStruc.py:1538 — wisdem/glue_code/gc_WT_DataStruc.py:1538-1545 | wisdem/glue_code/gc_WT_DataStruc.py:1575-1582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×9
  • Duplicated block (6 lines × 3) wisdem/ccblade/ccblade_component.py:840 — wisdem/ccblade/ccblade_component.py:840-845 | wisdem/ccblade/ccblade_component.py:973-978 | wisdem/ccblade/ccblade_component.py:992-997 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) wisdem/drivetrainse/drive_structure.py:519 — wisdem/drivetrainse/drive_structure.py:519-524 | wisdem/drivetrainse/drive_structure.py:853-858 | wisdem/drivetrainse/drive_structure.py:1230-1235 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) wisdem/drivetrainse/drive_structure.py:838 — wisdem/drivetrainse/drive_structure.py:838-843 | wisdem/drivetrainse/drive_structure.py:1214-1219 | wisdem/drivetrainse/hub.py:503-508 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (6 lines × 3) wisdem/glue_code/gc_LoadInputs.py:437 — wisdem/glue_code/gc_LoadInputs.py:437-442 | wisdem/glue_code/gc_LoadInputs.py:456-461 | wisdem/glue_code/gc_LoadInputs.py:489-494 — 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 `wisdem/glue_code/gc_LoadInputs.py:437` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) wisdem/glue_code/gc_PoseOptimization.py:979 — wisdem/glue_code/gc_PoseOptimization.py:979-984 | wisdem/glue_code/gc_PoseOptimization.py:994-999 | wisdem/glue_code/gc_PoseOptimization.py:1108-1115 — 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 `wisdem/glue_code/gc_PoseOptimization.py:1108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 3) wisdem/glue_code/gc_WT_DataStruc.py:41 — wisdem/glue_code/gc_WT_DataStruc.py:41-46 | wisdem/glue_code/gc_WT_DataStruc.py:2067-2072 | wisdem/glue_code/gc_WT_DataStruc.py:2139-2144 — 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 `wisdem/glue_code/gc_WT_DataStruc.py:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/glue_code/gc_WT_DataStruc.py:46` calls `add_output` and `wisdem/glue_code/gc_WT_DataStruc.py:2072` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) wisdem/glue_code/gc_LoadInputs.py:569 — wisdem/glue_code/gc_LoadInputs.py:569-574 | wisdem/glue_code/gc_LoadInputs.py:621-626 | wisdem/glue_code/gc_LoadInputs.py:638-643 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 3) wisdem/precomp/properties.py:417 — wisdem/precomp/properties.py:417-422 | wisdem/precomp/properties.py:424-429 | wisdem/precomp/properties.py:430-435 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 3) wisdem/rotorse/rotor_structure.py:739 — wisdem/rotorse/rotor_structure.py:739-744 | wisdem/rotorse/rotor_structure.py:750-755 | wisdem/rotorse/rotor_structure.py:762-767 — 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, `wisdem/rotorse/rotor_structure.py:738` calls `zeros` and `wisdem/rotorse/rotor_structure.py:749` 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 (13 lines × 2) · ×8
  • Duplicated block (13 lines × 2) wisdem/commonse/utilities.py:471 — wisdem/commonse/utilities.py:471-483 | wisdem/commonse/utilities.py:589-601 — 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 (13 lines × 2) wisdem/glue_code/gc_LoadInputs.py:625 — wisdem/glue_code/gc_LoadInputs.py:625-637 | wisdem/glue_code/gc_LoadInputs.py:642-654 — 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 `wisdem/glue_code/gc_LoadInputs.py:625` 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 (13 lines × 2) wisdem/glue_code/gc_PoseOptimization.py:1142 — wisdem/glue_code/gc_PoseOptimization.py:1142-1154 | wisdem/glue_code/gc_PoseOptimization.py:1178-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 (13 lines × 2) wisdem/rotorse/rotor_elasticity.py:555 — wisdem/rotorse/rotor_elasticity.py:555-567 | wisdem/rotorse/rotor_elasticity.py:569-581 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) wisdem/rotorse/rotor_power.py:488 — wisdem/rotorse/rotor_power.py:488-500 | wisdem/rotorse/rotor_power.py:563-575 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) wisdem/rotorse/blade_cost.py:3573 — wisdem/rotorse/blade_cost.py:3573-3585 | wisdem/rotorse/blade_cost.py:3594-3606 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) wisdem/drivetrainse/drive_structure.py:19 — wisdem/drivetrainse/drive_structure.py:19-31 | wisdem/drivetrainse/layout.py:13-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) wisdem/drivetrainse/gearbox.py:230 — wisdem/drivetrainse/gearbox.py:230-242 | wisdem/drivetrainse/gearbox.py:244-256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×8
  • Duplicated block (11 lines × 2) wisdem/ccblade/Polar.py:1154 — wisdem/ccblade/Polar.py:1154-1164 | wisdem/ccblade/Polar.py:1165-1175 — 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) wisdem/ccblade/ccblade.py:277 — wisdem/ccblade/ccblade.py:277-287 | wisdem/ccblade/ccblade.py:298-308 — 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) wisdem/fixed_bottomse/monopile.py:575 — wisdem/fixed_bottomse/monopile.py:575-585 | wisdem/towerse/tower.py:348-358 — before extracting anything, compare `wisdem/fixed_bottomse/monopile.py` and `wisdem/towerse/tower.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) wisdem/floatingse/visualize.py:75 — wisdem/floatingse/visualize.py:75-85 | wisdem/floatingse/visualize.py:116-126 — 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 `wisdem/floatingse/visualize.py:75` 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) wisdem/glue_code/gc_LoadInputs.py:254 — wisdem/glue_code/gc_LoadInputs.py:254-264 | wisdem/glue_code/gc_LoadInputs.py:272-282 — 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 `wisdem/glue_code/gc_LoadInputs.py:254` 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) wisdem/glue_code/gc_WT_InitModel.py:968 — wisdem/glue_code/gc_WT_InitModel.py:968-978 | wisdem/glue_code/gc_WT_InitModel.py:1057-1067 — 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) wisdem/rotorse/rotor_power.py:469 — wisdem/rotorse/rotor_power.py:469-479 | wisdem/rotorse/rotor_power.py:545-555 — 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) wisdem/commonse/cylinder_member.py:2249 — wisdem/commonse/cylinder_member.py:2249-2259 | wisdem/commonse/cylinder_member.py:2421-2431 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/commonse/cylinder_member.py:2433` calls `add_input`, `zeros` and `wisdem/commonse/cylinder_member.py:2261` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×7
  • Duplicated block (5 lines × 3) wisdem/drivetrainse/drive_structure.py:153 — wisdem/drivetrainse/drive_structure.py:153-157 | wisdem/drivetrainse/drive_structure.py:792-796 | wisdem/drivetrainse/drive_structure.py:1179-1183 — 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) wisdem/drivetrainse/drive_structure.py:269 — wisdem/drivetrainse/drive_structure.py:269-273 | wisdem/drivetrainse/drive_structure.py:544-548 | wisdem/drivetrainse/drive_structure.py:891-895 — 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) wisdem/drivetrainse/generator_models.py:1616 — wisdem/drivetrainse/generator_models.py:1616-1620 | wisdem/drivetrainse/generator_models.py:2072-2076 | wisdem/drivetrainse/generator_models.py:3536-3540 — 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 `wisdem/drivetrainse/generator_models.py:1616` 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, `wisdem/drivetrainse/generator_models.py:2069` calls `sqrt` and `wisdem/drivetrainse/generator_models.py:1613` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) wisdem/fixed_bottomse/jacket.py:144 — wisdem/fixed_bottomse/jacket.py:144-148 | wisdem/fixed_bottomse/jacket.py:222-226 | wisdem/fixed_bottomse/jacket.py:594-598 — 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) wisdem/landbosse/model/CollectionCost.py:1283 — wisdem/landbosse/model/CollectionCost.py:1283-1287 | wisdem/landbosse/model/FoundationCost.py:1033-1039 | wisdem/landbosse/model/SitePreparationCost.py:963-968 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/landbosse/model/CollectionCost.py:1288` calls `create_layout_for_opex` and `wisdem/landbosse/model/FoundationCost.py:1040` 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 (5 lines × 3) REDACTED:12 — REDACTED:12-16 | REDACTED:19-23 | REDACTED:30-37 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 3) wisdem/commonse/wind_wave_drag.py:434 — wisdem/commonse/wind_wave_drag.py:434-438 | wisdem/commonse/wind_wave_drag.py:629-633 | wisdem/commonse/wind_wave_drag.py:846-850 — 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, `wisdem/commonse/wind_wave_drag.py:844` calls `add_input`, `ones` and `wisdem/commonse/wind_wave_drag.py:433` 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×7
  • Swallowed exception (caught, then discarded) REDACTED:375 — `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) wisdem/glue_code/gc_LoadInputs.py:332 — `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) wisdem/glue_code/gc_PoseOptimization.py:790 — `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) wisdem/commonse/utilization_api.py:203 — `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) wisdem/commonse/utilization_api.py:368 — `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) wisdem/ccblade/Polar.py:1920 — `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) wisdem/ccblade/ccblade.py:213 — `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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×6
  • Duplicated block (12 lines × 2) wisdem/drivetrainse/drive_structure.py:359 — wisdem/drivetrainse/drive_structure.py:359-370 | wisdem/drivetrainse/drive_structure.py:1005-1016 — 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 `wisdem/drivetrainse/drive_structure.py:359` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) wisdem/drivetrainse/generator_models.py:2500 — wisdem/drivetrainse/generator_models.py:2500-2511 | wisdem/drivetrainse/generator_models.py:2949-2961 — 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) wisdem/fixed_bottomse/jacket.py:448 — wisdem/fixed_bottomse/jacket.py:448-459 | wisdem/towerse/tower.py:322-333 — 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 `wisdem/fixed_bottomse/jacket.py:448` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) wisdem/postprocessing/compare_designs.py:308 — wisdem/postprocessing/compare_designs.py:308-319 | wisdem/postprocessing/compare_designs.py:329-340 — 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) wisdem/precomp/properties.py:573 — wisdem/precomp/properties.py:573-584 | wisdem/precomp/properties.py:604-615 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/precomp/properties.py:585` calls `abs` and `wisdem/precomp/properties.py:616` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) wisdem/glue_code/gc_LoadInputs.py:694 — wisdem/glue_code/gc_LoadInputs.py:694-705 | wisdem/glue_code/gc_LoadInputs.py:708-719 — 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×5
  • Members sharing a duplicated core (4 members, 50+ identical tokens) wisdem/drivetrainse/drive_components.py:152 — wisdem/drivetrainse/drive_components.py:152-160 | wisdem/drivetrainse/drive_components.py:393-404 | wisdem/drivetrainse/drive_components.py:467-474 | wisdem/drivetrainse/drive_components.py:569-594 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) wisdem/drivetrainse/drive_components.py:806 — wisdem/drivetrainse/drive_components.py:806-878 | wisdem/drivetrainse/drive_structure.py:759-813 | wisdem/drivetrainse/drive_structure.py:1148-1200 | wisdem/floatingse/floating_system.py:407-451 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) wisdem/drivetrainse/drive_structure.py:178 — wisdem/drivetrainse/drive_structure.py:178-416 | wisdem/drivetrainse/drive_structure.py:502-645 | wisdem/drivetrainse/drive_structure.py:817-1054 | wisdem/drivetrainse/drive_structure.py:1204-1442 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) wisdem/landbosse/model/CostModule.py:34 — wisdem/landbosse/model/CostModule.py:34-101 | wisdem/landbosse/model/FoundationCost.py:957-975 | wisdem/landbosse/model/GridConnectionCost.py:138-166 | wisdem/landbosse/model/SitePreparationCost.py:898-928 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) wisdem/rotorse/blade_cost.py:1023 — wisdem/rotorse/blade_cost.py:1023-1113 | wisdem/rotorse/blade_cost.py:1119-1214 | wisdem/rotorse/blade_cost.py:1220-1306 | wisdem/rotorse/blade_cost.py:1343-1472 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×5
  • Duplicated block (17 lines × 2) wisdem/ccblade/Polar.py:1437 — wisdem/ccblade/Polar.py:1437-1453 | wisdem/ccblade/Polar.py:1460-1476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) wisdem/floatingse/visualize.py:50 — wisdem/floatingse/visualize.py:50-66 | wisdem/floatingse/visualize.py:100-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) wisdem/rotorse/blade_cost.py:3054 — wisdem/rotorse/blade_cost.py:3054-3070 | wisdem/rotorse/rotor_elasticity.py:100-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/rotorse/blade_cost.py:3054` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) wisdem/rotorse/rotor_power.py:523 — wisdem/rotorse/rotor_power.py:523-539 | wisdem/rotorse/rotor_power.py:577-593 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) wisdem/rotorse/geometry_tools/distfunc.py:88 — wisdem/rotorse/geometry_tools/distfunc.py:88-104 | wisdem/rotorse/geometry_tools/distfunc.py:141-157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×5
  • Duplicated block (14 lines × 2) wisdem/commonse/cylinder_member.py:1365 — wisdem/commonse/cylinder_member.py:1365-1378 | wisdem/commonse/cylinder_member.py:1386-1399 — 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 `wisdem/commonse/cylinder_member.py:1365` 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 (14 lines × 2) wisdem/drivetrainse/generator_models.py:1004 — wisdem/drivetrainse/generator_models.py:1004-1017 | wisdem/drivetrainse/generator_models.py:1099-1112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) wisdem/drivetrainse/generator_models.py:2543 — wisdem/drivetrainse/generator_models.py:2543-2556 | wisdem/drivetrainse/generator_models.py:2993-3006 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) wisdem/glue_code/gc_WT_DataStruc.py:1291 — wisdem/glue_code/gc_WT_DataStruc.py:1291-1304 | wisdem/glue_code/gc_WT_DataStruc.py:1496-1509 — 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 `wisdem/glue_code/gc_WT_DataStruc.py:1291` 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 (14 lines × 2) wisdem/commonse/cylinder_member.py:1951 — wisdem/commonse/cylinder_member.py:1951-1964 | wisdem/commonse/cylinder_member.py:2041-2054 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×4
  • Duplicated block (15 lines × 2) wisdem/commonse/cylinder_member.py:948 — wisdem/commonse/cylinder_member.py:948-962 | wisdem/commonse/cylinder_member.py:1553-1567 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) wisdem/precomp/properties.py:230 — wisdem/precomp/properties.py:230-244 | wisdem/precomp/properties.py:331-345 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) wisdem/rotorse/geometry_tools/distfunc.py:67 — wisdem/rotorse/geometry_tools/distfunc.py:67-81 | wisdem/rotorse/geometry_tools/distfunc.py:120-134 — 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 (15 lines × 2) wisdem/commonse/cylinder_member.py:1923 — wisdem/commonse/cylinder_member.py:1923-1937 | wisdem/commonse/cylinder_member.py:2008-2022 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/commonse/cylinder_member.py:2023` calls `interp` and `wisdem/commonse/cylinder_member.py:1938` 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 (20 lines × 2) · ×4
  • Duplicated block (20 lines × 2) wisdem/fixed_bottomse/monopile.py:503 — wisdem/fixed_bottomse/monopile.py:503-522 | wisdem/towerse/tower.py:296-315 — before extracting anything, compare `wisdem/fixed_bottomse/monopile.py` and `wisdem/towerse/tower.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (20 lines × 2) wisdem/ccblade/ccblade_component.py:114 — wisdem/ccblade/ccblade_component.py:114-133 | wisdem/ccblade/ccblade_component.py:644-663 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `wisdem/ccblade/ccblade_component.py:643` calls `add_input`, `zeros` and `wisdem/ccblade/ccblade_component.py:113` 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 (20 lines × 2) wisdem/glue_code/gc_PoseOptimization.py:430 — wisdem/glue_code/gc_PoseOptimization.py:430-449 | wisdem/glue_code/gc_PoseOptimization.py:452-471 — 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 `wisdem/glue_code/gc_PoseOptimization.py:430` 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 (20 lines × 2) wisdem/commonse/cylinder_member.py:53 — wisdem/commonse/cylinder_member.py:53-72 | wisdem/commonse/wind_wave_drag.py:102-121 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×4
  • Duplicated block (10–11 lines × 2) wisdem/glue_code/gc_WT_InitModel.py:217 — wisdem/glue_code/gc_WT_InitModel.py:217-227 | wisdem/glue_code/gc_WT_InitModel.py:325-334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) wisdem/glue_code/gc_WT_InitModel.py:1281 — wisdem/glue_code/gc_WT_InitModel.py:1281-1290 | wisdem/glue_code/gc_WT_InitModel.py:1296-1306 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) wisdem/main.py:18 — wisdem/main.py:18-28 | wisdem/main.py:52-61 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) wisdem/postprocessing/compare_designs.py:86 — wisdem/postprocessing/compare_designs.py:86-96 | wisdem/postprocessing/compare_designs.py:135-144 — 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 `wisdem/postprocessing/compare_designs.py:86` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×4
  • Duplicated block (10 lines × 2) wisdem/commonse/cylinder_member.py:1306 — wisdem/commonse/cylinder_member.py:1306-1315 | wisdem/commonse/cylinder_member.py:2124-2133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) wisdem/drivetrainse/generator_models.py:831 — wisdem/drivetrainse/generator_models.py:831-840 | wisdem/drivetrainse/generator_models.py:1375-1384 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) wisdem/drivetrainse/generator_models.py:2361 — wisdem/drivetrainse/generator_models.py:2361-2370 | wisdem/drivetrainse/generator_models.py:2779-2790 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) wisdem/fixed_bottomse/monopile.py:792 — wisdem/fixed_bottomse/monopile.py:792-801 | wisdem/towerse/tower.py:516-526 — before extracting anything, compare `wisdem/fixed_bottomse/monopile.py` and `wisdem/towerse/tower.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/fixed_bottomse/monopile.py:792` 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 (8–9 lines × 2) · ×4
  • Duplicated block (8–9 lines × 2) wisdem/ccblade/ccblade.py:1495 — wisdem/ccblade/ccblade.py:1495-1503 | wisdem/ccblade/ccblade.py:1520-1527 — 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–9 lines × 2) wisdem/fixed_bottomse/jacket.py:223 — wisdem/fixed_bottomse/jacket.py:223-230 | wisdem/fixed_bottomse/jacket.py:595-603 — 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–9 lines × 2) wisdem/floatingse/floating_system.py:485 — wisdem/floatingse/floating_system.py:485-493 | wisdem/floatingse/floating_system.py:528-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8–9 lines × 2) wisdem/glue_code/glue_code.py:602 — wisdem/glue_code/glue_code.py:602-610 | wisdem/glue_code/glue_code.py:669-676 — 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 × 5) · ×4
  • Duplicated block (5 lines × 5) wisdem/drivetrainse/generator_models.py:1255 — wisdem/drivetrainse/generator_models.py:1255-1259 | wisdem/drivetrainse/generator_models.py:1769-1773 | wisdem/drivetrainse/hub.py:246-251 | wisdem/drivetrainse/hub.py:401-406 | wisdem/fixed_bottomse/monopile.py:138-142 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (5 lines × 5) wisdem/drivetrainse/generator_models.py:1254 — wisdem/drivetrainse/generator_models.py:1254-1258 | wisdem/drivetrainse/generator_models.py:1768-1772 | wisdem/drivetrainse/hub.py:245-250 | wisdem/drivetrainse/hub.py:400-405 | wisdem/towerse/tower.py:40-44 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (5 lines × 5) wisdem/drivetrainse/generator_models.py:1629 — wisdem/drivetrainse/generator_models.py:1629-1633 | wisdem/drivetrainse/generator_models.py:2031-2035 | wisdem/drivetrainse/generator_models.py:2102-2106 | wisdem/drivetrainse/generator_models.py:3499-3503 | wisdem/drivetrainse/generator_models.py:3554-3558 — 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.
  • Duplicated block (5 lines × 5) wisdem/drivetrainse/drive_components.py:811 — wisdem/drivetrainse/drive_components.py:811-815 | wisdem/drivetrainse/drive_components.py:848-852 | wisdem/drivetrainse/drive_structure.py:777-781 | wisdem/drivetrainse/drive_structure.py:1161-1165 | wisdem/floatingse/floating_system.py:411-415 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/drivetrainse/drive_components.py:853` calls `add_input`, `zeros` and `wisdem/drivetrainse/drive_components.py:816` 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.
X3 · Exception handling · Swallowed exception (empty catch) · ×4
  • Swallowed exception (empty catch) wisdem/rotorse/geometry_tools/geom_tools.py:70 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) wisdem/postprocessing/compare_designs.py:697 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) wisdem/floatingse/floating_frame.py:517 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:177 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×3
  • Edited copy of a member (25 corresponding lines) wisdem/glue_code/gc_WT_DataStruc.py:2575 — wisdem/glue_code/gc_WT_DataStruc.py:2575-2609 | wisdem/glue_code/gc_WT_DataStruc.py:2617-2641 — 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) wisdem/rotorse/geometry_tools/geom_tools.py:130 — wisdem/rotorse/geometry_tools/geom_tools.py:130-154 | wisdem/rotorse/geometry_tools/geom_tools.py:214-240 — 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) wisdem/commonse/frustum.py:263 — wisdem/commonse/frustum.py:263-288 | wisdem/commonse/frustum.py:291-315 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×3
  • Edited copy of a member (11 corresponding lines) wisdem/drivetrainse/gearbox.py:36 — wisdem/drivetrainse/gearbox.py:36-47 | wisdem/drivetrainse/gearbox.py:55-65 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) wisdem/inputs/validation.py:252 — wisdem/inputs/validation.py:252-263 | wisdem/inputs/validation.py:267-277 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) wisdem/inputs/validation.py:113 — wisdem/inputs/validation.py:113-123 | wisdem/inputs/validation.py:127-137 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×3
  • Duplicated block (25 lines × 2) wisdem/landbosse/model/GridConnectionCost.py:106 — wisdem/landbosse/model/GridConnectionCost.py:106-130 | wisdem/landbosse/model/SubstationCost.py:94-118 — before extracting anything, compare `wisdem/landbosse/model/GridConnectionCost.py` and `wisdem/landbosse/model/SubstationCost.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (25 lines × 2) wisdem/rotorse/blade_cost.py:1035 — wisdem/rotorse/blade_cost.py:1035-1059 | wisdem/rotorse/blade_cost.py:1232-1256 — 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 (25 lines × 2) wisdem/wombat/wombat_api.py:203 — wisdem/wombat/wombat_api.py:203-227 | wisdem/wombat/wombat_api.py:310-334 — 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 `wisdem/wombat/wombat_api.py:203` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/wombat/wombat_api.py:227` calls `add_input` and `wisdem/wombat/wombat_api.py:334` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×3
  • Duplicated block (16 lines × 2) wisdem/commonse/utilities.py:570 — wisdem/commonse/utilities.py:570-585 | wisdem/rotorse/geometry_tools/cubicspline.py:19-34 — 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 (16 lines × 2) wisdem/drivetrainse/generator_models.py:1022 — wisdem/drivetrainse/generator_models.py:1022-1037 | wisdem/drivetrainse/generator_models.py:1122-1137 — 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) wisdem/glue_code/gc_PoseOptimization.py:1074 — wisdem/glue_code/gc_PoseOptimization.py:1074-1089 | wisdem/glue_code/gc_PoseOptimization.py:1130-1145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×3
  • Duplicated block (9 lines × 5) wisdem/ccblade/ccblade_component.py:216 — wisdem/ccblade/ccblade_component.py:216-224 | wisdem/ccblade/ccblade_component.py:450-458 | wisdem/ccblade/ccblade_component.py:709-717 | wisdem/ccblade/ccblade_component.py:787-795 | wisdem/rotorse/rotor_power.py:328-336 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (9 lines × 5) wisdem/ccblade/ccblade_component.py:335 — wisdem/ccblade/ccblade_component.py:335-345 | wisdem/rotorse/rotor_elasticity.py:46-54 | wisdem/rotorse/rotor_power.py:191-199 | wisdem/rotorse/rotor_structure.py:181-193 | wisdem/rotorse/rotor_structure.py:218-226 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/ccblade/ccblade_component.py:335` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 5) wisdem/fixed_bottomse/monopile.py:989 — wisdem/fixed_bottomse/monopile.py:989-997 | wisdem/glue_code/glue_code.py:159-168 | wisdem/rotorse/blade_cost.py:3988-3997 | wisdem/rotorse/blade_cost.py:4015-4024 | wisdem/rotorse/rotor.py:200-208 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/fixed_bottomse/monopile.py:989` 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–7 lines × 2) · ×3
  • Duplicated block (6–7 lines × 2) wisdem/glue_code/gc_LoadInputs.py:617 — wisdem/glue_code/gc_LoadInputs.py:617-623 | wisdem/glue_code/gc_LoadInputs.py:635-640 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6–7 lines × 2) wisdem/glue_code/gc_LoadInputs.py:971 — wisdem/glue_code/gc_LoadInputs.py:971-977 | wisdem/glue_code/gc_LoadInputs.py:1282-1287 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6–7 lines × 2) wisdem/glue_code/gc_LoadInputs.py:1289 — wisdem/glue_code/gc_LoadInputs.py:1289-1294 | wisdem/glue_code/gc_LoadInputs.py:1345-1351 — 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 `wisdem/glue_code/gc_LoadInputs.py:1289` 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 × 4) · ×3
  • Duplicated block (5 lines × 4) wisdem/ccblade/ccblade_component.py:826 — wisdem/ccblade/ccblade_component.py:826-830 | wisdem/ccblade/ccblade_component.py:959-963 | wisdem/ccblade/ccblade_component.py:978-982 | wisdem/ccblade/ccblade_component.py:1111-1115 — 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.
  • Duplicated block (5 lines × 4) wisdem/drivetrainse/generator.py:282 — wisdem/drivetrainse/generator.py:282-287 | wisdem/drivetrainse/generator_models.py:1254-1258 | wisdem/drivetrainse/generator_models.py:1768-1772 | wisdem/drivetrainse/hub.py:245-250 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (5 lines × 4) wisdem/drivetrainse/generator_models.py:1613 — wisdem/drivetrainse/generator_models.py:1613-1617 | wisdem/drivetrainse/generator_models.py:2010-2014 | wisdem/drivetrainse/generator_models.py:3482-3486 | wisdem/drivetrainse/generator_models.py:3533-3537 — 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 `wisdem/drivetrainse/generator_models.py:1613` 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.
D35 · Change Coupling · Change coupling · ×2
  • Change coupling: drive_structure.py ↔ layout.py wisdem/drivetrainse/drive_structure.py:1 — `wisdem/drivetrainse/drive_structure.py` and `wisdem/drivetrainse/layout.py` change together 54% of the time (25 of the 46 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 25 shared commits counted here, the most recent 3 are `69b53dcf` Revert "leaving numpy<2 behind and trying to fix RTD errors"; `dd5aabe4` leaving numpy<2 behind and trying to fix RTD errors; `48e56828` accommodate last of numpy v1 installations too — run `git show` on any of them.
  • Change coupling: gc_RunTools.py ↔ runWISDEM.py wisdem/glue_code/gc_RunTools.py:1 — `wisdem/glue_code/gc_RunTools.py` and `wisdem/glue_code/runWISDEM.py` change together 52% of the time (14 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `8db25c96` reduce messages on screen; `f22f87cd` fix bugs when calling OF; `4c3e6ec2` tests passing warnings addressed — run `git show` on any of them.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×2
  • Edited copy of a member (10 corresponding lines) wisdem/drivetrainse/generator_models.py:1252 — wisdem/drivetrainse/generator_models.py:1252-1261 | wisdem/drivetrainse/generator_models.py:1766-1775 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) wisdem/commonse/environment.py:161 — wisdem/commonse/environment.py:161-170 | wisdem/commonse/environment.py:264-274 — 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 · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (5 members, 50+ identical tokens) wisdem/drivetrainse/drive_structure.py:502 — wisdem/drivetrainse/drive_structure.py:502-645 | wisdem/drivetrainse/drive_structure.py:817-1054 | wisdem/drivetrainse/drive_structure.py:1204-1442 | wisdem/drivetrainse/layout.py:256-442 | wisdem/drivetrainse/layout.py:514-629 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) wisdem/fixed_bottomse/jacket.py:222 — wisdem/fixed_bottomse/jacket.py:222-541 | wisdem/fixed_bottomse/monopile.py:391-715 | wisdem/floatingse/floating_frame.py:161-304 | wisdem/floatingse/floating_frame.py:394-518 | wisdem/towerse/tower.py:266-439 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×2
  • Edited copy of a member (30 corresponding lines) wisdem/rotorse/blade_cost.py:1921 — wisdem/rotorse/blade_cost.py:1921-1952 | wisdem/rotorse/blade_cost.py:2132-2161 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) wisdem/landbosse/model/GridConnectionCost.py:106 — wisdem/landbosse/model/GridConnectionCost.py:106-135 | wisdem/landbosse/model/SubstationCost.py:94-123 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×2
  • Edited copy of a member (13 corresponding lines) wisdem/drivetrainse/generator_models.py:2224 — wisdem/drivetrainse/generator_models.py:2224-2236 | wisdem/drivetrainse/generator_models.py:2642-2654 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) wisdem/rotorse/blade_cost.py:2009 — wisdem/rotorse/blade_cost.py:2009-2021 | wisdem/rotorse/blade_cost.py:2087-2099 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 28+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 28+ corresponding lines) wisdem/landbosse/model/GridConnectionCost.py:169 — wisdem/landbosse/model/GridConnectionCost.py:169-196 | wisdem/landbosse/model/SubstationCost.py:127-156 | wisdem/landbosse/model/TurbineCost.py:107-135 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 28+ corresponding lines) wisdem/commonse/frustum.py:475 — wisdem/commonse/frustum.py:475-502 | wisdem/commonse/frustum.py:536-563 | wisdem/commonse/frustum.py:566-593 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 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 (5 corresponding lines) · ×2
  • Edited copy of a member (5 corresponding lines) wisdem/rotorse/blade_cost.py:1999 — wisdem/rotorse/blade_cost.py:1999-2003 | wisdem/rotorse/blade_cost.py:2077-2081 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) wisdem/commonse/utilization_constraints.py:177 — wisdem/commonse/utilization_constraints.py:177-188 | wisdem/commonse/utilization_dnvgl.py:272-276 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×2
  • Duplicated block (27 lines × 2) wisdem/glue_code/gc_PoseOptimization.py:834 — wisdem/glue_code/gc_PoseOptimization.py:834-860 | wisdem/glue_code/gc_PoseOptimization.py:1278-1304 — 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 (27 lines × 2) wisdem/postprocessing/compare_designs.py:179 — wisdem/postprocessing/compare_designs.py:179-205 | wisdem/postprocessing/compare_designs.py:212-238 — 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 (23–26 lines × 3) · ×2
  • Duplicated block (23–26 lines × 3) wisdem/fixed_bottomse/jacket.py:498 — wisdem/fixed_bottomse/jacket.py:498-520 | wisdem/fixed_bottomse/monopile.py:617-642 | wisdem/towerse/tower.py:374-398 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (23–26 lines × 3) wisdem/glue_code/gc_WT_InitModel.py:1201 — wisdem/glue_code/gc_WT_InitModel.py:1201-1226 | wisdem/glue_code/gc_WT_InitModel.py:1227-1249 | wisdem/glue_code/gc_WT_InitModel.py:1252-1277 — 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 `wisdem/glue_code/gc_WT_InitModel.py:1227` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) wisdem/ccblade/ccblade_component.py:465 — wisdem/ccblade/ccblade_component.py:465-485 | wisdem/rotorse/rotor_power.py:342-362 — 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 `wisdem/ccblade/ccblade_component.py:465` 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, `wisdem/ccblade/ccblade_component.py:464` calls `zeros_like` and `wisdem/rotorse/rotor_power.py:341` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (21 lines × 2) wisdem/commonse/cylinder_member.py:1897 — wisdem/commonse/cylinder_member.py:1897-1917 | wisdem/commonse/cylinder_member.py:1980-2000 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/commonse/cylinder_member.py:2001` calls `interp` and `wisdem/commonse/cylinder_member.py:1918` 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 (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) wisdem/glue_code/gc_WT_DataStruc.py:1269 — wisdem/glue_code/gc_WT_DataStruc.py:1269-1287 | wisdem/glue_code/gc_WT_DataStruc.py:1470-1488 — 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 `wisdem/glue_code/gc_WT_DataStruc.py:1269` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) wisdem/landbosse/model/ErectionCost.py:246 — wisdem/landbosse/model/ErectionCost.py:246-264 | wisdem/landbosse/model/FoundationCost.py:914-935 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (16–18 lines × 5) · ×2
  • Duplicated block (16–18 lines × 5) wisdem/glue_code/gc_WT_DataStruc.py:839 — wisdem/glue_code/gc_WT_DataStruc.py:839-854 | wisdem/glue_code/gc_WT_DataStruc.py:2989-3004 | wisdem/rotorse/parametrize_rotor.py:81-96 | wisdem/rotorse/rotor_elasticity.py:219-236 | wisdem/rotorse/rotor_elasticity.py:1340-1357 — before extracting anything, compare `wisdem/glue_code/gc_WT_DataStruc.py` and `wisdem/rotorse/parametrize_rotor.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:839` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16–18 lines × 5) wisdem/glue_code/gc_WT_DataStruc.py:916 — wisdem/glue_code/gc_WT_DataStruc.py:916-933 | wisdem/rotorse/rotor_elasticity.py:233-248 | wisdem/rotorse/rotor_elasticity.py:1354-1369 | wisdem/rotorse/rotor_structure.py:616-633 | wisdem/rotorse/rotor_structure.py:911-926 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:916` 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, `wisdem/rotorse/rotor_structure.py:905` calls `add_discrete_input` and `wisdem/rotorse/rotor_elasticity.py:229` 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 (14–16 lines × 2) · ×2
  • Duplicated block (14–16 lines × 2) wisdem/commonse/utilities.py:454 — wisdem/commonse/utilities.py:454-469 | wisdem/commonse/utilities.py:555-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14–16 lines × 2) wisdem/glue_code/gc_WT_DataStruc.py:2756 — wisdem/glue_code/gc_WT_DataStruc.py:2756-2771 | wisdem/rotorse/blade_cost.py:3063-3076 — 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 `wisdem/glue_code/gc_WT_DataStruc.py:2756` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) wisdem/landbosse/model/FoundationCost.py:961 — wisdem/landbosse/model/FoundationCost.py:961-972 | wisdem/landbosse/model/GridConnectionCost.py:152-163 | wisdem/landbosse/model/SitePreparationCost.py:913-924 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 3) wisdem/landbosse/model/CollectionCost.py:701 — wisdem/landbosse/model/CollectionCost.py:701-712 | wisdem/landbosse/model/FoundationCost.py:608-638 | wisdem/landbosse/model/SitePreparationCost.py:437-452 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (8–11 lines × 2) · ×2
  • Duplicated block (8–11 lines × 2) wisdem/drivetrainse/generator_models.py:2398 — wisdem/drivetrainse/generator_models.py:2398-2408 | wisdem/drivetrainse/generator_models.py:2829-2836 — 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–11 lines × 2) wisdem/landbosse/model/CollectionCost.py:806 — wisdem/landbosse/model/CollectionCost.py:806-816 | wisdem/landbosse/model/SitePreparationCost.py:405-412 — 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 (10 lines × 4) · ×2
  • Duplicated block (10 lines × 4) wisdem/drivetrainse/generator_models.py:1271 — wisdem/drivetrainse/generator_models.py:1271-1280 | wisdem/drivetrainse/generator_models.py:1789-1798 | wisdem/drivetrainse/generator_models.py:3137-3146 | wisdem/fixed_bottomse/jacket.py:604-613 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. 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 × 4) wisdem/rotorse/blade_cost.py:1090 — wisdem/rotorse/blade_cost.py:1090-1099 | wisdem/rotorse/blade_cost.py:1191-1200 | wisdem/rotorse/blade_cost.py:1283-1292 | wisdem/rotorse/blade_cost.py:1453-1462 — 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 (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) wisdem/postprocessing/compare_designs.py:288 — wisdem/postprocessing/compare_designs.py:288-296 | wisdem/postprocessing/compare_designs.py:313-321 | wisdem/postprocessing/compare_designs.py:334-342 — 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 `wisdem/postprocessing/compare_designs.py:288` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) wisdem/drivetrainse/drive_structure.py:367 — wisdem/drivetrainse/drive_structure.py:367-375 | wisdem/drivetrainse/drive_structure.py:620-628 | wisdem/drivetrainse/drive_structure.py:1013-1021 — 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–8 lines × 3) · ×2
  • Duplicated block (7–8 lines × 3) wisdem/fixed_bottomse/monopile.py:576 — wisdem/fixed_bottomse/monopile.py:576-583 | wisdem/rotorse/rotor_structure.py:469-475 | wisdem/towerse/tower.py:349-356 — before extracting anything, compare `wisdem/fixed_bottomse/monopile.py` and `wisdem/towerse/tower.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7–8 lines × 3) wisdem/fixed_bottomse/monopile.py:657 — wisdem/fixed_bottomse/monopile.py:657-663 | wisdem/floatingse/floating_frame.py:509-516 | wisdem/towerse/tower.py:404-410 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/fixed_bottomse/monopile.py:657` 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 (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) wisdem/glue_code/gc_LoadInputs.py:266 — wisdem/glue_code/gc_LoadInputs.py:266-273 | wisdem/glue_code/gc_WT_InitModel.py:971-978 | wisdem/glue_code/gc_WT_InitModel.py:1060-1067 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (8 lines × 3) wisdem/glue_code/gc_WT_DataStruc.py:128 — wisdem/glue_code/gc_WT_DataStruc.py:128-136 | wisdem/glue_code/gc_WT_DataStruc.py:2072-2079 | wisdem/glue_code/gc_WT_DataStruc.py:2144-2151 — 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 (6–8 lines × 2) · ×2
  • Duplicated block (6–8 lines × 2) wisdem/glue_code/gc_LoadInputs.py:434 — wisdem/glue_code/gc_LoadInputs.py:434-441 | wisdem/glue_code/gc_LoadInputs.py:488-493 — 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 `wisdem/glue_code/gc_LoadInputs.py:434` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6–8 lines × 2) wisdem/glue_code/gc_WT_DataStruc.py:1606 — wisdem/glue_code/gc_WT_DataStruc.py:1606-1613 | wisdem/glue_code/gc_WT_DataStruc.py:1616-1621 — 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 `wisdem/glue_code/gc_WT_DataStruc.py:1606` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×2
  • Duplicated block (7 lines × 4) wisdem/ccblade/ccblade_component.py:187 — wisdem/ccblade/ccblade_component.py:187-193 | wisdem/ccblade/ccblade_component.py:679-685 | wisdem/ccblade/ccblade_component.py:757-763 | wisdem/rotorse/blade_cost.py:3334-3341 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 4) wisdem/drivetrainse/drive_structure.py:858 — wisdem/drivetrainse/drive_structure.py:858-865 | wisdem/drivetrainse/drive_structure.py:1239-1246 | wisdem/drivetrainse/layout.py:267-273 | wisdem/drivetrainse/layout.py:527-534 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `wisdem/drivetrainse/layout.py:525` calls `deg2rad` and `wisdem/drivetrainse/layout.py:266` 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 × 3) · ×2
  • Duplicated block (7 lines × 3) wisdem/fixed_bottomse/monopile.py:454 — wisdem/fixed_bottomse/monopile.py:454-460 | wisdem/floatingse/floating_frame.py:408-419 | wisdem/towerse/tower.py:281-287 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (7 lines × 3) wisdem/rotorse/blade_cost.py:1894 — wisdem/rotorse/blade_cost.py:1894-1900 | wisdem/rotorse/blade_cost.py:2105-2111 | wisdem/rotorse/blade_cost.py:2167-2173 — 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 (4–7 lines × 3) · ×2
  • Duplicated block (4–7 lines × 3) wisdem/fixed_bottomse/monopile.py:336 — wisdem/fixed_bottomse/monopile.py:336-342 | wisdem/floatingse/floating_frame.py:382-385 | wisdem/towerse/tower.py:240-246 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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, `wisdem/towerse/tower.py:246` calls `add_output` and `wisdem/floatingse/floating_frame.py:385` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (4–7 lines × 3) wisdem/fixed_bottomse/jacket.py:258 — wisdem/fixed_bottomse/jacket.py:258-261 | wisdem/floatingse/floating_frame.py:394-400 | wisdem/towerse/tower.py:267-273 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×2
  • Duplicated block (6 lines × 5) wisdem/rotorse/blade_cost.py:2541 — wisdem/rotorse/blade_cost.py:2541-2546 | wisdem/rotorse/blade_cost.py:2558-2563 | wisdem/rotorse/blade_cost.py:2567-2572 | wisdem/rotorse/blade_cost.py:2587-2592 | wisdem/rotorse/blade_cost.py:2596-2601 — 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.
  • Duplicated block (6 lines × 5) wisdem/glue_code/gc_LoadInputs.py:872 — wisdem/glue_code/gc_LoadInputs.py:872-877 | wisdem/glue_code/gc_LoadInputs.py:891-896 | wisdem/glue_code/gc_LoadInputs.py:916-921 | wisdem/glue_code/gc_LoadInputs.py:1270-1275 | wisdem/glue_code/gc_LoadInputs.py:1328-1333 — 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 (6 lines × 4) · ×2
  • Duplicated block (6 lines × 4) wisdem/drivetrainse/drive_components.py:153 — wisdem/drivetrainse/drive_components.py:153-158 | wisdem/drivetrainse/drive_components.py:394-399 | wisdem/drivetrainse/drive_components.py:467-472 | wisdem/drivetrainse/drive_components.py:578-583 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/drivetrainse/drive_components.py:400` calls `add_output`, `zeros` and `wisdem/drivetrainse/drive_components.py:159` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 4) wisdem/ccblade/ccblade_component.py:838 — wisdem/ccblade/ccblade_component.py:838-843 | wisdem/ccblade/ccblade_component.py:971-976 | wisdem/ccblade/ccblade_component.py:990-995 | wisdem/ccblade/ccblade_component.py:1123-1128 — 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.
D1 · Cyclomatic Complexity · PoseOptimization.set_constraints (cyclomatic 112) · ×1
  • PoseOptimization.set_constraints (cyclomatic 112) wisdem/glue_code/gc_PoseOptimization.py:872 — PoseOptimization.set_constraints has cyclomatic complexity 112 (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 · WombatWisdem.compile_inputs (cyclomatic 102) · ×1
  • WombatWisdem.compile_inputs (cyclomatic 102) wisdem/wombat/wombat_api.py:679 — WombatWisdem.compile_inputs has cyclomatic complexity 102 (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 · WindTurbineOntologyPython.update_ontology (cyclomatic 91) · ×1
  • WindTurbineOntologyPython.update_ontology (cyclomatic 91) wisdem/glue_code/gc_LoadInputs.py:822 — WindTurbineOntologyPython.update_ontology has cyclomatic complexity 91 (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 · PoseOptimization.set_design_variables (cyclomatic 82) · ×1
  • PoseOptimization.set_design_variables (cyclomatic 82) wisdem/glue_code/gc_PoseOptimization.py:413 — PoseOptimization.set_design_variables has cyclomatic complexity 82 (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 · WT_RNTA.setup (cyclomatic 74) · ×1
  • WT_RNTA.setup (cyclomatic 74) wisdem/glue_code/glue_code.py:84 — WT_RNTA.setup has cyclomatic complexity 74 (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 · properties.properties (cyclomatic 72) · ×1
  • properties.properties (cyclomatic 72) wisdem/precomp/properties.py:5 — properties.properties has cyclomatic complexity 72 (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 · gc_WT_InitModel.assign_blade_structural_layers_values (cyclomatic 69) · ×1
  • gc_WT_InitModel.assign_blade_structural_layers_values (cyclomatic 69) wisdem/glue_code/gc_WT_InitModel.py:320 — gc_WT_InitModel.assign_blade_structural_layers_values has cyclomatic complexity 69 (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 · BladeCost.compute (cyclomatic 61) · ×1
  • BladeCost.compute (cyclomatic 61) wisdem/rotorse/blade_cost.py:3315 — BladeCost.compute has cyclomatic complexity 61 (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 · WindTurbineOntologyPython.set_openmdao_vectors (cyclomatic 47) · ×1
  • WindTurbineOntologyPython.set_openmdao_vectors (cyclomatic 47) wisdem/glue_code/gc_LoadInputs.py:129 — WindTurbineOntologyPython.set_openmdao_vectors has cyclomatic complexity 47 (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 · gc_WT_InitModel.assign_floating_values (cyclomatic 46) · ×1
  • gc_WT_InitModel.assign_floating_values (cyclomatic 46) wisdem/glue_code/gc_WT_InitModel.py:1131 — gc_WT_InitModel.assign_floating_values has cyclomatic complexity 46 (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 · RunPreComp.compute (cyclomatic 46) · ×1
  • RunPreComp.compute (cyclomatic 46) wisdem/rotorse/rotor_elasticity.py:295 — RunPreComp.compute has cyclomatic complexity 46 (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 · WindTurbineOntologyPython.set_opt_flags (cyclomatic 42) · ×1
  • WindTurbineOntologyPython.set_opt_flags (cyclomatic 42) wisdem/glue_code/gc_LoadInputs.py:661 — WindTurbineOntologyPython.set_opt_flags has cyclomatic complexity 42 (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 · ComputePowerCurve.compute (cyclomatic 42) · ×1
  • ComputePowerCurve.compute (cyclomatic 42) wisdem/rotorse/rotor_power.py:287 — ComputePowerCurve.compute has cyclomatic complexity 42 (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 · NLoptDriver.run (cyclomatic 38) · ×1
  • NLoptDriver.run (cyclomatic 38) wisdem/optimization_drivers/nlopt_driver.py:219 — NLoptDriver.run has cyclomatic complexity 38 (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 · compare_designs.create_all_plots (cyclomatic 38) · ×1
  • compare_designs.create_all_plots (cyclomatic 38) wisdem/postprocessing/compare_designs.py:37 — compare_designs.create_all_plots has cyclomatic complexity 38 (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 · gc_WT_InitModel.assign_drivetrain_values (cyclomatic 35) · ×1
  • gc_WT_InitModel.assign_drivetrain_values (cyclomatic 35) wisdem/glue_code/gc_WT_InitModel.py:727 — gc_WT_InitModel.assign_drivetrain_values has cyclomatic complexity 35 (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 · PoseOptimization.set_driver (cyclomatic 30) · ×1
  • PoseOptimization.set_driver (cyclomatic 30) wisdem/glue_code/gc_PoseOptimization.py:97 — PoseOptimization.set_driver 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 · PoseOptimization.set_merit_figure (cyclomatic 27) · ×1
  • PoseOptimization.set_merit_figure (cyclomatic 27) wisdem/glue_code/gc_PoseOptimization.py:326 — PoseOptimization.set_merit_figure has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WindTurbineOntologyPython.set_run_flags (cyclomatic 26) · ×1
  • WindTurbineOntologyPython.set_run_flags (cyclomatic 26) wisdem/glue_code/gc_LoadInputs.py:22 — WindTurbineOntologyPython.set_run_flags has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindPark.setup (cyclomatic 26) · ×1
  • WindPark.setup (cyclomatic 26) wisdem/glue_code/glue_code.py:951 — WindPark.setup has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WindTurbineOntologyOpenMDAO.setup (cyclomatic 25) · ×1
  • WindTurbineOntologyOpenMDAO.setup (cyclomatic 25) wisdem/glue_code/gc_WT_DataStruc.py:24 — WindTurbineOntologyOpenMDAO.setup has cyclomatic complexity 25 (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 · gc_WT_InitModel.assign_material_values (cyclomatic 25) · ×1
  • gc_WT_InitModel.assign_material_values (cyclomatic 25) wisdem/glue_code/gc_WT_InitModel.py:1760 — gc_WT_InitModel.assign_material_values 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 · polar_file.loadPolarFile (cyclomatic 24) · ×1
  • polar_file.loadPolarFile (cyclomatic 24) wisdem/ccblade/polar_file.py:171 — polar_file.loadPolarFile has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiscretizationYAML.compute (cyclomatic 24) · ×1
  • DiscretizationYAML.compute (cyclomatic 24) wisdem/commonse/cylinder_member.py:357 — DiscretizationYAML.compute has cyclomatic complexity 24 (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 · Compute_Blade_Structure.compute (cyclomatic 24) · ×1
  • Compute_Blade_Structure.compute (cyclomatic 24) wisdem/glue_code/gc_WT_DataStruc.py:1528 — Compute_Blade_Structure.compute has cyclomatic complexity 24 (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 · generator_models.winding_factor (cyclomatic 23) · ×1
  • generator_models.winding_factor (cyclomatic 23) wisdem/drivetrainse/generator_models.py:79 — generator_models.winding_factor 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 · runWISDEM.run_wisdem (cyclomatic 23) · ×1
  • runWISDEM.run_wisdem (cyclomatic 23) wisdem/glue_code/runWISDEM.py:26 — runWISDEM.run_wisdem has cyclomatic complexity 23 (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 · Polar._find_slope (cyclomatic 22) · ×1
  • Polar._find_slope (cyclomatic 22) wisdem/ccblade/Polar.py:1628 — Polar._find_slope 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 · MemberComplex.add_main_sections (cyclomatic 22) · ×1
  • MemberComplex.add_main_sections (cyclomatic 22) wisdem/commonse/cylinder_member.py:1303 — MemberComplex.add_main_sections has cyclomatic complexity 22 (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 · utilities.get_xyz_mode_shapes (cyclomatic 22) · ×1
  • utilities.get_xyz_mode_shapes (cyclomatic 22) wisdem/commonse/utilities.py:61 — utilities.get_xyz_mode_shapes 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 · gc_WT_InitModel.yaml2openmdao (cyclomatic 22) · ×1
  • gc_WT_InitModel.yaml2openmdao (cyclomatic 22) wisdem/glue_code/gc_WT_InitModel.py:12 — gc_WT_InitModel.yaml2openmdao has cyclomatic complexity 22 (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 · Convergence_Trends_Opt.compute (cyclomatic 21) · ×1
  • Convergence_Trends_Opt.compute (cyclomatic 21) wisdem/glue_code/gc_RunTools.py:16 — Convergence_Trends_Opt.compute has cyclomatic complexity 21 (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 · Floating.setup (cyclomatic 21) · ×1
  • Floating.setup (cyclomatic 21) wisdem/glue_code/gc_WT_DataStruc.py:2159 — Floating.setup 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 · NSGA2.update_data_external (cyclomatic 21) · ×1
  • NSGA2.update_data_external (cyclomatic 21) wisdem/optimization_drivers/nsga2/algo_nsga2.py:157 — NSGA2.update_data_external 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 · MemberComplex.add_bulkhead_sections (cyclomatic 20) · ×1
  • MemberComplex.add_bulkhead_sections (cyclomatic 20) wisdem/commonse/cylinder_member.py:1569 — MemberComplex.add_bulkhead_sections has cyclomatic complexity 20 (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 · PPI.__init__ (cyclomatic 20) · ×1
  • PPI.__init__ (cyclomatic 20) wisdem/nrelcsm/csmPPI.py:508 — PPI.__init__ has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fast_nondom_sort.fast_nondom_sort_ranks_python (cyclomatic 20) · ×1
  • fast_nondom_sort.fast_nondom_sort_ranks_python (cyclomatic 20) wisdem/optimization_drivers/nsga2/fast_nondom_sort.py:11 — fast_nondom_sort.fast_nondom_sort_ranks_python has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Place_Webs_Caps.compute (cyclomatic 19) · ×1
  • Place_Webs_Caps.compute (cyclomatic 19) wisdem/glue_code/gc_WT_DataStruc.py:1321 — Place_Webs_Caps.compute 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 · gc_WT_InitModel.assign_mooring_values (cyclomatic 19) · ×1
  • gc_WT_InitModel.assign_mooring_values (cyclomatic 19) wisdem/glue_code/gc_WT_InitModel.py:1377 — gc_WT_InitModel.assign_mooring_values 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 · schema2rst.get_type_string (cyclomatic 19) · ×1
  • schema2rst.get_type_string (cyclomatic 19) wisdem/inputs/schema2rst.py:11 — schema2rst.get_type_string 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 · distfunc.tanhdist (cyclomatic 19) · ×1
  • distfunc.tanhdist (cyclomatic 19) wisdem/rotorse/geometry_tools/distfunc.py:66 — distfunc.tanhdist has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (distfunc.sinhdist) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · distfunc.sinhdist (cyclomatic 19) · ×1
  • distfunc.sinhdist (cyclomatic 19) wisdem/rotorse/geometry_tools/distfunc.py:119 — distfunc.sinhdist has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (distfunc.tanhdist) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Polar.polar_params (cyclomatic 18) · ×1
  • Polar.polar_params (cyclomatic 18) wisdem/ccblade/Polar.py:1410 — Polar.polar_params 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 · AggregateJoints.compute (cyclomatic 18) · ×1
  • AggregateJoints.compute (cyclomatic 18) wisdem/glue_code/gc_WT_DataStruc.py:2444 — AggregateJoints.compute 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 · gc_WT_InitModel.assign_blade_structural_webs_values (cyclomatic 18) · ×1
  • gc_WT_InitModel.assign_blade_structural_webs_values (cyclomatic 18) wisdem/glue_code/gc_WT_InitModel.py:213 — gc_WT_InitModel.assign_blade_structural_webs_values 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 · gc_WT_InitModel.assign_airfoil_values (cyclomatic 18) · ×1
  • gc_WT_InitModel.assign_airfoil_values (cyclomatic 18) wisdem/glue_code/gc_WT_InitModel.py:1618 — gc_WT_InitModel.assign_airfoil_values 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 · NSGA2.iterate_population (cyclomatic 18) · ×1
  • NSGA2.iterate_population (cyclomatic 18) wisdem/optimization_drivers/nsga2/algo_nsga2.py:820 — NSGA2.iterate_population 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 · nacelle_csm.compute (cyclomatic 17) · ×1
  • nacelle_csm.compute (cyclomatic 17) wisdem/nrelcsm/nrel_csm_orig.py:687 — nacelle_csm.compute has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NacelleSystemAdder.compute (cyclomatic 16) · ×1
  • NacelleSystemAdder.compute (cyclomatic 16) wisdem/drivetrainse/drive_components.py:880 — NacelleSystemAdder.compute 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 · OrbitWisdem.compile_orbit_config_file (cyclomatic 16) · ×1
  • OrbitWisdem.compile_orbit_config_file (cyclomatic 16) wisdem/orbit/orbit_api.py:543 — OrbitWisdem.compile_orbit_config_file 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.
D17 · Explicit Debt · XxxComment · ×1
  • XxxComment REDACTED:20 — # XXX assume int() truncates! — 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.
D17 · Explicit Debt · HackComment · ×1
  • HackComment docs/scripts/latex-fix.py:37 — # hack to fix citations that use the name right before — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D2 · Cognitive Complexity · WindTurbineOntologyPython.update_ontology (cognitive 249) · ×1
  • WindTurbineOntologyPython.update_ontology (cognitive 249) wisdem/glue_code/gc_LoadInputs.py:822 — WindTurbineOntologyPython.update_ontology has cognitive complexity 249 (threshold 15). Drivers by points: if/else 71 (192 pts), loops 18 (55 pts), boolean chains 2 (nesting depth added 158). 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 · gc_WT_InitModel.assign_blade_structural_layers_values (cognitive 236) · ×1
  • gc_WT_InitModel.assign_blade_structural_layers_values (cognitive 236) wisdem/glue_code/gc_WT_InitModel.py:320 — gc_WT_InitModel.assign_blade_structural_layers_values has cognitive complexity 236 (threshold 15). Drivers by points: if/else 48 (197 pts), loops 7 (28 pts), boolean chains 11 (nesting depth added 170). 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 · gc_WT_InitModel.assign_floating_values (cognitive 169) · ×1
  • gc_WT_InitModel.assign_floating_values (cognitive 169) wisdem/glue_code/gc_WT_InitModel.py:1131 — gc_WT_InitModel.assign_floating_values has cognitive complexity 169 (threshold 15). Drivers by points: if/else 28 (72 pts), ternaries 12 (72 pts), loops 11 (22 pts), error handling 1 (3 pts) (nesting depth added 117). 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 · PoseOptimization.set_design_variables (cognitive 166) · ×1
  • PoseOptimization.set_design_variables (cognitive 166) wisdem/glue_code/gc_PoseOptimization.py:413 — PoseOptimization.set_design_variables has cognitive complexity 166 (threshold 15). Drivers by points: if/else 63 (128 pts), loops 14 (29 pts), error handling 1 (6 pts), boolean chains 3 (nesting depth added 85). 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 · RunPreComp.compute (cognitive 146) · ×1
  • RunPreComp.compute (cognitive 146) wisdem/rotorse/rotor_elasticity.py:295 — RunPreComp.compute has cognitive complexity 146 (threshold 15). Drivers by points: if/else 35 (127 pts), loops 6 (8 pts), boolean chains 7, ternaries 4 (nesting depth added 94). 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 · BladeCost.compute (cognitive 137) · ×1
  • BladeCost.compute (cognitive 137) wisdem/rotorse/blade_cost.py:3315 — BladeCost.compute has cognitive complexity 137 (threshold 15). Drivers by points: if/else 31 (77 pts), error handling 15 (42 pts), boolean chains 10, loops 7 (8 pts) (nesting depth added 74). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · WT_RNTA.setup (cognitive 135) · ×1
  • WT_RNTA.setup (cognitive 135) wisdem/glue_code/glue_code.py:84 — WT_RNTA.setup has cognitive complexity 135 (threshold 15). Drivers by points: if/else 55 (97 pts), loops 12 (31 pts), boolean chains 7 (nesting depth added 61). To reduce it, split the body into named stages: move each independent 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 · PoseOptimization.set_constraints (cognitive 134) · ×1
  • PoseOptimization.set_constraints (cognitive 134) wisdem/glue_code/gc_PoseOptimization.py:872 — PoseOptimization.set_constraints has cognitive complexity 134 (threshold 15). Drivers by points: if/else 94 (112 pts), boolean chains 10, loops 6 (7 pts), ternaries 2 (5 pts) (nesting depth added 22). 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 · WombatWisdem.compile_inputs (cognitive 128) · ×1
  • WombatWisdem.compile_inputs (cognitive 128) wisdem/wombat/wombat_api.py:679 — WombatWisdem.compile_inputs has cognitive complexity 128 (threshold 15). Drivers by points: if/else 92 (117 pts), ternaries 6, loops 3 (5 pts) (nesting depth added 27). 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 · WindTurbineOntologyPython.set_openmdao_vectors (cognitive 120) · ×1
  • WindTurbineOntologyPython.set_openmdao_vectors (cognitive 120) wisdem/glue_code/gc_LoadInputs.py:129 — WindTurbineOntologyPython.set_openmdao_vectors has cognitive complexity 120 (threshold 15). Drivers by points: if/else 33 (72 pts), loops 17 (45 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 68). To reduce it, split the body into named stages: move each independent 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 · properties.properties (cognitive 107) · ×1
  • properties.properties (cognitive 107) wisdem/precomp/properties.py:5 — properties.properties has cognitive complexity 107 (threshold 15). Drivers by points: if/else 59 (82 pts), boolean chains 11, loops 8 (11 pts), ternaries 2 (3 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent 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 · NLoptDriver.run (cognitive 101) · ×1
  • NLoptDriver.run (cognitive 101) wisdem/optimization_drivers/nlopt_driver.py:219 — NLoptDriver.run has cognitive complexity 101 (threshold 15). Drivers by points: if/else 27 (51 pts), ternaries 9 (31 pts), loops 5 (10 pts), error handling 2 (6 pts), boolean chains 3 (nesting depth added 55). To reduce it, split the body into named stages: move each independent 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 · WindTurbineOntologyPython.set_opt_flags (cognitive 90) · ×1
  • WindTurbineOntologyPython.set_opt_flags (cognitive 90) wisdem/glue_code/gc_LoadInputs.py:661 — WindTurbineOntologyPython.set_opt_flags has cognitive complexity 90 (threshold 15). Drivers by points: if/else 20 (49 pts), loops 11 (29 pts), boolean chains 4, error handling 1 (4 pts), ternaries 1 (4 pts) (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gc_WT_InitModel.assign_airfoil_values (cognitive 76) · ×1
  • gc_WT_InitModel.assign_airfoil_values (cognitive 76) wisdem/glue_code/gc_WT_InitModel.py:1618 — gc_WT_InitModel.assign_airfoil_values has cognitive complexity 76 (threshold 15). Drivers by points: if/else 11 (41 pts), loops 7 (35 pts) (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComputePowerCurve.compute (cognitive 75) · ×1
  • ComputePowerCurve.compute (cognitive 75) wisdem/rotorse/rotor_power.py:287 — ComputePowerCurve.compute has cognitive complexity 75 (threshold 15). Drivers by points: if/else 28 (45 pts), boolean chains 12, error handling 3 (9 pts), loops 4 (6 pts), ternaries 2 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Convergence_Trends_Opt.compute (cognitive 66) · ×1
  • Convergence_Trends_Opt.compute (cognitive 66) wisdem/glue_code/gc_RunTools.py:16 — Convergence_Trends_Opt.compute has cognitive complexity 66 (threshold 15). Drivers by points: loops 11 (38 pts), if/else 7 (23 pts), error handling 1 (5 pts) (nesting depth added 47). 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 · gc_WT_InitModel.assign_blade_structural_webs_values (cognitive 60) · ×1
  • gc_WT_InitModel.assign_blade_structural_webs_values (cognitive 60) wisdem/glue_code/gc_WT_InitModel.py:213 — gc_WT_InitModel.assign_blade_structural_webs_values has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (51 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 41). 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 · gc_WT_InitModel.assign_drivetrain_values (cognitive 57) · ×1
  • gc_WT_InitModel.assign_drivetrain_values (cognitive 57) wisdem/glue_code/gc_WT_InitModel.py:727 — gc_WT_InitModel.assign_drivetrain_values has cognitive complexity 57 (threshold 15). Drivers by points: if/else 26 (56 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent 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 · Place_Webs_Caps.compute (cognitive 55) · ×1
  • Place_Webs_Caps.compute (cognitive 55) wisdem/glue_code/gc_WT_DataStruc.py:1321 — Place_Webs_Caps.compute has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (36 pts), loops 6 (18 pts), boolean chains 1 (nesting depth added 37). To reduce it, split the body into named stages: move each independent 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 · WindPark.setup (cognitive 54) · ×1
  • WindPark.setup (cognitive 54) wisdem/glue_code/glue_code.py:951 — WindPark.setup has cognitive complexity 54 (threshold 15). Drivers by points: if/else 28 (49 pts), ternaries 1 (4 pts), boolean chains 1 (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 · PoseOptimization.set_driver (cognitive 53) · ×1
  • PoseOptimization.set_driver (cognitive 53) wisdem/glue_code/gc_PoseOptimization.py:97 — PoseOptimization.set_driver has cognitive complexity 53 (threshold 15). Drivers by points: if/else 19 (44 pts), error handling 3 (9 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · gc_WT_InitModel.assign_material_values (cognitive 52) · ×1
  • gc_WT_InitModel.assign_material_values (cognitive 52) wisdem/glue_code/gc_WT_InitModel.py:1760 — gc_WT_InitModel.assign_material_values has cognitive complexity 52 (threshold 15). Drivers by points: if/else 22 (51 pts), loops 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent 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 · Floating.setup (cognitive 49) · ×1
  • Floating.setup (cognitive 49) wisdem/glue_code/gc_WT_DataStruc.py:2159 — Floating.setup has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (43 pts), loops 5 (6 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent 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 · NSGA2.update_data_external (cognitive 48) · ×1
  • NSGA2.update_data_external (cognitive 48) wisdem/optimization_drivers/nsga2/algo_nsga2.py:157 — NSGA2.update_data_external has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (46 pts), loops 1 (2 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 · Polar._find_slope (cognitive 47) · ×1
  • Polar._find_slope (cognitive 47) wisdem/ccblade/Polar.py:1628 — Polar._find_slope has cognitive complexity 47 (threshold 15). Drivers by points: if/else 24 (41 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PPI.__init__ (cognitive 46) · ×1
  • PPI.__init__ (cognitive 46) wisdem/nrelcsm/csmPPI.py:508 — PPI.__init__ has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 6 (17 pts), boolean chains 3 (nesting depth added 27). To reduce it, split the body into named stages: move each independent 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 · get_docstrings.get_all_docstrings (cognitive 45) · ×1
  • get_docstrings.get_all_docstrings (cognitive 45) docs/docstrings/get_docstrings.py:79 — get_docstrings.get_all_docstrings has cognitive complexity 45 (threshold 15). Drivers by points: if/else 7 (26 pts), loops 4 (10 pts), ternaries 2 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent 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 · gc_WT_InitModel.assign_mooring_values (cognitive 44) · ×1
  • gc_WT_InitModel.assign_mooring_values (cognitive 44) wisdem/glue_code/gc_WT_InitModel.py:1377 — gc_WT_InitModel.assign_mooring_values has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 6 (11 pts), boolean chains 3, ternaries 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 · utilities.get_xyz_mode_shapes (cognitive 42) · ×1
  • utilities.get_xyz_mode_shapes (cognitive 42) wisdem/commonse/utilities.py:61 — utilities.get_xyz_mode_shapes has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (34 pts), boolean chains 6, loops 1, ternaries 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 · polar_file.loadPolarFile (cognitive 41) · ×1
  • polar_file.loadPolarFile (cognitive 41) wisdem/ccblade/polar_file.py:171 — polar_file.loadPolarFile has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (30 pts), loops 5 (11 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 · genetic_functions.unit_simulated_binary_crossover_python (cognitive 40) · ×1
  • genetic_functions.unit_simulated_binary_crossover_python (cognitive 40) wisdem/optimization_drivers/nsga2/genetic_functions.py:47 — genetic_functions.unit_simulated_binary_crossover_python has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 4 (14 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Polar.polar_params (cognitive 39) · ×1
  • Polar.polar_params (cognitive 39) wisdem/ccblade/Polar.py:1410 — Polar.polar_params has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 7 (16 pts), boolean chains 3 (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 · compare_designs.create_all_plots (cognitive 39) · ×1
  • compare_designs.create_all_plots (cognitive 39) wisdem/postprocessing/compare_designs.py:37 — compare_designs.create_all_plots has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (15 pts), loops 12 (13 pts), error handling 11 (nesting depth added 2). To reduce it, split the body into named stages: move each independent 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 · NSGA2.iterate_population (cognitive 36) · ×1
  • NSGA2.iterate_population (cognitive 36) wisdem/optimization_drivers/nsga2/algo_nsga2.py:820 — NSGA2.iterate_population has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 2 (5 pts), ternaries 2 (4 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 · ComputeMaterialsProperties.compute (cognitive 35) · ×1
  • ComputeMaterialsProperties.compute (cognitive 35) wisdem/glue_code/gc_WT_DataStruc.py:2814 — ComputeMaterialsProperties.compute has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 2, boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fast_nondom_sort.fast_nondom_sort_ranks_python (cognitive 35) · ×1
  • fast_nondom_sort.fast_nondom_sort_ranks_python (cognitive 35) wisdem/optimization_drivers/nsga2/fast_nondom_sort.py:11 — fast_nondom_sort.fast_nondom_sort_ranks_python has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 6 (12 pts), ternaries 4 (5 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gc_WT_InitModel.yaml2openmdao (cognitive 34) · ×1
  • gc_WT_InitModel.yaml2openmdao (cognitive 34) wisdem/glue_code/gc_WT_InitModel.py:12 — gc_WT_InitModel.yaml2openmdao has cognitive complexity 34 (threshold 15). Drivers by points: if/else 26 (27 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 2). 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 · runWISDEM.run_wisdem (cognitive 34) · ×1
  • runWISDEM.run_wisdem (cognitive 34) wisdem/glue_code/runWISDEM.py:26 — runWISDEM.run_wisdem has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 6, loops 2 (4 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 · WindTurbineOntologyPython.set_run_flags (cognitive 33) · ×1
  • WindTurbineOntologyPython.set_run_flags (cognitive 33) wisdem/glue_code/gc_LoadInputs.py:22 — WindTurbineOntologyPython.set_run_flags has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 10, loops 4 (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 · Compute_Blade_Structure.compute (cognitive 32) · ×1
  • Compute_Blade_Structure.compute (cognitive 32) wisdem/glue_code/gc_WT_DataStruc.py:1528 — Compute_Blade_Structure.compute has cognitive complexity 32 (threshold 15). Drivers by points: loops 7 (16 pts), if/else 11 (15 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 · AggregateJoints.compute (cognitive 31) · ×1
  • AggregateJoints.compute (cognitive 31) wisdem/glue_code/gc_WT_DataStruc.py:2444 — AggregateJoints.compute has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 6 (9 pts), boolean chains 3 (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 · MonopileFrame.compute (cognitive 29) · ×1
  • MonopileFrame.compute (cognitive 29) wisdem/fixed_bottomse/monopile.py:390 — MonopileFrame.compute has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 4 (7 pts), ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CCBlade.distributedAeroLoads (cognitive 28) · ×1
  • CCBlade.distributedAeroLoads (cognitive 28) wisdem/ccblade/ccblade.py:863 — CCBlade.distributedAeroLoads has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (23 pts), error handling 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DiscretizationYAML.compute (cognitive 27) · ×1
  • DiscretizationYAML.compute (cognitive 27) wisdem/commonse/cylinder_member.py:357 — DiscretizationYAML.compute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4, error handling 2 (4 pts), loops 2, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · WindTurbineOntologyOpenMDAO.setup (cognitive 27) · ×1
  • WindTurbineOntologyOpenMDAO.setup (cognitive 27) wisdem/glue_code/gc_WT_DataStruc.py:24 — WindTurbineOntologyOpenMDAO.setup has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21 (23 pts), boolean chains 4 (nesting depth added 2). 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 · MemberComplex.add_main_sections (cognitive 24) · ×1
  • MemberComplex.add_main_sections (cognitive 24) wisdem/commonse/cylinder_member.py:1303 — MemberComplex.add_main_sections has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 5 (9 pts), boolean chains 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gc_WT_InitModel.assign_generator_values (cognitive 24) · ×1
  • gc_WT_InitModel.assign_generator_values (cognitive 24) wisdem/glue_code/gc_WT_InitModel.py:856 — gc_WT_InitModel.assign_generator_values has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (24 pts) (nesting depth added 13). 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 · distfunc.tanhdist (cognitive 24) · ×1
  • distfunc.tanhdist (cognitive 24) wisdem/rotorse/geometry_tools/distfunc.py:66 — distfunc.tanhdist has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 9 (10 pts), boolean chains 3 (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. This shape REPEATS in the file: one other method here (distfunc.sinhdist) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · distfunc.sinhdist (cognitive 24) · ×1
  • distfunc.sinhdist (cognitive 24) wisdem/rotorse/geometry_tools/distfunc.py:119 — distfunc.sinhdist has cognitive complexity 24 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 9 (10 pts), boolean chains 3 (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. This shape REPEATS in the file: one other method here (distfunc.tanhdist) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · properties.seg_info (cognitive 23) · ×1
  • properties.seg_info (cognitive 23) wisdem/precomp/properties.py:655 — properties.seg_info has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (4 pts), 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 · Polar.thicknessinterp_from_one_set (cognitive 22) · ×1
  • Polar.thicknessinterp_from_one_set (cognitive 22) wisdem/ccblade/Polar.py:1203 — Polar.thicknessinterp_from_one_set has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), boolean chains 4 (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 · NacelleSystemAdder.compute (cognitive 22) · ×1
  • NacelleSystemAdder.compute (cognitive 22) wisdem/drivetrainse/drive_components.py:880 — NacelleSystemAdder.compute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 6 (8 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SitePreparationCost.calculate_costs (cognitive 22) · ×1
  • SitePreparationCost.calculate_costs (cognitive 22) wisdem/landbosse/model/SitePreparationCost.py:476 — SitePreparationCost.calculate_costs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · OrbitWisdem.compile_orbit_config_file (cognitive 22) · ×1
  • OrbitWisdem.compile_orbit_config_file (cognitive 22) wisdem/orbit/orbit_api.py:543 — OrbitWisdem.compile_orbit_config_file has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 4 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Polar.correction3D (cognitive 21) · ×1
  • Polar.correction3D (cognitive 21) wisdem/ccblade/Polar.py:297 — Polar.correction3D has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17 (20 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 · PoseOptimization.set_initial (cognitive 21) · ×1
  • PoseOptimization.set_initial (cognitive 21) wisdem/glue_code/gc_PoseOptimization.py:1333 — PoseOptimization.set_initial has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 1 (3 pts) (nesting depth added 12). 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 · nacelle_csm.compute (cognitive 21) · ×1
  • nacelle_csm.compute (cognitive 21) wisdem/nrelcsm/nrel_csm_orig.py:687 — nacelle_csm.compute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Polar.__init__ (cognitive 20) · ×1
  • Polar.__init__ (cognitive 20) wisdem/ccblade/Polar.py:46 — Polar.__init__ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NSGA2Driver.run (cognitive 20) · ×1
  • NSGA2Driver.run (cognitive 20) wisdem/optimization_drivers/nsga2_driver.py:303 — NSGA2Driver.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 6, boolean chains 1, 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 · CCBlade.__loads (cognitive 19) · ×1
  • CCBlade.__loads (cognitive 19) wisdem/ccblade/ccblade.py:704 — CCBlade.__loads has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 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 · CCBladeTwist.compute (cognitive 19) · ×1
  • CCBladeTwist.compute (cognitive 19) wisdem/ccblade/ccblade_component.py:448 — CCBladeTwist.compute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (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 · generator_models.winding_factor (cognitive 19) · ×1
  • generator_models.winding_factor (cognitive 19) wisdem/drivetrainse/generator_models.py:79 — generator_models.winding_factor has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, loops 4, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ComputeFrame3DD.compute (cognitive 19) · ×1
  • ComputeFrame3DD.compute (cognitive 19) wisdem/fixed_bottomse/jacket.py:221 — ComputeFrame3DD.compute has cognitive complexity 19 (threshold 15). Drivers by points: loops 10 (14 pts), if/else 3 (4 pts), ternaries 1 (nesting depth added 5). 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 · GUI_Master._read_output (cognitive 19) · ×1
  • GUI_Master._read_output (cognitive 19) REDACTED:331 — GUI_Master._read_output has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 2 (7 pts), loops 1 (2 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 · geom_tools.dotXC (cognitive 19) · ×1
  • geom_tools.dotXC (cognitive 19) wisdem/rotorse/geometry_tools/geom_tools.py:213 — geom_tools.dotXC has cognitive complexity 19 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 3 (5 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 · Mooring.evaluate_mooring (cognitive 18) · ×1
  • Mooring.evaluate_mooring (cognitive 18) wisdem/floatingse/mooring.py:152 — Mooring.evaluate_mooring has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 8 (9 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PoseOptimization.set_restart (cognitive 18) · ×1
  • PoseOptimization.set_restart (cognitive 18) wisdem/glue_code/gc_PoseOptimization.py:1401 — PoseOptimization.set_restart has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Schema2RST.write_loop (cognitive 18) · ×1
  • Schema2RST.write_loop (cognitive 18) wisdem/inputs/schema2rst.py:93 — Schema2RST.write_loop has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 2 (8 pts), if/else 4 (7 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.wisdem_cmd (cognitive 18) · ×1
  • main.wisdem_cmd (cognitive 18) wisdem/main.py:33 — main.wisdem_cmd has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (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 · NSGA2Driver.objective_callback (cognitive 18) · ×1
  • NSGA2Driver.objective_callback (cognitive 18) wisdem/optimization_drivers/nsga2_driver.py:483 — NSGA2Driver.objective_callback has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 3 (4 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Polar.cl_linear_slope (cognitive 17) · ×1
  • Polar.cl_linear_slope (cognitive 17) wisdem/ccblade/Polar.py:1540 — Polar.cl_linear_slope has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CCAirfoil.eval_unsteady (cognitive 17) · ×1
  • CCAirfoil.eval_unsteady (cognitive 17) wisdem/ccblade/ccblade.py:218 — CCAirfoil.eval_unsteady has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (17 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Rectangle.Asx (cognitive 17) · ×1
  • Rectangle.Asx (cognitive 17) wisdem/commonse/cross_sections.py:294 — Rectangle.Asx has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts), error handling 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. This shape REPEATS in the file: one other method here (Rectangle.Asy) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Rectangle.Asy (cognitive 17) · ×1
  • Rectangle.Asy (cognitive 17) wisdem/commonse/cross_sections.py:347 — Rectangle.Asy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts), error handling 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. This shape REPEATS in the file: one other method here (Rectangle.Asx) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · gc_WT_InitModel.assign_tower_values (cognitive 17) · ×1
  • gc_WT_InitModel.assign_tower_values (cognitive 17) wisdem/glue_code/gc_WT_InitModel.py:966 — gc_WT_InitModel.assign_tower_values has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 3 (6 pts), ternaries 1 (4 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 · NSGA2.compute_fronts_external (cognitive 17) · ×1
  • NSGA2.compute_fronts_external (cognitive 17) wisdem/optimization_drivers/nsga2/algo_nsga2.py:325 — NSGA2.compute_fronts_external has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 1 (2 pts), boolean chains 1, ternaries 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 · NSGA2.get_fronts_external (cognitive 17) · ×1
  • NSGA2.get_fronts_external (cognitive 17) wisdem/optimization_drivers/nsga2/algo_nsga2.py:435 — NSGA2.get_fronts_external has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compare_designs.print_results_to_screen (cognitive 17) · ×1
  • compare_designs.print_results_to_screen (cognitive 17) wisdem/postprocessing/compare_designs.py:630 — compare_designs.print_results_to_screen has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (7 pts), error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · geom_tools.dotX (cognitive 17) · ×1
  • geom_tools.dotX (cognitive 17) wisdem/rotorse/geometry_tools/geom_tools.py:129 — geom_tools.dotX has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 2 (3 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Polar.unsteadyParams (cognitive 16) · ×1
  • Polar.unsteadyParams (cognitive 16) wisdem/ccblade/Polar.py:672 — Polar.unsteadyParams has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), error handling 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Polar._intersections (cognitive 16) · ×1
  • Polar._intersections (cognitive 16) wisdem/ccblade/Polar.py:1846 — Polar._intersections has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · fileIO.variable_dict2df (cognitive 16) · ×1
  • fileIO.variable_dict2df (cognitive 16) REDACTED:43 — fileIO.variable_dict2df has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2, 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 · fileIO.transfer_data (cognitive 16) · ×1
  • fileIO.transfer_data (cognitive 16) REDACTED:137 — fileIO.transfer_data has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 1 (3 pts), boolean chains 2, loops 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 · validation.integrate_defaults (cognitive 16) · ×1
  • validation.integrate_defaults (cognitive 16) wisdem/inputs/validation.py:48 — validation.integrate_defaults has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NSGA2Driver._setup_recording (cognitive 16) · ×1
  • NSGA2Driver._setup_recording (cognitive 16) wisdem/optimization_drivers/nsga2_driver.py:266 — NSGA2Driver._setup_recording has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (3 members, 57 shared lines) · ×1
  • Near-duplicate member family (3 members, 57 shared lines) wisdem/ccblade/ccblade_component.py:187 — wisdem/ccblade/ccblade_component.py:187-262 | wisdem/ccblade/ccblade_component.py:679-754 | wisdem/ccblade/ccblade_component.py:757-1128 — These 3 members are variants of one another: a block of 57 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (53 shared lines) · ×1
  • Near-duplicate member pair (53 shared lines) wisdem/rotorse/rotor_elasticity.py:21 — wisdem/rotorse/rotor_elasticity.py:21-293 | wisdem/rotorse/rotor_elasticity.py:1260-1392 — These two members are variants of one another: 53 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (50 shared lines) · ×1
  • Near-duplicate member pair (50 shared lines) wisdem/commonse/cylinder_member.py:1887 — wisdem/commonse/cylinder_member.py:1887-1964 | wisdem/commonse/cylinder_member.py:1969-2054 — These two members are variants of one another: 50 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (22 shared lines) · ×1
  • Near-duplicate member pair (22 shared lines) wisdem/commonse/cross_sections.py:295 — wisdem/commonse/cross_sections.py:295-344 | wisdem/commonse/cross_sections.py:348-392 — These two members are variants of one another: 22 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) wisdem/ccblade/ccblade_component.py:95 — wisdem/ccblade/ccblade_component.py:95-184 | wisdem/ccblade/ccblade_component.py:624-676 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (11 members, 50+ identical tokens) wisdem/commonse/cylinder_member.py:2249 — wisdem/commonse/cylinder_member.py:2249-2274 | wisdem/commonse/cylinder_member.py:2421-2446 | wisdem/commonse/cylinder_member.py:2607-2626 | wisdem/commonse/wind_wave_drag.py:181-201 | wisdem/commonse/wind_wave_drag.py:275-306 | wisdem/commonse/wind_wave_drag.py:424-458 | wisdem/commonse/wind_wave_drag.py:618-652 | wisdem/commonse/wind_wave_drag.py:832-869 | wisdem/fixed_bottomse/jacket.py:554-590 | wisdem/fixed_bottomse/jacket.py:656-683 | wisdem/fixed_bottomse/monopile.py:265-388 — These 11 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 11 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 11 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) wisdem/drivetrainse/generator_models.py:739 — wisdem/drivetrainse/generator_models.py:739-1216 | wisdem/drivetrainse/generator_models.py:1265-1730 | wisdem/drivetrainse/generator_models.py:1780-2186 | wisdem/drivetrainse/generator_models.py:2240-2600 | wisdem/drivetrainse/generator_models.py:2658-3045 | wisdem/drivetrainse/generator_models.py:3127-3668 | wisdem/rotorse/blade_cost.py:3317-3922 | wisdem/rotorse/rotor_power.py:289-841 — These 8 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 8 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 8 times.
D4 · Code Duplication · Edited copy of a member (136 corresponding lines) · ×1
  • Edited copy of a member (136 corresponding lines) wisdem/ccblade/ccblade_component.py:307 — wisdem/ccblade/ccblade_component.py:307-446 | wisdem/rotorse/rotor_power.py:148-283 — These two members are one piece of code written twice and then edited apart: 136 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 (50 corresponding lines) · ×1
  • Edited copy of a member (50 corresponding lines) wisdem/rotorse/geometry_tools/distfunc.py:67 — wisdem/rotorse/geometry_tools/distfunc.py:67-116 | wisdem/rotorse/geometry_tools/distfunc.py:120-169 — These two members are one piece of code written twice and then edited apart: 50 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 (118 corresponding lines) · ×1
  • Edited copy of a member (118 corresponding lines) wisdem/landbosse/model/ErectionCost.py:423 — wisdem/landbosse/model/ErectionCost.py:423-585 | wisdem/landbosse/model/ErectionCost.py:588-705 — These two members are one piece of code written twice and then edited apart: 118 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, 35+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 35+ corresponding lines) wisdem/commonse/cylinder_member.py:629 — wisdem/commonse/cylinder_member.py:629-668 | wisdem/commonse/cylinder_member.py:775-809 | wisdem/commonse/cylinder_member.py:2811-2854 | wisdem/floatingse/floating_frame.py:357-391 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 35 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 43+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 43+ corresponding lines) wisdem/landbosse/model/CollectionCost.py:1244 — wisdem/landbosse/model/CollectionCost.py:1244-1293 | wisdem/landbosse/model/FoundationCost.py:978-1044 | wisdem/landbosse/model/SitePreparationCost.py:931-973 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 43 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 (22 corresponding lines) · ×1
  • Edited copy of a member (22 corresponding lines) wisdem/rotorse/blade_cost.py:1894 — wisdem/rotorse/blade_cost.py:1894-1915 | wisdem/rotorse/blade_cost.py:2105-2126 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) wisdem/commonse/wind_wave_drag.py:309 — wisdem/commonse/wind_wave_drag.py:309-339 | wisdem/commonse/wind_wave_drag.py:343-377 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×1
  • Edited copy of a member (20 corresponding lines) wisdem/rotorse/blade_cost.py:1863 — wisdem/rotorse/blade_cost.py:1863-1888 | wisdem/rotorse/blade_cost.py:1974-1993 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) wisdem/optimization_drivers/nlopt_driver.py:112 — wisdem/optimization_drivers/nlopt_driver.py:112-147 | wisdem/optimization_drivers/nsga2_driver.py:67-106 — 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 copy of a member (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) wisdem/commonse/cylinder_member.py:3021 — wisdem/commonse/cylinder_member.py:3021-3035 | wisdem/commonse/cylinder_member.py:3048-3062 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×1
  • Edited copy of a member (17 corresponding lines) wisdem/rotorse/blade_cost.py:2604 — wisdem/rotorse/blade_cost.py:2604-2622 | wisdem/rotorse/blade_cost.py:2625-2641 — 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 (9 corresponding lines) · ×1
  • Edited copy of a member (9 corresponding lines) wisdem/commonse/utilization_dnvgl.py:210 — wisdem/commonse/utilization_dnvgl.py:210-218 | wisdem/commonse/utilization_dnvgl.py:221-229 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×1
  • Edited copy of a member (12 corresponding lines) wisdem/rotorse/blade_cost.py:2741 — wisdem/rotorse/blade_cost.py:2741-2753 | wisdem/rotorse/blade_cost.py:2757-2768 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) wisdem/commonse/frustum.py:106 — wisdem/commonse/frustum.py:106-126 | wisdem/commonse/frustum.py:171-195 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×1
  • Edited copy of a member (4 corresponding lines) wisdem/nrelcsm/nrel_csm_cost_2015.py:387 — wisdem/nrelcsm/nrel_csm_cost_2015.py:387-391 | wisdem/nrelcsm/nrel_csm_mass_2015.py:371-374 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (72–75 lines × 2) · ×1
  • Duplicated block (72–75 lines × 2) wisdem/landbosse/model/CollectionCost.py:1005 — wisdem/landbosse/model/CollectionCost.py:1005-1079 | wisdem/landbosse/model/FoundationCost.py:830-901 — 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 (56–57 lines × 3) · ×1
  • Duplicated block (56–57 lines × 3) wisdem/ccblade/ccblade_component.py:188 — wisdem/ccblade/ccblade_component.py:188-243 | wisdem/ccblade/ccblade_component.py:680-736 | wisdem/ccblade/ccblade_component.py:758-814 — 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 `wisdem/ccblade/ccblade_component.py:188` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (35–54 lines × 2) · ×1
  • Duplicated block (35–54 lines × 2) wisdem/fixed_bottomse/monopile.py:948 — wisdem/fixed_bottomse/monopile.py:948-982 | wisdem/towerse/tower.py:659-712 — before extracting anything, compare `wisdem/fixed_bottomse/monopile.py` and `wisdem/towerse/tower.py` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/fixed_bottomse/monopile.py:948` 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 (42–43 lines × 2) · ×1
  • Duplicated block (42–43 lines × 2) wisdem/drivetrainse/generator_models.py:1312 — wisdem/drivetrainse/generator_models.py:1312-1353 | wisdem/drivetrainse/generator_models.py:1830-1872 — 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–40 lines × 3) · ×1
  • Duplicated block (37–40 lines × 3) wisdem/drivetrainse/generator_models.py:1311 — wisdem/drivetrainse/generator_models.py:1311-1350 | wisdem/drivetrainse/generator_models.py:1829-1868 | wisdem/drivetrainse/generator_models.py:3177-3213 — 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 (33–34 lines × 2) · ×1
  • Duplicated block (33–34 lines × 2) wisdem/drivetrainse/drive_structure.py:263 — wisdem/drivetrainse/drive_structure.py:263-296 | wisdem/drivetrainse/drive_structure.py:539-571 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (33 lines × 4) · ×1
  • Duplicated block (33 lines × 4) wisdem/drivetrainse/generator_models.py:1311 — wisdem/drivetrainse/generator_models.py:1311-1349 | wisdem/drivetrainse/generator_models.py:1829-1867 | wisdem/drivetrainse/generator_models.py:2692-2727 | wisdem/drivetrainse/generator_models.py:3177-3209 — 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 (17–31 lines × 5) · ×1
  • Duplicated block (17–31 lines × 5) wisdem/glue_code/gc_WT_DataStruc.py:1436 — wisdem/glue_code/gc_WT_DataStruc.py:1436-1452 | wisdem/glue_code/gc_WT_DataStruc.py:1463-1479 | wisdem/rotorse/blade_cost.py:2831-2847 | wisdem/rotorse/blade_cost.py:3031-3047 | wisdem/rotorse/rotor_elasticity.py:71-101 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:1436` 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 (29–31 lines × 2) · ×1
  • Duplicated block (29–31 lines × 2) wisdem/landbosse/model/CollectionCost.py:1140 — wisdem/landbosse/model/CollectionCost.py:1140-1168 | wisdem/landbosse/model/SitePreparationCost.py:858-888 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/landbosse/model/SitePreparationCost.py:858` 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 (28–29 lines × 3) · ×1
  • Duplicated block (28–29 lines × 3) wisdem/rotorse/blade_cost.py:1074 — wisdem/rotorse/blade_cost.py:1074-1102 | wisdem/rotorse/blade_cost.py:1175-1202 | wisdem/rotorse/blade_cost.py:1267-1295 — 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 `wisdem/rotorse/blade_cost.py:1074` 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 (24–26 lines × 3) · ×1
  • Duplicated block (24–26 lines × 3) wisdem/landbosse/model/GridConnectionCost.py:169 — wisdem/landbosse/model/GridConnectionCost.py:169-192 | wisdem/landbosse/model/SubstationCost.py:127-152 | wisdem/landbosse/model/TurbineCost.py:107-131 — before extracting anything, compare `wisdem/landbosse/model/GridConnectionCost.py` and `wisdem/landbosse/model/SubstationCost.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (14–26 lines × 2) · ×1
  • Duplicated block (14–26 lines × 2) wisdem/fixed_bottomse/jacket.py:466 — wisdem/fixed_bottomse/jacket.py:466-491 | wisdem/fixed_bottomse/monopile.py:585-598 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/fixed_bottomse/jacket.py:466` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20–25 lines × 2) · ×1
  • Duplicated block (20–25 lines × 2) wisdem/wombat/wombat_api.py:53 — wisdem/wombat/wombat_api.py:53-77 | wisdem/wombat/wombat_api.py:81-100 — 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 `wisdem/wombat/wombat_api.py:81` 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 (24 lines × 3) · ×1
  • Duplicated block (24 lines × 3) wisdem/landbosse/model/CollectionCost.py:1147 — wisdem/landbosse/model/CollectionCost.py:1147-1170 | wisdem/landbosse/model/FoundationCost.py:926-949 | wisdem/landbosse/model/SitePreparationCost.py:867-890 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/landbosse/model/CollectionCost.py:1147` 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, `wisdem/landbosse/model/FoundationCost.py:923` calls `itertuples`, `format` and `wisdem/landbosse/model/CollectionCost.py:1147` 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 (23 lines × 3) · ×1
  • Duplicated block (23 lines × 3) wisdem/drivetrainse/generator_models.py:1271 — wisdem/drivetrainse/generator_models.py:1271-1293 | wisdem/drivetrainse/generator_models.py:1789-1811 | wisdem/drivetrainse/generator_models.py:3137-3159 — 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 (17–22 lines × 7) · ×1
  • Duplicated block (17–22 lines × 7) wisdem/glue_code/gc_WT_DataStruc.py:835 — wisdem/glue_code/gc_WT_DataStruc.py:835-851 | wisdem/glue_code/gc_WT_DataStruc.py:2979-2995 | wisdem/rotorse/blade_cost.py:3172-3193 | wisdem/rotorse/parametrize_rotor.py:71-92 | wisdem/rotorse/rotor_elasticity.py:179-195 | wisdem/rotorse/rotor_elasticity.py:1300-1316 | wisdem/rotorse/rotor_structure.py:295-311 — there are 7 copies across 5 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:835` 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 after the matched lines, `wisdem/rotorse/blade_cost.py:3194` calls `add_output` and `wisdem/glue_code/gc_WT_DataStruc.py:851` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (20–22 lines × 3) · ×1
  • Duplicated block (20–22 lines × 3) wisdem/drivetrainse/generator_models.py:1707 — wisdem/drivetrainse/generator_models.py:1707-1728 | wisdem/drivetrainse/generator_models.py:2165-2184 | wisdem/drivetrainse/generator_models.py:3645-3666 — 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 (21–22 lines × 3) · ×1
  • Duplicated block (21–22 lines × 3) wisdem/rotorse/blade_cost.py:1023 — wisdem/rotorse/blade_cost.py:1023-1044 | wisdem/rotorse/blade_cost.py:1119-1139 | wisdem/rotorse/blade_cost.py:1220-1241 — 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 (14–21 lines × 5) · ×1
  • Duplicated block (14–21 lines × 5) wisdem/glue_code/gc_PoseOptimization.py:519 — wisdem/glue_code/gc_PoseOptimization.py:519-534 | wisdem/glue_code/gc_PoseOptimization.py:563-578 | wisdem/glue_code/gc_PoseOptimization.py:588-602 | wisdem/glue_code/gc_PoseOptimization.py:655-668 | wisdem/glue_code/gc_PoseOptimization.py:798-818 — 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 `wisdem/glue_code/gc_PoseOptimization.py:519` 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 after the matched lines, `wisdem/glue_code/gc_PoseOptimization.py:818` calls `add_design_var` and `wisdem/glue_code/gc_PoseOptimization.py:668` 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 (1–21 lines × 4) · ×1
  • Duplicated block (1–21 lines × 4) wisdem/commonse/frustum.py:198 — wisdem/commonse/frustum.py:198-218 | wisdem/commonse/frustum.py:221-221 | wisdem/commonse/frustum.py:263-283 | wisdem/commonse/frustum.py:291-311 — 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 `wisdem/commonse/frustum.py:198` 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 (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) wisdem/commonse/wind_wave_drag.py:519 — wisdem/commonse/wind_wave_drag.py:519-537 | wisdem/commonse/wind_wave_drag.py:962-982 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (33–37 lines × 2) · ×1
  • Duplicated block (33–37 lines × 2) wisdem/drivetrainse/generator_models.py:1388 — wisdem/drivetrainse/generator_models.py:1388-1420 | wisdem/drivetrainse/generator_models.py:1905-1941 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18–20 lines × 4) · ×1
  • Duplicated block (18–20 lines × 4) wisdem/rotorse/rotor_elasticity.py:229 — wisdem/rotorse/rotor_elasticity.py:229-248 | wisdem/rotorse/rotor_elasticity.py:1350-1369 | wisdem/rotorse/rotor_structure.py:618-636 | wisdem/rotorse/rotor_structure.py:910-927 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/rotorse/rotor_elasticity.py:229` 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 (18–20 lines × 3) · ×1
  • Duplicated block (18–20 lines × 3) wisdem/landbosse/model/CollectionCost.py:1252 — wisdem/landbosse/model/CollectionCost.py:1252-1269 | wisdem/landbosse/model/FoundationCost.py:998-1017 | wisdem/landbosse/model/SitePreparationCost.py:937-954 — 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.
D4 · Code Duplication · Duplicated block (17–20 lines × 2) · ×1
  • Duplicated block (17–20 lines × 2) wisdem/commonse/wind_wave_drag.py:309 — wisdem/commonse/wind_wave_drag.py:309-325 | wisdem/commonse/wind_wave_drag.py:343-362 — 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 (18–20 lines × 2) · ×1
  • Duplicated block (18–20 lines × 2) wisdem/landbosse/model/DevelopmentCost.py:87 — wisdem/landbosse/model/DevelopmentCost.py:87-104 | wisdem/landbosse/model/ErectionCost.py:186-205 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–19 lines × 8) · ×1
  • Duplicated block (12–19 lines × 8) wisdem/glue_code/gc_WT_DataStruc.py:831 — wisdem/glue_code/gc_WT_DataStruc.py:831-847 | wisdem/glue_code/gc_WT_DataStruc.py:2976-2991 | wisdem/rotorse/blade_cost.py:3173-3191 | wisdem/rotorse/parametrize_rotor.py:72-89 | wisdem/rotorse/rotor_elasticity.py:150-161 | wisdem/rotorse/rotor_elasticity.py:176-191 | wisdem/rotorse/rotor_elasticity.py:1297-1312 | wisdem/rotorse/rotor_structure.py:291-307 — there are 8 copies across 5 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 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:831` 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, `wisdem/glue_code/gc_WT_DataStruc.py:829` calls `add_output`, `zeros` and `wisdem/rotorse/parametrize_rotor.py:71` 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 (17–19 lines × 5) · ×1
  • Duplicated block (17–19 lines × 5) wisdem/glue_code/gc_WT_DataStruc.py:2795 — wisdem/glue_code/gc_WT_DataStruc.py:2795-2812 | wisdem/glue_code/gc_WT_DataStruc.py:2945-2961 | wisdem/glue_code/gc_WT_DataStruc.py:2993-3009 | wisdem/rotorse/rotor_elasticity.py:223-241 | wisdem/rotorse/rotor_elasticity.py:1344-1362 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:2795` 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 (14–19 lines × 2) · ×1
  • Duplicated block (14–19 lines × 2) wisdem/precomp/properties.py:587 — wisdem/precomp/properties.py:587-600 | wisdem/precomp/properties.py:616-634 — 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 `wisdem/precomp/properties.py:587` 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, `wisdem/precomp/properties.py:585` calls `abs` and `wisdem/precomp/properties.py:615` 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 (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) wisdem/wombat/wombat_api.py:264 — wisdem/wombat/wombat_api.py:264-282 | wisdem/wombat/wombat_api.py:503-520 — 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 `wisdem/wombat/wombat_api.py:264` 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 (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) wisdem/landbosse/model/CollectionCost.py:815 — wisdem/landbosse/model/CollectionCost.py:815-833 | wisdem/landbosse/model/FoundationCost.py:583-601 | wisdem/landbosse/model/SitePreparationCost.py:411-430 — 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.
D4 · Code Duplication · Duplicated block (3–18 lines × 3) · ×1
  • Duplicated block (3–18 lines × 3) wisdem/glue_code/gc_LoadInputs.py:967 — wisdem/glue_code/gc_LoadInputs.py:967-969 | wisdem/glue_code/gc_LoadInputs.py:1261-1278 | wisdem/glue_code/gc_LoadInputs.py:1319-1336 — 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 `wisdem/glue_code/gc_LoadInputs.py:1261` 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 (15–17 lines × 6) · ×1
  • Duplicated block (15–17 lines × 6) wisdem/landbosse/model/CollectionCost.py:1159 — wisdem/landbosse/model/CollectionCost.py:1159-1175 | wisdem/landbosse/model/DevelopmentCost.py:70-84 | wisdem/landbosse/model/FoundationCost.py:938-954 | wisdem/landbosse/model/GridConnectionCost.py:121-135 | wisdem/landbosse/model/SitePreparationCost.py:879-895 | wisdem/landbosse/model/SubstationCost.py:109-123 — 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 6 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (13–17 lines × 5) · ×1
  • Duplicated block (13–17 lines × 5) wisdem/glue_code/gc_WT_DataStruc.py:2950 — wisdem/glue_code/gc_WT_DataStruc.py:2950-2962 | wisdem/rotorse/rotor_elasticity.py:228-244 | wisdem/rotorse/rotor_elasticity.py:1349-1365 | wisdem/rotorse/rotor_structure.py:618-634 | wisdem/rotorse/rotor_structure.py:913-927 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:2950` 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 (16–17 lines × 4) · ×1
  • Duplicated block (16–17 lines × 4) wisdem/rotorse/blade_cost.py:2839 — wisdem/rotorse/blade_cost.py:2839-2855 | wisdem/rotorse/blade_cost.py:3039-3055 | wisdem/rotorse/rotor_elasticity.py:79-95 | wisdem/rotorse/rotor_structure.py:1021-1036 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/rotorse/blade_cost.py:2839` 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 (3–17 lines × 3) · ×1
  • Duplicated block (3–17 lines × 3) wisdem/ccblade/ccblade_component.py:385 — wisdem/ccblade/ccblade_component.py:385-401 | wisdem/landbosse/landbosse_omdao/landbosse.py:102-104 | wisdem/rotorse/rotor_power.py:219-231 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/ccblade/ccblade_component.py:385` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (29–34 lines × 2) · ×1
  • Duplicated block (29–34 lines × 2) wisdem/drivetrainse/generator_models.py:1442 — wisdem/drivetrainse/generator_models.py:1442-1470 | wisdem/drivetrainse/generator_models.py:1966-1999 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16 lines × 6) · ×1
  • Duplicated block (16 lines × 6) wisdem/glue_code/gc_WT_DataStruc.py:249 — wisdem/glue_code/gc_WT_DataStruc.py:249-264 | wisdem/glue_code/gc_WT_DataStruc.py:2943-2958 | wisdem/glue_code/gc_WT_DataStruc.py:2991-3006 | wisdem/rotorse/parametrize_rotor.py:83-98 | wisdem/rotorse/rotor_elasticity.py:221-238 | wisdem/rotorse/rotor_elasticity.py:1342-1359 — before extracting anything, compare `wisdem/glue_code/gc_WT_DataStruc.py` and `wisdem/rotorse/parametrize_rotor.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:249` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–16 lines × 5) · ×1
  • Duplicated block (13–16 lines × 5) wisdem/drivetrainse/generator_models.py:1184 — wisdem/drivetrainse/generator_models.py:1184-1196 | wisdem/drivetrainse/generator_models.py:1695-1708 | wisdem/drivetrainse/generator_models.py:2153-2165 | wisdem/drivetrainse/generator_models.py:2581-2596 | wisdem/drivetrainse/generator_models.py:3631-3645 — 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 (11–16 lines × 3) · ×1
  • Duplicated block (11–16 lines × 3) wisdem/rotorse/blade_cost.py:605 — wisdem/rotorse/blade_cost.py:605-615 | wisdem/rotorse/blade_cost.py:634-644 | wisdem/rotorse/blade_cost.py:664-679 — 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 `wisdem/rotorse/blade_cost.py:664` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15 lines × 8) · ×1
  • Duplicated block (15 lines × 8) wisdem/glue_code/gc_WT_DataStruc.py:70 — wisdem/glue_code/gc_WT_DataStruc.py:70-84 | wisdem/glue_code/gc_WT_DataStruc.py:250-264 | wisdem/glue_code/gc_WT_DataStruc.py:2794-2809 | wisdem/glue_code/gc_WT_DataStruc.py:2944-2958 | wisdem/glue_code/gc_WT_DataStruc.py:2992-3006 | wisdem/rotorse/parametrize_rotor.py:84-98 | wisdem/rotorse/rotor_elasticity.py:222-238 | wisdem/rotorse/rotor_elasticity.py:1343-1359 — before extracting anything, compare `wisdem/glue_code/gc_WT_DataStruc.py` and `wisdem/rotorse/parametrize_rotor.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:70` 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–15 lines × 6) · ×1
  • Duplicated block (11–15 lines × 6) wisdem/glue_code/gc_WT_DataStruc.py:2763 — wisdem/glue_code/gc_WT_DataStruc.py:2763-2777 | wisdem/rotorse/rotor_elasticity.py:37-47 | wisdem/rotorse/rotor_elasticity.py:893-906 | wisdem/rotorse/rotor_structure.py:187-201 | wisdem/rotorse/rotor_structure.py:209-219 | wisdem/rotorse/rotor_structure.py:545-559 — there are 6 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 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:2763` 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, `wisdem/rotorse/rotor_structure.py:183` calls `add_input`, `zeros` and `wisdem/glue_code/gc_WT_DataStruc.py:2761` 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 (11–14 lines × 7) · ×1
  • Duplicated block (11–14 lines × 7) wisdem/glue_code/gc_WT_DataStruc.py:2763 — wisdem/glue_code/gc_WT_DataStruc.py:2763-2776 | wisdem/rotorse/blade_cost.py:3082-3095 | wisdem/rotorse/rotor_elasticity.py:37-47 | wisdem/rotorse/rotor_elasticity.py:893-905 | wisdem/rotorse/rotor_structure.py:187-200 | wisdem/rotorse/rotor_structure.py:209-219 | wisdem/rotorse/rotor_structure.py:545-558 — there are 7 copies across 4 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:2763` 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, `wisdem/rotorse/rotor_structure.py:183` calls `add_input`, `zeros` and `wisdem/glue_code/gc_WT_DataStruc.py:2761` 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 (1–14 lines × 11) · ×1
  • Duplicated block (1–14 lines × 11) wisdem/ccblade/ccblade_component.py:430 — wisdem/ccblade/ccblade_component.py:430-435 | wisdem/glue_code/gc_WT_DataStruc.py:828-841 | wisdem/rotorse/rotor_elasticity.py:148-148 | wisdem/rotorse/rotor_elasticity.py:149-159 | wisdem/rotorse/rotor_elasticity.py:163-164 | wisdem/rotorse/rotor_elasticity.py:167-173 | wisdem/rotorse/rotor_elasticity.py:175-185 | wisdem/rotorse/rotor_elasticity.py:1284-1285 | wisdem/rotorse/rotor_elasticity.py:1296-1306 | wisdem/rotorse/rotor_structure.py:114-119 | wisdem/rotorse/rotor_structure.py:288-301 — there are 11 copies across 4 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 11 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/ccblade/ccblade_component.py:430` 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 after the matched lines, `wisdem/ccblade/ccblade_component.py:435` calls `add_output`, `zeros` and `wisdem/rotorse/rotor_elasticity.py:148` 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 lines × 5) · ×1
  • Duplicated block (14 lines × 5) wisdem/rotorse/blade_cost.py:147 — wisdem/rotorse/blade_cost.py:147-160 | wisdem/rotorse/blade_cost.py:162-175 | wisdem/rotorse/blade_cost.py:177-190 | wisdem/rotorse/blade_cost.py:192-205 | wisdem/rotorse/blade_cost.py:207-220 — 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 `wisdem/rotorse/blade_cost.py:147` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–14 lines × 4) · ×1
  • Duplicated block (10–14 lines × 4) wisdem/rotorse/rotor_elasticity.py:45 — wisdem/rotorse/rotor_elasticity.py:45-54 | wisdem/rotorse/rotor_power.py:190-199 | wisdem/rotorse/rotor_structure.py:180-193 | wisdem/rotorse/rotor_structure.py:217-226 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/rotorse/rotor_elasticity.py:45` 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 (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) wisdem/ccblade/ccblade.py:339 — wisdem/ccblade/ccblade.py:339-352 | wisdem/rotorse/rotor_power.py:1094-1106 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) wisdem/commonse/cylinder_member.py:2303 — wisdem/commonse/cylinder_member.py:2303-2324 | wisdem/commonse/cylinder_member.py:2474-2496 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11–13 lines × 6) · ×1
  • Duplicated block (11–13 lines × 6) wisdem/drivetrainse/generator_models.py:1185 — wisdem/drivetrainse/generator_models.py:1185-1195 | wisdem/drivetrainse/generator_models.py:1696-1707 | wisdem/drivetrainse/generator_models.py:2154-2164 | wisdem/drivetrainse/generator_models.py:2582-2594 | wisdem/drivetrainse/generator_models.py:3031-3041 | wisdem/drivetrainse/generator_models.py:3632-3644 — 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.
D4 · Code Duplication · Duplicated block (2–13 lines × 9) · ×1
  • Duplicated block (2–13 lines × 9) wisdem/glue_code/gc_WT_DataStruc.py:1007 — wisdem/glue_code/gc_WT_DataStruc.py:1007-1019 | wisdem/rotorse/rotor_elasticity.py:48-54 | wisdem/rotorse/rotor_structure.py:29-30 | wisdem/rotorse/rotor_structure.py:91-96 | wisdem/rotorse/rotor_structure.py:106-107 | wisdem/rotorse/rotor_structure.py:174-182 | wisdem/rotorse/rotor_structure.py:207-217 | wisdem/rotorse/rotor_structure.py:220-226 | wisdem/rotorse/rotor_structure.py:542-553 — there are 9 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 9 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:1007` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `wisdem/rotorse/rotor_structure.py:171` calls `add_input`, `zeros` and `wisdem/glue_code/gc_WT_DataStruc.py:1005` 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 (2–13 lines × 10) · ×1
  • Duplicated block (2–13 lines × 10) wisdem/rotorse/blade_cost.py:3068 — wisdem/rotorse/blade_cost.py:3068-3078 | wisdem/rotorse/rotor_elasticity.py:41-51 | wisdem/rotorse/rotor_power.py:185-196 | wisdem/rotorse/rotor_structure.py:28-29 | wisdem/rotorse/rotor_structure.py:90-94 | wisdem/rotorse/rotor_structure.py:105-106 | wisdem/rotorse/rotor_structure.py:176-188 | wisdem/rotorse/rotor_structure.py:197-205 | wisdem/rotorse/rotor_structure.py:213-223 | wisdem/rotorse/rotor_structure.py:540-541 — there are 10 copies across 4 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 `wisdem/rotorse/blade_cost.py:3068` 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 after the matched lines, `wisdem/rotorse/rotor_structure.py:207` calls `add_input`, `zeros` and `wisdem/rotorse/rotor_structure.py:544` 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 (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) wisdem/rotorse/blade_cost.py:1026 — wisdem/rotorse/blade_cost.py:1026-1038 | wisdem/rotorse/blade_cost.py:1122-1134 | wisdem/rotorse/blade_cost.py:1223-1235 | wisdem/rotorse/blade_cost.py:1352-1364 — 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 (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) wisdem/drivetrainse/generator_models.py:973 — wisdem/drivetrainse/generator_models.py:973-983 | wisdem/drivetrainse/generator_models.py:1066-1078 — 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 `wisdem/drivetrainse/generator_models.py:973` 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 (12 lines × 8) · ×1
  • Duplicated block (12 lines × 8) wisdem/glue_code/gc_WT_DataStruc.py:1010 — wisdem/glue_code/gc_WT_DataStruc.py:1010-1023 | wisdem/glue_code/gc_WT_DataStruc.py:2762-2775 | wisdem/rotorse/blade_cost.py:3081-3094 | wisdem/rotorse/rotor_elasticity.py:36-47 | wisdem/rotorse/rotor_elasticity.py:892-904 | wisdem/rotorse/rotor_structure.py:186-199 | wisdem/rotorse/rotor_structure.py:208-219 | wisdem/rotorse/rotor_structure.py:544-557 — there are 8 copies across 4 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 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:1010` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/rotorse/rotor_elasticity.py:48` calls `add_input`, `zeros` and `wisdem/glue_code/gc_WT_DataStruc.py:2775` 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 (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) wisdem/glue_code/gc_WT_DataStruc.py:1460 — wisdem/glue_code/gc_WT_DataStruc.py:1460-1473 | wisdem/rotorse/blade_cost.py:2828-2841 | wisdem/rotorse/blade_cost.py:2844-2855 | wisdem/rotorse/blade_cost.py:3028-3041 | wisdem/rotorse/rotor_elasticity.py:84-97 | wisdem/rotorse/rotor_structure.py:1025-1036 — there are 6 copies across 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:1460` 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 (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) wisdem/fixed_bottomse/jacket.py:500 — wisdem/fixed_bottomse/jacket.py:500-511 | wisdem/fixed_bottomse/monopile.py:619-630 | wisdem/floatingse/floating_frame.py:232-243 | wisdem/floatingse/floating_frame.py:472-483 | wisdem/towerse/tower.py:376-387 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/fixed_bottomse/jacket.py:500` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–12 lines × 5) · ×1
  • Duplicated block (10–12 lines × 5) wisdem/landbosse/model/FoundationCost.py:1033 — wisdem/landbosse/model/FoundationCost.py:1033-1043 | wisdem/landbosse/model/GridConnectionCost.py:186-195 | wisdem/landbosse/model/SitePreparationCost.py:963-972 | wisdem/landbosse/model/SubstationCost.py:144-155 | wisdem/landbosse/model/TurbineCost.py:124-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 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 (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) wisdem/glue_code/gc_WT_InitModel.py:984 — wisdem/glue_code/gc_WT_InitModel.py:984-1017 | wisdem/glue_code/gc_WT_InitModel.py:1070-1103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) wisdem/rotorse/blade_cost.py:648 — wisdem/rotorse/blade_cost.py:648-659 | wisdem/rotorse/blade_cost.py:683-693 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 10) · ×1
  • Duplicated block (11 lines × 10) wisdem/ccblade/ccblade.py:1569 — wisdem/ccblade/ccblade.py:1569-1579 | wisdem/commonse/cylinder_member.py:2058-2070 | wisdem/drivetrainse/drivetrain.py:77-87 | wisdem/drivetrainse/generator_models.py:1283-1294 | wisdem/drivetrainse/generator_models.py:1801-1812 | wisdem/drivetrainse/generator_models.py:2240-2252 | wisdem/drivetrainse/generator_models.py:3149-3160 | wisdem/nrelcsm/nrel_csm_cost_2015.py:221-232 | wisdem/nrelcsm/nrel_csm_cost_2015.py:1228-1239 | wisdem/rotorse/rotor_structure.py:943-954 — there are 10 copies across 6 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. 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 lines × 7) · ×1
  • Duplicated block (11 lines × 7) wisdem/drivetrainse/generator_models.py:1684 — wisdem/drivetrainse/generator_models.py:1684-1695 | wisdem/drivetrainse/generator_models.py:1704-1714 | wisdem/drivetrainse/generator_models.py:2547-2557 | wisdem/drivetrainse/generator_models.py:3609-3619 | wisdem/drivetrainse/generator_models.py:3640-3651 | wisdem/rotorse/blade_cost.py:3898-3908 | wisdem/rotorse/rotor_power.py:797-807 — there are 7 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 7 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×1
  • Duplicated block (11 lines × 6) wisdem/glue_code/gc_WT_DataStruc.py:1461 — wisdem/glue_code/gc_WT_DataStruc.py:1461-1473 | wisdem/rotorse/blade_cost.py:2829-2841 | wisdem/rotorse/blade_cost.py:3029-3041 | wisdem/rotorse/rotor_elasticity.py:70-81 | wisdem/rotorse/rotor_elasticity.py:85-97 | wisdem/rotorse/rotor_structure.py:1026-1036 — there are 6 copies across 4 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. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:1461` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–11 lines × 4) · ×1
  • Duplicated block (10–11 lines × 4) wisdem/drivetrainse/generator_models.py:1177 — wisdem/drivetrainse/generator_models.py:1177-1186 | wisdem/drivetrainse/generator_models.py:1680-1690 | wisdem/drivetrainse/generator_models.py:2140-2149 | wisdem/drivetrainse/generator_models.py:3027-3036 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/drivetrainse/generator_models.py:3037` calls `maximum` and `wisdem/drivetrainse/generator_models.py:1187` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) wisdem/commonse/cylinder_member.py:1310 — wisdem/commonse/cylinder_member.py:1310-1320 | wisdem/commonse/cylinder_member.py:1579-1588 | wisdem/commonse/cylinder_member.py:1729-1739 — 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, `wisdem/commonse/cylinder_member.py:1726` calls `make_float` and `wisdem/commonse/cylinder_member.py:1577` 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 (2–11 lines × 13) · ×1
  • Duplicated block (2–11 lines × 13) wisdem/glue_code/gc_LoadInputs.py:1028 — wisdem/glue_code/gc_LoadInputs.py:1028-1031 | wisdem/glue_code/gc_LoadInputs.py:1036-1040 | wisdem/glue_code/gc_LoadInputs.py:1042-1050 | wisdem/glue_code/gc_LoadInputs.py:1066-1076 | wisdem/glue_code/gc_LoadInputs.py:1103-1111 | wisdem/glue_code/gc_LoadInputs.py:1153-1154 | wisdem/glue_code/gc_LoadInputs.py:1170-1171 | wisdem/glue_code/gc_LoadInputs.py:1172-1173 | wisdem/glue_code/gc_LoadInputs.py:1175-1176 | wisdem/glue_code/gc_LoadInputs.py:1178-1181 | wisdem/glue_code/gc_LoadInputs.py:1214-1215 | wisdem/glue_code/gc_LoadInputs.py:1237-1238 | wisdem/glue_code/gc_LoadInputs.py:1488-1489 — all 13 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 `wisdem/glue_code/gc_LoadInputs.py:1036` 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 after the matched lines, `wisdem/glue_code/gc_LoadInputs.py:1041` calls `tolist` and `wisdem/glue_code/gc_LoadInputs.py:1032` 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–11 lines × 3) · ×1
  • Duplicated block (9–11 lines × 3) wisdem/glue_code/gc_PoseOptimization.py:1084 — wisdem/glue_code/gc_PoseOptimization.py:1084-1092 | wisdem/glue_code/gc_PoseOptimization.py:1140-1149 | wisdem/glue_code/gc_PoseOptimization.py:1229-1239 — 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 `wisdem/glue_code/gc_PoseOptimization.py:1140` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) wisdem/glue_code/gc_PoseOptimization.py:1079 — wisdem/glue_code/gc_PoseOptimization.py:1079-1089 | wisdem/glue_code/gc_PoseOptimization.py:1135-1145 | wisdem/glue_code/gc_PoseOptimization.py:1152-1162 — 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 `wisdem/glue_code/gc_PoseOptimization.py:1079` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) wisdem/drivetrainse/generator_models.py:919 — wisdem/drivetrainse/generator_models.py:919-927 | wisdem/drivetrainse/generator_models.py:929-939 — 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 `wisdem/drivetrainse/generator_models.py:919` 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 (4–11 lines × 3) · ×1
  • Duplicated block (4–11 lines × 3) wisdem/glue_code/gc_PoseOptimization.py:951 — wisdem/glue_code/gc_PoseOptimization.py:951-961 | wisdem/glue_code/gc_PoseOptimization.py:963-973 | wisdem/glue_code/gc_PoseOptimization.py:974-977 — 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 (8–10 lines × 17) · ×1
  • Duplicated block (8–10 lines × 17) wisdem/rotorse/blade_cost.py:81 — wisdem/rotorse/blade_cost.py:81-90 | wisdem/rotorse/blade_cost.py:95-104 | wisdem/rotorse/blade_cost.py:108-115 | wisdem/rotorse/blade_cost.py:120-128 | wisdem/rotorse/blade_cost.py:132-140 | wisdem/rotorse/blade_cost.py:144-152 | wisdem/rotorse/blade_cost.py:159-167 | wisdem/rotorse/blade_cost.py:174-182 | wisdem/rotorse/blade_cost.py:189-197 | wisdem/rotorse/blade_cost.py:204-212 | wisdem/rotorse/blade_cost.py:219-227 | wisdem/rotorse/blade_cost.py:236-244 | wisdem/rotorse/blade_cost.py:251-259 | wisdem/rotorse/blade_cost.py:264-273 | wisdem/rotorse/blade_cost.py:278-287 | wisdem/rotorse/blade_cost.py:294-302 | wisdem/rotorse/blade_cost.py:307-316 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/rotorse/blade_cost.py:81` 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 (9–10 lines × 13) · ×1
  • Duplicated block (9–10 lines × 13) wisdem/rotorse/blade_cost.py:70 — wisdem/rotorse/blade_cost.py:70-78 | wisdem/rotorse/blade_cost.py:84-93 | wisdem/rotorse/blade_cost.py:98-106 | wisdem/rotorse/blade_cost.py:122-130 | wisdem/rotorse/blade_cost.py:146-154 | wisdem/rotorse/blade_cost.py:161-169 | wisdem/rotorse/blade_cost.py:176-184 | wisdem/rotorse/blade_cost.py:191-199 | wisdem/rotorse/blade_cost.py:206-214 | wisdem/rotorse/blade_cost.py:253-262 | wisdem/rotorse/blade_cost.py:267-276 | wisdem/rotorse/blade_cost.py:296-305 | wisdem/rotorse/blade_cost.py:310-319 — all 13 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 `wisdem/rotorse/blade_cost.py:70` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10 lines × 7) · ×1
  • Duplicated block (10 lines × 7) wisdem/glue_code/gc_WT_DataStruc.py:1435 — wisdem/glue_code/gc_WT_DataStruc.py:1435-1446 | wisdem/glue_code/gc_WT_DataStruc.py:1462-1473 | wisdem/rotorse/blade_cost.py:2830-2841 | wisdem/rotorse/blade_cost.py:3030-3041 | wisdem/rotorse/rotor_elasticity.py:70-81 | wisdem/rotorse/rotor_elasticity.py:86-97 | wisdem/rotorse/rotor_structure.py:1027-1036 — there are 7 copies across 4 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:1435` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–10 lines × 6) · ×1
  • Duplicated block (9–10 lines × 6) wisdem/postprocessing/compare_designs.py:101 — wisdem/postprocessing/compare_designs.py:101-110 | wisdem/postprocessing/compare_designs.py:177-185 | wisdem/postprocessing/compare_designs.py:210-218 | wisdem/postprocessing/compare_designs.py:243-251 | wisdem/postprocessing/compare_designs.py:276-284 | wisdem/postprocessing/compare_designs.py:301-309 — 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.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×1
  • Duplicated block (9–10 lines × 4) wisdem/landbosse/model/CostModule.py:75 — wisdem/landbosse/model/CostModule.py:75-84 | wisdem/landbosse/model/FoundationCost.py:961-969 | wisdem/landbosse/model/GridConnectionCost.py:152-160 | wisdem/landbosse/model/SitePreparationCost.py:913-921 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) wisdem/drivetrainse/drive_structure.py:859 — wisdem/drivetrainse/drive_structure.py:859-865 | wisdem/drivetrainse/drive_structure.py:1240-1249 — 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 (5–10 lines × 5) · ×1
  • Duplicated block (5–10 lines × 5) wisdem/glue_code/gc_LoadInputs.py:829 — wisdem/glue_code/gc_LoadInputs.py:829-833 | wisdem/glue_code/gc_LoadInputs.py:838-843 | wisdem/glue_code/gc_LoadInputs.py:845-850 | wisdem/glue_code/gc_LoadInputs.py:1247-1253 | wisdem/glue_code/gc_LoadInputs.py:1302-1311 — 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 `wisdem/glue_code/gc_LoadInputs.py:829` 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 (8–9 lines × 18) · ×1
  • Duplicated block (8–9 lines × 18) wisdem/rotorse/blade_cost.py:69 — wisdem/rotorse/blade_cost.py:69-76 | wisdem/rotorse/blade_cost.py:83-91 | wisdem/rotorse/blade_cost.py:97-105 | wisdem/rotorse/blade_cost.py:109-116 | wisdem/rotorse/blade_cost.py:121-129 | wisdem/rotorse/blade_cost.py:133-141 | wisdem/rotorse/blade_cost.py:145-153 | wisdem/rotorse/blade_cost.py:160-168 | wisdem/rotorse/blade_cost.py:175-183 | wisdem/rotorse/blade_cost.py:190-198 | wisdem/rotorse/blade_cost.py:205-213 | wisdem/rotorse/blade_cost.py:220-228 | wisdem/rotorse/blade_cost.py:237-245 | wisdem/rotorse/blade_cost.py:252-260 | wisdem/rotorse/blade_cost.py:266-274 | wisdem/rotorse/blade_cost.py:280-288 | wisdem/rotorse/blade_cost.py:295-303 | wisdem/rotorse/blade_cost.py:309-317 — all 18 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 (8–9 lines × 5) · ×1
  • Duplicated block (8–9 lines × 5) wisdem/drivetrainse/generator_models.py:1723 — wisdem/drivetrainse/generator_models.py:1723-1730 | wisdem/drivetrainse/generator_models.py:2179-2186 | wisdem/drivetrainse/generator_models.py:2592-2600 | wisdem/drivetrainse/generator_models.py:3038-3045 | wisdem/drivetrainse/generator_models.py:3660-3668 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `wisdem/drivetrainse/generator_models.py:2590` calls `maximum` and `wisdem/drivetrainse/generator_models.py:1720` 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 (3–9 lines × 4) · ×1
  • Duplicated block (3–9 lines × 4) wisdem/ccblade/ccblade_component.py:95 — wisdem/ccblade/ccblade_component.py:95-103 | wisdem/ccblade/ccblade_component.py:624-632 | wisdem/ccblade/ccblade_component.py:641-643 | wisdem/drivetrainse/generator_models.py:491-493 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. 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, `wisdem/ccblade/ccblade_component.py:104` calls `add_input` and `wisdem/ccblade/ccblade_component.py:634` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6–9 lines × 2) · ×1
  • Duplicated block (6–9 lines × 2) wisdem/precomp/writer.py:81 — wisdem/precomp/writer.py:81-86 | wisdem/precomp/writer.py:89-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/precomp/writer.py:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 14) · ×1
  • Duplicated block (8 lines × 14) wisdem/commonse/wind_wave_drag.py:1119 — wisdem/commonse/wind_wave_drag.py:1119-1126 | wisdem/drivetrainse/drivetrain.py:256-263 | wisdem/fixed_bottomse/monopile.py:989-997 | wisdem/glue_code/gc_WT_DataStruc.py:731-739 | wisdem/glue_code/glue_code.py:121-129 | wisdem/glue_code/glue_code.py:159-168 | wisdem/glue_code/glue_code.py:185-192 | wisdem/glue_code/glue_code.py:354-361 | wisdem/glue_code/glue_code.py:840-847 | wisdem/rotorse/blade_cost.py:3988-3997 | wisdem/rotorse/blade_cost.py:4015-4024 | wisdem/rotorse/blade_cost.py:4041-4049 | wisdem/rotorse/rotor.py:200-208 | wisdem/rotorse/rotor_structure.py:1188-1207 — there are 14 copies across 8 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 14 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/fixed_bottomse/monopile.py:989` 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, `wisdem/glue_code/gc_WT_DataStruc.py:729` calls `add_subsystem`, `ParametrizeBladeAero` and `wisdem/commonse/wind_wave_drag.py:1119` 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 × 7) · ×1
  • Duplicated block (8 lines × 7) wisdem/landbosse/model/DevelopmentCost.py:95 — wisdem/landbosse/model/DevelopmentCost.py:95-105 | wisdem/landbosse/model/ErectionCost.py:199-206 | wisdem/landbosse/model/FoundationCost.py:1037-1044 | wisdem/landbosse/model/GridConnectionCost.py:188-196 | wisdem/landbosse/model/SitePreparationCost.py:966-973 | wisdem/landbosse/model/SubstationCost.py:147-156 | wisdem/landbosse/model/TurbineCost.py:126-135 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 7 call sites, so a change lands once. The 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 (8 lines × 6) · ×1
  • Duplicated block (8 lines × 6) wisdem/postprocessing/compare_designs.py:99 — wisdem/postprocessing/compare_designs.py:99-106 | wisdem/postprocessing/compare_designs.py:147-155 | wisdem/postprocessing/compare_designs.py:208-216 | wisdem/postprocessing/compare_designs.py:241-249 | wisdem/postprocessing/compare_designs.py:274-282 | wisdem/postprocessing/compare_designs.py:299-307 — 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.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×1
  • Duplicated block (12 lines × 4) wisdem/glue_code/gc_LoadInputs.py:879 — wisdem/glue_code/gc_LoadInputs.py:879-890 | wisdem/glue_code/gc_LoadInputs.py:904-915 | wisdem/glue_code/gc_LoadInputs.py:930-941 | wisdem/glue_code/gc_LoadInputs.py:948-959 — 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 (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) wisdem/glue_code/gc_PoseOptimization.py:1086 — wisdem/glue_code/gc_PoseOptimization.py:1086-1093 | wisdem/glue_code/gc_PoseOptimization.py:1172-1179 | wisdem/glue_code/gc_PoseOptimization.py:1233-1240 | wisdem/glue_code/gc_PoseOptimization.py:1260-1267 — 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 (5–8 lines × 4) · ×1
  • Duplicated block (5–8 lines × 4) wisdem/ccblade/ccblade_component.py:356 — wisdem/ccblade/ccblade_component.py:356-360 | wisdem/rotorse/blade_cost.py:2824-2831 | wisdem/rotorse/blade_cost.py:3024-3031 | wisdem/rotorse/rotor_elasticity.py:56-64 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/rotorse/blade_cost.py:2824` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5–8 lines × 3) · ×1
  • Duplicated block (5–8 lines × 3) wisdem/commonse/cylinder_member.py:1185 — wisdem/commonse/cylinder_member.py:1185-1189 | wisdem/commonse/cylinder_member.py:2260-2267 | wisdem/commonse/cylinder_member.py:2433-2440 — 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, `wisdem/commonse/cylinder_member.py:2430` calls `add_input`, `zeros` and `wisdem/commonse/cylinder_member.py:2257` 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–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) wisdem/glue_code/gc_WT_DataStruc.py:2200 — wisdem/glue_code/gc_WT_DataStruc.py:2200-2206 | wisdem/glue_code/gc_WT_InitModel.py:1195-1202 — 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 (7 lines × 11) · ×1
  • Duplicated block (7 lines × 11) wisdem/glue_code/glue_code.py:306 — wisdem/glue_code/glue_code.py:306-312 | wisdem/glue_code/glue_code.py:520-526 | wisdem/glue_code/glue_code.py:556-562 | wisdem/glue_code/glue_code.py:571-577 | wisdem/glue_code/glue_code.py:622-628 | wisdem/glue_code/glue_code.py:635-641 | wisdem/glue_code/glue_code.py:645-651 | wisdem/glue_code/glue_code.py:815-821 | wisdem/glue_code/glue_code.py:838-845 | wisdem/glue_code/glue_code.py:1021-1027 | wisdem/glue_code/glue_code.py:1058-1064 — all 11 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, `wisdem/glue_code/glue_code.py:518` calls `connect` and `wisdem/glue_code/glue_code.py:835` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) wisdem/glue_code/gc_PoseOptimization.py:1086 — wisdem/glue_code/gc_PoseOptimization.py:1086-1092 | wisdem/glue_code/gc_PoseOptimization.py:1142-1150 | wisdem/glue_code/gc_PoseOptimization.py:1175-1181 | wisdem/glue_code/gc_PoseOptimization.py:1231-1239 | wisdem/glue_code/gc_PoseOptimization.py:1260-1266 — 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 `wisdem/glue_code/gc_PoseOptimization.py:1142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–7 lines × 4) · ×1
  • Duplicated block (6–7 lines × 4) wisdem/glue_code/gc_LoadInputs.py:854 — wisdem/glue_code/gc_LoadInputs.py:854-859 | wisdem/glue_code/gc_LoadInputs.py:1132-1138 | wisdem/glue_code/gc_LoadInputs.py:1257-1262 | wisdem/glue_code/gc_LoadInputs.py:1315-1320 — 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 `wisdem/glue_code/gc_LoadInputs.py:1132` 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 (6–7 lines × 3) · ×1
  • Duplicated block (6–7 lines × 3) wisdem/rotorse/blade_cost.py:2559 — wisdem/rotorse/blade_cost.py:2559-2564 | wisdem/rotorse/blade_cost.py:2568-2573 | wisdem/rotorse/blade_cost.py:2588-2594 — 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 `wisdem/rotorse/blade_cost.py:2559` 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 after the matched lines, `wisdem/rotorse/blade_cost.py:2565` calls `sum` and `wisdem/rotorse/blade_cost.py:2574` 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 (6 lines × 10) · ×1
  • Duplicated block (6 lines × 10) wisdem/ccblade/ccblade_component.py:861 — wisdem/ccblade/ccblade_component.py:861-866 | wisdem/ccblade/ccblade_component.py:880-885 | wisdem/ccblade/ccblade_component.py:899-904 | wisdem/ccblade/ccblade_component.py:918-923 | wisdem/ccblade/ccblade_component.py:937-942 | wisdem/ccblade/ccblade_component.py:1013-1018 | wisdem/ccblade/ccblade_component.py:1032-1037 | wisdem/ccblade/ccblade_component.py:1051-1056 | wisdem/ccblade/ccblade_component.py:1070-1075 | wisdem/ccblade/ccblade_component.py:1089-1094 — all 10 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 (6 lines × 8) · ×1
  • Duplicated block (6 lines × 8) wisdem/postprocessing/compare_designs.py:89 — wisdem/postprocessing/compare_designs.py:89-97 | wisdem/postprocessing/compare_designs.py:138-145 | wisdem/postprocessing/compare_designs.py:167-173 | wisdem/postprocessing/compare_designs.py:201-206 | wisdem/postprocessing/compare_designs.py:234-239 | wisdem/postprocessing/compare_designs.py:291-297 | wisdem/postprocessing/compare_designs.py:316-322 | wisdem/postprocessing/compare_designs.py:337-343 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/postprocessing/compare_designs.py:89` 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 × 7) · ×1
  • Duplicated block (6 lines × 7) wisdem/postprocessing/compare_designs.py:99 — wisdem/postprocessing/compare_designs.py:99-104 | wisdem/postprocessing/compare_designs.py:147-152 | wisdem/postprocessing/compare_designs.py:208-213 | wisdem/postprocessing/compare_designs.py:241-246 | wisdem/postprocessing/compare_designs.py:274-279 | wisdem/postprocessing/compare_designs.py:299-304 | wisdem/postprocessing/compare_designs.py:345-350 — all 7 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 (3–6 lines × 10) · ×1
  • Duplicated block (3–6 lines × 10) wisdem/commonse/cylinder_member.py:1200 — wisdem/commonse/cylinder_member.py:1200-1203 | wisdem/commonse/cylinder_member.py:1226-1229 | wisdem/commonse/cylinder_member.py:2265-2270 | wisdem/commonse/cylinder_member.py:2438-2443 | wisdem/drivetrainse/drive_components.py:590-593 | wisdem/drivetrainse/drive_components.py:868-871 | wisdem/floatingse/mooring.py:134-136 | wisdem/glue_code/gc_WT_DataStruc.py:227-230 | wisdem/glue_code/gc_WT_DataStruc.py:1844-1849 | wisdem/glue_code/gc_WT_DataStruc.py:2255-2260 — there are 10 copies across 4 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 `wisdem/glue_code/gc_WT_DataStruc.py:1844` 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 after the matched lines, `wisdem/commonse/cylinder_member.py:1203` calls `add_output`, `zeros` and `wisdem/commonse/cylinder_member.py:2270` 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 × 12) · ×1
  • Duplicated block (8 lines × 12) wisdem/ccblade/ccblade_component.py:857 — wisdem/ccblade/ccblade_component.py:857-864 | wisdem/ccblade/ccblade_component.py:876-883 | wisdem/ccblade/ccblade_component.py:895-902 | wisdem/ccblade/ccblade_component.py:914-921 | wisdem/ccblade/ccblade_component.py:933-940 | wisdem/ccblade/ccblade_component.py:952-959 | wisdem/ccblade/ccblade_component.py:1009-1016 | wisdem/ccblade/ccblade_component.py:1028-1035 | wisdem/ccblade/ccblade_component.py:1047-1054 | wisdem/ccblade/ccblade_component.py:1066-1073 | wisdem/ccblade/ccblade_component.py:1085-1092 | wisdem/ccblade/ccblade_component.py:1104-1111 — all 12 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 × 8) · ×1
  • Duplicated block (7 lines × 8) wisdem/postprocessing/compare_designs.py:96 — wisdem/postprocessing/compare_designs.py:96-102 | wisdem/postprocessing/compare_designs.py:144-150 | wisdem/postprocessing/compare_designs.py:205-211 | wisdem/postprocessing/compare_designs.py:238-244 | wisdem/postprocessing/compare_designs.py:271-277 | wisdem/postprocessing/compare_designs.py:296-302 | wisdem/postprocessing/compare_designs.py:321-327 | wisdem/postprocessing/compare_designs.py:342-348 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `wisdem/postprocessing/compare_designs.py:268` calls `set_ylim` and `wisdem/postprocessing/compare_designs.py:92` 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 (3–5 lines × 11) · ×1
  • Duplicated block (3–5 lines × 11) wisdem/commonse/cylinder_member.py:791 — wisdem/commonse/cylinder_member.py:791-795 | wisdem/commonse/cylinder_member.py:1192-1197 | wisdem/drivetrainse/drive_components.py:291-293 | wisdem/drivetrainse/generator_models.py:1256-1260 | wisdem/drivetrainse/generator_models.py:1770-1774 | wisdem/drivetrainse/hub.py:104-109 | wisdem/drivetrainse/hub.py:247-252 | wisdem/drivetrainse/hub.py:495-497 | wisdem/drivetrainse/layout.py:160-162 | wisdem/fixed_bottomse/monopile.py:139-143 | wisdem/glue_code/gc_WT_DataStruc.py:1689-1691 — there are 11 copies across 7 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 11 sites; resolving a subset leaves the remainder to drift apart. 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, `wisdem/fixed_bottomse/monopile.py:136` calls `add_input`, `zeros` and `wisdem/commonse/cylinder_member.py:790` 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 × 7) · ×1
  • Duplicated block (5 lines × 7) wisdem/glue_code/gc_WT_DataStruc.py:44 — wisdem/glue_code/gc_WT_DataStruc.py:44-48 | wisdem/glue_code/gc_WT_DataStruc.py:146-152 | wisdem/glue_code/gc_WT_DataStruc.py:425-429 | wisdem/glue_code/gc_WT_DataStruc.py:1705-1711 | wisdem/glue_code/gc_WT_DataStruc.py:2071-2075 | wisdem/glue_code/gc_WT_DataStruc.py:2143-2147 | wisdem/rotorse/rotor_elasticity.py:839-843 — there are 7 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `wisdem/glue_code/gc_WT_DataStruc.py:2071` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `wisdem/glue_code/gc_WT_DataStruc.py:49` calls `add_output` and `wisdem/glue_code/gc_WT_DataStruc.py:1711` 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 (2–5 lines × 15) · ×1
  • Duplicated block (2–5 lines × 15) wisdem/commonse/cylinder_member.py:2431 — wisdem/commonse/cylinder_member.py:2431-2432 | wisdem/commonse/cylinder_member.py:2619-2620 | wisdem/commonse/wind_wave_drag.py:181-185 | wisdem/commonse/wind_wave_drag.py:186-188 | wisdem/commonse/wind_wave_drag.py:190-191 | wisdem/commonse/wind_wave_drag.py:192-193 | wisdem/commonse/wind_wave_drag.py:275-280 | wisdem/commonse/wind_wave_drag.py:424-429 | wisdem/commonse/wind_wave_drag.py:618-623 | wisdem/commonse/wind_wave_drag.py:624-627 | wisdem/commonse/wind_wave_drag.py:832-837 | wisdem/commonse/wind_wave_drag.py:839-842 | wisdem/fixed_bottomse/jacket.py:563-564 | wisdem/fixed_bottomse/jacket.py:674-676 | wisdem/fixed_bottomse/monopile.py:296-297 — there are 15 copies across 4 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 15 sites; resolving a subset leaves the remainder to drift apart. 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, `wisdem/commonse/wind_wave_drag.py:188` calls `add_input` and `wisdem/commonse/cylinder_member.py:2432` 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 (1–5 lines × 7) · ×1
  • Duplicated block (1–5 lines × 7) wisdem/drivetrainse/generator_models.py:1635 — wisdem/drivetrainse/generator_models.py:1635-1639 | wisdem/drivetrainse/generator_models.py:2036-2036 | wisdem/drivetrainse/generator_models.py:2037-2037 | wisdem/drivetrainse/generator_models.py:2108-2112 | wisdem/drivetrainse/generator_models.py:3504-3504 | wisdem/drivetrainse/generator_models.py:3505-3505 | wisdem/drivetrainse/generator_models.py:3560-3564 — all 7 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 `wisdem/drivetrainse/generator_models.py:1635` 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 after the matched lines, `wisdem/drivetrainse/generator_models.py:2036` calls `sin`, `tan` and `wisdem/drivetrainse/generator_models.py:1639` 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 (4–5 lines × 4) · ×1
  • Duplicated block (4–5 lines × 4) wisdem/drivetrainse/generator_models.py:2515 — wisdem/drivetrainse/generator_models.py:2515-2518 | wisdem/drivetrainse/generator_models.py:2520-2524 | wisdem/drivetrainse/generator_models.py:2968-2972 | wisdem/drivetrainse/generator_models.py:2974-2978 — 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 `wisdem/drivetrainse/generator_models.py:2515` 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 (2–5 lines × 6) · ×1
  • Duplicated block (2–5 lines × 6) wisdem/glue_code/gc_LoadInputs.py:879 — wisdem/glue_code/gc_LoadInputs.py:879-880 | wisdem/glue_code/gc_LoadInputs.py:900-904 | wisdem/glue_code/gc_LoadInputs.py:924-927 | wisdem/glue_code/gc_LoadInputs.py:930-931 | wisdem/glue_code/gc_LoadInputs.py:944-948 | wisdem/glue_code/gc_LoadInputs.py:961-964 — 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 `wisdem/glue_code/gc_LoadInputs.py:900` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: NSGA2Driver (LCOM4 4) wisdem/optimization_drivers/nsga2_driver.py:37 — NSGA2Driver'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.
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.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×1
  • Recursive walk over a caller-supplied document has no depth cap wisdem/inputs/validation.py:336 — `remove_numpy` is public and takes `fst_vt: dict` from its caller, and it calls itself at line 336 (`remove_numpy`) with a piece of `fst_vt` — and nowhere in `remove_numpy` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `remove_numpy` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
X19 · Unrestored process-global state · Process-global state is restored only on the happy path · ×1
  • Process-global state is restored only on the happy path REDACTED:313 — `_run_program` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the process working directory (changed at line 318, put back at line 324) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception raised in between: the process then keeps the overwritten value for the rest of its life, and every later relative path, `subprocess` launch, `os.environ` read or `print` in ANY module sees it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the value. The window is not private while it is open either: the working directory, the environment, the umask and `sys.stdout` are per-process, not per-thread, so a concurrent thread sees the moved value too. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd=` and `env=` arguments of `subprocess.run`/`Popen` scope both to the CHILD, absolute paths built with `os.path.join` or `pathlib` need no working directory, and a stream handed to the code that writes needs no `sys.stdout`. Where the global genuinely must move, `contextlib.chdir` (3.11+), `contextlib.redirect_stdout` or a `try`/`finally` makes the restore run on every path.
Minor — 20 finding(s)
X4 · Structured logging · Interpolated log message defeats structured logging · ×6
  • Interpolated log message defeats structured logging wisdem/glue_code/gc_WT_InitModel.py:1468 — `warning` at line 1468 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging wisdem/floatingse/floating_system.py:513 — `warning` at line 513 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging wisdem/commonse/utilities.py:113 — `debug` at line 113 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging wisdem/commonse/utilities.py:120 — `debug` at line 120 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging wisdem/commonse/utilities.py:130 — `debug` at line 130 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging wisdem/commonse/utilities.py:142 — `debug` at line 142 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 3 significant file(s) lose their only recent owner: wisdem/drivetrainse/drive_structure.py, wisdem/fixed_bottomse/monopile.py, wisdem/postprocessing/wisdem_get.py. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 3 significant file(s) lose their only recent owner: wisdem/ccblade/ccblade_component.py, wisdem/drivetrainse/converter.py, wisdem/rotorse/parametrize_rotor.py. Pair on, review, or document these before any departure.
D34 · Knowledge Freshness · Orphaned file · ×2
  • Orphaned file wisdem/optimization_drivers/dakota_driver.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file wisdem/optimization_drivers/nsga2/fast_nondom_sort.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found pyproject.toml:107 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `pyproject.toml` makes this repository a deployable product (line 107).
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 2 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: wisdem/optimization_drivers/dakota_driver.py, wisdem/optimization_drivers/nsga2/fast_nondom_sort.py (3 orphaned of 96 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 96 of the 129 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×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:4 — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 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:50 — `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`.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
X10 · Duplicated predicate · Duplicated predicate · ×1
  • Duplicated predicate wisdem/glue_code/gc_WT_DataStruc.py:221 — `modeling_options["user_elastic"]["hub"] or modeling_options["user_elastic"]["drivetrain"]` appears character-identically in 2 files — wisdem/glue_code/gc_WT_DataStruc.py, wisdem/glue_code/gc_WT_InitModel.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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch wisdem/landbosse/model/WeatherDelay.py:213 — `run_module` swallows every exception into `return 1` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Minor — 1 finding(s)
D12 · Dependency Hygiene · Outdated · ×1
  • Outdated: moorpy — `moorpy` is pinned to 1.2.1, but 1.3.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.2.1 until the declaration is edited.

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-f03377b66b4d4e7299a467195b9b84e6/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-f03377b66b4d4e7299a467195b9b84e6/history-1.json --exit-code 0 --source .0artifacts/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=3200" --report-format json --report-path /tmp/watchdog-gitleaks-f03377b66b4d4e7299a467195b9b84e6/history-2.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=4200 --max-count=747" --report-format json --report-path /tmp/watchdog-gitleaks-f03377b66b4d4e7299a467195b9b84e6/history-3.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-3.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-f03377b66b4d4e7299a467195b9b84e6/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .30artifacts/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 01a1e9cb-d39e-77c5-bddd-5261def6d572 · 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