Public report of sigscale/ocs, published 30 October 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, 15 November 2026, 06:30 UTC · Survey ID cd_1d7ecba59705435c8d86d4c1cfcc5d37

sigscale/ocs

Measured 30 October 2026, 05:19 UTC, at code version 1fd9a5d

No regression since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 30out of 100 Weak
CriticalWeakAdequateStrongExemplary
Down 2 since the last survey

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

A medium codebase: 67,571 lines of product code, tests not counted · Estimated rebuild effort: about 0.6 person-years · Weakest lens: Production Readiness, 16

Findings by how serious they are

7 critical 890 serious 10 minor

33 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks 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

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
30 October 2026, 05:19 UTC

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

The score is deterministic, which means the same code always gets the same score. Watchdog works 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 ▸

55of 55 dimensions measured by tools.
896of 907 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.
55dimensions across 7 lenses, read from 67,571 lines of product code.
Chapters

Executive summary

sigscale/ocs falls short of our standard for production because we found no working pipeline that builds or tests changes to the code and no automated security scanning of the code, its secrets or its dependencies. It scores 30 out of 100 and is rated Weak, and three of its seven critical findings are leaked passwords or keys.

Production Readiness, at 16, is the weakest lens and counts most in the score. The best first step is fixing the password or key in the code, worth about 11 points. Adding an automated build and test pipeline would lift Production Readiness itself, worth about 5 points. Raising Production Readiness to 70 would lift the score to about 42.

Two passwords or keys in the code's history and one in the code are open to anyone who can read the repository. Four form fields can't be read by a screen reader. Replacing each exposed password or key and labelling the form fields would close both risks.

The product code is 67,571 lines, about €81,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 16 · counts for 46%Code Health 25 · counts for 25%Maturity 43 · counts for 14%Security and Compliance 60 · counts for 8%Accessibility 69 · counts for 4%Architecture 94 · counts for 2%Event Sourcing 100 · counts for 1%

If Production Readiness rose from 16 to 70, the lowest score rated Strong, the score would rise from 30 to about 42.

Code composition: what the lines of code are
Product code 71%Tests 29%
New since the last survey: 7 findings

These 7 critical or serious findings weren't in the previous survey, on 16 October 2026.

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 185 findings

These 185 critical or serious findings were in the previous survey, on 16 October 2026, and are gone from this one. The first 100 are listed here.

  • Code Duplication · Duplicated block (23 lines × 3 locations) priv/www/src/sig-dashboard.js
  • Code Duplication · Duplicated block (23 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (22 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (22 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (22 lines × 3 locations) priv/www/src/sig-tariff-period-update.js
  • Code Duplication · Duplicated block (21 lines × 5 locations) priv/www/src/sig-client-add.js
  • Code Duplication · Duplicated block (21 lines × 7 locations) priv/www/src/sig-dashboard.js
  • Code Duplication · Duplicated block (20 lines × 8 locations) priv/www/src/sig-accounting-list.js
  • Code Duplication · Duplicated block (19 lines × 2 locations) priv/www/src/sig-accounting-list.js
  • Code Duplication · Duplicated block (19 lines × 6 locations) REDACTED
  • Code Duplication · Duplicated block (18 lines × 7 locations) priv/www/src/sig-dashboard.js
  • Code Duplication · Duplicated block (18 lines × 5 locations) priv/www/src/sig-dashboard.js
  • Code Duplication · Duplicated block (18 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (17 lines × 4 locations) REDACTED
  • Code Duplication · Duplicated block (17 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (17 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (16 lines × 2 locations) priv/www/src/sig-sub-update.js
  • Code Duplication · Duplicated block (15 lines × 3 locations) priv/www/src/sig-client-update.js
  • Code Duplication · Duplicated block (15 lines × 4 locations) priv/www/src/sig-dashboard.js
  • Code Duplication · Duplicated block (15 lines × 3 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (15 lines × 8 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (15 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (15 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (15 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (15 lines × 2 locations) priv/www/src/sig-sub-update.js
  • Code Duplication · Duplicated block (14 lines × 2 locations) priv/www/src/sig-bucket-add.js
  • Code Duplication · Duplicated block (14 lines × 3 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (14 lines × 3 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (14 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (14 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (14 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (14 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) priv/www/src/sig-dashboard.js
  • Code Duplication · Duplicated block (13 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (13 lines × 4 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (13 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (13 lines × 4 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (13 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 4 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) priv/www/src/sig-sub-update.js
  • Code Duplication · Duplicated block (12 lines × 5 locations) priv/www/src/sig-access-list.js
  • Code Duplication · Duplicated block (12 lines × 19 locations) priv/www/src/sig-dashboard.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (12 lines × 6 locations) REDACTED
  • Code Duplication · Duplicated block (12 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (12 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (12 lines × 5 locations) priv/www/src/sig-policy-list.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) priv/www/src/sig-sub-update.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) priv/www/src/sig-app.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) priv/www/src/sig-bucket-list.js
  • Code Duplication · Duplicated block (11 lines × 4 locations) priv/www/src/sig-dashboard.js
  • Code Duplication · Duplicated block (11 lines × 4 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (11 lines × 11 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 4 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (10 lines × 2 locations) priv/www/src/sig-http-list.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (10 lines × 7 locations) REDACTED
  • Code Duplication · Duplicated block (10 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (10 lines × 4 locations) priv/www/src/sig-policy-table-add.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) priv/www/src/sig-sub-update.js
  • Code Duplication · Duplicated block (9 lines × 7 locations) priv/www/src/sig-client-update.js
  • Code Duplication · Duplicated block (9 lines × 5 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (9 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (9 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (9 lines × 2 locations) priv/www/src/sig-policy-list.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) priv/www/src/sig-policy-list.js
  • Code Duplication · Duplicated block (9 lines × 2 locations) priv/www/src/sig-sub-update.js
  • Code Duplication · Duplicated block (8 lines × 5 locations) priv/www/src/sig-access-list.js
  • Code Duplication · Duplicated block (8 lines × 15 locations) priv/www/src/sig-app.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) priv/www/src/sig-bucket-add.js
  • Code Duplication · Duplicated block with local edits (8 matched lines × 2 locations) priv/www/src/sig-client-add.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (8 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (8 lines × 4 locations) priv/www/src/sig-policy-add.js
  • Code Duplication · Duplicated block (8 lines × 4 locations) priv/www/src/sig-product-list.js
  • Code Duplication · Duplicated block (8 lines × 3 locations) priv/www/src/sig-sub-update.js
  • Code Duplication · Duplicated block (8 lines × 2 locations) priv/www/src/sig-sub-update.js
  • Code Duplication · Duplicated block (7 lines × 2 locations) priv/www/src/sig-balance-list.js
  • Code Duplication · Duplicated block (7 lines × 3 locations) priv/www/src/sig-bucket-list.js
  • Code Duplication · Duplicated block (7 lines × 3 locations) priv/www/src/sig-client-update.js
  • Code Duplication · Duplicated block (7 lines × 2 locations) priv/www/src/sig-offer-add.js
  • Code Duplication · Duplicated block (7 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) priv/www/src/sig-client-update.js
  • Code Duplication · Duplicated block (6 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (6 lines × 5 locations) REDACTED
  • Code Duplication · Duplicated block (6 lines × 2 locations) REDACTED
Rebuild cost: about €81,000 · Estimate
Cost to rebuild€27,000 to €130,000, for 446 to 1,415 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 30. 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,571 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: Watchdog prices 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 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Raises the score by about 11 points · Low effort · REDACTED Scanning
2
Resolve the 1 Off-boarding risk finding(s) in Bus Factor.
Raises the score by about 3 points · Low effort · Bus Factor
3
Add a CI workflow that builds and runs the test suite on every push/PR.
Raises the score by about 5 points · Medium effort · CI/CD gates

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 €81,000 to build again, about 0.6 person-years of work. Its weakest lens is Production Readiness, at 16 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 11 points for low effort, because it clears the 1 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.9 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 17,632 lines over the last 90 days, which is about 71,508 lines a year. At that pace, the extra work comes to an estimated 9.4 to 56.4 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 Watchdog's 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.

At a glance — Code Health · 25% · Critical · gated by D1, D2, R1, R2, R3 ·

At a glance — Architecture · 94% · Exemplary ·

At a glance — Maturity · 43% · Weak · gated by D16, M1, M2 ·

At a glance — Readiness · 16% · Critical · gated by R4, P1, P3, P7 ·

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

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Accessibility · 69% · Adequate ·

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 — Injection18Medium
A07:2025 — Authentication Failures4High / Critical

Roadmap

Immediately resolve the leaked secret in REDACTED and establish a CI pipeline to build and test every push. Integrate static analysis tools like dialyzer or elvis into this workflow to ensure security regressions fail the build. Simultaneously, add tests for unreached production modules and enforce explicit timeouts and circuit breakers on all outbound HTTP requests to improve resilience.

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

Do thisHelpsEffortDimension
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.+11.5 ptsLowREDACTED Scanning
Resolve the 1 Off-boarding risk finding(s) in Bus Factor.+2.9 ptsLowBus Factor
Add a CI workflow that builds and runs the test suite on every push/PR.+5.0 ptsMediumCI/CD gates
Run what this repository's stack ships: dialyzer or elvis — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.+5.0 ptsMediumSecurity & performance tooling
Add tests that import the unreached modules (directly or through their public entry).+5.0 ptsMediumTest Coverage
Pass an explicit bound on every request — `{timeout, Ms}` in `httpc:request/4`'s HTTP options (its default is `infinity`), `{recv_timeout, Ms}` for hackney, a timeout on `gun:await/3` — and wrap dependencies that fail in a breaker (`fuse`) with back-off (`backoff`).+3.4 ptsMediumOutbound HTTP resilience
Expand the README with getting-started, architecture overview and a project map.+2.8 ptsMediumDocumentation (README)
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+2.8 ptsMediumType Safety

File quality

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

FileScoreBandWorst signal
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.1MixedStatic Analysis (SAST): Medium: REDACTED
src/ocs_diameter_3gpp_s6b_application_cb.erl4.8MixedCode Duplication: Near-duplicate member family (4 members, 14 shared lines)
src/ocs.erl5.5MixedCyclomatic Complexity: ocs.update_resource (cyclomatic 59)
src/ocs_rest_res_hub_balance.erl5.5MixedCode Duplication: Members sharing a duplicated core (8 members, 50+ identical tokens)
src/mod_ocs_rest_get.erl5.5MixedCode Duplication: Duplicated block (19 lines × 2)
src/mod_ocs_rest_delete.erl5.5MixedCode Duplication: Duplicated block (15 lines × 3)
src/ocs_diameter_acct_service_fsm.erl5.5MixedCyclomatic Complexity: ocs_diameter_acct_service_fsm.service_options (cyclomatic 19)
src/ocs_diameter_3gpp_sta_application_cb.erl5.6MixedCode Duplication: Duplicated block (16 lines × 2)
src/mod_ocs_rest_accepted_content.erl5.9MixedCode Duplication: Members sharing a duplicated core (15 members, 50+ identical tokens)
src/mod_ocs_rest_patch.erl5.9MixedCode Duplication: Duplicated block (5 lines × 2)
priv/www/src/sig-access-list.js6.3MixedCyclomatic Complexity: accessList._getAccess (cyclomatic 22)
src/ocs_rating.erl7.0MixedCyclomatic Complexity: ocs_rating.charge2 (cyclomatic 136)
src/ocs_log.erl7.0MixedCyclomatic Complexity: ocs_log.dia_req_and_res (cyclomatic 102)
priv/www/src/sig-offer-add.js7.0MixedCyclomatic Complexity: offerAdd._addOffer::mapPrice (cyclomatic 82)
priv/www/src/sig-dashboard.js7.0MixedCyclomatic Complexity: dashBoard._healthChart::handleAjaxResponse (cyclomatic 78)
src/ocs_rest_res_usage.erl7.0MixedCyclomatic Complexity: ocs_rest_res_usage.query_page1 (cyclomatic 45)
src/ocs_rest_res_product.erl7.0MixedCyclomatic Complexity: ocs_rest_res_product.product (cyclomatic 44)
src/ocs_rest_res_nrf.erl7.0MixedCyclomatic Complexity: ocs_rest_res_nrf.rate2 (cyclomatic 36)
priv/www/src/sig-app.js7.0MixedCyclomatic Complexity: SigApp.refresh (cyclomatic 35)

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

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

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

Minor — 10

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

Could not be resolved — 33

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

Watchdog 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. 55 of 55 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.7 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 55 dimensions across the health lenses
D1D2D3D4D6D13D15D16D17D28D29D34D35AC2AC3AC5AC6AC7AX10AX9ES1ES2M1M2M3P1P3P6P7R1R10R2R3R4R7R9X1X12X13X14X15X16X17X18X19X21X22X23X24X25X27X28X29X3X30

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, 896 of 907 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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
Watchdog 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
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement—◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a18b3f-9a53-75da-8761-335cef35e7cc.

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.

  • D5 Coupling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D8 Code Coverage — not measured this run — Watchdog 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: test source is present (.erl) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (`rebar3 do eunit --cover, cover` (or covertool for Cobertura XML)) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`rebar3 do eunit --cover, cover` (or covertool for Cobertura XML)) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog 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 (.erl) and this repository's suite is Common Test (19 `*_SUITE.erl` file(s)) with no rebar3 project above it — it is built by erlang.mk, a plain Makefile or autotools. This analyzer re-runs Erlang suites by pointing `rebar3` at a project root, and there is none here, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — Watchdog 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. No dependency manifest this pass reads for hygiene (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)) was found in this repository, so no package was assessed. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED — a gap in the analyzer, not a verdict about this repository. This row is about dependency HYGIENE — outdated, deprecated or unmaintained direct dependencies; known CVEs in the same dependency graph are a separate question, reported under D30 wherever the manifest is OSV-readable.
  • D14 License Compliance — not measured this run — Watchdog 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. Not scored — no dependency manifest this pass reads for licence data (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)) was found in this repository, so it declares no third-party dependency closure to grade. A gap in the analyzer, NOT a finding that this repository's licences are compliant: a manifest in an ecosystem outside that list, or third-party code copied into the tree, is not read — so this dimension asserts nothing about this repository's licensing in either direction.
  • D20 ADR Quality — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The ADR expectation is gated on whether a repository ships a deployable product. Our repo-kind classifier reads .NET project files and the host and package markers of the other ecosystems it knows (a Go `package main`, a Cargo binary, a package.json `bin`, `start` script or application dev server such as Vite or Next, Python console scripts or a Django/WSGI entry point, a Spring Boot / WAR / Gradle application build, a Rack or Rails app, a Composer project, an OTP release or escript, a Dockerfile, a Procfile, a Platform.sh `.platform/routes.yaml`, and the corresponding published-package manifests, including an OTP `*.app.src`, a Drupal module's `*.info` and a Claude Code `.claude-plugin/plugin.json`), and found none here, so we could not tell what kind of repository this is and did not assess its ADR log. This is a gap in our analyzer, not a finding about this repository.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog 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: 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D26 Project Cohesion — not measured this run — Watchdog 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. Project size and spread are measured over build units (a .NET project, a Maven or Gradle module, an npm, Deno or JSR package, a Go module, a Cargo crate, a Python, Composer, Bundler, RubyGems, Mix, rebar3, sbt, SwiftPM or pub package, an OTP application, an Xcode project or XcodeGen spec, or a checkout that declares no build at all) whose source a code model reads. This repository's production source is in a language no model reads, or in units whose build tool D26 does not recognise. That is a gap in this analyzer's language reach — not a finding that the repository's projects are cohesive.
  • D27 Navigability — not measured this run — Watchdog 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. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D44 Platform End-of-Life — not measured this run — Watchdog 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AX3 Project dependency cycles — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which project references which. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module (and dep/glide/godep), Python pyproject.toml/setup.cfg/setup.py, SwiftPM, sbt, Mill, RubyGems, Composer, Mix/rebar3, pub, Unity assembly-definition, Deno/JSR, Tuist, CMake, Bazel, Xcode and XcodeGen builds and uni-app uni_modules plugins, or — when none declares a module — from the imports between a JavaScript/TypeScript, Python, Ruby, loose Rust, build-less C# or manifest-less Go tree's top-level directories, or as one module when all of a tree's source is one directory, and this repository offers none of them — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, and the source's own imports could not stand in: they are read for JavaScript/TypeScript, Python and Ruby only, and only when those languages are the product — in any other language a tree is read only when its whole source is one directory, which this one's is not. The collector owed is an import reader for this repository's languages. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
  • AX4 Dependency direction — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the direction each project reference points. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module (and dep/glide/godep), Python pyproject.toml/setup.cfg/setup.py, SwiftPM, sbt, Mill, RubyGems, Composer, Mix/rebar3, pub, Unity assembly-definition, Deno/JSR, Tuist, CMake, Bazel, Xcode and XcodeGen builds and uni-app uni_modules plugins, or — when none declares a module — from the imports between a JavaScript/TypeScript, Python, Ruby, loose Rust, build-less C# or manifest-less Go tree's top-level directories, or as one module when all of a tree's source is one directory, and this repository offers none of them — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, and the source's own imports could not stand in: they are read for JavaScript/TypeScript, Python and Ruby only, and only when those languages are the product — in any other language a tree is read only when its whole source is one directory, which this one's is not. The collector owed is an import reader for this repository's languages. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX8 Test isolation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over which projects are test projects, and what they reference. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module (and dep/glide/godep), Python pyproject.toml/setup.cfg/setup.py, SwiftPM, sbt, Mill, RubyGems, Composer, Mix/rebar3, pub, Unity assembly-definition, Deno/JSR, Tuist, CMake, Bazel, Xcode and XcodeGen builds and uni-app uni_modules plugins, or — when none declares a module — from the imports between a JavaScript/TypeScript, Python, Ruby, loose Rust, build-less C# or manifest-less Go tree's top-level directories, or as one module when all of a tree's source is one directory, and this repository offers none of them — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, and the source's own imports could not stand in: they are read for JavaScript/TypeScript, Python and Ruby only, and only when those languages are the product — in any other language a tree is read only when its whole source is one directory, which this one's is not. The collector owed is an import reader for this repository's languages. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — Watchdog 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. Subject: 46 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • C1 Data Protection — not measured this run — Watchdog 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.
  • C2 Access Controls — not measured this run — Watchdog 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 authorization 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 authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog 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 audit 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 audit controls.
  • C4 Data Retention — not measured this run — Watchdog 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 retention 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 retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog 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 data-subject rights 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 data-subject rights controls.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Erlang, c 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Erlang, c 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.
  • P10 Library API & versioning — not measured this run — Watchdog 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 NuGet packaging and C# public API, and npm, PyPI, crates.io, Maven/Gradle, Go module, RubyGems, Composer, SwiftPM, CocoaPods, pub.dev, Hex, sbt, Mill and scala-cli package manifests only, and no .NET project and no package manifest of those ecosystems was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P5 DR & Backup — not measured this run — Watchdog 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. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found. Whether there is anything here to recover could NOT be determined: persistence is detected from deployment/container manifests and from dependency manifests, and neither was readable by this pass, so a data store this code opens directly — a file, an embedded database — would not be visible to it. The blindness is this analyzer's, not a finding that the repository holds no data. You can widen what we reach: keep the deployment/container manifest or a dependency manifest in this repository — or a link to the ops repo that holds the DR evidence — so the persistence probe has something to read.
  • R10 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 105 further occurrence(s) are not listed individually; the score already reflects all 145.
  • S1 Web-Security Posture — not measured this run — Watchdog 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.
  • X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, 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.
  • X26 Unsynchronised callback handoff — not measured this run — Watchdog 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 Java, Kotlin, Scala, Go, Swift, Python and Ruby source only, and no C# was loaded, no Java, Kotlin, Scala, Go, Swift, Python or Ruby was found, and this repository's C 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.
  • X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 76 further occurrence(s) are not listed individually; the score already reflects all 116.
  • X4 Structured logging — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's C 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.
  • X7 Silent fallback defaults — not measured this run — Watchdog 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. X7 measured the part of this repository it reads (C#, Python, TypeScript/JavaScript, Rust, Go, Java, Kotlin, Scala, PHP, Ruby, Swift and Dart), and its Erlang source is outside the check's reach, so the card covers only part of the product. That is a gap in this analyzer's language reach — not a finding that the unread source is free of silent defaults.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • 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.
  • 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.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • 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.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • 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 Complexity3.4 / 10Weak✓ 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 3.4 / 10 · rule-coverage 100% · ceiling Prevented

128 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was offerUpdate._updateOfferPrice at 186. A further 53 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being ocs_diameter.plmn at 836 — they are counted neither in the figure above nor in this dimension's score. 11 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: src/ocs_diameter.erl (ocs_diameter.plmn at 836), src/mod_ocs_rest_get.erl (mod_ocs_rest_get.do_get at 98), src/mod_ocs_rest_accepted_content.erl (mod_ocs_rest_accepted_content.do at 69), src/ocs_eap_codec.erl (ocs_eap_codec.aka_attr at 41), src/ocs_rest.erl (ocs_rest.date_range at 35), and 6 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

offerUpdate._updateOfferPrice (cyclomatic 186)REDACTED:1951
ocs_rating.charge2 (cyclomatic 136)src/ocs_rating.erl:608
offerUpdate._updateOfferAlteration (cyclomatic 104)REDACTED:2694
ocs_log.dia_req_and_res (cyclomatic 102)src/ocs_log.erl:2766
offerAdd._addOffer::mapPrice (cyclomatic 82)priv/www/src/sig-offer-add.js:1454

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

What to do

  1. Bring the 3 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with offerUpdate._updateOfferPrice (cyclomatic 186), _updateOfferPrice (cyclomatic 186), ocs_rating.charge2 (cyclomatic 136). — 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 3 together lifts Cyclomatic Complexity from 3.4 to about 4.2/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Stand up a CI pipeline, then gate Cyclomatic Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

121 method(s) exceeded the cognitive complexity threshold of 15; the worst was _updateOfferPrice at 237.

_updateOfferPrice (cognitive 237)REDACTED:1951
dashBoard._healthChart::handleAjaxResponse (cognitive 232)priv/www/src/sig-dashboard.js:892
offerUpdate._activeItemChanged (cognitive 182)REDACTED:991
ocs_rating.charge2 (cognitive 158)src/ocs_rating.erl:608
offerUpdate._updatePricesDialog (cognitive 121)REDACTED:1344

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

What to do

  1. Bring the 9 bodies over 120 down to 120 or less in Cognitive Complexity — start with _updateOfferPrice (cognitive 237), dashBoard._healthChart::handleAjaxResponse (cognitive 232), _healthChart::handleAjaxResponse (cognitive 232). — 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 9 together lifts Cognitive Complexity from 3.3 to about 4.5/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
  2. Stand up a CI pipeline, then gate Cognitive Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes6.3 / 10Adequate✓ 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 6.3 / 10 · rule-coverage 100% · ceiling Prevented

90 god class(es) detected.

MethodTooLong: offerAdd.template · ×47priv/www/src/sig-offer-add.js:32
FileTooLong: src/ocs_log.erl · ×33src/ocs_log.erl
ClassTooLong: offerUpdate · ×8REDACTED:32
TooManyMethods: offerUpdate · ×2REDACTED:32

What to do

  1. Resolve the 47 MethodTooLong finding(s) in God Classes — start with REDACTED (8), sig-dashboard.js (7), sig-offer-add.js (4). — One of this dimension's main actionable groups (47 warning-level).
  2. Resolve the 33 FileTooLong finding(s) in God Classes — start with ocs_log.erl, ocs_rest_res_usage.erl, ocs_rating.erl. — One of this dimension's main actionable groups (33 warning-level).
  3. Resolve the 8 ClassTooLong finding(s) in God Classes — start with REDACTED, sig-offer-add.js, sig-dashboard.js. — One of this dimension's main actionable groups (8 warning-level).
  4. Stand up a CI pipeline, then gate God Classes in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication6.8 / 10Adequate✓ Tool-verified

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

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

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

441 duplicated block group(s) detected. A further 35 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (5 lines × 2) · ×50src/mod_ocs_rest_accepted_content.erl:260
Duplicated block (7 lines × 2) · ×38src/ocs.erl:3465
Duplicated block (6 lines × 2) · ×34src/mod_ocs_rest_get.erl:574
Duplicated block (10 lines × 2) · ×23src/ocs.erl:2118
Duplicated block (9 lines × 2) · ×22src/ocs_app.erl:632

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

What to do

  1. Resolve the 50 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with ocs_log.erl (7), ocs_rating.erl (7), mod_ocs_rest_get.erl (7). — One of this dimension's main actionable groups (50 warning-level).
  2. Resolve the 38 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with ocs_log.erl (17), ocs_rating.erl (6), ocs_mib.erl (2). — One of this dimension's main actionable groups (38 warning-level).
  3. Resolve the 34 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with ocs_rating.erl (6), ocs_log.erl (5), ocs_diameter_auth_port_server.erl (3). — One of this dimension's main actionable groups (34 warning-level).
  4. Stand up a CI pipeline, then gate Code Duplication in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D6 · Cohesion (LCOM4)10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 20 classes have LCOM4 above 3.

✓ On the Gold path — maintain.

Detailed fixes: d6_recommendation.md.

D13 · REDACTED Scanning5.0 / 10Adequate✓ Tool-verified

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

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

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

1 secret(s) detected.

REDACTED

What to do

  1. Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Stand up a CI pipeline, then gate REDACTED Scanning in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D15 · Churn × Complexity Hotspots9.6 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

Top hotspots: src/ocs_log.erl (15×34=510); src/user_default.erl (3×91=273); src/ocs_terminate_fsm.erl (3×15=45)

Hotspot: src/ocs_log.erl · ×3src/ocs_log.erl:6830

What to do

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

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

D16 · Bus Factor2.7 / 10Weak✓ 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 2.7 / 10 · rule-coverage 100% · ceiling Documented

68 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/ocs_log.erl. Counted over 93 of the 118 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1

What to do

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

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 deducted task-comment markers across 67571 LoC (0.0/KLoC) → score 10.0. 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.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

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

REDACTED

What to do

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

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

D34 · Knowledge Freshness9.8 / 10Exemplary✓ 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.8 / 10 · rule-coverage 100% · ceiling Documented

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

Orphaned file · ×2src/mod_oauth.erl:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

D35 · Change Coupling6.5 / 10Adequate✓ 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 6.5 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: ocs_diameter_3gpp_sta_application_cb.erl↔ocs_diameter_3gpp_swm_application_cb.erl 90%; ocs_diameter_eap_application_cb.erl↔ocs_diameter_nas_application_cb.erl 80%; ocs_rest_res_hub_service.erl↔ocs_rest_res_hub_user.erl 69%

Change coupling: ocs_diameter_eap_application_cb.erl ↔ ocs_diameter_nas_application_cb.erl · ×9src/ocs_diameter_eap_application_cb.erl:1
Change-coupling hub: ocs_diameter_3gpp_sta_application_cb.erl → ocs_diameter_3gpp_s6b_application_cb.erl, ocs_diameter_3gpp_swm_application_cb.erl, ocs_diameter_3gpp_swx_application_cb.erl, ocs_diameter_eap_application_cb.erl, ocs_diameter_nas_application_cb.erl · ×2src/ocs_diameter_3gpp_sta_application_cb.erl
Change coupling clique: ocs_rest_res_hub_balance.erl, ocs_rest_res_hub_product.erl, ocs_rest_res_hub_resource.erl, ocs_rest_res_hub_service.erl, ocs_rest_res_hub_usage.erl, ocs_rest_res_hub_user.erl · ×2src/ocs_rest_res_hub_balance.erl

What to do

  1. Resolve the 9 Change coupling finding(s) in Change Coupling — start with ocs_diameter_3gpp_s6b_application_cb.erl (2), ocs_diameter_eap_application_cb.erl, mod_ocs_rest_accepted_content.erl. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with ocs_diameter_3gpp_sta_application_cb.erl, mod_ocs_rest_delete.erl. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 2 Change coupling clique finding(s) in Change Coupling — start with ocs_rest_res_hub_balance.erl, sig-access-list.js. — 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.

Frontend & cross-cutting dimensions

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

AC2 · Forms & labels5.2 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×4) — priv/www/src/sig-offer-add.js:282, priv/www/src/sig-offer-add.js:642, REDACTED:245, …

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.

  • No accessibility enforcement found — no automated accessibility check runs over your pages. Add an accessibility checker (axe-core, pa11y or Lighthouse) over your HTML in CI and fail the build on new violations. What was searched, so you can tell an absence from a miss: the 46 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.

What to do

  • Enforce accessibility over your pages: run an accessibility checker (axe-core, pa11y or Lighthouse) against your HTML in CI and fail the build on new violations — these run as standalone tools without adding a package manifest.
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.

What to do

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

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether the event-sourcing replay fold reconstructs state purely from the event (no wall clock, UUID or randomness) so replay is reproducible.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether persisted events stay immutable (never rewritten in place).

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

M1 · Documentation (README)1.2 / 10Critical✓ Tool-verified

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

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

  • The root README is 10 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, it found no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
  • 100 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.

What to do

  • Expand the README with getting-started, architecture overview and a project map.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Review the README against recent changes; refresh the parts that drifted.
M2 · Architecture documentation3.0 / 10Weak✓ 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 repo is organised deliberately — src/test separation and consistent project naming.

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

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

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

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

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

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
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 dialyzer or elvis — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Run what this repository's stack ships: dialyzer or elvis — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `httpc:request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×4) — src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1027, src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1095, src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1181, …

What to do

  • Pass an explicit bound on every request — `{timeout, Ms}` in `httpc:request/4`'s HTTP options (its default is `infinity`), `{recv_timeout, Ms}` for hackney, a timeout on `gun:await/3` — and wrap dependencies that fail in a breaker (`fuse`) with back-off (`backoff`).
R1 · Type Safety0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

  • 0 typed · 45 plain JS — the untyped files are priv/www/src/ocs-icons.js, priv/www/src/sig-access-list.js, priv/www/src/sig-accounting-list.js, priv/www/src/sig-app.js, priv/www/src/sig-balance-list.js, priv/www/src/sig-bucket-add.js (+39 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication6.7 / 10Adequate✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.

  • priv/www/src/sig-dashboard.js:1739 · priv/www/src/sig-dashboard.js:1870 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — priv/www/src/sig-dashboard.js:1739
  • priv/www/src/sig-tariff-rate-update.js:140 · priv/www/src/sig-tariff-roaming-update.js:144 — the two spans are one implementation copied and then locally edited — 801 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — priv/www/src/sig-tariff-rate-update.js:140
  • priv/www/src/sig-tariff-rate-add.js:91 · priv/www/src/sig-tariff-roaming-add.js:95 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-tariff-rate-add.js:91
  • priv/www/src/sig-dashboard.js:387 · priv/www/src/sig-dashboard.js:470 · priv/www/src/sig-dashboard.js:553 · priv/www/src/sig-dashboard.js:636 · +2 more site(s) not listed — 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. — priv/www/src/sig-dashboard.js:387
  • priv/www/src/sig-ipdr-list-voip.js:257 · REDACTED:354 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — priv/www/src/sig-ipdr-list-voip.js:257
  • priv/www/src/sig-period-table-add.js:14 · priv/www/src/sig-policy-table-add.js:14 · priv/www/src/sig-rate-table-add.js:14 · priv/www/src/sig-roaming-table-add.js:14 — these 4 files are line-for-line copies of one another — 62 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — priv/www/src/sig-period-table-add.js:14
  • priv/www/src/sig-period-table-list.js:14 · priv/www/src/sig-rate-table-list.js:14 · priv/www/src/sig-roaming-table-list.js:14 — these 3 files are line-for-line copies of one another — 60 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — priv/www/src/sig-period-table-list.js:14
  • priv/www/src/sig-tariff-period-list.js:159 · priv/www/src/sig-tariff-rate-list.js:130 · priv/www/src/sig-tariff-roaming-list.js:119 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-tariff-period-list.js:159
  • priv/www/src/sig-product-list.js:171 · priv/www/src/sig-sub-list.js:138 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-product-list.js:171
  • priv/www/src/sig-tariff-period-update.js:185 · priv/www/src/sig-tariff-rate-update.js:127 · priv/www/src/sig-tariff-roaming-update.js:131 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-tariff-period-update.js:185
  • priv/www/src/sig-sub-add.js:740 · priv/www/src/sig-sub-add.js:810 · priv/www/src/sig-sub-update.js:543 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — priv/www/src/sig-sub-add.js:740
  • priv/www/src/sig-bucket-list.js:361 · priv/www/src/sig-product-list.js:287 · priv/www/src/sig-sub-list.js:255 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — priv/www/src/sig-bucket-list.js:361
  • priv/www/src/sig-tariff-period-list.js:224 · priv/www/src/sig-tariff-rate-list.js:189 · priv/www/src/sig-tariff-roaming-list.js:178 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-tariff-period-list.js:224
  • priv/www/src/sig-tariff-period-add.js:196 · priv/www/src/sig-tariff-rate-add.js:139 · priv/www/src/sig-tariff-roaming-add.js:143 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — priv/www/src/sig-tariff-period-add.js:196
  • priv/www/src/sig-accounting-list.js:453 · priv/www/src/sig-balance-list.js:245 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-accounting-list.js:453
  • priv/www/src/sig-tariff-period-add.js:143 · priv/www/src/sig-tariff-rate-add.js:98 · priv/www/src/sig-tariff-roaming-add.js:102 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-tariff-period-add.js:143
  • priv/www/src/sig-bucket-list.js:249 · priv/www/src/sig-product-list.js:189 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-bucket-list.js:249
  • priv/www/src/sig-access-list.js:165 · priv/www/src/sig-accounting-list.js:314 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-access-list.js:165
  • priv/www/src/sig-client-list.js:249 · priv/www/src/sig-product-list.js:305 · priv/www/src/sig-sub-list.js:273 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — priv/www/src/sig-client-list.js:249
  • REDACTED:1841 · REDACTED:1884 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:1841
  • REDACTED:1973 · REDACTED:2719 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:1973
  • priv/www/src/sig-access-list.js:277 · priv/www/src/sig-accounting-list.js:462 · priv/www/src/sig-balance-list.js:254 · priv/www/src/sig-ipdr-list-voip.js:296 · +1 more site(s) not listed — the 5 copies are spread across 5 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-access-list.js:277
  • priv/www/src/sig-http-list.js:193 · priv/www/src/sig-user-list.js:195 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-http-list.js:193
  • priv/www/src/sig-offer-list.js:161 · priv/www/src/sig-user-list.js:128 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-offer-list.js:161
  • REDACTED:3454 · REDACTED:3486 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:3454
  • priv/www/src/sig-ipdr-list-voip.js:200 · REDACTED:298 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — priv/www/src/sig-ipdr-list-voip.js:200
  • REDACTED:1765 · REDACTED:1813 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:1765
  • priv/www/src/sig-tariff-period-list.js:123 · priv/www/src/sig-tariff-roaming-list.js:83 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — priv/www/src/sig-tariff-period-list.js:123
  • priv/www/src/sig-client-update.js:219 · priv/www/src/sig-tariff-period-update.js:185 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-client-update.js:219
  • REDACTED:2304 · REDACTED:2350 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:2304
  • priv/www/src/sig-policy-list.js:523 · priv/www/src/sig-tariff-period-list.js:194 · priv/www/src/sig-tariff-rate-list.js:165 · priv/www/src/sig-tariff-roaming-list.js:154 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-policy-list.js:523
  • priv/www/src/sig-tariff-period-update.js:325 · priv/www/src/sig-tariff-roaming-update.js:206 — the two spans are one implementation copied and then locally edited — 197 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — priv/www/src/sig-tariff-period-update.js:325
  • priv/www/src/sig-client-list.js:166 · priv/www/src/sig-sub-list.js:119 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-client-list.js:166
  • priv/www/src/sig-dashboard.js:954 · priv/www/src/sig-dashboard.js:980 · priv/www/src/sig-dashboard.js:1006 · priv/www/src/sig-dashboard.js:1032 — 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. — priv/www/src/sig-dashboard.js:954
  • priv/www/src/sig-offer-add.js:2113 · priv/www/src/sig-offer-add.js:2231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — priv/www/src/sig-offer-add.js:2113
  • priv/www/src/sig-dashboard.js:1846 · priv/www/src/sig-dashboard.js:1977 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-dashboard.js:1846
  • priv/www/src/sig-sub-add.js:563 · priv/www/src/sig-sub-add.js:592 · priv/www/src/sig-sub-update.js:632 · priv/www/src/sig-sub-update.js:659 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — priv/www/src/sig-sub-add.js:563
  • priv/www/src/sig-sub-update.js:711 · priv/www/src/sig-sub-update.js:736 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-sub-update.js:711
  • priv/www/src/sig-client-update.js:190 · priv/www/src/sig-user-update.js:126 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — priv/www/src/sig-client-update.js:190
  • priv/www/src/sig-client-update.js:275 · priv/www/src/sig-client-update.js:349 · priv/www/src/sig-user-update.js:198 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — priv/www/src/sig-client-update.js:275

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R2 · Cyclomatic Complexity0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • _updateOfferPrice has cyclomatic complexity 186 and cognitive complexity 237; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1951
  • _updateOfferAlteration has cyclomatic complexity 104 and cognitive complexity 120; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2694
  • mapPrice has cyclomatic complexity 82 and cognitive complexity 120; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-offer-add.js:1454
  • _updateProductOffer has cyclomatic complexity 82 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1637
  • _activeItemChanged has cyclomatic complexity 79 and cognitive complexity 182; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:991
  • handleAjaxResponse has cyclomatic complexity 78 and cognitive complexity 232; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-dashboard.js:892
  • _updateAddPrice has cyclomatic complexity 78 and cognitive complexity 120; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:3210
  • _addPrice has cyclomatic complexity 48 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-offer-add.js:2002
  • _updatePricesDialog has cyclomatic complexity 45 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1344
  • refresh has cyclomatic complexity 35 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-app.js:389
  • _addOffer has cyclomatic complexity 32 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-offer-add.js:1301
  • handleAjaxResponse has cyclomatic complexity 30 and cognitive complexity 108; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-bucket-list.js:271
  • _addAlteration has cyclomatic complexity 29 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-offer-add.js:2170
  • handleAjaxResponse has cyclomatic complexity 28 and cognitive complexity 101; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-product-list.js:211
  • _addUpdatePriceDialog has cyclomatic complexity 28 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-offer-add.js:1071
  • _serviceAddSubmit has cyclomatic complexity 27 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-sub-add.js:533
  • updateSubscriberAuthorization has cyclomatic complexity 25 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-sub-update.js:616
  • _routePageChanged has cyclomatic complexity 25 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-app.js:680
  • handleAjaxResponse has cyclomatic complexity 23 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-offer-list.js:195
  • handleAjaxResponse has cyclomatic complexity 22 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — priv/www/src/sig-policy-list.js:523

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files0.2 / 10Critical✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • REDACTED has 3761 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • priv/www/src/sig-offer-add.js has 2343 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — priv/www/src/sig-offer-add.js:1
  • priv/www/src/sig-dashboard.js has 2040 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — priv/www/src/sig-dashboard.js:1
  • priv/www/src/sig-sub-add.js has 930 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — priv/www/src/sig-sub-add.js:1
  • priv/www/src/sig-sub-update.js has 895 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — priv/www/src/sig-sub-update.js:1
  • priv/www/src/sig-app.js has 852 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — priv/www/src/sig-app.js:1
  • priv/www/src/sig-policy-list.js has 767 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — priv/www/src/sig-policy-list.js:1
  • priv/www/src/sig-accounting-list.js has 487 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — priv/www/src/sig-accounting-list.js:1
  • priv/www/src/sig-client-update.js has 417 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — priv/www/src/sig-client-update.js:1
  • REDACTED has 417 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • priv/www/src/sig-bucket-list.js has 403 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — priv/www/src/sig-bucket-list.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage0.0 / 10Critical✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • 0% of 45 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

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.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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

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

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

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

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

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

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

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

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

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

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

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

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

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

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

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

Other · Code Health — Whether a walk over an ETS table leaves the key it stands on alone — Erlang's own lists and maps are values no body can change, but an ETS key traversal asks the table for the key after the current one, so on a `set`, `bag` or `duplicate_bag` that is not fixed with `ets:safe_fixtable/2`, deleting the current key and then calling `ets:next/2` (or `ets:prev/2`) from it raises `badarg` and the rest of the table is never visited.

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

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

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

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

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

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

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

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

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

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

  • `catch _:_` 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. (×37) — src/ocs_diameter_3gpp_ro_application_cb.erl:770, src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1927, src/ocs_diameter_acct_service_fsm.erl:205, …
  • `catch _:_Reason` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — src/ocs_radius_acct_port_server.erl:270, src/ocs_radius_auth_port_server.erl:344
  • `catch _:_R` 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. — src/ocs_radius_authentication.erl:115

What to do

  • Swallowed exception (caught, then discarded)
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.

WCAG coverage — what static analysis assessed

Statically assessed 10 of 55 WCAG 2.2 Level A/AA success criteria (18%; ≈20% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 45 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 45 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.1, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

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 Health25%Critical — gated by D1, D2, R1, R2, R3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture94%ExemplarySolid.
Maturity43%Weak — gated by D16, M1, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness16%Critical — gated by R4, P1, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security60%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event Sourcing100%ExemplaryStrongest area.
Accessibility69%AdequateAcceptable, with room to improve.
Unscored — 1 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 5 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: these audit 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 audit 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.
  • C4 Data Retention — Not assessed: these retention 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 retention 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.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights 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 data-subject rights 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.
  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 71 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 image/media element found in the parsed markup — AC1 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AX1 Captive dependencies — Not applicable: the BEAM has no dependency-injection container — state lives in processes, and no process is handed an instance whose lifetime another one scopes.
  • AX2 Stateful singletons — Not applicable: Erlang processes share no mutable memory — state lives in a process's own mailbox — so there is no shared object to race on. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
  • AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
  • AXB1 Runtime evidence locked — no reproducible boot — 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 — Not assessed: these authorization 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 authorization 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.
  • D10 Test Quality — ~27052 lines of test source are present (.erl) 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 — no .erl test runner
  • D12 Dependency Hygiene — Dependency hygiene not measured — no supported dependency manifest was read
  • D14 License Compliance — No dependency manifest found — no declared dependency closure to grade for licences
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
  • D20 ADR Quality — Repository kind not determined
  • D21 Naming Consistency — Naming consistency is measured on C# only; Erlang, JavaScript not measured.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. 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# and Visual Basic comments only — this repository's production source is .erl, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 measured no build unit over this repository's .c, .erl, .js source. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.erl), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — 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.
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D43 Malicious Dependencies — 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), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D5 Coupling — D5 reads a .NET project-reference graph only — this repository's production source is .erl, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • D9 Test Distribution — Test source is present (.erl) 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 its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (86 value object(s))
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • M4 Documentation accuracy — Not applicable: the 7 current-state document(s) make no claim of a kind M4 checks.
  • P10 Library API & versioning — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — no CI workflow found
  • P2 Observability — This repository's JavaScript/TypeScript, Erlang source (2 module(s), 163 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`rebar3 do eunit --cover, cover` (or covertool for Cobertura XML)) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `erlperf:run`/`compare`/`benchmark`/`time` calls, a common_test `benchmark_data` event, `bench_*` functions in a `bench_*.erl` module where rebar.config installs rebar3_bench, or erlperf or rebar3_bench in a rebar.config, 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 applicable: Erlang and TypeScript/JavaScript runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • PF3 Async & latency hygiene — Not applicable: Erlang has no async/await function colour, so there is no asynchronous code for a blocking call to stall.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
  • R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X2 Cancellation propagation — 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
  • 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.
  • X26 Unsynchronised callback handoff — 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
  • X31 Test-only surface in a production module — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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.
  • X4 Structured logging — 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
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 7 finding(s)
AC2 · Forms & labels · <input> without a programmatic label · ×4
  • <input> without a programmatic label priv/www/src/sig-offer-add.js:282 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label priv/www/src/sig-offer-add.js:642 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label REDACTED:245 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label REDACTED:588 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
D13 · REDACTED Scanning · Leaked secret · ×1
  • REDACTED
Serious — 890 finding(s)
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×50
  • Duplicated block (5 lines × 2) src/mod_ocs_rest_accepted_content.erl:260 — src/mod_ocs_rest_accepted_content.erl:260-264 | src/mod_ocs_rest_accepted_content.erl:301-305 — both copies are in the same file, so extract the 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) src/mod_ocs_rest_patch.erl:178 — src/mod_ocs_rest_patch.erl:178-182 | src/mod_ocs_rest_patch.erl:219-223 — both copies are in the same file, so extract the 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) src/mod_ocs_rest_patch.erl:189 — src/mod_ocs_rest_patch.erl:189-193 | src/mod_ocs_rest_patch.erl:195-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) src/ocs.erl:386 — src/ocs.erl:386-390 | src/ocs.erl:431-435 — both copies are in the same file, so extract the 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) src/ocs.erl:1571 — src/ocs.erl:1571-1575 | src/ocs.erl:1585-1589 — both copies are in the same file, so extract the 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) src/ocs.erl:3549 — src/ocs.erl:3549-3553 | src/ocs_rest_res_role.erl:266-270 — 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) src/ocs_diameter_3gpp_ro_application_cb.erl:834 — src/ocs_diameter_3gpp_ro_application_cb.erl:834-838 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1975-1979 — before extracting anything, compare `src/ocs_diameter_3gpp_ro_application_cb.erl` and `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) src/ocs_diameter_acct_service_fsm.erl:352 — src/ocs_diameter_acct_service_fsm.erl:352-356 | src/ocs_diameter_auth_service_fsm.erl:401-405 — before extracting anything, compare `src/ocs_diameter_acct_service_fsm.erl` and `src/ocs_diameter_auth_service_fsm.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) src/ocs_eap_aka_auc_fsm.erl:144 — src/ocs_eap_aka_auc_fsm.erl:144-148 | src/ocs_eap_aka_auc_fsm.erl:186-190 — both copies are in the same file, so extract the 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) src/ocs_log.erl:433 — src/ocs_log.erl:433-437 | src/ocs_log.erl:700-704 — both copies are in the same file, so extract the 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) src/ocs_log.erl:845 — src/ocs_log.erl:845-849 | src/ocs_log.erl:858-863 — both copies are in the same file, so extract the 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) src/ocs_log.erl:1998 — src/ocs_log.erl:1998-2002 | src/ocs_log.erl:2276-2281 — both copies are in the same file, so extract the 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) src/ocs_log.erl:3518 — src/ocs_log.erl:3518-3523 | src/ocs_log.erl:3625-3629 — both copies are in the same file, so extract the 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) src/ocs_log.erl:6847 — src/ocs_log.erl:6847-6851 | src/ocs_log.erl:6854-6858 — both copies are in the same file, so extract the 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) src/ocs_pgw_fsm.erl:295 — src/ocs_pgw_fsm.erl:295-299 | src/ocs_pgw_fsm.erl:402-406 — both copies are in the same file, so extract the 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) src/ocs_pgw_fsm.erl:336 — src/ocs_pgw_fsm.erl:336-340 | src/ocs_pgw_fsm.erl:371-375 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:799 — src/ocs_rating.erl:799-803 | src/ocs_rating.erl:841-845 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:1145 — src/ocs_rating.erl:1145-1149 | src/ocs_rating.erl:1286-1291 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:2012 — src/ocs_rating.erl:2012-2016 | src/ocs_rating.erl:2034-2038 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:2436 — src/ocs_rating.erl:2436-2441 | src/ocs_rating.erl:2451-2455 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:2800 — src/ocs_rating.erl:2800-2805 | src/ocs_rating.erl:2812-2816 — both copies are in the same file, so extract the 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) src/ocs_rest_res_product.erl:78 — src/ocs_rest_res_product.erl:78-82 | src/ocs_rest_res_product.erl:178-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) src/ocs_rest_res_product.erl:122 — src/ocs_rest_res_product.erl:122-126 | src/ocs_rest_res_product.erl:215-219 — both copies are in the same file, so extract the 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) src/ocs_rest_res_resource.erl:968 — src/ocs_rest_res_resource.erl:968-972 | src/ocs_rest_res_resource.erl:983-987 — both copies are in the same file, so extract the 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) src/ocs_rest_res_usage.erl:1436 — src/ocs_rest_res_usage.erl:1436-1440 | src/ocs_rest_res_usage.erl:1446-1450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 25 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×47
  • MethodTooLong: offerAdd.template priv/www/src/sig-offer-add.js:32 — MethodTooLong — template runs 807 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 707 over it, 8.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: offerUpdate.template REDACTED:33 — MethodTooLong — template runs 768 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 668 over it, 7.68× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: offerUpdate._updateOfferPrice REDACTED:1951 — MethodTooLong — _updateOfferPrice runs 656 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 556 over it, 6.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: subAdd.template priv/www/src/sig-sub-add.js:32 — MethodTooLong — template runs 439 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 339 over it, 4.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: offerAdd._addOffer priv/www/src/sig-offer-add.js:1301 — MethodTooLong — _addOffer runs 432 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 332 over it, 4.32× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SigApp.template priv/www/src/sig-app.js:43 — MethodTooLong — template runs 343 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 243 over it, 3.43× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: offerUpdate._updateAddPrice REDACTED:3210 — MethodTooLong — _updateAddPrice runs 323 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 223 over it, 3.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: policyList.template priv/www/src/sig-policy-list.js:31 — MethodTooLong — template runs 312 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 212 over it, 3.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: subUpdate.template priv/www/src/sig-sub-update.js:32 — MethodTooLong — template runs 312 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 212 over it, 3.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: offerUpdate._updateOfferAlteration REDACTED:2694 — MethodTooLong — _updateOfferAlteration runs 293 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 193 over it, 2.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: offerUpdate._updateProductOffer REDACTED:1637 — MethodTooLong — _updateProductOffer runs 264 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 164 over it, 2.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: dashBoard._healthChart priv/www/src/sig-dashboard.js:885 — MethodTooLong — _healthChart runs 239 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 139 over it, 2.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ipdrListWlan.template REDACTED:29 — MethodTooLong — template runs 228 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 128 over it, 2.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: offerUpdate._activeItemChanged REDACTED:991 — MethodTooLong — _activeItemChanged runs 227 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 127 over it, 2.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: accountingList.template priv/www/src/sig-accounting-list.js:28 — MethodTooLong — template runs 219 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 119 over it, 2.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: dashBoard.template priv/www/src/sig-dashboard.js:30 — MethodTooLong — template runs 187 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 87 over it, 1.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: offerAdd.template priv/www/src/sig-bucket-add.js:28 — MethodTooLong — template runs 179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 79 over it, 1.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: dashBoard.draw_nrf priv/www/src/sig-dashboard.js:1184 — MethodTooLong — draw_nrf runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: dashBoard.draw_credit priv/www/src/sig-dashboard.js:1482 — MethodTooLong — draw_credit runs 176 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 76 over it, 1.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: offerUpdate._updatePricesDialog REDACTED:1344 — MethodTooLong — _updatePricesDialog runs 161 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 61 over it, 1.61× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: clientUpdate.template priv/www/src/sig-client-update.js:31 — MethodTooLong — template runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: bucketList.template priv/www/src/sig-bucket-list.js:28 — MethodTooLong — template runs 152 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 52 over it, 1.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ipdrListVoip.template priv/www/src/sig-ipdr-list-voip.js:27 — MethodTooLong — template runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: productAddClass.template priv/www/src/sig-product-add.js:28 — MethodTooLong — template runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: clientAdd.template priv/www/src/sig-client-add.js:29 — MethodTooLong — template runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 22 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×40
  • Swallowed exception (caught, then discarded) src/ocs_diameter_3gpp_ro_application_cb.erl:770 — `catch _:_` 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) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1927 — `catch _:_` 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) src/ocs_diameter_acct_service_fsm.erl:205 — `catch _:_` 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) src/ocs_diameter_acct_service_fsm.erl:210 — `catch _:_` 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) src/ocs_diameter_auth_service_fsm.erl:222 — `catch _:_` 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) src/ocs_diameter_auth_service_fsm.erl:227 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:172 — `catch _:_` 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) src/ocs_event.erl:64 — `catch _:_` 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) src/ocs_event_log.erl:62 — `catch _:_` 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) src/ocs_log.erl:7008 — `catch _:_` 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) src/ocs_log.erl:7051 — `catch _:_` 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) src/ocs_mib.erl:295 — `catch _:_` 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) src/ocs_mib.erl:367 — `catch _:_` 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) src/ocs_mib.erl:405 — `catch _:_` 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) src/ocs_mib.erl:502 — `catch _:_` 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) src/ocs_mib.erl:574 — `catch _:_` 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) src/ocs_mib.erl:675 — `catch _:_` 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) src/ocs_mib.erl:723 — `catch _:_` 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) src/ocs_radius_accounting.erl:83 — `catch _:_` 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) src/ocs_radius_acct_port_server.erl:270 — `catch _:_Reason` 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) src/ocs_radius_auth_port_server.erl:344 — `catch _:_Reason` 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) src/ocs_radius_authentication.erl:115 — `catch _:_R` 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) src/ocs_rest.erl:250 — `catch _:_` 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) src/ocs_rest_res_balance.erl:104 — `catch _:_` 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) src/ocs_rest_res_balance.erl:133 — `catch _:_` 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.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×38
  • Duplicated block (7 lines × 2) src/ocs.erl:3465 — src/ocs.erl:3465-3471 | src/ocs.erl:3483-3489 — both copies are in the same file, so extract the 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) src/ocs_diameter_acct_service_fsm.erl:290 — src/ocs_diameter_acct_service_fsm.erl:290-296 | src/ocs_diameter_auth_service_fsm.erl:324-331 — before extracting anything, compare `src/ocs_diameter_acct_service_fsm.erl` and `src/ocs_diameter_auth_service_fsm.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) src/ocs_eap_aka_fsm.erl:403 — src/ocs_eap_aka_fsm.erl:403-409 | src/ocs_eap_akap_fsm.erl:413-419 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) src/ocs_log.erl:966 — src/ocs_log.erl:966-972 | src/ocs_log.erl:1235-1241 — both copies are in the same file, so extract the 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) src/ocs_log.erl:982 — src/ocs_log.erl:982-988 | src/ocs_log.erl:1249-1255 — both copies are in the same file, so extract the 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) src/ocs_log.erl:3760 — src/ocs_log.erl:3760-3766 | src/ocs_log.erl:3784-3790 — both copies are in the same file, so extract the 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) src/ocs_mib.erl:321 — src/ocs_mib.erl:321-327 | src/ocs_mib.erl:375-381 — both copies are in the same file, so extract the 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) src/ocs_mib.erl:432 — src/ocs_mib.erl:432-438 | src/ocs_mib.erl:510-516 — both copies are in the same file, so extract the 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) src/ocs_pgw_fsm.erl:302 — src/ocs_pgw_fsm.erl:302-308 | src/ocs_pgw_fsm.erl:409-415 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:353 — src/ocs_rating.erl:353-359 | src/ocs_rating.erl:385-391 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:722 — src/ocs_rating.erl:722-728 | src/ocs_rating.erl:874-880 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:2323 — src/ocs_rating.erl:2323-2329 | src/ocs_rating.erl:2405-2411 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:2397 — src/ocs_rating.erl:2397-2403 | src/ocs_rating.erl:2413-2419 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:2514 — src/ocs_rating.erl:2514-2520 | src/ocs_rating.erl:2531-2537 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:3474 — src/ocs_rating.erl:3474-3480 | src/ocs_rating.erl:3495-3501 — both copies are in the same file, so extract the 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) src/ocs_rest_res_nrf.erl:1209 — src/ocs_rest_res_nrf.erl:1209-1215 | src/ocs_rest_res_nrf.erl:1217-1223 — both copies are in the same file, so extract the 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) src/ocs_simple_auth_fsm.erl:389 — src/ocs_simple_auth_fsm.erl:389-395 | src/ocs_simple_auth_fsm.erl:427-433 — both copies are in the same file, so extract the 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) src/ocs_rest_res_role.erl:136 — src/ocs_rest_res_role.erl:136-142 | src/ocs_rest_res_user.erl:61-67 — before extracting anything, compare `src/ocs_rest_res_role.erl` and `src/ocs_rest_res_user.erl` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 204 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) src/ocs_log.erl:2690 — src/ocs_log.erl:2690-2697 | src/ocs_log.erl:2709-2715 — both copies are in the same file, so extract the 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) src/ocs_log.erl:2811 — src/ocs_log.erl:2811-2817 | src/ocs_log.erl:2824-2830 — both copies are in the same file, so extract the 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) src/ocs_log.erl:2601 — src/ocs_log.erl:2601-2607 | src/ocs_log.erl:2620-2626 — both copies are in the same file, so extract the 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) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1015 — src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1015-1021 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1082-1088 — both copies are in the same file, so extract the 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) src/ocs_log.erl:2976 — src/ocs_log.erl:2976-2982 | src/ocs_log.erl:2989-2995 — both copies are in the same file, so extract the 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) src/ocs_log.erl:3198 — src/ocs_log.erl:3198-3204 | src/ocs_log.erl:3211-3217 — both copies are in the same file, so extract the 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) src/ocs_log.erl:2737 — src/ocs_log.erl:2737-2743 | src/ocs_log.erl:2749-2755 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 13 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×34
  • Duplicated block (6 lines × 2) src/mod_ocs_rest_get.erl:574 — src/mod_ocs_rest_get.erl:574-579 | src/mod_ocs_rest_head.erl:319-324 — before extracting anything, compare `src/mod_ocs_rest_get.erl` and `src/mod_ocs_rest_head.erl` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) src/ocs_deregister_fsm.erl:377 — src/ocs_deregister_fsm.erl:377-382 | src/ocs_deregister_fsm.erl:398-403 — both copies are in the same file, so extract the 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) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:2268 — src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:2268-2273 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:2278-2283 — both copies are in the same file, so extract the 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) src/ocs_diameter_auth_port_server.erl:642 — src/ocs_diameter_auth_port_server.erl:642-647 | src/ocs_radius_auth_port_server.erl:458-463 — before extracting anything, compare `src/ocs_diameter_auth_port_server.erl` and `src/ocs_radius_auth_port_server.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) src/ocs_diameter_auth_port_server.erl:659 — src/ocs_diameter_auth_port_server.erl:659-664 | src/ocs_radius_auth_port_server.erl:476-481 — before extracting anything, compare `src/ocs_diameter_auth_port_server.erl` and `src/ocs_radius_auth_port_server.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) src/ocs_diameter_auth_port_server.erl:676 — src/ocs_diameter_auth_port_server.erl:676-681 | src/ocs_radius_auth_port_server.erl:494-499 — before extracting anything, compare `src/ocs_diameter_auth_port_server.erl` and `src/ocs_radius_auth_port_server.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) src/ocs_eap_aka_auc_fsm.erl:339 — src/ocs_eap_aka_auc_fsm.erl:339-344 | src/ocs_eap_aka_auc_fsm.erl:372-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.
  • Duplicated block (6 lines × 2) src/ocs_eap_aka_fsm.erl:1286 — src/ocs_eap_aka_fsm.erl:1286-1291 | src/ocs_eap_aka_fsm.erl:1404-1410 — both copies are in the same file, so extract the 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) src/ocs_eap_akap_fsm.erl:1304 — src/ocs_eap_akap_fsm.erl:1304-1309 | src/ocs_eap_akap_fsm.erl:1422-1428 — both copies are in the same file, so extract the 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) src/ocs_eap_pwd_fsm.erl:1180 — src/ocs_eap_pwd_fsm.erl:1180-1185 | src/ocs_simple_auth_fsm.erl:538-544 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) src/ocs_eap_pwd_fsm.erl:1190 — src/ocs_eap_pwd_fsm.erl:1190-1195 | src/ocs_simple_auth_fsm.erl:549-554 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) src/ocs_event_log.erl:135 — src/ocs_event_log.erl:135-140 | src/ocs_event_log.erl: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 (6 lines × 2) src/ocs_log.erl:1002 — src/ocs_log.erl:1002-1007 | src/ocs_log.erl:1269-1274 — both copies are in the same file, so extract the 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) src/ocs_log.erl:1993 — src/ocs_log.erl:1993-1998 | src/ocs_log.erl:2014-2019 — both copies are in the same file, so extract the 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) src/ocs_log.erl:6983 — src/ocs_log.erl:6983-6988 | src/ocs_log.erl:6989-6994 — both copies are in the same file, so extract the 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) src/ocs_log_rotate_server.erl:302 — src/ocs_log_rotate_server.erl:302-307 | src/ocs_scheduler.erl:260-265 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) src/ocs_pgw_fsm.erl:255 — src/ocs_pgw_fsm.erl:255-260 | src/ocs_pgw_fsm.erl:273-278 — both copies are in the same file, so extract the 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) src/ocs_pgw_fsm.erl:279 — src/ocs_pgw_fsm.erl:279-284 | src/ocs_pgw_fsm.erl:386-391 — both copies are in the same file, so extract the 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) src/ocs_pgw_fsm.erl:362 — src/ocs_pgw_fsm.erl:362-367 | src/ocs_pgw_fsm.erl:380-385 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:646 — src/ocs_rating.erl:646-651 | src/ocs_rating.erl:662-667 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:892 — src/ocs_rating.erl:892-897 | src/ocs_rating.erl:939-944 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:1735 — src/ocs_rating.erl:1735-1740 | src/ocs_rating.erl:1750-1755 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:2316 — src/ocs_rating.erl:2316-2321 | src/ocs_rating.erl:2331-2336 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:2327 — src/ocs_rating.erl:2327-2332 | src/ocs_rating.erl:2342-2347 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:2492 — src/ocs_rating.erl:2492-2497 | src/ocs_rating.erl:2509-2514 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 9 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×33
  • FileTooLong: src/ocs_log.erl src/ocs_log.erl — FileTooLong — 6729 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 356 functions. The bar is 500 significant lines; this is 6229 over it, 13.46× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_rest_res_usage.erl src/ocs_rest_res_usage.erl — FileTooLong — 4147 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 160 functions. The bar is 500 significant lines; this is 3647 over it, 8.29× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_rating.erl src/ocs_rating.erl — FileTooLong — 3591 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 71 functions. The bar is 500 significant lines; this is 3091 over it, 7.18× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs.erl src/ocs.erl — FileTooLong — 3510 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 154 functions. The bar is 500 significant lines; this is 3010 over it, 7.02× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 3372 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 99% of them inside a single declaration: offerUpdate (32-3798). The bar is 1500 significant lines; this is 1872 over it, 2.25× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/ocs_rest_res_product.erl src/ocs_rest_res_product.erl — FileTooLong — 2393 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 87 functions. The bar is 500 significant lines; this is 1893 over it, 4.79× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_diameter_3gpp_ro_nrf_app_cb.erl src/ocs_diameter_3gpp_ro_nrf_app_cb.erl — FileTooLong — 2238 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 77 functions. The bar is 500 significant lines; this is 1738 over it, 4.48× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/sig-offer-add.js priv/www/src/sig-offer-add.js — FileTooLong — 2108 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 99% of them inside a single declaration: offerAdd (31-2374). The bar is 1500 significant lines; this is 608 over it, 1.41× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/sig-dashboard.js priv/www/src/sig-dashboard.js — FileTooLong — 1879 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 99% of them inside a single declaration: dashBoard (29-2074). The bar is 1500 significant lines; this is 379 over it, 1.25× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/ocs_diameter.erl src/ocs_diameter.erl — FileTooLong — 1706 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1206 over it, 3.41× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_eap_akap_fsm.erl src/ocs_eap_akap_fsm.erl — FileTooLong — 1415 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 915 over it, 2.83× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_eap_aka_fsm.erl src/ocs_eap_aka_fsm.erl — FileTooLong — 1392 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 892 over it, 2.78× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_rest_res_nrf.erl src/ocs_rest_res_nrf.erl — FileTooLong — 1340 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 65 functions. The bar is 500 significant lines; this is 840 over it, 2.68× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_eap_ttls_fsm.erl src/ocs_eap_ttls_fsm.erl — FileTooLong — 1265 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 765 over it, 2.53× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_rest_res_resource.erl src/ocs_rest_res_resource.erl — FileTooLong — 1245 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 59 functions. The bar is 500 significant lines; this is 745 over it, 2.49× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_app.erl src/ocs_app.erl — FileTooLong — 1198 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 85 functions. The bar is 500 significant lines; this is 698 over it, 2.40× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_diameter_3gpp_ro_application_cb.erl src/ocs_diameter_3gpp_ro_application_cb.erl — FileTooLong — 1184 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 684 over it, 2.37× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_rest_res_balance.erl src/ocs_rest_res_balance.erl — FileTooLong — 1135 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 49 functions. The bar is 500 significant lines; this is 635 over it, 2.27× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_eap_pwd_fsm.erl src/ocs_eap_pwd_fsm.erl — FileTooLong — 1127 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 627 over it, 2.25× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/ocs_rest_res_service.erl src/ocs_rest_res_service.erl — FileTooLong — 906 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 406 over it, 1.81× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/sig-sub-add.js priv/www/src/sig-sub-add.js — FileTooLong — 840 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: subAdd (31-945). The bar is 500 significant lines; this is 340 over it, 1.68× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/ocs_rest.erl src/ocs_rest.erl — FileTooLong — 820 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 42 functions. The bar is 500 significant lines; this is 320 over it, 1.64× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/user_default.erl src/user_default.erl — FileTooLong — 818 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 37 functions. The bar is 500 significant lines; this is 318 over it, 1.64× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/sig-sub-update.js priv/www/src/sig-sub-update.js — FileTooLong — 785 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: subUpdate (31-917). The bar is 500 significant lines; this is 285 over it, 1.57× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/sig-app.js priv/www/src/sig-app.js — FileTooLong — 738 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: SigApp (42-868). The bar is 500 significant lines; this is 238 over it, 1.48× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • + 8 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×23
  • Duplicated block (10 lines × 2) src/ocs.erl:2118 — src/ocs.erl:2118-2127 | src/ocs.erl:2267-2276 — both copies are in the same file, so extract the 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) src/ocs_deregister_fsm.erl:188 — src/ocs_deregister_fsm.erl:188-197 | src/ocs_deregister_fsm.erl:200-209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) src/ocs_diameter_3gpp_ro_application_cb.erl:841 — src/ocs_diameter_3gpp_ro_application_cb.erl:841-850 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:2001-2010 — before extracting anything, compare `src/ocs_diameter_3gpp_ro_application_cb.erl` and `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 135 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 (10 lines × 2) src/ocs_diameter_3gpp_ro_application_cb.erl:858 — src/ocs_diameter_3gpp_ro_application_cb.erl:858-867 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:2013-2022 — before extracting anything, compare `src/ocs_diameter_3gpp_ro_application_cb.erl` and `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 135 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 (10 lines × 2) src/ocs_diameter_3gpp_ro_application_cb.erl:870 — src/ocs_diameter_3gpp_ro_application_cb.erl:870-879 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:2030-2039 — before extracting anything, compare `src/ocs_diameter_3gpp_ro_application_cb.erl` and `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 135 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 (10 lines × 2) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1017 — src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1017-1026 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1171-1180 — both copies are in the same file, so extract the 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) src/ocs_diameter_acct_service_fsm.erl:331 — src/ocs_diameter_acct_service_fsm.erl:331-340 | src/ocs_diameter_auth_service_fsm.erl:380-389 — before extracting anything, compare `src/ocs_diameter_acct_service_fsm.erl` and `src/ocs_diameter_auth_service_fsm.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 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 (10 lines × 2) src/ocs_eap_aka.erl:181 — src/ocs_eap_aka.erl:181-190 | src/ocs_eap_pwd.erl:139-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) src/ocs_eap_aka_auc_fsm.erl:346 — src/ocs_eap_aka_auc_fsm.erl:346-355 | src/ocs_eap_aka_auc_fsm.erl:381-390 — both copies are in the same file, so extract the 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) src/ocs_eap_aka_fsm.erl:851 — src/ocs_eap_aka_fsm.erl:851-860 | src/ocs_eap_akap_fsm.erl:870-879 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 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 (10 lines × 2) src/ocs_eap_aka_fsm.erl:888 — src/ocs_eap_aka_fsm.erl:888-897 | src/ocs_eap_akap_fsm.erl:907-916 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 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 (10 lines × 2) src/ocs_log.erl:991 — src/ocs_log.erl:991-1000 | src/ocs_log.erl:1258-1267 — both copies are in the same file, so extract the 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) src/ocs_log.erl:2003 — src/ocs_log.erl:2003-2012 | src/ocs_log.erl:2024-2033 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:188 — src/ocs_rating.erl:188-197 | src/ocs_rating.erl:494-503 — both copies are in the same file, so extract the 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) src/ocs_rest_res_nrf.erl:747 — src/ocs_rest_res_nrf.erl:747-756 | src/ocs_rest_res_nrf.erl:787-796 — both copies are in the same file, so extract the 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) src/ocs_rest_res_nrf.erl:759 — src/ocs_rest_res_nrf.erl:759-768 | src/ocs_rest_res_nrf.erl:799-808 — both copies are in the same file, so extract the 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) src/ocs_rest_res_nrf.erl:771 — src/ocs_rest_res_nrf.erl:771-780 | src/ocs_rest_res_nrf.erl:811-820 — both copies are in the same file, so extract the 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) src/ocs_rest_res_usage.erl:3101 — src/ocs_rest_res_usage.erl:3101-3110 | src/ocs_rest_res_usage.erl:3129-3138 — both copies are in the same file, so extract the 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) src/ocs_rest_res_usage.erl:4351 — src/ocs_rest_res_usage.erl:4351-4360 | src/ocs_rest_res_usage.erl:4379-4388 — both copies are in the same file, so extract the 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) src/ocs_diameter_3gpp_ro_application_cb.erl:763 — src/ocs_diameter_3gpp_ro_application_cb.erl:763-772 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1920-1929 — before extracting anything, compare `src/ocs_diameter_3gpp_ro_application_cb.erl` and `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 135 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 (10 lines × 2) src/ocs_log.erl:2680 — src/ocs_log.erl:2680-2689 | src/ocs_log.erl:2717-2726 — both copies are in the same file, so extract the 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) src/ocs_log.erl:2591 — src/ocs_log.erl:2591-2600 | src/ocs_log.erl:2628-2637 — both copies are in the same file, so extract the 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) src/ocs_rest_res_balance.erl:196 — src/ocs_rest_res_balance.erl:196-205 | src/ocs_rest_res_client.erl:60-69 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×22
  • Duplicated block (9 lines × 2) src/ocs_app.erl:632 — src/ocs_app.erl:632-640 | src/ocs_app.erl:1027-1035 — both copies are in the same file, so extract the 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) src/ocs_deregister_fsm.erl:190 — src/ocs_deregister_fsm.erl:190-198 | src/ocs_deregister_fsm.erl:227-235 — both copies are in the same file, so extract the 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) src/ocs_diameter_acct_service_fsm.erl:342 — src/ocs_diameter_acct_service_fsm.erl:342-350 | src/ocs_diameter_auth_service_fsm.erl:391-399 — before extracting anything, compare `src/ocs_diameter_acct_service_fsm.erl` and `src/ocs_diameter_auth_service_fsm.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) src/ocs_diameter_auth_port_server.erl:488 — src/ocs_diameter_auth_port_server.erl:488-496 | src/ocs_diameter_auth_port_server.erl:507-515 — both copies are in the same file, so extract the 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) src/ocs_eap_aka_fsm.erl:540 — src/ocs_eap_aka_fsm.erl:540-548 | src/ocs_eap_akap_fsm.erl:553-561 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) src/ocs_eap_aka_fsm.erl:899 — src/ocs_eap_aka_fsm.erl:899-907 | src/ocs_eap_akap_fsm.erl:918-926 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) src/ocs_eap_codec.erl:511 — src/ocs_eap_codec.erl:511-519 | src/ocs_eap_codec.erl:536-544 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:831 — src/ocs_rating.erl:831-839 | src/ocs_rating.erl:882-890 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:1436 — src/ocs_rating.erl:1436-1444 | src/ocs_rating.erl:1528-1536 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:2308 — src/ocs_rating.erl:2308-2316 | src/ocs_rating.erl:2390-2398 — both copies are in the same file, so extract the 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) src/ocs_rest_res_nrf.erl:161 — src/ocs_rest_res_nrf.erl:161-169 | src/ocs_rest_res_nrf.erl:284-292 — both copies are in the same file, so extract the 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) src/ocs_rest_res_product.erl:1345 — src/ocs_rest_res_product.erl:1345-1353 | src/ocs_rest_res_resource.erl:992-1000 — before extracting anything, compare `src/ocs_rest_res_product.erl` and `src/ocs_rest_res_resource.erl` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) src/ocs_rest_res_product.erl:1356 — src/ocs_rest_res_product.erl:1356-1364 | src/ocs_rest_res_resource.erl:1003-1011 — before extracting anything, compare `src/ocs_rest_res_product.erl` and `src/ocs_rest_res_resource.erl` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) src/ocs_rest_res_product.erl:1367 — src/ocs_rest_res_product.erl:1367-1375 | src/ocs_rest_res_resource.erl:1014-1022 — before extracting anything, compare `src/ocs_rest_res_product.erl` and `src/ocs_rest_res_resource.erl` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) src/ocs_rest_res_product.erl:1379 — src/ocs_rest_res_product.erl:1379-1387 | src/ocs_rest_res_resource.erl:1026-1034 — before extracting anything, compare `src/ocs_rest_res_product.erl` and `src/ocs_rest_res_resource.erl` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) src/ocs_rest_res_usage.erl:721 — src/ocs_rest_res_usage.erl:721-729 | src/ocs_rest_res_usage.erl:842-850 — both copies are in the same file, so extract the 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) src/ocs_rest_res_usage.erl:1619 — src/ocs_rest_res_usage.erl:1619-1627 | src/ocs_rest_res_usage.erl:1633-1641 — both copies are in the same file, so extract the 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) src/ocs_rest_res_usage.erl:4294 — src/ocs_rest_res_usage.erl:4294-4302 | src/ocs_rest_res_usage.erl:4315-4323 — both copies are in the same file, so extract the 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) src/ocs_diameter_3gpp_ro_application_cb.erl:682 — src/ocs_diameter_3gpp_ro_application_cb.erl:682-690 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1589-1597 — before extracting anything, compare `src/ocs_diameter_3gpp_ro_application_cb.erl` and `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) src/mod_oauth.erl:334 — src/mod_oauth.erl:334-342 | src/mod_oauth.erl:348-357 — both copies are in the same file, so extract the 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) src/ocs_rest_res_balance.erl:231 — src/ocs_rest_res_balance.erl:231-239 | src/ocs_rest_res_service.erl:161-169 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_service.erl` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) src/ocs_rest_res_product.erl:1211 — src/ocs_rest_res_product.erl:1211-1219 | src/ocs_rest_res_product.erl:1232-1240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×17
  • Duplicated block (11 lines × 2) src/ocs.erl:1372 — src/ocs.erl:1372-1382 | src/ocs.erl:1384-1394 — both copies are in the same file, so extract the 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) src/ocs_eap_aka_fsm.erl:862 — src/ocs_eap_aka_fsm.erl:862-872 | src/ocs_eap_akap_fsm.erl:881-891 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 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 (11 lines × 2) src/ocs_log.erl:2844 — src/ocs_log.erl:2844-2854 | src/ocs_log.erl:2887-2897 — both copies are in the same file, so extract the 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) src/ocs_log.erl:2908 — src/ocs_log.erl:2908-2918 | src/ocs_log.erl:2951-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 (11 lines × 2) src/ocs_rating.erl:2293 — src/ocs_rating.erl:2293-2303 | src/ocs_rating.erl:2375-2385 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:3362 — src/ocs_rating.erl:3362-3372 | src/ocs_rating.erl:3418-3428 — both copies are in the same file, so extract the 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) src/ocs_rest_res_balance.erl:330 — src/ocs_rest_res_balance.erl:330-340 | src/ocs_rest_res_balance.erl:390-400 — both copies are in the same file, so extract the 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) src/ocs_rest_res_nrf.erl:257 — src/ocs_rest_res_nrf.erl:257-267 | src/ocs_rest_res_nrf.erl:386-396 — both copies are in the same file, so extract the 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) src/ocs_rest_res_product.erl:79 — src/ocs_rest_res_product.erl:79-89 | src/ocs_rest_res_product.erl:851-861 — both copies are in the same file, so extract the 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) src/ocs_rest_res_product.erl:717 — src/ocs_rest_res_product.erl:717-727 | src/ocs_rest_res_service.erl:310-320 — before extracting anything, compare `src/ocs_rest_res_product.erl` and `src/ocs_rest_res_service.erl` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 237 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 (11 lines × 2) src/ocs_rest_res_usage.erl:2896 — src/ocs_rest_res_usage.erl:2896-2906 | src/ocs_rest_res_usage.erl:2910-2920 — both copies are in the same file, so extract the 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) src/ocs_rest_res_user.erl:144 — src/ocs_rest_res_user.erl:144-154 | src/ocs_rest_res_user.erl:499-509 — both copies are in the same file, so extract the 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) src/ocs_simple_auth_fsm.erl:397 — src/ocs_simple_auth_fsm.erl:397-407 | src/ocs_simple_auth_fsm.erl:416-426 — both copies are in the same file, so extract the 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) src/ocs_rest_res_balance.erl:125 — src/ocs_rest_res_balance.erl:125-135 | src/ocs_rest_res_service.erl:194-204 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_service.erl` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 215 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 (11 lines × 2) src/ocs_rest_res_role.erl:106 — src/ocs_rest_res_role.erl:106-116 | src/ocs_rest_res_user.erl:322-332 — before extracting anything, compare `src/ocs_rest_res_role.erl` and `src/ocs_rest_res_user.erl` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 204 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 (11 lines × 2) src/ocs_rest_res_product.erl:184 — src/ocs_rest_res_product.erl:184-194 | src/ocs_rest_res_product.erl:221-231 — both copies are in the same file, so extract the 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) src/ocs_diameter_3gpp_sta_application_cb.erl:109 — src/ocs_diameter_3gpp_sta_application_cb.erl:109-119 | src/ocs_diameter_3gpp_swm_application_cb.erl:108-118 — before extracting anything, compare `src/ocs_diameter_3gpp_sta_application_cb.erl` and `src/ocs_diameter_3gpp_swm_application_cb.erl` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×15
  • Duplicated block (6 lines × 3) src/ocs.erl:3390 — src/ocs.erl:3390-3395 | src/ocs.erl:3464-3469 | src/ocs.erl:3482-3487 — 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) src/ocs_deregister_fsm.erl:213 — src/ocs_deregister_fsm.erl:213-218 | src/ocs_deregister_fsm.erl:238-243 | src/ocs_deregister_fsm.erl:263-268 — 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) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1009 — src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1009-1014 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1076-1081 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1165-1170 — 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) src/ocs_diameter_codec_s6b.erl:70 — src/ocs_diameter_codec_s6b.erl:70-75 | src/ocs_diameter_codec_sta.erl:70-75 | src/ocs_diameter_codec_swm.erl:70-75 — before extracting anything, compare `src/ocs_diameter_codec_s6b.erl` and `src/ocs_diameter_codec_sta.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) src/ocs_diameter_codec_s6b.erl:111 — src/ocs_diameter_codec_s6b.erl:111-116 | src/ocs_diameter_codec_sta.erl:111-116 | src/ocs_diameter_codec_swm.erl:111-116 — before extracting anything, compare `src/ocs_diameter_codec_s6b.erl` and `src/ocs_diameter_codec_sta.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) src/ocs_diameter_codec_s6b.erl:150 — src/ocs_diameter_codec_s6b.erl:150-155 | src/ocs_diameter_codec_sta.erl:150-155 | src/ocs_diameter_codec_swm.erl:150-155 — before extracting anything, compare `src/ocs_diameter_codec_s6b.erl` and `src/ocs_diameter_codec_sta.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) src/ocs_diameter_codec_s6b.erl:191 — src/ocs_diameter_codec_s6b.erl:191-196 | src/ocs_diameter_codec_sta.erl:191-196 | src/ocs_diameter_codec_swm.erl:191-196 — before extracting anything, compare `src/ocs_diameter_codec_s6b.erl` and `src/ocs_diameter_codec_sta.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) src/ocs_diameter_codec_s6b.erl:232 — src/ocs_diameter_codec_s6b.erl:232-237 | src/ocs_diameter_codec_sta.erl:232-237 | src/ocs_diameter_codec_swm.erl:232-237 — before extracting anything, compare `src/ocs_diameter_codec_s6b.erl` and `src/ocs_diameter_codec_sta.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) src/ocs_diameter_codec_s6b.erl:271 — src/ocs_diameter_codec_s6b.erl:271-276 | src/ocs_diameter_codec_sta.erl:271-276 | src/ocs_diameter_codec_swm.erl:271-276 — before extracting anything, compare `src/ocs_diameter_codec_s6b.erl` and `src/ocs_diameter_codec_sta.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) src/ocs_diameter_codec_s6b.erl:310 — src/ocs_diameter_codec_s6b.erl:310-315 | src/ocs_diameter_codec_sta.erl:310-315 | src/ocs_diameter_codec_swm.erl:310-315 — before extracting anything, compare `src/ocs_diameter_codec_s6b.erl` and `src/ocs_diameter_codec_sta.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) src/ocs_diameter_codec_s6b.erl:349 — src/ocs_diameter_codec_s6b.erl:349-354 | src/ocs_diameter_codec_sta.erl:349-354 | src/ocs_diameter_codec_swm.erl:349-354 — before extracting anything, compare `src/ocs_diameter_codec_s6b.erl` and `src/ocs_diameter_codec_sta.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) src/ocs_log.erl:6881 — src/ocs_log.erl:6881-6886 | src/ocs_log.erl:6917-6922 | src/ocs_log.erl:6938-6943 — 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) src/ocs_log.erl:7017 — src/ocs_log.erl:7017-7022 | src/ocs_log.erl:7026-7031 | src/ocs_log.erl:7035-7040 — 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) src/ocs_rating.erl:2308 — src/ocs_rating.erl:2308-2313 | src/ocs_rating.erl:2390-2395 | src/ocs_rating.erl:2406-2411 — 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) src/ocs_deregister_fsm.erl:219 — src/ocs_deregister_fsm.erl:219-224 | src/ocs_deregister_fsm.erl:244-249 | src/ocs_deregister_fsm.erl:269-274 — 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 (5 lines × 3) · ×14
  • Duplicated block (5 lines × 3) src/ocs.erl:431 — src/ocs.erl:431-435 | src/ocs.erl:527-531 | src/ocs.erl:1503-1507 — 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) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1022 — src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1022-1026 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1090-1094 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1176-1180 — 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) src/ocs_diameter_auth_port_server.erl:473 — src/ocs_diameter_auth_port_server.erl:473-477 | src/ocs_diameter_auth_port_server.erl:492-496 | src/ocs_diameter_auth_port_server.erl:511-515 — 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) src/ocs_diameter_cc_application_cb.erl:164 — src/ocs_diameter_cc_application_cb.erl:164-168 | src/ocs_diameter_eap_application_cb.erl:158-162 | src/ocs_diameter_nas_application_cb.erl:157-161 — before extracting anything, compare `src/ocs_diameter_eap_application_cb.erl` and `src/ocs_diameter_nas_application_cb.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) src/ocs_log.erl:6890 — src/ocs_log.erl:6890-6894 | src/ocs_log.erl:6926-6930 | src/ocs_log.erl:6956-6960 — 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) src/ocs_log.erl:6983 — src/ocs_log.erl:6983-6987 | src/ocs_log.erl:6989-6993 | src/ocs_log.erl:6995-6999 — 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) src/ocs_radius_auth_port_server.erl:457 — src/ocs_radius_auth_port_server.erl:457-461 | src/ocs_radius_auth_port_server.erl:475-479 | src/ocs_radius_auth_port_server.erl:493-497 — 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) src/ocs_diameter_acct_service_fsm_sup.erl:60 — src/ocs_diameter_acct_service_fsm_sup.erl:60-64 | src/ocs_diameter_auth_service_fsm_sup.erl:60-64 | src/ocs_eap_ttls_fsm_sup.erl:61-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (5 lines × 3) src/ocs_log.erl:6047 — src/ocs_log.erl:6047-6051 | src/ocs_log.erl:6053-6057 | src/ocs_log.erl:6059-6063 — 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) src/ocs_rest_res_balance.erl:936 — src/ocs_rest_res_balance.erl:936-940 | src/ocs_rest_res_balance.erl:946-950 | src/ocs_rest_res_balance.erl:956-960 — 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) src/ocs_log.erl:6335 — src/ocs_log.erl:6335-6339 | src/ocs_log.erl:6341-6345 | src/ocs_log.erl:6347-6351 — 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) src/ocs_diameter_auth_port_server.erl:386 — src/ocs_diameter_auth_port_server.erl:386-390 | src/ocs_diameter_auth_port_server.erl:392-396 | src/ocs_diameter_auth_port_server.erl:398-402 — 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) src/ocs_diameter_auth_port_sup.erl:73 — src/ocs_diameter_auth_port_sup.erl:73-77 | src/ocs_radius_acct_port_sup.erl:77-81 | src/ocs_radius_auth_port_sup.erl:70-74 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (5 lines × 3) src/ocs_rating.erl:2486 — src/ocs_rating.erl:2486-2490 | src/ocs_rating.erl:2503-2507 | src/ocs_rating.erl:2522-2526 — 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.
D35 · Change Coupling · Change coupling · ×9
  • Change coupling: ocs_diameter_eap_application_cb.erl ↔ ocs_diameter_nas_application_cb.erl src/ocs_diameter_eap_application_cb.erl:1 — `src/ocs_diameter_eap_application_cb.erl` and `src/ocs_diameter_nas_application_cb.erl` change together 80% of the time (20 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 20 shared commits counted here, the most recent 3 are `81612ad4` refactor simple auth diameter callbacks for consistency; `5093ff5a` handle multiple accepted connections in diameter callbacks; `baf2955a` handle multiple accepted connections in diameter callbacks — run `git show` on any of them.
  • Change coupling: mod_ocs_rest_accepted_content.erl ↔ mod_ocs_rest_get.erl src/mod_ocs_rest_accepted_content.erl:1 — `src/mod_ocs_rest_accepted_content.erl` and `src/mod_ocs_rest_get.erl` change together 59% of the time (64 of the 109 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 64 shared commits counted here, the most recent 3 are `41324aa2` modernize uri parsing in inets httpd callbacks; `3376db0b` correct rest hub resource basenames; `5ddaa278` removed deprecated polymorphic schemas, update oas — run `git show` on any of them.
  • Change coupling: ocs_diameter_acct_service_fsm.erl ↔ ocs_diameter_auth_service_fsm.erl src/ocs_diameter_acct_service_fsm.erl:1 — `src/ocs_diameter_acct_service_fsm.erl` and `src/ocs_diameter_auth_service_fsm.erl` change together 56% of the time (35 of the 62 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 35 shared commits counted here, the most recent 3 are `4c60370b` port deprecated 'catch' to 'try ... catch ... end'; `ac030cfd` move log opening to application handler; `d4e179fe` safely stop diameter service — run `git show` on any of them.
  • Change coupling: mod_ocs_rest_get.erl ↔ mod_ocs_rest_patch.erl src/mod_ocs_rest_get.erl:1 — `src/mod_ocs_rest_get.erl` and `src/mod_ocs_rest_patch.erl` change together 56% of the time (35 of the 63 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 35 shared commits counted here, the most recent 3 are `efe68484` unquote variable path components; `ed746e9c` only percent decode query strings; `62267846` Reapply "percent decode uri map to handle special chars in path" — run `git show` on any of them.
  • Change coupling: ocs_diameter_cc_application_cb.erl ↔ ocs_diameter_nas_application_cb.erl src/ocs_diameter_cc_application_cb.erl:1 — `src/ocs_diameter_cc_application_cb.erl` and `src/ocs_diameter_nas_application_cb.erl` change together 55% of the time (12 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 12 shared commits counted here, the most recent 3 are `81612ad4` refactor simple auth diameter callbacks for consistency; `6906d04b` diameter_app supports behaviour_info from otp 27; `03b06d89` correct documented behaviour of diameter_app callback modules — run `git show` on any of them.
  • Change coupling: ocs_diameter_3gpp_s6b_application_cb.erl ↔ ocs_diameter_3gpp_swm_application_cb.erl src/ocs_diameter_3gpp_s6b_application_cb.erl:1 — `src/ocs_diameter_3gpp_s6b_application_cb.erl` and `src/ocs_diameter_3gpp_swm_application_cb.erl` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 6 shared commits counted here, the most recent 3 are `5093ff5a` handle multiple accepted connections in diameter callbacks; `baf2955a` handle multiple accepted connections in diameter callbacks; `6906d04b` diameter_app supports behaviour_info from otp 27 — run `git show` on any of them.
  • Change coupling: ocs_diameter_3gpp_s6b_application_cb.erl ↔ ocs_diameter_3gpp_swx_application_cb.erl src/ocs_diameter_3gpp_s6b_application_cb.erl:1 — `src/ocs_diameter_3gpp_s6b_application_cb.erl` and `src/ocs_diameter_3gpp_swx_application_cb.erl` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 6 shared commits counted here, the most recent 3 are `5093ff5a` handle multiple accepted connections in diameter callbacks; `baf2955a` handle multiple accepted connections in diameter callbacks; `6906d04b` diameter_app supports behaviour_info from otp 27 — run `git show` on any of them.
  • Change coupling: mod_ocs_rest_patch.erl ↔ mod_ocs_rest_post.erl src/mod_ocs_rest_patch.erl:1 — `src/mod_ocs_rest_patch.erl` and `src/mod_ocs_rest_post.erl` change together 54% of the time (34 of the 63 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 34 shared commits counted here, the most recent 3 are `efe68484` unquote variable path components; `ed746e9c` only percent decode query strings; `62267846` Reapply "percent decode uri map to handle special chars in path" — run `git show` on any of them.
  • Change coupling: ocs.erl ↔ ocs_server.erl src/ocs.erl:1 — `src/ocs.erl` and `src/ocs_server.erl` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — 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 7 shared commits counted here, the most recent 3 are `17a80030` public api to stop radius/diameter handlers; `aacf02f5` add stop/3 api to terminate radius/diameter handlers; `64838884` remove protocol dependant log rotate value — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×9
  • Duplicated block (8 lines × 2) src/ocs.erl:1155 — src/ocs.erl:1155-1162 | src/ocs.erl:1257-1264 — both copies are in the same file, so extract the 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) src/ocs_diameter_3gpp_sta_application_cb.erl:283 — src/ocs_diameter_3gpp_sta_application_cb.erl:283-290 | src/ocs_diameter_3gpp_swm_application_cb.erl:283-290 — before extracting anything, compare `src/ocs_diameter_3gpp_sta_application_cb.erl` and `src/ocs_diameter_3gpp_swm_application_cb.erl` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/ocs_diameter_auth_port_server.erl:244 — src/ocs_diameter_auth_port_server.erl:244-251 | src/ocs_radius_auth_port_server.erl:214-221 — before extracting anything, compare `src/ocs_diameter_auth_port_server.erl` and `src/ocs_radius_auth_port_server.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/ocs_eap_akap_fsm.erl:391 — src/ocs_eap_akap_fsm.erl:391-398 | src/ocs_eap_akap_fsm.erl:404-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 (8 lines × 2) src/ocs_log.erl:3509 — src/ocs_log.erl:3509-3516 | src/ocs_log.erl:3521-3528 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:1000 — src/ocs_rating.erl:1000-1007 | src/ocs_rating.erl:1295-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.
  • Duplicated block (8 lines × 2) src/ocs_rating.erl:1598 — src/ocs_rating.erl:1598-1605 | src/ocs_rating.erl:1651-1658 — both copies are in the same file, so extract the 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) src/ocs_rest_res_balance.erl:71 — src/ocs_rest_res_balance.erl:71-78 | src/ocs_rest_res_usage.erl:3072-3079 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_usage.erl` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 89 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) src/ocs_radius_acct_server_sup.erl:44 — src/ocs_radius_acct_server_sup.erl:44-51 | src/ocs_radius_auth_server_sup.erl:44-51 — 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.
D3 · God Classes · ClassTooLong · ×8
  • ClassTooLong: offerUpdate REDACTED:32 — ClassTooLong — 3354 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 2954 over it, 8.39× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: offerAdd priv/www/src/sig-offer-add.js:31 — ClassTooLong — 2091 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 1691 over it, 5.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: dashBoard priv/www/src/sig-dashboard.js:29 — ClassTooLong — 1863 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 1463 over it, 4.66× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: subAdd priv/www/src/sig-sub-add.js:31 — ClassTooLong — 823 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 423 over it, 2.06× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: subUpdate priv/www/src/sig-sub-update.js:31 — ClassTooLong — 768 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 368 over it, 1.92× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SigApp priv/www/src/sig-app.js:42 — ClassTooLong — 716 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 316 over it, 1.79× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: policyList priv/www/src/sig-policy-list.js:30 — ClassTooLong — 662 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 262 over it, 1.66× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: accountingList priv/www/src/sig-accounting-list.js:27 — ClassTooLong — 405 significant lines (blank, comment-only and punctuation-only lines excluded), 5 methods. The bar is 400 significant lines; this is 5 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×8
  • Duplicated block (7–8 lines × 2) src/ocs_rest_res_hub_balance.erl:91 — src/ocs_rest_res_hub_balance.erl:91-97 | src/ocs_rest_res_hub_balance.erl:102-109 — both copies are in the same file, so extract the 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–8 lines × 2) src/ocs_rest_res_hub_product.erl:95 — src/ocs_rest_res_hub_product.erl:95-101 | src/ocs_rest_res_hub_product.erl:106-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7–8 lines × 2) src/ocs_rest_res_hub_product.erl:198 — src/ocs_rest_res_hub_product.erl:198-204 | src/ocs_rest_res_hub_product.erl:209-216 — both copies are in the same file, so extract the 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–8 lines × 2) src/ocs_rest_res_hub_resource.erl:93 — src/ocs_rest_res_hub_resource.erl:93-99 | src/ocs_rest_res_hub_resource.erl:104-111 — both copies are in the same file, so extract the 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–8 lines × 2) src/ocs_rest_res_hub_service.erl:93 — src/ocs_rest_res_hub_service.erl:93-99 | src/ocs_rest_res_hub_service.erl:104-111 — both copies are in the same file, so extract the 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–8 lines × 2) src/ocs_rest_res_hub_usage.erl:93 — src/ocs_rest_res_hub_usage.erl:93-99 | src/ocs_rest_res_hub_usage.erl:104-111 — both copies are in the same file, so extract the 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–8 lines × 2) src/ocs_rest_res_hub_user.erl:93 — src/ocs_rest_res_hub_user.erl:93-99 | src/ocs_rest_res_hub_user.erl:104-111 — both copies are in the same file, so extract the 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–8 lines × 2) src/ocs_scheduler.erl:50 — src/ocs_scheduler.erl:50-56 | src/ocs_scheduler.erl:143-150 — both copies are in the same file, so extract the 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 × 4) · ×8
  • Duplicated block (5 lines × 4) src/ocs_diameter_3gpp_s6b_application_cb.erl:159 — src/ocs_diameter_3gpp_s6b_application_cb.erl:159-163 | src/ocs_diameter_3gpp_sta_application_cb.erl:173-177 | src/ocs_diameter_3gpp_swm_application_cb.erl:172-176 | src/ocs_diameter_3gpp_swx_application_cb.erl:165-169 — before extracting anything, compare `src/ocs_diameter_3gpp_s6b_application_cb.erl` and `src/ocs_diameter_3gpp_sta_application_cb.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) src/ocs_eap_aka_fsm.erl:1312 — src/ocs_eap_aka_fsm.erl:1312-1316 | src/ocs_eap_aka_fsm.erl:1371-1375 | src/ocs_eap_akap_fsm.erl:1330-1334 | src/ocs_eap_akap_fsm.erl:1389-1393 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) src/ocs_rest_res_product.erl:1372 — src/ocs_rest_res_product.erl:1372-1376 | src/ocs_rest_res_product.erl:1384-1388 | src/ocs_rest_res_resource.erl:1019-1023 | src/ocs_rest_res_resource.erl:1031-1035 — before extracting anything, compare `src/ocs_rest_res_product.erl` and `src/ocs_rest_res_resource.erl` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) src/ocs_rest_res_usage.erl:3348 — src/ocs_rest_res_usage.erl:3348-3352 | src/ocs_rest_res_usage.erl:3381-3385 | src/ocs_rest_res_usage.erl:3414-3418 | src/ocs_rest_res_usage.erl:3447-3451 — 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) src/ocs_diameter_acct_port_sup.erl:72 — src/ocs_diameter_acct_port_sup.erl:72-76 | src/ocs_diameter_auth_port_sup.erl:88-92 | src/ocs_radius_acct_port_sup.erl:92-96 | src/ocs_sup.erl:94-98 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (5 lines × 4) src/ocs_event_log_sup.erl:42 — src/ocs_event_log_sup.erl:42-46 | src/ocs_rest_hub_sup.erl:42-46 | src/ocs_rest_pagination_sup.erl:42-46 | src/ocs_statistics_sup.erl:42-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (5 lines × 4) src/ocs_rest_res_product.erl:993 — src/ocs_rest_res_product.erl:993-997 | src/ocs_rest_res_product.erl:1108-1112 | src/ocs_rest_res_product.erl:1131-1135 | src/ocs_rest_res_product.erl:1175-1179 — 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) src/ocs_log.erl:6881 — src/ocs_log.erl:6881-6885 | src/ocs_log.erl:6917-6921 | src/ocs_log.erl:6932-6936 | src/ocs_log.erl:6938-6942 — 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×7
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/ocs.erl:383 — src/ocs.erl:383-409 | src/ocs.erl:428-452 | src/ocs.erl:524-548 | src/ocs.erl:1500-1529 — 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) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1644 — src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1644-1674 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1777-1822 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1836-1873 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1886-1917 — 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) src/ocs_diameter_3gpp_s6b_application_cb.erl:158 — src/ocs_diameter_3gpp_s6b_application_cb.erl:158-163 | src/ocs_diameter_3gpp_sta_application_cb.erl:172-177 | src/ocs_diameter_3gpp_swm_application_cb.erl:171-176 | src/ocs_diameter_3gpp_swx_application_cb.erl:164-169 — 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) src/ocs_diameter_3gpp_s6b_application_cb.erl:250 — src/ocs_diameter_3gpp_s6b_application_cb.erl:250-263 | src/ocs_diameter_3gpp_sta_application_cb.erl:292-307 | src/ocs_diameter_3gpp_swm_application_cb.erl:292-307 | src/ocs_diameter_3gpp_swx_application_cb.erl:241-254 — 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) src/ocs_rest_res_balance.erl:1185 — src/ocs_rest_res_balance.erl:1185-1198 | src/ocs_rest_res_client.erl:579-592 | src/ocs_rest_res_product.erl:2543-2556 | src/ocs_rest_res_service.erl:971-984 — 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) src/ocs_rest_res_product.erl:977 — src/ocs_rest_res_product.erl:977-998 | src/ocs_rest_res_product.erl:1093-1113 | src/ocs_rest_res_product.erl:1116-1136 | src/ocs_rest_res_product.erl:1160-1180 — 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) src/ocs_rest_res_product.erl:1367 — src/ocs_rest_res_product.erl:1367-1376 | src/ocs_rest_res_product.erl:1379-1388 | src/ocs_rest_res_resource.erl:1014-1023 | src/ocs_rest_res_resource.erl:1026-1035 — 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 (7 lines × 4) · ×7
  • Duplicated block (7 lines × 4) src/ocs_diameter_3gpp_s6b_application_cb.erl:253 — src/ocs_diameter_3gpp_s6b_application_cb.erl:253-259 | src/ocs_diameter_3gpp_sta_application_cb.erl:297-303 | src/ocs_diameter_3gpp_swm_application_cb.erl:297-303 | src/ocs_diameter_3gpp_swx_application_cb.erl:244-250 — before extracting anything, compare `src/ocs_diameter_3gpp_s6b_application_cb.erl` and `src/ocs_diameter_3gpp_sta_application_cb.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) src/ocs_eap_aka_fsm.erl:442 — src/ocs_eap_aka_fsm.erl:442-448 | src/ocs_eap_aka_fsm.erl:455-461 | src/ocs_eap_akap_fsm.erl:453-459 | src/ocs_eap_akap_fsm.erl:466-472 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) src/ocs_eap_aka_fsm.erl:453 — src/ocs_eap_aka_fsm.erl:453-459 | src/ocs_eap_aka_fsm.erl:1102-1108 | src/ocs_eap_akap_fsm.erl:464-470 | src/ocs_eap_akap_fsm.erl:1120-1126 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) src/ocs_eap_aka_fsm.erl:1272 — src/ocs_eap_aka_fsm.erl:1272-1278 | src/ocs_eap_aka_fsm.erl:1291-1297 | src/ocs_eap_akap_fsm.erl:1290-1296 | src/ocs_eap_akap_fsm.erl:1309-1315 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 4) src/ocs_log.erl:6868 — src/ocs_log.erl:6868-6874 | src/ocs_log.erl:6883-6889 | src/ocs_log.erl:6904-6910 | src/ocs_log.erl:6919-6925 — 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 (7 lines × 4) src/ocs_rating.erl:1481 — src/ocs_rating.erl:1481-1487 | src/ocs_rating.erl:1560-1567 | src/ocs_rating.erl:1633-1640 | src/ocs_rating.erl:1678-1685 — 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 (7 lines × 4) src/ocs_rest_res_nrf.erl:1193 — src/ocs_rest_res_nrf.erl:1193-1199 | src/ocs_rest_res_nrf.erl:1201-1207 | src/ocs_rest_res_nrf.erl:1209-1215 | src/ocs_rest_res_nrf.erl:1217-1223 — 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 (7 lines × 3) · ×7
  • Duplicated block (7 lines × 3) src/ocs_pgw_fsm.erl:247 — src/ocs_pgw_fsm.erl:247-253 | src/ocs_pgw_fsm.erl:265-271 | src/ocs_pgw_fsm.erl:281-287 — 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 (7 lines × 3) src/ocs_pgw_fsm.erl:354 — src/ocs_pgw_fsm.erl:354-360 | src/ocs_pgw_fsm.erl:372-378 | src/ocs_pgw_fsm.erl:388-394 — 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 (7 lines × 3) src/ocs_rating.erl:999 — src/ocs_rating.erl:999-1005 | src/ocs_rating.erl:1151-1157 | src/ocs_rating.erl:1294-1300 — 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 (7 lines × 3) src/ocs_rest_res_nrf.erl:176 — src/ocs_rest_res_nrf.erl:176-182 | src/ocs_rest_res_nrf.erl:299-305 | src/ocs_rest_res_nrf.erl:431-437 — 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 (7 lines × 3) src/ocs_rest_res_usage.erl:1766 — src/ocs_rest_res_usage.erl:1766-1772 | src/ocs_rest_res_usage.erl:1805-1811 | src/ocs_rest_res_usage.erl:1827-1833 — 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 (7 lines × 3) src/ocs_simple_auth_fsm.erl:406 — src/ocs_simple_auth_fsm.erl:406-412 | src/ocs_simple_auth_fsm.erl:425-431 | src/ocs_simple_auth_fsm.erl:444-450 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (7 lines × 3) src/ocs_rest_res_client.erl:135 — src/ocs_rest_res_client.erl:135-141 | src/ocs_rest_res_role.erl:214-220 | src/ocs_rest_res_user.erl:132-138 — before extracting anything, compare `src/ocs_rest_res_client.erl` and `src/ocs_rest_res_role.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×6
  • Duplicated block (13 lines × 2) src/ocs.erl:216 — src/ocs.erl:216-228 | src/ocs.erl:252-264 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) src/ocs_eap_aka_auc_fsm.erl:156 — src/ocs_eap_aka_auc_fsm.erl:156-168 | src/ocs_eap_aka_auc_fsm.erl:170-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) src/ocs_eap_aka_fsm.erl:369 — src/ocs_eap_aka_fsm.erl:369-381 | src/ocs_eap_akap_fsm.erl:375-387 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) src/ocs_eap_aka_fsm.erl:1087 — src/ocs_eap_aka_fsm.erl:1087-1099 | src/ocs_eap_akap_fsm.erl:1105-1117 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) src/ocs_log.erl:1759 — src/ocs_log.erl:1759-1771 | src/ocs_log.erl:1868-1880 — both copies are in the same file, so extract the 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) src/ocs_log.erl:6875 — src/ocs_log.erl:6875-6887 | src/ocs_log.erl:6911-6923 — both copies are in the same file, so extract the 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 (12 lines × 2) · ×6
  • Duplicated block (12 lines × 2) src/ocs.erl:1164 — src/ocs.erl:1164-1175 | src/ocs.erl:1266-1277 — both copies are in the same file, so extract the 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) src/ocs.erl:1822 — src/ocs.erl:1822-1833 | src/ocs.erl:1854-1865 — both copies are in the same file, so extract the 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) src/ocs_eap_aka_fsm.erl:411 — src/ocs_eap_aka_fsm.erl:411-422 | src/ocs_eap_akap_fsm.erl:421-432 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) src/ocs_eap_aka_fsm.erl:571 — src/ocs_eap_aka_fsm.erl:571-582 | src/ocs_eap_aka_fsm.erl:905-916 — both copies are in the same file, so extract the 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) src/ocs_eap_akap_fsm.erl:588 — src/ocs_eap_akap_fsm.erl:588-599 | src/ocs_eap_akap_fsm.erl:924-935 — both copies are in the same file, so extract the 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) src/ocs_eap_aka_fsm.erl:1507 — src/ocs_eap_aka_fsm.erl:1507-1518 | src/ocs_eap_akap_fsm.erl:1544-1555 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×6
  • Duplicated block (11 lines × 3) src/mod_ocs_rest_get.erl:535 — src/mod_ocs_rest_get.erl:535-545 | src/mod_ocs_rest_head.erl:280-290 | src/mod_ocs_rest_post.erl:317-327 — before extracting anything, compare `src/mod_ocs_rest_get.erl` and `src/mod_ocs_rest_head.erl` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 135 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 (11 lines × 3) src/ocs_diameter_auth_port_server.erl:647 — src/ocs_diameter_auth_port_server.erl:647-657 | src/ocs_diameter_auth_port_server.erl:664-674 | src/ocs_diameter_auth_port_server.erl:681-691 — 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 (11 lines × 3) src/ocs_radius_auth_port_server.erl:463 — src/ocs_radius_auth_port_server.erl:463-473 | src/ocs_radius_auth_port_server.erl:481-491 | src/ocs_radius_auth_port_server.erl:499-509 — 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 (11 lines × 3) src/ocs_rest_res_product.erl:522 — src/ocs_rest_res_product.erl:522-532 | src/ocs_rest_res_product.erl:663-673 | src/ocs_rest_res_service.erl:225-235 — before extracting anything, compare `src/ocs_rest_res_product.erl` and `src/ocs_rest_res_service.erl` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 237 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 (11 lines × 3) src/ocs_terminate_fsm.erl:230 — src/ocs_terminate_fsm.erl:230-240 | src/ocs_terminate_fsm.erl:245-255 | src/ocs_terminate_fsm.erl:259-269 — 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 (11 lines × 3) src/ocs_log.erl:2909 — src/ocs_log.erl:2909-2919 | src/ocs_log.erl:2931-2941 | src/ocs_log.erl:2952-2962 — 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–7 lines × 2) · ×6
  • Duplicated block (6–7 lines × 2) src/ocs.erl:816 — src/ocs.erl:816-821 | src/ocs.erl:845-851 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6–7 lines × 2) src/ocs.erl:3428 — src/ocs.erl:3428-3434 | src/ocs.erl:3449-3454 — both copies are in the same file, so extract the 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) src/ocs_log.erl:2923 — src/ocs_log.erl:2923-2929 | src/ocs_log.erl:2945-2950 — both copies are in the same file, so extract the 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) src/ocs_pgw_fsm.erl:244 — src/ocs_pgw_fsm.erl:244-250 | src/ocs_pgw_fsm.erl:352-357 — both copies are in the same file, so extract the 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) src/ocs_rating.erl:3380 — src/ocs_rating.erl:3380-3386 | src/ocs_rating.erl:3436-3441 — both copies are in the same file, so extract the 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) src/ocs_rest_res_product.erl:685 — src/ocs_rest_res_product.erl:685-690 | src/ocs_rest_res_product.erl:694-700 — both copies are in the same file, so extract the 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 × 2) · ×5
  • Duplicated block (16 lines × 2) src/ocs_diameter_3gpp_sta_application_cb.erl:292 — src/ocs_diameter_3gpp_sta_application_cb.erl:292-307 | src/ocs_diameter_3gpp_swm_application_cb.erl:292-307 — before extracting anything, compare `src/ocs_diameter_3gpp_sta_application_cb.erl` and `src/ocs_diameter_3gpp_swm_application_cb.erl` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 150 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 (16 lines × 2) src/ocs_diameter_auth_port_server.erl:742 — src/ocs_diameter_auth_port_server.erl:742-757 | src/ocs_radius_auth_port_server.erl:555-570 — before extracting anything, compare `src/ocs_diameter_auth_port_server.erl` and `src/ocs_radius_auth_port_server.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 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 (16 lines × 2) src/ocs_diameter_auth_port_server.erl:758 — src/ocs_diameter_auth_port_server.erl:758-773 | src/ocs_radius_auth_port_server.erl:539-554 — before extracting anything, compare `src/ocs_diameter_auth_port_server.erl` and `src/ocs_radius_auth_port_server.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 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 (16 lines × 2) src/ocs_log.erl:3477 — src/ocs_log.erl:3477-3492 | src/ocs_log.erl:3560-3575 — both copies are in the same file, so extract the 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) src/ocs_rest_res_usage.erl:3084 — src/ocs_rest_res_usage.erl:3084-3099 | src/ocs_rest_res_usage.erl:3112-3127 — both copies are in the same file, so extract the 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) · ×5
  • Duplicated block (15 lines × 2) src/ocs_diameter_acct_service_fsm.erl:103 — src/ocs_diameter_acct_service_fsm.erl:103-117 | src/ocs_diameter_auth_service_fsm.erl:121-135 — before extracting anything, compare `src/ocs_diameter_acct_service_fsm.erl` and `src/ocs_diameter_auth_service_fsm.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 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 (15 lines × 2) src/ocs_diameter_auth_port_server.erl:253 — src/ocs_diameter_auth_port_server.erl:253-267 | src/ocs_radius_auth_port_server.erl:223-237 — before extracting anything, compare `src/ocs_diameter_auth_port_server.erl` and `src/ocs_radius_auth_port_server.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 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 (15 lines × 2) src/ocs_diameter_eap_application_cb.erl:320 — src/ocs_diameter_eap_application_cb.erl:320-334 | src/ocs_diameter_nas_application_cb.erl:285-299 — before extracting anything, compare `src/ocs_diameter_eap_application_cb.erl` and `src/ocs_diameter_nas_application_cb.erl` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 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 (15 lines × 2) src/ocs_eap_aka_fsm.erl:1304 — src/ocs_eap_aka_fsm.erl:1304-1318 | src/ocs_eap_akap_fsm.erl:1322-1336 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 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 (15 lines × 2) src/ocs_log.erl:6858 — src/ocs_log.erl:6858-6872 | src/ocs_log.erl:6894-6908 — both copies are in the same file, so extract the 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 × 3) · ×5
  • Duplicated block (9 lines × 3) src/ocs_rest_res_product.erl:594 — src/ocs_rest_res_product.erl:594-602 | src/ocs_rest_res_product.erl:730-738 | src/ocs_rest_res_service.erl:323-331 — before extracting anything, compare `src/ocs_rest_res_product.erl` and `src/ocs_rest_res_service.erl` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) src/ocs_rest_res_product.erl:1105 — src/ocs_rest_res_product.erl:1105-1113 | src/ocs_rest_res_product.erl:1128-1136 | src/ocs_rest_res_product.erl:1172-1180 — 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 (9 lines × 3) src/ocs_rest_res_role.erl:343 — src/ocs_rest_res_role.erl:343-352 | src/ocs_rest_res_usage.erl:3101-3109 | src/ocs_rest_res_usage.erl:3129-3137 — before extracting anything, compare `src/ocs_rest_res_role.erl` and `src/ocs_rest_res_usage.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) src/ocs_rest_res_usage.erl:741 — src/ocs_rest_res_usage.erl:741-749 | src/ocs_rest_res_usage.erl:769-777 | src/ocs_rest_res_usage.erl:788-796 — 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 (9 lines × 3) src/ocs_rest_res_product.erl:461 — src/ocs_rest_res_product.erl:461-469 | src/ocs_rest_res_product.erl:631-639 | src/ocs_rest_res_service.erl:385-393 — before extracting anything, compare `src/ocs_rest_res_product.erl` and `src/ocs_rest_res_service.erl` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×4
  • Duplicated block (14 lines × 2) src/ocs.erl:1217 — src/ocs.erl:1217-1230 | src/ocs.erl:1325-1338 — both copies are in the same file, so extract the 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) src/ocs_eap_aka_fsm.erl:1320 — src/ocs_eap_aka_fsm.erl:1320-1333 | src/ocs_eap_akap_fsm.erl:1338-1351 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 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 (14 lines × 2) src/ocs_log.erl:5619 — src/ocs_log.erl:5619-5632 | src/ocs_log.erl:5840-5853 — both copies are in the same file, so extract the 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) src/ocs_rest_res_role.erl:336 — src/ocs_rest_res_role.erl:336-349 | src/ocs_rest_res_user.erl:451-464 — before extracting anything, compare `src/ocs_rest_res_role.erl` and `src/ocs_rest_res_user.erl` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 204 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×4
  • Duplicated block (8 lines × 3) src/ocs.erl:2124 — src/ocs.erl:2124-2131 | src/ocs.erl:2210-2217 | src/ocs.erl:2273-2280 — 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 (8 lines × 3) src/ocs_rest_res_product.erl:585 — src/ocs_rest_res_product.erl:585-592 | src/ocs_rest_res_product.erl:721-728 | src/ocs_rest_res_service.erl:314-321 — before extracting anything, compare `src/ocs_rest_res_product.erl` and `src/ocs_rest_res_service.erl` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 3) src/ocs_rest_res_usage.erl:3084 — src/ocs_rest_res_usage.erl:3084-3091 | src/ocs_rest_res_usage.erl:3112-3119 | src/ocs_rest_res_usage.erl:3140-3147 — 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 (8 lines × 3) src/ocs_rest_res_product.erl:182 — src/ocs_rest_res_product.erl:182-189 | src/ocs_rest_res_product.erl:219-226 | src/ocs_rest_res_service.erl:120-127 — before extracting anything, compare `src/ocs_rest_res_product.erl` and `src/ocs_rest_res_service.erl` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 237 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×4
  • Duplicated block (6 lines × 4) src/ocs_eap_aka_fsm.erl:575 — src/ocs_eap_aka_fsm.erl:575-580 | src/ocs_eap_aka_fsm.erl:909-914 | src/ocs_eap_akap_fsm.erl:592-597 | src/ocs_eap_akap_fsm.erl:928-933 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) src/ocs_eap_aka_fsm.erl:874 — src/ocs_eap_aka_fsm.erl:874-879 | src/ocs_eap_aka_fsm.erl:888-893 | src/ocs_eap_akap_fsm.erl:893-898 | src/ocs_eap_akap_fsm.erl:907-912 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) src/ocs_eap_aka_fsm.erl:1267 — src/ocs_eap_aka_fsm.erl:1267-1272 | src/ocs_eap_aka_fsm.erl:1383-1389 | src/ocs_eap_akap_fsm.erl:1285-1290 | src/ocs_eap_akap_fsm.erl:1401-1407 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 4) src/ocs_rating.erl:779 — src/ocs_rating.erl:779-784 | src/ocs_rating.erl:1171-1177 | src/ocs_rating.erl:1309-1314 | src/ocs_rating.erl:1356-1361 — 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 lines × 6) · ×4
  • Duplicated block (5 lines × 6) src/ocs_eap_aka_fsm.erl:1274 — src/ocs_eap_aka_fsm.erl:1274-1278 | src/ocs_eap_aka_fsm.erl:1293-1297 | src/ocs_eap_aka_fsm.erl:1391-1396 | src/ocs_eap_akap_fsm.erl:1292-1296 | src/ocs_eap_akap_fsm.erl:1311-1315 | src/ocs_eap_akap_fsm.erl:1409-1414 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 6) src/ocs_pgw_fsm.erl:255 — src/ocs_pgw_fsm.erl:255-259 | src/ocs_pgw_fsm.erl:273-277 | src/ocs_pgw_fsm.erl:289-293 | src/ocs_pgw_fsm.erl:362-366 | src/ocs_pgw_fsm.erl:380-384 | src/ocs_pgw_fsm.erl:396-400 — 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.
  • Duplicated block (5 lines × 6) src/ocs_rest_res_usage.erl:1393 — src/ocs_rest_res_usage.erl:1393-1397 | src/ocs_rest_res_usage.erl:1404-1408 | src/ocs_rest_res_usage.erl:1415-1419 | src/ocs_rest_res_usage.erl:1502-1506 | src/ocs_rest_res_usage.erl:1513-1517 | src/ocs_rest_res_usage.erl:1556-1560 — 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.
  • Duplicated block (5 lines × 6) src/ocs_rest_res_usage.erl:1051 — src/ocs_rest_res_usage.erl:1051-1055 | src/ocs_rest_res_usage.erl:1061-1065 | src/ocs_rest_res_usage.erl:1071-1075 | src/ocs_rest_res_usage.erl:1081-1085 | src/ocs_rest_res_usage.erl:1091-1095 | src/ocs_rest_res_usage.erl:1100-1104 — 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×4
  • Outbound HTTP without resilience src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1027 — `httpc:request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1095 — `httpc:request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1181 — `httpc:request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/ocs_rest_hub_fsm.erl:462 — `httpc:request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D15 · Churn × Complexity Hotspots · Hotspot · ×3
  • Hotspot: src/ocs_log.erl src/ocs_log.erl:6830 — src/ocs_log.erl changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in ocs_log.diameter_user_location_info at line 6830. 2 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-10..2026-10-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-10 10:50:09 +08:00' --until='2026-10-08 10:50:09 +08:00' --full-history --no-merges -- src/ocs_log.erl`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/user_default.erl src/user_default.erl:747 — src/user_default.erl changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 91 in user_default.dia_count at line 747. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-10..2026-10-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-10 10:50:09 +08:00' --until='2026-10-08 10:50:09 +08:00' --full-history --no-merges -- src/user_default.erl`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/ocs_terminate_fsm.erl src/ocs_terminate_fsm.erl:122 — src/ocs_terminate_fsm.erl changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in ocs_terminate_fsm.idle at line 122. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-10..2026-10-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-10 10:50:09 +08:00' --until='2026-10-08 10:50:09 +08:00' --full-history --no-merges -- src/ocs_terminate_fsm.erl`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (7 members, 50+ identical tokens) src/ocs_rest_res_balance.erl:69 — src/ocs_rest_res_balance.erl:69-109 | src/ocs_rest_res_balance.erl:222-248 | src/ocs_rest_res_client.erl:86-118 | src/ocs_rest_res_product.erl:253-287 | src/ocs_rest_res_product.erl:304-332 | src/ocs_rest_res_resource.erl:350-380 | src/ocs_rest_res_service.erl:152-178 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) src/ocs_rest_res_hub_balance.erl:188 — src/ocs_rest_res_hub_balance.erl:188-195 | src/ocs_rest_res_hub_product.erl:289-296 | src/ocs_rest_res_hub_resource.erl:189-196 | src/ocs_rest_res_hub_role.erl:182-189 | src/ocs_rest_res_hub_service.erl:189-196 | src/ocs_rest_res_hub_usage.erl:191-198 | src/ocs_rest_res_hub_user.erl:189-196 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) src/ocs_rest_res_hub_balance.erl:197 — src/ocs_rest_res_hub_balance.erl:197-209 | src/ocs_rest_res_hub_product.erl:298-310 | src/ocs_rest_res_hub_resource.erl:198-210 | src/ocs_rest_res_hub_role.erl:191-204 | src/ocs_rest_res_hub_service.erl:198-210 | src/ocs_rest_res_hub_usage.erl:200-212 | src/ocs_rest_res_hub_user.erl:198-210 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (6 members, 50+ identical tokens) src/ocs.erl:271 — src/ocs.erl:271-288 | src/ocs.erl:454-471 | src/ocs.erl:996-1013 | src/ocs.erl:1445-1462 | src/ocs.erl:1714-1731 | src/ocs.erl:2317-2334 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) src/ocs_rest_res_hub_balance.erl:130 — src/ocs_rest_res_hub_balance.erl:130-145 | src/ocs_rest_res_hub_resource.erl:132-147 | src/ocs_rest_res_hub_role.erl:125-140 | src/ocs_rest_res_hub_service.erl:132-147 | src/ocs_rest_res_hub_usage.erl:133-148 | src/ocs_rest_res_hub_user.erl:132-147 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) src/ocs_rest_res_usage.erl:1390 — src/ocs_rest_res_usage.erl:1390-1399 | src/ocs_rest_res_usage.erl:1401-1410 | src/ocs_rest_res_usage.erl:1412-1421 | src/ocs_rest_res_usage.erl:1499-1508 | src/ocs_rest_res_usage.erl:1510-1519 | src/ocs_rest_res_usage.erl:1553-1562 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (5 members, 50+ identical tokens) src/ocs_rest_res_balance.erl:1035 — src/ocs_rest_res_balance.erl:1035-1041 | src/ocs_rest_res_client.erl:433-439 | src/ocs_rest_res_product.erl:2394-2400 | src/ocs_rest_res_resource.erl:383-389 | src/ocs_rest_res_service.erl:825-831 — 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) src/ocs_rest_res_balance.erl:1101 — src/ocs_rest_res_balance.erl:1101-1107 | src/ocs_rest_res_client.erl:499-505 | src/ocs_rest_res_product.erl:2460-2466 | src/ocs_rest_res_resource.erl:520-526 | src/ocs_rest_res_service.erl:891-897 — 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) src/ocs_rest_res_balance.erl:1177 — src/ocs_rest_res_balance.erl:1177-1182 | src/ocs_rest_res_client.erl:571-576 | src/ocs_rest_res_product.erl:2535-2540 | src/ocs_rest_res_resource.erl:512-517 | src/ocs_rest_res_service.erl:963-968 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×3
  • Duplicated block (18 lines × 2) src/ocs.erl:1993 — src/ocs.erl:1993-2010 | src/ocs.erl:2252-2269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) src/ocs_rating.erl:1319 — src/ocs_rating.erl:1319-1336 | src/ocs_rating.erl:1366-1383 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) src/ocs_rest_res_client.erl:353 — src/ocs_rest_res_client.erl:353-370 | src/ocs_rest_res_client.erl:377-394 — both copies are in the same file, so extract the 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 (17 lines × 2) · ×3
  • Duplicated block (17 lines × 2) src/ocs_eap_aka_fsm.erl:1339 — src/ocs_eap_aka_fsm.erl:1339-1355 | src/ocs_eap_akap_fsm.erl:1357-1373 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 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 (17 lines × 2) src/ocs_rating.erl:260 — src/ocs_rating.erl:260-276 | src/ocs_rating.erl:299-315 — both copies are in the same file, so extract the 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) src/ocs_rest_res_usage.erl:695 — src/ocs_rest_res_usage.erl:695-711 | src/ocs_rest_res_usage.erl:832-848 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×3
  • Duplicated block (9–10 lines × 2) src/ocs_diameter_3gpp_sta_application_cb.erl:221 — src/ocs_diameter_3gpp_sta_application_cb.erl:221-229 | src/ocs_diameter_3gpp_swm_application_cb.erl:220-229 — before extracting anything, compare `src/ocs_diameter_3gpp_sta_application_cb.erl` and `src/ocs_diameter_3gpp_swm_application_cb.erl` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9–10 lines × 2) src/ocs_log.erl:1148 — src/ocs_log.erl:1148-1157 | src/ocs_log.erl:1161-1169 — both copies are in the same file, so extract the 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–10 lines × 2) src/ocs_log_rotate_server.erl:236 — src/ocs_log_rotate_server.erl:236-244 | src/ocs_log_rotate_server.erl:253-262 — both copies are in the same file, so extract the 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 × 5) · ×3
  • Duplicated block (6 lines × 5) src/ocs_rest_res_balance.erl:1102 — src/ocs_rest_res_balance.erl:1102-1107 | src/ocs_rest_res_client.erl:500-505 | src/ocs_rest_res_product.erl:2461-2466 | src/ocs_rest_res_resource.erl:521-526 | src/ocs_rest_res_service.erl:892-897 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 5) src/ocs_rest_res_balance.erl:1177 — src/ocs_rest_res_balance.erl:1177-1182 | src/ocs_rest_res_client.erl:571-576 | src/ocs_rest_res_product.erl:2535-2540 | src/ocs_rest_res_resource.erl:512-517 | src/ocs_rest_res_service.erl:963-968 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 5) src/ocs_terminate_fsm.erl:231 — src/ocs_terminate_fsm.erl:231-236 | src/ocs_terminate_fsm.erl:246-251 | src/ocs_terminate_fsm.erl:260-265 | src/ocs_terminate_fsm.erl:272-277 | src/ocs_terminate_fsm.erl:284-289 — 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 (5 lines × 5) · ×3
  • Duplicated block (5 lines × 5) src/ocs_pgw_fsm.erl:245 — src/ocs_pgw_fsm.erl:245-250 | src/ocs_pgw_fsm.erl:280-284 | src/ocs_pgw_fsm.erl:353-357 | src/ocs_pgw_fsm.erl:371-375 | src/ocs_pgw_fsm.erl:387-391 — 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) src/ocs_rest_res_usage.erl:1061 — src/ocs_rest_res_usage.erl:1061-1065 | src/ocs_rest_res_usage.erl:1071-1075 | src/ocs_rest_res_usage.erl:1081-1085 | src/ocs_rest_res_usage.erl:1091-1095 | src/ocs_rest_res_usage.erl:1100-1104 — 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) src/ocs_log.erl:6870 — src/ocs_log.erl:6870-6874 | src/ocs_log.erl:6885-6889 | src/ocs_log.erl:6906-6910 | src/ocs_log.erl:6921-6925 | src/ocs_log.erl:6972-6976 — 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 (10 lines × 3) · ×3
  • Duplicated block (10 lines × 3) src/ocs_log.erl:2680 — src/ocs_log.erl:2680-2689 | src/ocs_log.erl:2699-2708 | src/ocs_log.erl:2717-2726 — 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 (10 lines × 3) src/ocs_log.erl:2591 — src/ocs_log.erl:2591-2600 | src/ocs_log.erl:2610-2619 | src/ocs_log.erl:2628-2637 — 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 (10 lines × 3) src/ocs_rest_res_resource.erl:758 — src/ocs_rest_res_resource.erl:758-767 | src/ocs_rest_res_resource.erl:860-869 | src/ocs_rest_res_resource.erl:912-921 — 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.
R10 · Code Duplication · Duplicated block (31 lines × 2 locations) · ×3
  • Duplicated block (31 lines × 2 locations) priv/www/src/sig-ipdr-list-voip.js:200 — priv/www/src/sig-ipdr-list-voip.js:200 · REDACTED:298 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (31 lines × 2 locations) REDACTED:1765 — REDACTED:1765 · REDACTED:1813 — both copies are in the same file, so extract the 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 (31 lines × 2 locations) priv/www/src/sig-tariff-period-list.js:123 — priv/www/src/sig-tariff-period-list.js:123 · priv/www/src/sig-tariff-roaming-list.js:83 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: offerUpdate REDACTED:32 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: dashBoard priv/www/src/sig-dashboard.js:29 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D35 · Change Coupling · Change-coupling hub · ×2
  • Change-coupling hub: ocs_diameter_3gpp_sta_application_cb.erl → ocs_diameter_3gpp_s6b_application_cb.erl, ocs_diameter_3gpp_swm_application_cb.erl, ocs_diameter_3gpp_swx_application_cb.erl, ocs_diameter_eap_application_cb.erl, ocs_diameter_nas_application_cb.erl src/ocs_diameter_3gpp_sta_application_cb.erl — `src/ocs_diameter_3gpp_sta_application_cb.erl` changes together with 5 other files — `src/ocs_diameter_3gpp_s6b_application_cb.erl`, `src/ocs_diameter_3gpp_swm_application_cb.erl`, `src/ocs_diameter_3gpp_swx_application_cb.erl`, `src/ocs_diameter_eap_application_cb.erl`, `src/ocs_diameter_nas_application_cb.erl` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: mod_ocs_rest_delete.erl → mod_ocs_rest_get.erl, mod_ocs_rest_patch.erl, mod_ocs_rest_post.erl src/mod_ocs_rest_delete.erl — `src/mod_ocs_rest_delete.erl` changes together with 3 other files — `src/mod_ocs_rest_get.erl`, `src/mod_ocs_rest_patch.erl`, `src/mod_ocs_rest_post.erl` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D35 · Change Coupling · Change coupling clique · ×2
  • Change coupling clique: ocs_rest_res_hub_balance.erl, ocs_rest_res_hub_product.erl, ocs_rest_res_hub_resource.erl, ocs_rest_res_hub_service.erl, ocs_rest_res_hub_usage.erl, ocs_rest_res_hub_user.erl src/ocs_rest_res_hub_balance.erl — 6 files — `src/ocs_rest_res_hub_balance.erl`, `src/ocs_rest_res_hub_product.erl`, `src/ocs_rest_res_hub_resource.erl`, `src/ocs_rest_res_hub_service.erl`, `src/ocs_rest_res_hub_usage.erl`, `src/ocs_rest_res_hub_user.erl` — all change together with no explicit dependency: a fully-connected co-change clique, not 15 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
  • Change coupling clique: sig-access-list.js, sig-client-list.js, sig-sub-list.js priv/www/src/sig-access-list.js — 3 files — `priv/www/src/sig-access-list.js`, `priv/www/src/sig-client-list.js`, `priv/www/src/sig-sub-list.js` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×2
  • Duplicated block (41 lines × 2) src/ocs.erl:1925 — src/ocs.erl:1925-1965 | src/ocs.erl:2165-2205 — both copies are in the same file, so extract the 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 (41 lines × 2) src/ocs_rating.erl:206 — src/ocs_rating.erl:206-246 | src/ocs_rating.erl:512-552 — both copies are in the same file, so extract the 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 (24 lines × 2) · ×2
  • Duplicated block (24 lines × 2) src/ocs_deregister_fsm.erl:211 — src/ocs_deregister_fsm.erl:211-234 | src/ocs_deregister_fsm.erl:236-259 — both copies are in the same file, so extract the 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 (24 lines × 2) src/ocs_diameter_3gpp_ro_application_cb.erl:263 — src/ocs_diameter_3gpp_ro_application_cb.erl:263-286 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:299-322 — before extracting anything, compare `src/ocs_diameter_3gpp_ro_application_cb.erl` and `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×2
  • Duplicated block (20–21 lines × 2) src/ocs_log.erl:2845 — src/ocs_log.erl:2845-2865 | src/ocs_log.erl:2867-2886 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20–21 lines × 2) src/ocs_rating.erl:1629 — src/ocs_rating.erl:1629-1648 | src/ocs_rating.erl:1674-1694 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) src/mod_ocs_rest_get.erl:150 — src/mod_ocs_rest_get.erl:150-168 | src/mod_ocs_rest_head.erl:144-162 — before extracting anything, compare `src/mod_ocs_rest_get.erl` and `src/mod_ocs_rest_head.erl` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 135 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 (19 lines × 2) src/ocs.erl:1881 — src/ocs.erl:1881-1899 | src/ocs.erl:2102-2120 — both copies are in the same file, so extract the 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 × 3) · ×2
  • Duplicated block (15 lines × 3) src/mod_ocs_rest_delete.erl:97 — src/mod_ocs_rest_delete.erl:97-111 | src/mod_ocs_rest_patch.erl:99-113 | src/mod_ocs_rest_post.erl:99-113 — before extracting anything, compare `src/mod_ocs_rest_delete.erl` and `src/mod_ocs_rest_patch.erl` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 114 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 (15 lines × 3) src/ocs_rating.erl:337 — src/ocs_rating.erl:337-351 | src/ocs_rating.erl:368-382 | src/ocs_rating.erl:405-419 — 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 (14 lines × 4) · ×2
  • Duplicated block (14 lines × 4) src/ocs_diameter_3gpp_s6b_application_cb.erl:189 — src/ocs_diameter_3gpp_s6b_application_cb.erl:189-202 | src/ocs_diameter_3gpp_sta_application_cb.erl:202-215 | src/ocs_diameter_3gpp_swm_application_cb.erl:201-214 | src/ocs_diameter_3gpp_swx_application_cb.erl:195-208 — before extracting anything, compare `src/ocs_diameter_3gpp_s6b_application_cb.erl` and `src/ocs_diameter_3gpp_sta_application_cb.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 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 (14 lines × 4) src/ocs_rest_res_balance.erl:1185 — src/ocs_rest_res_balance.erl:1185-1198 | src/ocs_rest_res_client.erl:579-592 | src/ocs_rest_res_product.erl:2543-2556 | src/ocs_rest_res_service.erl:971-984 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×2
  • Duplicated block (13–14 lines × 2) src/ocs_radius_disconnect_fsm.erl:273 — src/ocs_radius_disconnect_fsm.erl:273-285 | src/ocs_radius_disconnect_fsm.erl:290-303 — both copies are in the same file, so extract the 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–14 lines × 2) src/ocs_rating.erl:782 — src/ocs_rating.erl:782-794 | src/ocs_rating.erl:961-974 — both copies are in the same file, so extract the 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 (12–13 lines × 3) · ×2
  • Duplicated block (12–13 lines × 3) src/ocs.erl:1903 — src/ocs.erl:1903-1914 | src/ocs.erl:1971-1982 | src/ocs.erl:2014-2026 — 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 (12–13 lines × 3) src/ocs_rating.erl:773 — src/ocs_rating.erl:773-784 | src/ocs_rating.erl:1303-1314 | src/ocs_rating.erl:1349-1361 — 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 (12–13 lines × 2) · ×2
  • Duplicated block (12–13 lines × 2) src/ocs_rating.erl:3800 — src/ocs_rating.erl:3800-3811 | src/ocs_rating.erl:3826-3838 — both copies are in the same file, so extract the 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–13 lines × 2) src/ocs_rest_res_usage.erl:208 — src/ocs_rest_res_usage.erl:208-219 | src/ocs_rest_res_usage.erl:233-245 — both copies are in the same file, so extract the 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 (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1337 — src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1337-1348 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1359-1370 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1376-1387 — 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 (12 lines × 3) src/ocs_rest_res_balance.erl:427 — src/ocs_rest_res_balance.erl:427-438 | src/ocs_rest_res_balance.erl:477-488 | src/ocs_rest_res_balance.erl:492-503 — 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 (11 lines × 5) · ×2
  • Duplicated block (11 lines × 5) src/mod_ocs_rest_delete.erl:264 — src/mod_ocs_rest_delete.erl:264-274 | src/mod_ocs_rest_get.erl:523-533 | src/mod_ocs_rest_head.erl:268-278 | src/mod_ocs_rest_patch.erl:299-309 | src/mod_ocs_rest_post.erl:305-315 — before extracting anything, compare `src/mod_ocs_rest_delete.erl` and `src/mod_ocs_rest_get.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 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 (11 lines × 5) src/mod_ocs_rest_delete.erl:276 — src/mod_ocs_rest_delete.erl:276-286 | src/mod_ocs_rest_get.erl:547-557 | src/mod_ocs_rest_head.erl:292-302 | src/mod_ocs_rest_patch.erl:322-332 | src/mod_ocs_rest_post.erl:329-339 — before extracting anything, compare `src/mod_ocs_rest_delete.erl` and `src/mod_ocs_rest_get.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×2
  • Duplicated block (10–11 lines × 2) src/ocs.erl:2056 — src/ocs.erl:2056-2065 | src/ocs.erl:2083-2093 — both copies are in the same file, so extract the 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) src/ocs_eap_aka_fsm.erl:441 — src/ocs_eap_aka_fsm.erl:441-450 | src/ocs_eap_akap_fsm.erl:451-461 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×2
  • Duplicated block (9–10 lines × 4) src/ocs_diameter_auth_port_server.erl:647 — src/ocs_diameter_auth_port_server.erl:647-655 | src/ocs_diameter_auth_port_server.erl:664-672 | src/ocs_diameter_auth_port_server.erl:681-689 | src/ocs_diameter_auth_port_server.erl:696-705 — 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 (9–10 lines × 4) src/ocs_radius_auth_port_server.erl:463 — src/ocs_radius_auth_port_server.erl:463-471 | src/ocs_radius_auth_port_server.erl:481-489 | src/ocs_radius_auth_port_server.erl:499-507 | src/ocs_radius_auth_port_server.erl:515-524 — 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–10 lines × 2) · ×2
  • Duplicated block (8–10 lines × 2) src/ocs_eap_aka_fsm.erl:570 — src/ocs_eap_aka_fsm.erl:570-577 | src/ocs_eap_aka_fsm.erl:1094-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.
  • Duplicated block (8–10 lines × 2) src/ocs_eap_akap_fsm.erl:587 — src/ocs_eap_akap_fsm.erl:587-594 | src/ocs_eap_akap_fsm.erl:1112-1121 — both copies are in the same file, so extract the 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) · ×2
  • Duplicated block (9 lines × 5) src/mod_ocs_rest_delete.erl:253 — src/mod_ocs_rest_delete.erl:253-261 | src/mod_ocs_rest_get.erl:512-520 | src/mod_ocs_rest_head.erl:257-265 | src/mod_ocs_rest_patch.erl:276-284 | src/mod_ocs_rest_post.erl:294-302 — before extracting anything, compare `src/mod_ocs_rest_delete.erl` and `src/mod_ocs_rest_get.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 5) src/ocs_eap_akap_fsm.erl:595 — src/ocs_eap_akap_fsm.erl:595-603 | src/ocs_eap_akap_fsm.erl:877-885 | src/ocs_eap_akap_fsm.erl:889-897 | src/ocs_eap_akap_fsm.erl:903-911 | src/ocs_eap_akap_fsm.erl:914-922 — 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 (7–8 lines × 4) · ×2
  • Duplicated block (7–8 lines × 4) src/ocs_eap_aka_fsm.erl:1389 — src/ocs_eap_aka_fsm.erl:1389-1395 | src/ocs_eap_aka_fsm.erl:1410-1417 | src/ocs_eap_akap_fsm.erl:1407-1413 | src/ocs_eap_akap_fsm.erl:1428-1435 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7–8 lines × 4) src/ocs_diameter_auth_port_server.erl:570 — src/ocs_diameter_auth_port_server.erl:570-577 | src/ocs_diameter_auth_port_server.erl:591-598 | src/ocs_diameter_auth_port_server.erl:612-619 | src/ocs_diameter_auth_port_server.erl:632-638 — 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 (7 lines × 8) · ×2
  • Duplicated block (7 lines × 8) src/ocs_rest_res_balance.erl:1111 — src/ocs_rest_res_balance.erl:1111-1117 | src/ocs_rest_res_client.erl:509-515 | src/ocs_rest_res_product.erl:2470-2476 | src/ocs_rest_res_resource.erl:450-456 | src/ocs_rest_res_service.erl:901-907 | src/ocs_rest_res_usage.erl:3224-3230 | src/ocs_rest_res_usage.erl:3265-3271 | src/ocs_rest_res_usage.erl:3306-3312 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 8) src/ocs_rest_res_health.erl:471 — src/ocs_rest_res_health.erl:471-477 | src/ocs_rest_res_health.erl:481-487 | src/ocs_rest_res_health.erl:491-497 | src/ocs_rest_res_health.erl:501-507 | src/ocs_rest_res_health.erl:511-517 | src/ocs_rest_res_health.erl:521-527 | src/ocs_rest_res_health.erl:532-538 | src/ocs_rest_res_health.erl:542-548 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (6 lines × 14) · ×2
  • Duplicated block (6 lines × 14) src/mod_ocs_rest_delete.erl:126 — src/mod_ocs_rest_delete.erl:126-132 | src/mod_ocs_rest_delete.erl:215-220 | src/mod_ocs_rest_delete.erl:257-262 | src/mod_ocs_rest_get.erl:183-189 | src/mod_ocs_rest_get.erl:474-479 | src/mod_ocs_rest_get.erl:516-521 | src/mod_ocs_rest_head.erl:177-183 | src/mod_ocs_rest_head.erl:219-224 | src/mod_ocs_rest_head.erl:261-266 | src/mod_ocs_rest_patch.erl:141-147 | src/mod_ocs_rest_patch.erl:233-239 | src/mod_ocs_rest_patch.erl:280-285 | src/mod_ocs_rest_post.erl:133-139 | src/mod_ocs_rest_post.erl:298-303 — before extracting anything, compare `src/mod_ocs_rest_delete.erl` and `src/mod_ocs_rest_get.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 14) src/ocs_rest_res_usage.erl:1133 — src/ocs_rest_res_usage.erl:1133-1138 | src/ocs_rest_res_usage.erl:1155-1160 | src/ocs_rest_res_usage.erl:1247-1252 | src/ocs_rest_res_usage.erl:1359-1364 | src/ocs_rest_res_usage.erl:1371-1376 | src/ocs_rest_res_usage.erl:1456-1461 | src/ocs_rest_res_usage.erl:1478-1483 | src/ocs_rest_res_usage.erl:1490-1495 | src/ocs_rest_res_usage.erl:1544-1549 | src/ocs_rest_res_usage.erl:1567-1572 | src/ocs_rest_res_usage.erl:1589-1594 | src/ocs_rest_res_usage.erl:1868-1873 | src/ocs_rest_res_usage.erl:1900-1905 | src/ocs_rest_res_usage.erl:1912-1917 — all 14 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 × 7) · ×2
  • Duplicated block (6 lines × 7) src/ocs_eap_aka_fsm.erl:582 — src/ocs_eap_aka_fsm.erl:582-588 | src/ocs_eap_aka_fsm.erl:862-867 | src/ocs_eap_aka_fsm.erl:899-905 | src/ocs_eap_aka_fsm.erl:916-922 | src/ocs_eap_akap_fsm.erl:599-605 | src/ocs_eap_akap_fsm.erl:881-886 | src/ocs_eap_akap_fsm.erl:918-924 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 7) src/ocs_rest_res_hub_balance.erl:190 — src/ocs_rest_res_hub_balance.erl:190-195 | src/ocs_rest_res_hub_product.erl:291-296 | src/ocs_rest_res_hub_resource.erl:191-196 | src/ocs_rest_res_hub_role.erl:184-189 | src/ocs_rest_res_hub_service.erl:191-196 | src/ocs_rest_res_hub_usage.erl:193-198 | src/ocs_rest_res_hub_user.erl:191-196 — before extracting anything, compare `src/ocs_rest_res_hub_balance.erl` and `src/ocs_rest_res_hub_product.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 7) · ×2
  • Duplicated block (5 lines × 7) src/ocs_rest_res_hub_balance.erl:205 — src/ocs_rest_res_hub_balance.erl:205-209 | src/ocs_rest_res_hub_product.erl:306-310 | src/ocs_rest_res_hub_resource.erl:206-210 | src/ocs_rest_res_hub_role.erl:200-204 | src/ocs_rest_res_hub_service.erl:206-210 | src/ocs_rest_res_hub_usage.erl:208-212 | src/ocs_rest_res_hub_user.erl:206-210 — before extracting anything, compare `src/ocs_rest_res_hub_balance.erl` and `src/ocs_rest_res_hub_product.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 7) src/ocs_deregister_fsm_sup.erl:60 — src/ocs_deregister_fsm_sup.erl:60-64 | src/ocs_diameter_disconnect_fsm_sup.erl:60-64 | src/ocs_eap_pwd_fsm_sup.erl:60-64 | src/ocs_pgw_fsm_sup.erl:60-64 | src/ocs_radius_disconnect_fsm_sup.erl:71-75 | src/ocs_simple_auth_fsm_sup.erl:60-64 | src/ocs_terminate_fsm_sup.erl:60-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 7 call sites, so a change lands once.
R10 · Code Duplication · Duplicated block (33 lines × 2 locations) · ×2
  • Duplicated block (33 lines × 2 locations) priv/www/src/sig-http-list.js:193 — priv/www/src/sig-http-list.js:193 · priv/www/src/sig-user-list.js:195 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (33 lines × 2 locations) priv/www/src/sig-offer-list.js:161 — priv/www/src/sig-offer-list.js:161 · priv/www/src/sig-user-list.js:128 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (26 lines × 2 locations) · ×2
  • Duplicated block (26 lines × 2 locations) priv/www/src/sig-client-list.js:166 — priv/www/src/sig-client-list.js:166 · priv/www/src/sig-sub-list.js:119 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (26 lines × 2 locations) priv/www/src/sig-offer-add.js:2113 — priv/www/src/sig-offer-add.js:2113 · priv/www/src/sig-offer-add.js:2231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (24 lines × 2 locations) · ×2
  • Duplicated block (24 lines × 2 locations) priv/www/src/sig-dashboard.js:1846 — priv/www/src/sig-dashboard.js:1846 · priv/www/src/sig-dashboard.js:1977 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (24 lines × 2 locations) priv/www/src/sig-sub-update.js:711 — priv/www/src/sig-sub-update.js:711 · priv/www/src/sig-sub-update.js:736 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
AC7 · A11y enforcement · Accessibility enforcement below the top rung · ×1
  • Accessibility enforcement below the top rung — No accessibility enforcement found — no automated accessibility check runs over your pages. Add an accessibility checker (axe-core, pa11y or Lighthouse) over your HTML in CI and fail the build on new violations. What was searched, so you can tell an absence from a miss: the 46 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
D1 · Cyclomatic Complexity · offerUpdate._updateOfferPrice (cyclomatic 186) · ×1
  • offerUpdate._updateOfferPrice (cyclomatic 186) REDACTED:1951 — offerUpdate._updateOfferPrice has cyclomatic complexity 186 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: REDACTED holds 8 of the 90 methods over the threshold — including the worst — and 495 of the 1660 points over it (30%), 2.3× the next-largest file (src/ocs_rating.erl at 216). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · ocs_rating.charge2 (cyclomatic 136) · ×1
  • ocs_rating.charge2 (cyclomatic 136) src/ocs_rating.erl:608 — ocs_rating.charge2 has cyclomatic complexity 136 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · offerUpdate._updateOfferAlteration (cyclomatic 104) · ×1
  • offerUpdate._updateOfferAlteration (cyclomatic 104) REDACTED:2694 — offerUpdate._updateOfferAlteration has cyclomatic complexity 104 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: REDACTED holds 8 of the 90 methods over the threshold — including the worst — and 495 of the 1660 points over it (30%), 2.3× the next-largest file (src/ocs_rating.erl at 216). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · ocs_log.dia_req_and_res (cyclomatic 102) · ×1
  • ocs_log.dia_req_and_res (cyclomatic 102) src/ocs_log.erl:2766 — ocs_log.dia_req_and_res has cyclomatic complexity 102 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · offerAdd._addOffer · ×1
  • offerAdd._addOffer::mapPrice (cyclomatic 82) priv/www/src/sig-offer-add.js:1454 — offerAdd._addOffer::mapPrice 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. This shape REPEATS in the file: one other method here (offerAdd._addOffer) 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 · offerUpdate._updateProductOffer (cyclomatic 82) · ×1
  • offerUpdate._updateProductOffer (cyclomatic 82) REDACTED:1637 — offerUpdate._updateProductOffer has cyclomatic complexity 82 (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 file is where this pass's cyclomatic complexity CONCENTRATES: REDACTED holds 8 of the 90 methods over the threshold — including the worst — and 495 of the 1660 points over it (30%), 2.3× the next-largest file (src/ocs_rating.erl at 216). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · offerUpdate._activeItemChanged (cyclomatic 79) · ×1
  • offerUpdate._activeItemChanged (cyclomatic 79) REDACTED:991 — offerUpdate._activeItemChanged has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: REDACTED holds 8 of the 90 methods over the threshold — including the worst — and 495 of the 1660 points over it (30%), 2.3× the next-largest file (src/ocs_rating.erl at 216). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · dashBoard._healthChart · ×1
  • dashBoard._healthChart::handleAjaxResponse (cyclomatic 78) priv/www/src/sig-dashboard.js:892 — dashBoard._healthChart::handleAjaxResponse has cyclomatic complexity 78 (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 · offerUpdate._updateAddPrice (cyclomatic 78) · ×1
  • offerUpdate._updateAddPrice (cyclomatic 78) REDACTED:3210 — offerUpdate._updateAddPrice has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: REDACTED holds 8 of the 90 methods over the threshold — including the worst — and 495 of the 1660 points over it (30%), 2.3× the next-largest file (src/ocs_rating.erl at 216). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · ocs.update_resource (cyclomatic 59) · ×1
  • ocs.update_resource (cyclomatic 59) src/ocs.erl:2039 — ocs.update_resource has cyclomatic complexity 59 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_log.ipdr_csv (cyclomatic 55) · ×1
  • ocs_log.ipdr_csv (cyclomatic 55) src/ocs_log.erl:4189 — ocs_log.ipdr_csv has cyclomatic complexity 55 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_log.dia_req_and_res (cyclomatic 52) · ×1
  • ocs_log.dia_req_and_res (cyclomatic 52) src/ocs_log.erl:2587 — ocs_log.dia_req_and_res has cyclomatic complexity 52 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs.adjustment (cyclomatic 50) · ×1
  • ocs.adjustment (cyclomatic 50) src/ocs.erl:1146 — ocs.adjustment has cyclomatic complexity 50 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · offerAdd._addPrice (cyclomatic 48) · ×1
  • offerAdd._addPrice (cyclomatic 48) priv/www/src/sig-offer-add.js:2002 — offerAdd._addPrice has cyclomatic complexity 48 (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 · ocs_rest_res_usage.query_page1 (cyclomatic 45) · ×1
  • ocs_rest_res_usage.query_page1 (cyclomatic 45) src/ocs_rest_res_usage.erl:3223 — ocs_rest_res_usage.query_page1 has cyclomatic complexity 45 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_usage.ipdr_wlan_characteristics (cyclomatic 49) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · offerUpdate._updatePricesDialog (cyclomatic 45) · ×1
  • offerUpdate._updatePricesDialog (cyclomatic 45) REDACTED:1344 — offerUpdate._updatePricesDialog has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This file is where this pass's cyclomatic complexity CONCENTRATES: REDACTED holds 8 of the 90 methods over the threshold — including the worst — and 495 of the 1660 points over it (30%), 2.3× the next-largest file (src/ocs_rating.erl at 216). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · ocs_rating.charge3 (cyclomatic 44) · ×1
  • ocs_rating.charge3 (cyclomatic 44) src/ocs_rating.erl:1423 — ocs_rating.charge3 has cyclomatic complexity 44 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_rest_res_product.product (cyclomatic 44) · ×1
  • ocs_rest_res_product.product (cyclomatic 44) src/ocs_rest_res_product.erl:2250 — ocs_rest_res_product.product has cyclomatic complexity 44 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_log.ipdr_ims_voip1 (cyclomatic 38) · ×1
  • ocs_log.ipdr_ims_voip1 (cyclomatic 38) src/ocs_log.erl:3690 — ocs_log.ipdr_ims_voip1 has cyclomatic complexity 38 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs.add_resource (cyclomatic 36) · ×1
  • ocs.add_resource (cyclomatic 36) src/ocs.erl:1817 — ocs.add_resource has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_rest_res_nrf.rate2 (cyclomatic 36) · ×1
  • ocs_rest_res_nrf.rate2 (cyclomatic 36) src/ocs_rest_res_nrf.erl:721 — ocs_rest_res_nrf.rate2 has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_mib.dcca_peer_stats_get_next (cyclomatic 35) · ×1
  • ocs_mib.dcca_peer_stats_get_next (cyclomatic 35) src/ocs_mib.erl:431 — ocs_mib.dcca_peer_stats_get_next has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SigApp.refresh (cyclomatic 35) · ×1
  • SigApp.refresh (cyclomatic 35) priv/www/src/sig-app.js:389 — SigApp.refresh 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 · ocs_rest_res_usage.query_start1 (cyclomatic 32) · ×1
  • ocs_rest_res_usage.query_start1 (cyclomatic 32) src/ocs_rest_res_usage.erl:3083 — ocs_rest_res_usage.query_start1 has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_usage.ipdr_wlan_characteristics (cyclomatic 49) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · offerAdd._addOffer (cyclomatic 32) · ×1
  • offerAdd._addOffer (cyclomatic 32) priv/www/src/sig-offer-add.js:1301 — offerAdd._addOffer has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (offerAdd._addOffer::mapPrice) 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 · ocs_mib.dcca_peer_stats_get (cyclomatic 31) · ×1
  • ocs_mib.dcca_peer_stats_get (cyclomatic 31) src/ocs_mib.erl:509 — ocs_mib.dcca_peer_stats_get has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_rating.tariff_rate (cyclomatic 30) · ×1
  • ocs_rating.tariff_rate (cyclomatic 30) src/ocs_rating.erl:3754 — ocs_rating.tariff_rate has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · bucketList._getBuckets · ×1
  • bucketList._getBuckets::handleAjaxResponse (cyclomatic 30) priv/www/src/sig-bucket-list.js:271 — bucketList._getBuckets::handleAjaxResponse 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 · ocs.add_offer (cyclomatic 29) · ×1
  • ocs.add_offer (cyclomatic 29) src/ocs.erl:1569 — ocs.add_offer has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · offerAdd._addAlteration (cyclomatic 29) · ×1
  • offerAdd._addAlteration (cyclomatic 29) priv/www/src/sig-offer-add.js:2170 — offerAdd._addAlteration has cyclomatic complexity 29 (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 · ocs_rating.rate1 (cyclomatic 28) · ×1
  • ocs_rating.rate1 (cyclomatic 28) src/ocs_rating.erl:253 — ocs_rating.rate1 has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions — but note WHERE they are: these tests sit in guard sequences, and a guard is a restricted expression sublanguage that allows neither binding a local nor calling a function you wrote, so neither of those moves is available in place. Move the decision out of the guard instead: keep one clause with a permissive guard, compute the compound test in the body through named predicate functions, and dispatch on their result. Where the clauses genuinely differ by pattern rather than by test, keep the patterns and lift only the comma-conjunctions.
D1 · Cyclomatic Complexity · user_default.peer_stat1 (cyclomatic 28) · ×1
  • user_default.peer_stat1 (cyclomatic 28) src/user_default.erl:631 — user_default.peer_stat1 has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: user_default.dia_count (cyclomatic 91) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · offerAdd._addUpdatePriceDialog (cyclomatic 28) · ×1
  • offerAdd._addUpdatePriceDialog (cyclomatic 28) priv/www/src/sig-offer-add.js:1071 — offerAdd._addUpdatePriceDialog has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · productList._getProduct · ×1
  • productList._getProduct::handleAjaxResponse (cyclomatic 28) priv/www/src/sig-product-list.js:211 — productList._getProduct::handleAjaxResponse has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ocs_rest_res_product.price (cyclomatic 27) · ×1
  • ocs_rest_res_product.price (cyclomatic 27) src/ocs_rest_res_product.erl:1692 — ocs_rest_res_product.price has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · subAdd._serviceAddSubmit (cyclomatic 27) · ×1
  • subAdd._serviceAddSubmit (cyclomatic 27) priv/www/src/sig-sub-add.js:533 — subAdd._serviceAddSubmit 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 · ocs_rating.authorize2 (cyclomatic 26) · ×1
  • ocs_rating.authorize2 (cyclomatic 26) src/ocs_rating.erl:1973 — ocs_rating.authorize2 has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_rating.rate2 (cyclomatic 26) · ×1
  • ocs_rating.rate2 (cyclomatic 26) src/ocs_rating.erl:324 — ocs_rating.rate2 has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions — but note WHERE they are: these tests sit in guard sequences, and a guard is a restricted expression sublanguage that allows neither binding a local nor calling a function you wrote, so neither of those moves is available in place. Move the decision out of the guard instead: keep one clause with a permissive guard, compute the compound test in the body through named predicate functions, and dispatch on their result. Where the clauses genuinely differ by pattern rather than by test, keep the patterns and lift only the comma-conjunctions.
D1 · Cyclomatic Complexity · ocs_log.acct_query4 (cyclomatic 25) · ×1
  • ocs_log.acct_query4 (cyclomatic 25) src/ocs_log.erl:1978 — ocs_log.acct_query4 has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_log.diameter_user_location_info (cyclomatic 34) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · accountingList._getAccounting (cyclomatic 25) · ×1
  • accountingList._getAccounting (cyclomatic 25) priv/www/src/sig-accounting-list.js:329 — accountingList._getAccounting has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (handleAjaxResponse, a function literal at line 349, a function literal at line 465, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · subUpdate.updateSubscriberAuthorization (cyclomatic 25) · ×1
  • subUpdate.updateSubscriberAuthorization (cyclomatic 25) priv/www/src/sig-sub-update.js:616 — subUpdate.updateSubscriberAuthorization 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 · SigApp._routePageChanged (cyclomatic 25) · ×1
  • SigApp._routePageChanged (cyclomatic 25) priv/www/src/sig-app.js:680 — SigApp._routePageChanged has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_rest_res_product.alteration (cyclomatic 24) · ×1
  • ocs_rest_res_product.alteration (cyclomatic 24) src/ocs_rest_res_product.erl:1834 — ocs_rest_res_product.alteration has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_product.char_value (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rest_res_service.patch_service (cyclomatic 24) · ×1
  • ocs_rest_res_service.patch_service (cyclomatic 24) src/ocs_rest_res_service.erl:224 — ocs_rest_res_service.patch_service has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_rest_res_nrf.rate (cyclomatic 23) · ×1
  • ocs_rest_res_nrf.rate (cyclomatic 23) src/ocs_rest_res_nrf.erl:612 — ocs_rest_res_nrf.rate has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · offerList.getOffers · ×1
  • offerList.getOffers::handleAjaxResponse (cyclomatic 23) priv/www/src/sig-offer-list.js:195 — offerList.getOffers::handleAjaxResponse 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 · ocs.subscription (cyclomatic 22) · ×1
  • ocs.subscription (cyclomatic 22) src/ocs.erl:3365 — ocs.subscription has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_app.start16 (cyclomatic 22) · ×1
  • ocs_app.start16 (cyclomatic 22) src/ocs_app.erl:253 — ocs_app.start16 has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_log.btree_search (cyclomatic 22) · ×1
  • ocs_log.btree_search (cyclomatic 22) src/ocs_log.erl:3354 — ocs_log.btree_search has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_log.diameter_user_location_info (cyclomatic 34) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rating.rate (cyclomatic 22) · ×1
  • ocs_rating.rate (cyclomatic 22) src/ocs_rating.erl:142 — ocs_rating.rate has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rating.get_final (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · accessList._getAccess (cyclomatic 22) · ×1
  • accessList._getAccess (cyclomatic 22) priv/www/src/sig-access-list.js:180 — accessList._getAccess has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (handleAjaxResponse, checkHead, checkChar, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · offerUpdate._updateAlterationsDialog (cyclomatic 22) · ×1
  • offerUpdate._updateAlterationsDialog (cyclomatic 22) REDACTED:1536 — offerUpdate._updateAlterationsDialog 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. This file is where this pass's cyclomatic complexity CONCENTRATES: REDACTED holds 8 of the 90 methods over the threshold — including the worst — and 495 of the 1660 points over it (30%), 2.3× the next-largest file (src/ocs_rating.erl at 216). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · subList._getSub · ×1
  • subList._getSub::handleAjaxResponse (cyclomatic 22) priv/www/src/sig-sub-list.js:178 — subList._getSub::handleAjaxResponse 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 · policyList._getPolicy · ×1
  • policyList._getPolicy::handleAjaxResponse (cyclomatic 22) priv/www/src/sig-policy-list.js:523 — policyList._getPolicy::handleAjaxResponse 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 · ocs_mib.dcca_peer_info_get_next (cyclomatic 21) · ×1
  • ocs_mib.dcca_peer_info_get_next (cyclomatic 21) src/ocs_mib.erl:320 — ocs_mib.dcca_peer_info_get_next has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_mib.peer_stats1 (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rest_res_product.patch_product (cyclomatic 21) · ×1
  • ocs_rest_res_product.patch_product (cyclomatic 21) src/ocs_rest_res_product.erl:662 — ocs_rest_res_product.patch_product has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_product.char_value (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · periodList._getPeriodTable (cyclomatic 21) · ×1
  • periodList._getPeriodTable (cyclomatic 21) priv/www/src/sig-tariff-period-list.js:166 — periodList._getPeriodTable has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (handleAjaxResponse, a function literal at line 182, a function literal at line 241). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ocs_rating.authorize (cyclomatic 20) · ×1
  • ocs_rating.authorize (cyclomatic 20) src/ocs_rating.erl:1839 — ocs_rating.authorize has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rating.get_final (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rest_res_balance.query_filter (cyclomatic 20) · ×1
  • ocs_rest_res_balance.query_filter (cyclomatic 20) src/ocs_rest_res_balance.erl:1043 — ocs_rest_res_balance.query_filter has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_balance.bucket (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rest_res_client.query_filter (cyclomatic 20) · ×1
  • ocs_rest_res_client.query_filter (cyclomatic 20) src/ocs_rest_res_client.erl:441 — ocs_rest_res_client.query_filter has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_rest_res_product.patch_offer (cyclomatic 20) · ×1
  • ocs_rest_res_product.patch_offer (cyclomatic 20) src/ocs_rest_res_product.erl:521 — ocs_rest_res_product.patch_offer has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_product.char_value (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rest_res_product.query_filter (cyclomatic 20) · ×1
  • ocs_rest_res_product.query_filter (cyclomatic 20) src/ocs_rest_res_product.erl:2402 — ocs_rest_res_product.query_filter has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_product.char_value (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rest_res_resource.query_filter (cyclomatic 20) · ×1
  • ocs_rest_res_resource.query_filter (cyclomatic 20) src/ocs_rest_res_resource.erl:391 — ocs_rest_res_resource.query_filter has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_resource.resource (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rest_res_service.query_filter (cyclomatic 20) · ×1
  • ocs_rest_res_service.query_filter (cyclomatic 20) src/ocs_rest_res_service.erl:833 — ocs_rest_res_service.query_filter has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_service.radius_reserve (cyclomatic 24) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rest_res_usage.get_usages1 (cyclomatic 20) · ×1
  • ocs_rest_res_usage.get_usages1 (cyclomatic 20) src/ocs_rest_res_usage.erl:122 — ocs_rest_res_usage.get_usages1 has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_usage.ipdr_wlan_characteristics (cyclomatic 49) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · subAdd._addServiceResponse (cyclomatic 20) · ×1
  • subAdd._addServiceResponse (cyclomatic 20) priv/www/src/sig-sub-add.js:701 — subAdd._addServiceResponse 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 · ocs_diameter_acct_service_fsm.service_options (cyclomatic 19) · ×1
  • ocs_diameter_acct_service_fsm.service_options (cyclomatic 19) src/ocs_diameter_acct_service_fsm.erl:243 — ocs_diameter_acct_service_fsm.service_options has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_diameter_acct_service_fsm.split_options (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rating.charge (cyclomatic 19) · ×1
  • ocs_rating.charge (cyclomatic 19) src/ocs_rating.erl:471 — ocs_rating.charge has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rating.get_final (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rest_hub_fsm.registered (cyclomatic 19) · ×1
  • ocs_rest_hub_fsm.registered (cyclomatic 19) src/ocs_rest_hub_fsm.erl:199 — ocs_rest_hub_fsm.registered has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_rest_res_role.get_roles1 (cyclomatic 19) · ×1
  • ocs_rest_res_role.get_roles1 (cyclomatic 19) src/ocs_rest_res_role.erl:144 — ocs_rest_res_role.get_roles1 has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_rest_res_user.get_users1 (cyclomatic 19) · ×1
  • ocs_rest_res_user.get_users1 (cyclomatic 19) src/ocs_rest_res_user.erl:69 — ocs_rest_res_user.get_users1 has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · offerUpdate._updateAddAlteration (cyclomatic 19) · ×1
  • offerUpdate._updateAddAlteration (cyclomatic 19) REDACTED:3581 — offerUpdate._updateAddAlteration has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This file is where this pass's cyclomatic complexity CONCENTRATES: REDACTED holds 8 of the 90 methods over the threshold — including the worst — and 495 of the 1660 points over it (30%), 2.3× the next-largest file (src/ocs_rating.erl at 216). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · ocs_eap_aka_auc_fsm.idle1 (cyclomatic 18) · ×1
  • ocs_eap_aka_auc_fsm.idle1 (cyclomatic 18) src/ocs_eap_aka_auc_fsm.erl:295 — ocs_eap_aka_auc_fsm.idle1 has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ocs_rest_res_nrf.initial_nrf1 (cyclomatic 18) · ×1
  • ocs_rest_res_nrf.initial_nrf1 (cyclomatic 18) src/ocs_rest_res_nrf.erl:84 — ocs_rest_res_nrf.initial_nrf1 has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_nrf.subscriber_id (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rest_res_resource.patch_resource (cyclomatic 18) · ×1
  • ocs_rest_res_resource.patch_resource (cyclomatic 18) src/ocs_rest_res_resource.erl:647 — ocs_rest_res_resource.patch_resource has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_resource.resource (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · userList._getUsers (cyclomatic 18) · ×1
  • userList._getUsers (cyclomatic 18) priv/www/src/sig-user-list.js:130 — userList._getUsers has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (handleAjaxResponse, a function literal at line 149, a function literal at line 206, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · rateList._getPrefixTable (cyclomatic 18) · ×1
  • rateList._getPrefixTable (cyclomatic 18) priv/www/src/sig-tariff-rate-list.js:137 — rateList._getPrefixTable has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (handleAjaxResponse, a function literal at line 153, a function literal at line 206). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · roamingList._getRoamingTable (cyclomatic 18) · ×1
  • roamingList._getRoamingTable (cyclomatic 18) priv/www/src/sig-tariff-roaming-list.js:126 — roamingList._getRoamingTable has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (handleAjaxResponse, a function literal at line 142, a function literal at line 195). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · subUpdate.updateSubscriberBalance (cyclomatic 17) · ×1
  • subUpdate.updateSubscriberBalance (cyclomatic 17) priv/www/src/sig-sub-update.js:542 — subUpdate.updateSubscriberBalance has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · subUpdate.updateSubscriberProduct (cyclomatic 17) · ×1
  • subUpdate.updateSubscriberProduct (cyclomatic 17) priv/www/src/sig-sub-update.js:793 — subUpdate.updateSubscriberProduct has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _loadingChanged (cyclomatic 17) · ×1
  • _loadingChanged (cyclomatic 17) priv/www/src/sig-app.js:861 — _loadingChanged has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file's highest cyclomatic complexity: _pageChanged (cyclomatic 18) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rest_res_nrf.user_location_info1 (cyclomatic 16) · ×1
  • ocs_rest_res_nrf.user_location_info1 (cyclomatic 16) src/ocs_rest_res_nrf.erl:1230 — ocs_rest_res_nrf.user_location_info1 has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_nrf.subscriber_id (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_rest_res_usage.usage_aaa_acct (cyclomatic 16) · ×1
  • ocs_rest_res_usage.usage_aaa_acct (cyclomatic 16) src/ocs_rest_res_usage.erl:812 — ocs_rest_res_usage.usage_aaa_acct has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: ocs_rest_res_usage.ipdr_wlan_characteristics (cyclomatic 49) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · ocs_scheduler.product_charge1 (cyclomatic 16) · ×1
  • ocs_scheduler.product_charge1 (cyclomatic 16) src/ocs_scheduler.erl:70 — ocs_scheduler.product_charge1 has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · subAdd._addProductResponse (cyclomatic 16) · ×1
  • subAdd._addProductResponse (cyclomatic 16) priv/www/src/sig-sub-add.js:805 — subAdd._addProductResponse 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 · tableRateAdd._tableAdd (cyclomatic 16) · ×1
  • tableRateAdd._tableAdd (cyclomatic 16) priv/www/src/sig-rate-table-add.js:125 — tableRateAdd._tableAdd has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · tablePeriodAdd._tableAdd (cyclomatic 16) · ×1
  • tablePeriodAdd._tableAdd (cyclomatic 16) priv/www/src/sig-period-table-add.js:125 — tablePeriodAdd._tableAdd has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · periodUpdate._updatePeriodRow (cyclomatic 16) · ×1
  • periodUpdate._updatePeriodRow (cyclomatic 16) priv/www/src/sig-tariff-period-update.js:221 — periodUpdate._updatePeriodRow has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 5 function items inside it that branch. 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 · tableRoamingAdd._tableAdd (cyclomatic 16) · ×1
  • tableRoamingAdd._tableAdd (cyclomatic 16) priv/www/src/sig-roaming-table-add.js:125 — tableRoamingAdd._tableAdd has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · balanceList._getBalances (cyclomatic 16) · ×1
  • balanceList._getBalances (cyclomatic 16) priv/www/src/sig-balance-list.js:193 — balanceList._getBalances has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (handleAjaxResponse, checkHead, a function literal at line 210, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · _updateOfferPrice (cognitive 237) · ×1
  • _updateOfferPrice (cognitive 237) REDACTED:1951 — _updateOfferPrice has cognitive complexity 237 (threshold 15). Drivers by points: if/else 110 (152 pts), boolean chains 73, match/switch 4 (12 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent 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 · dashBoard._healthChart · ×1
  • dashBoard._healthChart::handleAjaxResponse (cognitive 232) priv/www/src/sig-dashboard.js:892 — dashBoard._healthChart::handleAjaxResponse has cognitive complexity 232 (threshold 15). Drivers by points: if/else 51 (161 pts), loops 16 (64 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 159). 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 · offerUpdate._activeItemChanged (cognitive 182) · ×1
  • offerUpdate._activeItemChanged (cognitive 182) REDACTED:991 — offerUpdate._activeItemChanged has cognitive complexity 182 (threshold 15). Drivers by points: if/else 46 (146 pts), match/switch 6 (24 pts), loops 3 (8 pts), boolean chains 4 (nesting depth added 123). 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 · ocs_rating.charge2 (cognitive 158) · ×1
  • ocs_rating.charge2 (cognitive 158) src/ocs_rating.erl:608 — ocs_rating.charge2 has cognitive complexity 158 (threshold 15). Drivers by points: match/switch 78 (132 pts), boolean chains 26 (nesting depth added 54). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · offerUpdate._updatePricesDialog (cognitive 121) · ×1
  • offerUpdate._updatePricesDialog (cognitive 121) REDACTED:1344 — offerUpdate._updatePricesDialog has cognitive complexity 121 (threshold 15). Drivers by points: if/else 35 (107 pts), match/switch 3 (10 pts), loops 1 (4 pts) (nesting depth added 82). 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 · offerAdd._addOffer · ×1
  • offerAdd._addOffer::mapPrice (cognitive 120) priv/www/src/sig-offer-add.js:1454 — offerAdd._addOffer::mapPrice has cognitive complexity 120 (threshold 15). Drivers by points: if/else 74 (105 pts), boolean chains 15 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (offerAdd._addOffer) 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 · _updateOfferAlteration (cognitive 120) · ×1
  • _updateOfferAlteration (cognitive 120) REDACTED:2694 — _updateOfferAlteration has cognitive complexity 120 (threshold 15). Drivers by points: if/else 47 (68 pts), boolean chains 46, match/switch 3 (6 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _updateAddPrice (cognitive 120) · ×1
  • _updateAddPrice (cognitive 120) REDACTED:3210 — _updateAddPrice has cognitive complexity 120 (threshold 15). Drivers by points: if/else 54 (102 pts), boolean chains 9, match/switch 5 (9 pts) (nesting depth added 52). To reduce it, split the body into named stages: move each independent 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 · bucketList._getBuckets · ×1
  • bucketList._getBuckets::handleAjaxResponse (cognitive 108) priv/www/src/sig-bucket-list.js:271 — bucketList._getBuckets::handleAjaxResponse has cognitive complexity 108 (threshold 15). Drivers by points: if/else 30 (106 pts), loops 1 (2 pts) (nesting depth added 77). 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 · productList._getProduct · ×1
  • productList._getProduct::handleAjaxResponse (cognitive 101) priv/www/src/sig-product-list.js:211 — productList._getProduct::handleAjaxResponse has cognitive complexity 101 (threshold 15). Drivers by points: if/else 25 (91 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 71). 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 · _updateProductOffer (cognitive 95) · ×1
  • _updateProductOffer (cognitive 95) REDACTED:1637 — _updateProductOffer has cognitive complexity 95 (threshold 15). Drivers by points: if/else 42 (52 pts), boolean chains 43 (nesting depth added 10). 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 · ocs_log.dia_req_and_res (cognitive 90) · ×1
  • ocs_log.dia_req_and_res (cognitive 90) src/ocs_log.erl:2766 — ocs_log.dia_req_and_res has cognitive complexity 90 (threshold 15). Drivers by points: match/switch 78, boolean chains 12. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_log.ipdr_csv (cognitive 72) · ×1
  • ocs_log.ipdr_csv (cognitive 72) src/ocs_log.erl:4189 — ocs_log.ipdr_csv has cognitive complexity 72 (threshold 15). Drivers by points: match/switch 68, loops 4. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs.update_resource (cognitive 69) · ×1
  • ocs.update_resource (cognitive 69) src/ocs.erl:2039 — ocs.update_resource has cognitive complexity 69 (threshold 15). Drivers by points: match/switch 35 (56 pts), boolean chains 10, error handling 3 (nesting depth added 21). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SigApp.refresh (cognitive 68) · ×1
  • SigApp.refresh (cognitive 68) priv/www/src/sig-app.js:389 — SigApp.refresh has cognitive complexity 68 (threshold 15). Drivers by points: if/else 51 (68 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · policyList._getPolicy · ×1
  • policyList._getPolicy::handleAjaxResponse (cognitive 66) priv/www/src/sig-policy-list.js:523 — policyList._getPolicy::handleAjaxResponse has cognitive complexity 66 (threshold 15). Drivers by points: if/else 23 (56 pts), loops 3 (10 pts) (nesting depth added 40). 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 · ocs_rest_res_usage.query_page1 (cognitive 65) · ×1
  • ocs_rest_res_usage.query_page1 (cognitive 65) src/ocs_rest_res_usage.erl:3223 — ocs_rest_res_usage.query_page1 has cognitive complexity 65 (threshold 15). Drivers by points: match/switch 27 (37 pts), error handling 21 (28 pts) (nesting depth added 17). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · subList._getSub · ×1
  • subList._getSub::handleAjaxResponse (cognitive 59) priv/www/src/sig-sub-list.js:178 — subList._getSub::handleAjaxResponse has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (56 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 38). 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 · offerList.getOffers · ×1
  • offerList.getOffers::handleAjaxResponse (cognitive 57) priv/www/src/sig-offer-list.js:195 — offerList.getOffers::handleAjaxResponse has cognitive complexity 57 (threshold 15). Drivers by points: if/else 14 (49 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 36). 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 · ocs.add_resource (cognitive 55) · ×1
  • ocs.add_resource (cognitive 55) src/ocs.erl:1817 — ocs.add_resource has cognitive complexity 55 (threshold 15). Drivers by points: match/switch 30 (43 pts), boolean chains 9, error handling 3 (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · subUpdate.updateSubscriberAuthorization (cognitive 54) · ×1
  • subUpdate.updateSubscriberAuthorization (cognitive 54) priv/www/src/sig-sub-update.js:616 — subUpdate.updateSubscriberAuthorization has cognitive complexity 54 (threshold 15). Drivers by points: if/else 28 (52 pts), loops 2 (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 · ocs.adjustment (cognitive 45) · ×1
  • ocs.adjustment (cognitive 45) src/ocs.erl:1146 — ocs.adjustment has cognitive complexity 45 (threshold 15). Drivers by points: match/switch 14 (22 pts), loops 6 (19 pts), boolean chains 4 (nesting depth added 21). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · subAdd._addServiceResponse (cognitive 44) · ×1
  • subAdd._addServiceResponse (cognitive 44) priv/www/src/sig-sub-add.js:701 — subAdd._addServiceResponse has cognitive complexity 44 (threshold 15). Drivers by points: if/else 23 (42 pts), boolean chains 2 (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 · offerAdd._addUpdatePriceDialog (cognitive 43) · ×1
  • offerAdd._addUpdatePriceDialog (cognitive 43) priv/www/src/sig-offer-add.js:1071 — offerAdd._addUpdatePriceDialog has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (31 pts), match/switch 3 (9 pts), boolean chains 3 (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 · ocs_rest_res_product.patch_product (cognitive 41) · ×1
  • ocs_rest_res_product.patch_product (cognitive 41) src/ocs_rest_res_product.erl:662 — ocs_rest_res_product.patch_product has cognitive complexity 41 (threshold 15). Drivers by points: loops 4 (20 pts), match/switch 8 (16 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 26). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · offerAdd._addOffer (cognitive 39) · ×1
  • offerAdd._addOffer (cognitive 39) priv/www/src/sig-offer-add.js:1301 — offerAdd._addOffer has cognitive complexity 39 (threshold 15). Drivers by points: if/else 102 (137 pts), boolean chains 20, loops 1 (2 pts) (nesting depth added 36). To reduce it, split the body into named stages: move each independent 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 (offerAdd._addOffer::mapPrice) 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 · offerAdd._addPrice (cognitive 35) · ×1
  • offerAdd._addPrice (cognitive 35) priv/www/src/sig-offer-add.js:2002 — offerAdd._addPrice has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 14, match/switch 3 (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 · ocs_rest_res_usage.query_start1 (cognitive 34) · ×1
  • ocs_rest_res_usage.query_start1 (cognitive 34) src/ocs_rest_res_usage.erl:3083 — ocs_rest_res_usage.query_start1 has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 16 (31 pts), error handling 3 (nesting depth added 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · offerUpdate._updateAlterationsDialog (cognitive 34) · ×1
  • offerUpdate._updateAlterationsDialog (cognitive 34) REDACTED:1536 — offerUpdate._updateAlterationsDialog has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (24 pts), match/switch 3 (9 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · subAdd._serviceAddSubmit (cognitive 34) · ×1
  • subAdd._serviceAddSubmit (cognitive 34) priv/www/src/sig-sub-add.js:533 — subAdd._serviceAddSubmit has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30 (34 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · subUpdate.updateSubscriberProduct (cognitive 34) · ×1
  • subUpdate.updateSubscriberProduct (cognitive 34) priv/www/src/sig-sub-update.js:793 — subUpdate.updateSubscriberProduct has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ocs_log.ipdr_ims_voip1 (cognitive 33) · ×1
  • ocs_log.ipdr_ims_voip1 (cognitive 33) src/ocs_log.erl:3690 — ocs_log.ipdr_ims_voip1 has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 26 (33 pts) (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rating.charge3 (cognitive 33) · ×1
  • ocs_rating.charge3 (cognitive 33) src/ocs_rating.erl:1423 — ocs_rating.charge3 has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 15 (29 pts), boolean chains 4 (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · accountingList._getAccounting · ×1
  • accountingList._getAccounting::handleAjaxResponse (cognitive 33) priv/www/src/sig-accounting-list.js:367 — accountingList._getAccounting::handleAjaxResponse has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · subUpdate.updateSubscriberBalance (cognitive 32) · ×1
  • subUpdate.updateSubscriberBalance (cognitive 32) priv/www/src/sig-sub-update.js:542 — subUpdate.updateSubscriberBalance has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (31 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rateList._getPrefixTable (cognitive 32) · ×1
  • rateList._getPrefixTable (cognitive 32) priv/www/src/sig-tariff-rate-list.js:137 — rateList._getPrefixTable has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (25 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to 3 function items inside it that branch (handleAjaxResponse, a function literal at line 153, a function literal at line 206). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · roamingList._getRoamingTable (cognitive 32) · ×1
  • roamingList._getRoamingTable (cognitive 32) priv/www/src/sig-tariff-roaming-list.js:126 — roamingList._getRoamingTable has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (25 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 9 of the 32 points are its own statements and the rest belongs to 3 function items inside it that branch (handleAjaxResponse, a function literal at line 142, a function literal at line 195). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ocs_rest_res_user.patch_user (cognitive 31) · ×1
  • ocs_rest_res_user.patch_user (cognitive 31) src/ocs_rest_res_user.erl:239 — ocs_rest_res_user.patch_user has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 9 (20 pts), error handling 3 (10 pts), boolean chains 1 (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · subAdd._addProductResponse (cognitive 31) · ×1
  • subAdd._addProductResponse (cognitive 31) priv/www/src/sig-sub-add.js:805 — subAdd._addProductResponse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · userList._getUsers (cognitive 31) · ×1
  • userList._getUsers (cognitive 31) priv/www/src/sig-user-list.js:130 — userList._getUsers has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 9). Most of this is not in the body itself: 10 of the 31 points are its own statements and the rest belongs to 4 function items inside it that branch (handleAjaxResponse, a function literal at line 149, a function literal at line 206, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · policyAdd._add (cognitive 31) · ×1
  • policyAdd._add (cognitive 31) priv/www/src/sig-policy-add.js:217 — policyAdd._add has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ocs_rest_res_service.patch_service (cognitive 30) · ×1
  • ocs_rest_res_service.patch_service (cognitive 30) src/ocs_rest_res_service.erl:224 — ocs_rest_res_service.patch_service has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 9 (19 pts), error handling 3 (7 pts), boolean chains 4 (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest_res_nrf.rate2 (cognitive 29) · ×1
  • ocs_rest_res_nrf.rate2 (cognitive 29) src/ocs_rest_res_nrf.erl:721 — ocs_rest_res_nrf.rate2 has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 17 (23 pts), boolean chains 6 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest_res_nrf.rate (cognitive 28) · ×1
  • ocs_rest_res_nrf.rate (cognitive 28) src/ocs_rest_res_nrf.erl:612 — ocs_rest_res_nrf.rate has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 18 (22 pts), loops 2 (6 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_mib.dcca_peer_info_get_next (cognitive 27) · ×1
  • ocs_mib.dcca_peer_info_get_next (cognitive 27) src/ocs_mib.erl:320 — ocs_mib.dcca_peer_info_get_next has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 5 (11 pts), loops 3 (10 pts), error handling 2 (6 pts) (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rating.rate1 (cognitive 27) · ×1
  • ocs_rating.rate1 (cognitive 27) src/ocs_rating.erl:253 — ocs_rating.rate1 has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 22, match/switch 2 (3 pts), error handling 2 (nesting depth added 1). To reduce it, name the conditions — but note WHERE they are: these tests sit in guard sequences, and a guard is a restricted expression sublanguage that allows neither binding a local nor calling a function you wrote, so neither of those moves is available in place. Move the decision out of the guard instead: keep one clause with a permissive guard, compute the compound test in the body through named predicate functions, and dispatch on their result. Where the clauses genuinely differ by pattern rather than by test, keep the patterns and lift only the comma-conjunctions.
D2 · Cognitive Complexity · ocs_rest_res_product.patch_offer (cognitive 26) · ×1
  • ocs_rest_res_product.patch_offer (cognitive 26) src/ocs_rest_res_product.erl:521 — ocs_rest_res_product.patch_offer has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 9 (17 pts), error handling 3 (8 pts), boolean chains 1 (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · balanceList._getBalances (cognitive 24) · ×1
  • balanceList._getBalances (cognitive 24) priv/www/src/sig-balance-list.js:193 — balanceList._getBalances has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 4 function items inside it that branch (handleAjaxResponse, a function literal at line 210, a function literal at line 257, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ocs_rating.authorize2 (cognitive 23) · ×1
  • ocs_rating.authorize2 (cognitive 23) src/ocs_rating.erl:1973 — ocs_rating.authorize2 has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, match/switch 7 (9 pts), error handling 1 (nesting depth added 2). To reduce it, name the conditions — but note WHERE they are: these tests sit in guard sequences, and a guard is a restricted expression sublanguage that allows neither binding a local nor calling a function you wrote, so neither of those moves is available in place. Move the decision out of the guard instead: keep one clause with a permissive guard, compute the compound test in the body through named predicate functions, and dispatch on their result. Where the clauses genuinely differ by pattern rather than by test, keep the patterns and lift only the comma-conjunctions.
D2 · Cognitive Complexity · clientList._getClient (cognitive 23) · ×1
  • clientList._getClient (cognitive 23) priv/www/src/sig-client-list.js:196 — clientList._getClient has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 4 function items inside it that branch (handleAjaxResponse, a function literal at line 207, a function literal at line 255, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ocs_log.dia_req_and_res (cognitive 22) · ×1
  • ocs_log.dia_req_and_res (cognitive 22) src/ocs_log.erl:2587 — ocs_log.dia_req_and_res has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 18, boolean chains 4. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest_res_balance.query_filter (cognitive 21) · ×1
  • ocs_rest_res_balance.query_filter (cognitive 21) src/ocs_rest_res_balance.erl:1043 — ocs_rest_res_balance.query_filter has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 11 (21 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest_res_client.query_filter (cognitive 21) · ×1
  • ocs_rest_res_client.query_filter (cognitive 21) src/ocs_rest_res_client.erl:441 — ocs_rest_res_client.query_filter has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 11 (21 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest_res_product.query_filter (cognitive 21) · ×1
  • ocs_rest_res_product.query_filter (cognitive 21) src/ocs_rest_res_product.erl:2402 — ocs_rest_res_product.query_filter has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 11 (21 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest_res_resource.query_filter (cognitive 21) · ×1
  • ocs_rest_res_resource.query_filter (cognitive 21) src/ocs_rest_res_resource.erl:391 — ocs_rest_res_resource.query_filter has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 11 (21 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest_res_role.get_roles1 (cognitive 21) · ×1
  • ocs_rest_res_role.get_roles1 (cognitive 21) src/ocs_rest_res_role.erl:144 — ocs_rest_res_role.get_roles1 has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 11 (21 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest_res_service.query_filter (cognitive 21) · ×1
  • ocs_rest_res_service.query_filter (cognitive 21) src/ocs_rest_res_service.erl:833 — ocs_rest_res_service.query_filter has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 11 (21 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest_res_usage.get_usages1 (cognitive 21) · ×1
  • ocs_rest_res_usage.get_usages1 (cognitive 21) src/ocs_rest_res_usage.erl:122 — ocs_rest_res_usage.get_usages1 has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 11 (21 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest_res_user.get_users1 (cognitive 21) · ×1
  • ocs_rest_res_user.get_users1 (cognitive 21) src/ocs_rest_res_user.erl:69 — ocs_rest_res_user.get_users1 has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 11 (21 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · accessList._getAccess · ×1
  • accessList._getAccess::handleAjaxResponse (cognitive 21) priv/www/src/sig-access-list.js:215 — accessList._getAccess::handleAjaxResponse has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ipdrListVoip.getLogContentResponseVoip (cognitive 21) · ×1
  • ipdrListVoip.getLogContentResponseVoip (cognitive 21) priv/www/src/sig-ipdr-list-voip.js:252 — ipdrListVoip.getLogContentResponseVoip has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (handleAjaxResponse, a function literal at line 299, a function literal at line 275). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · _bucketAddSubmit (cognitive 21) · ×1
  • _bucketAddSubmit (cognitive 21) priv/www/src/sig-bucket-add.js:261 — _bucketAddSubmit has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · getLogContentResponse (cognitive 21) · ×1
  • getLogContentResponse (cognitive 21) REDACTED:349 — getLogContentResponse has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (handleAjaxResponse, a function literal at line 397, a function literal at line 372, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ocs_rating.tariff_rate (cognitive 20) · ×1
  • ocs_rating.tariff_rate (cognitive 20) src/ocs_rating.erl:3754 — ocs_rating.tariff_rate has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 9 (14 pts), boolean chains 6 (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest.format_problem1 (cognitive 20) · ×1
  • ocs_rest.format_problem1 (cognitive 20) src/ocs_rest.erl:494 — ocs_rest.format_problem1 has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 11 (20 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest_res_product.product (cognitive 20) · ×1
  • ocs_rest_res_product.product (cognitive 20) src/ocs_rest_res_product.erl:2250 — ocs_rest_res_product.product has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (9 pts), boolean chains 8, loops 2, error handling 1 (nesting depth added 4). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · userUpdate._updateUserSubmit (cognitive 20) · ×1
  • userUpdate._updateUserSubmit (cognitive 20) priv/www/src/sig-user-update.js:194 — userUpdate._updateUserSubmit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (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 · periodUpdate._updatePeriodRow (cognitive 20) · ×1
  • periodUpdate._updatePeriodRow (cognitive 20) priv/www/src/sig-tariff-period-update.js:221 — periodUpdate._updatePeriodRow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 20. Of this number, 10 points are the body's own statements and 10 belong to 5 function items inside it that branch. 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 · ocs_mib.dcca_peer_stats_get_next (cognitive 19) · ×1
  • ocs_mib.dcca_peer_stats_get_next (cognitive 19) src/ocs_mib.erl:431 — ocs_mib.dcca_peer_stats_get_next has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (10 pts), match/switch 4 (7 pts), error handling 1 (2 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rating.rate (cognitive 19) · ×1
  • ocs_rating.rate (cognitive 19) src/ocs_rating.erl:142 — ocs_rating.rate has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 7 (13 pts), loops 1 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_scheduler.product_charge1 (cognitive 19) · ×1
  • ocs_scheduler.product_charge1 (cognitive 19) src/ocs_scheduler.erl:70 — ocs_scheduler.product_charge1 has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 6 (14 pts), loops 1 (5 pts) (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · offerAdd._addAlteration (cognitive 18) · ×1
  • offerAdd._addAlteration (cognitive 18) priv/www/src/sig-offer-add.js:2170 — offerAdd._addAlteration has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, match/switch 3 (nesting depth added 1). To reduce it, split the body into named stages: move each independent 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 · clientUpdate.updateClientAuth (cognitive 18) · ×1
  • clientUpdate.updateClientAuth (cognitive 18) priv/www/src/sig-client-update.js:271 — clientUpdate.updateClientAuth has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · periodList._getPeriodTable · ×1
  • periodList._getPeriodTable::handleAjaxResponse (cognitive 18) priv/www/src/sig-tariff-period-list.js:194 — periodList._getPeriodTable::handleAjaxResponse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (5 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 · ocs_rating.charge (cognitive 17) · ×1
  • ocs_rating.charge (cognitive 17) src/ocs_rating.erl:471 — ocs_rating.charge has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (12 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ocs_rest_res_resource.patch_resource (cognitive 17) · ×1
  • ocs_rest_res_resource.patch_resource (cognitive 17) src/ocs_rest_res_resource.erl:647 — ocs_rest_res_resource.patch_resource has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 7 (12 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · user_default.peer_stat1 (cognitive 17) · ×1
  • user_default.peer_stat1 (cognitive 17) src/user_default.erl:631 — user_default.peer_stat1 has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 10 (15 pts), boolean chains 2 (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _loadingChanged (cognitive 17) · ×1
  • _loadingChanged (cognitive 17) priv/www/src/sig-app.js:861 — _loadingChanged has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · httpList._getHttpResponse (cognitive 16) · ×1
  • httpList._getHttpResponse (cognitive 16) priv/www/src/sig-http-list.js:167 — httpList._getHttpResponse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 4). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (handleAjaxResponse, a function literal at line 204). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SigApp._routePageChanged (cognitive 16) · ×1
  • SigApp._routePageChanged (cognitive 16) priv/www/src/sig-app.js:680 — SigApp._routePageChanged has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 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.
D4 · Code Duplication · Near-duplicate member family (8 members, 26 shared lines) · ×1
  • Near-duplicate member family (8 members, 26 shared lines) src/ocs_rest_res_balance.erl:1043 — src/ocs_rest_res_balance.erl:1043-1098 | src/ocs_rest_res_client.erl:441-496 | src/ocs_rest_res_product.erl:2402-2457 | src/ocs_rest_res_resource.erl:391-446 | src/ocs_rest_res_role.erl:144-197 | src/ocs_rest_res_service.erl:833-888 | src/ocs_rest_res_usage.erl:122-177 | src/ocs_rest_res_user.erl:69-122 — These 8 members are variants of one another: a block of 26 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 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 · Near-duplicate member family (7 members, 17 shared lines) · ×1
  • Near-duplicate member family (7 members, 17 shared lines) src/ocs_rest_res_balance.erl:1110 — src/ocs_rest_res_balance.erl:1110-1175 | src/ocs_rest_res_client.erl:508-569 | src/ocs_rest_res_resource.erl:449-510 | src/ocs_rest_res_role.erl:355-378 | src/ocs_rest_res_service.erl:900-961 | src/ocs_rest_res_usage.erl:3223-3478 | src/ocs_rest_res_user.erl:470-494 — These 7 members are variants of one another: a block of 17 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 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Near-duplicate member family (6 members, 12 shared lines) · ×1
  • Near-duplicate member family (6 members, 12 shared lines) src/ocs_rest_res_balance.erl:1110 — src/ocs_rest_res_balance.erl:1110-1175 | src/ocs_rest_res_client.erl:508-569 | src/ocs_rest_res_product.erl:2469-2533 | src/ocs_rest_res_resource.erl:449-510 | src/ocs_rest_res_service.erl:900-961 | src/ocs_rest_res_user.erl:470-494 — These 6 members are variants of one another: a block of 12 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 14 shared lines) · ×1
  • Near-duplicate member family (4 members, 14 shared lines) src/ocs_diameter_3gpp_s6b_application_cb.erl:186 — src/ocs_diameter_3gpp_s6b_application_cb.erl:186-204 | src/ocs_diameter_3gpp_sta_application_cb.erl:200-217 | src/ocs_diameter_3gpp_swm_application_cb.erl:199-216 | src/ocs_diameter_3gpp_swx_application_cb.erl:192-210 — These 4 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 13 shared lines) · ×1
  • Near-duplicate member family (4 members, 13 shared lines) src/ocs_eap_aka_fsm.erl:540 — src/ocs_eap_aka_fsm.erl:540-588 | src/ocs_eap_aka_fsm.erl:830-922 | src/ocs_eap_akap_fsm.erl:553-605 | src/ocs_eap_akap_fsm.erl:849-940 — These 4 members are variants of one another: a block of 13 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 38 shared lines) · ×1
  • Near-duplicate member family (3 members, 38 shared lines) src/ocs_rest_res_product.erl:521 — src/ocs_rest_res_product.erl:521-612 | src/ocs_rest_res_product.erl:662-748 | src/ocs_rest_res_service.erl:224-341 — These 3 members are variants of one another: a block of 38 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 (145 shared lines) · ×1
  • Near-duplicate member pair (145 shared lines) src/ocs_eap_aka_fsm.erl:1259 — src/ocs_eap_aka_fsm.erl:1259-1417 | src/ocs_eap_akap_fsm.erl:1277-1435 — These two members are variants of one another: 145 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 (90 shared lines) · ×1
  • Near-duplicate member pair (90 shared lines) src/ocs.erl:1817 — src/ocs.erl:1817-2026 | src/ocs.erl:2039-2303 — These two members are variants of one another: 90 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 (68 shared lines) · ×1
  • Near-duplicate member pair (68 shared lines) src/ocs_eap_aka_fsm.erl:369 — src/ocs_eap_aka_fsm.erl:369-461 | src/ocs_eap_akap_fsm.erl:375-472 — These two members are variants of one another: 68 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 (56 shared lines) · ×1
  • Near-duplicate member pair (56 shared lines) src/ocs_rating.erl:142 — src/ocs_rating.erl:142-251 | src/ocs_rating.erl:471-555 — These two members are variants of one another: 56 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 (40 shared lines) · ×1
  • Near-duplicate member pair (40 shared lines) src/ocs_pgw_fsm.erl:236 — src/ocs_pgw_fsm.erl:236-308 | src/ocs_pgw_fsm.erl:320-415 — These two members are variants of one another: 40 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 (27 shared lines) · ×1
  • Near-duplicate member pair (27 shared lines) src/ocs_rating.erl:2276 — src/ocs_rating.erl:2276-2368 | src/ocs_rating.erl:2370-2476 — These two members are variants of one another: 27 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 (24 shared lines) · ×1
  • Near-duplicate member pair (24 shared lines) src/ocs_rest_res_nrf.erl:234 — src/ocs_rest_res_nrf.erl:234-305 | src/ocs_rest_res_nrf.erl:359-437 — These two members are variants of one another: 24 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 (18 shared lines) · ×1
  • Near-duplicate member pair (18 shared lines) src/ocs_diameter_auth_port_server.erl:640 — src/ocs_diameter_auth_port_server.erl:640-705 | src/ocs_radius_auth_port_server.erl:455-524 — These two members are variants of one another: 18 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (27 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (27 members, 50+ identical tokens) src/ocs_rest_res_usage.erl:1120 — src/ocs_rest_res_usage.erl:1120-1128 | src/ocs_rest_res_usage.erl:1142-1150 | src/ocs_rest_res_usage.erl:1164-1172 | src/ocs_rest_res_usage.erl:1174-1182 | src/ocs_rest_res_usage.erl:1184-1192 | src/ocs_rest_res_usage.erl:1194-1202 | src/ocs_rest_res_usage.erl:1204-1212 | src/ocs_rest_res_usage.erl:1214-1222 | src/ocs_rest_res_usage.erl:1224-1232 | src/ocs_rest_res_usage.erl:1234-1242 | src/ocs_rest_res_usage.erl:1256-1264 | src/ocs_rest_res_usage.erl:1266-1274 | src/ocs_rest_res_usage.erl:1276-1284 | src/ocs_rest_res_usage.erl:1286-1294 | src/ocs_rest_res_usage.erl:1296-1304 | src/ocs_rest_res_usage.erl:1306-1314 | src/ocs_rest_res_usage.erl:1316-1324 | src/ocs_rest_res_usage.erl:1326-1334 | src/ocs_rest_res_usage.erl:1336-1344 | src/ocs_rest_res_usage.erl:1346-1354 | src/ocs_rest_res_usage.erl:1380-1388 | src/ocs_rest_res_usage.erl:1423-1431 | src/ocs_rest_res_usage.erl:1465-1473 | src/ocs_rest_res_usage.erl:1521-1529 | src/ocs_rest_res_usage.erl:1531-1539 | src/ocs_rest_res_usage.erl:1576-1584 | src/ocs_rest_res_usage.erl:1598-1606 — These 27 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 27 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 27 times.
D4 · Code Duplication · Members sharing a duplicated core (15 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (15 members, 50+ identical tokens) src/mod_ocs_rest_accepted_content.erl:238 — src/mod_ocs_rest_accepted_content.erl:238-275 | src/mod_ocs_rest_delete.erl:117-134 | src/mod_ocs_rest_delete.erl:137-222 | src/mod_ocs_rest_delete.erl:225-302 | src/mod_ocs_rest_get.erl:174-191 | src/mod_ocs_rest_get.erl:194-481 | src/mod_ocs_rest_get.erl:484-580 | src/mod_ocs_rest_head.erl:168-185 | src/mod_ocs_rest_head.erl:188-226 | src/mod_ocs_rest_head.erl:229-325 | src/mod_ocs_rest_patch.erl:119-149 | src/mod_ocs_rest_patch.erl:160-241 | src/mod_ocs_rest_patch.erl:244-348 | src/mod_ocs_rest_post.erl:119-141 | src/mod_ocs_rest_post.erl:255-355 — These 15 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 15 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 15 times.
D4 · Code Duplication · Members sharing a duplicated core (14 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (14 members, 50+ identical tokens) src/ocs_rest_res_usage.erl:1130 — src/ocs_rest_res_usage.erl:1130-1140 | src/ocs_rest_res_usage.erl:1152-1162 | src/ocs_rest_res_usage.erl:1244-1254 | src/ocs_rest_res_usage.erl:1356-1366 | src/ocs_rest_res_usage.erl:1368-1378 | src/ocs_rest_res_usage.erl:1453-1463 | src/ocs_rest_res_usage.erl:1475-1485 | src/ocs_rest_res_usage.erl:1487-1497 | src/ocs_rest_res_usage.erl:1541-1551 | src/ocs_rest_res_usage.erl:1564-1574 | src/ocs_rest_res_usage.erl:1586-1596 | src/ocs_rest_res_usage.erl:1865-1874 | src/ocs_rest_res_usage.erl:1897-1906 | src/ocs_rest_res_usage.erl:1909-1918 — These 14 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 14 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 14 times.
D4 · Code Duplication · Members sharing a duplicated core (12 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (12 members, 50+ identical tokens) src/ocs_diameter_3gpp_gx_application_cb.erl:191 — src/ocs_diameter_3gpp_gx_application_cb.erl:191-236 | src/ocs_diameter_3gpp_ro_application_cb.erl:206-251 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:242-287 | src/ocs_diameter_3gpp_s6a_application_cb.erl:554-599 | src/ocs_diameter_3gpp_s6b_application_cb.erl:282-329 | src/ocs_diameter_3gpp_sta_application_cb.erl:326-373 | src/ocs_diameter_3gpp_swm_application_cb.erl:326-373 | src/ocs_diameter_3gpp_swx_application_cb.erl:273-318 | src/ocs_diameter_base_application_cb.erl:182-229 | src/ocs_diameter_cc_application_cb.erl:191-236 | src/ocs_diameter_eap_application_cb.erl:185-230 | src/ocs_diameter_nas_application_cb.erl:184-229 — These 12 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 12 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 12 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) src/ocs_rest_res_hub_balance.erl:160 — src/ocs_rest_res_hub_balance.erl:160-173 | src/ocs_rest_res_hub_product.erl:164-177 | src/ocs_rest_res_hub_product.erl:261-274 | src/ocs_rest_res_hub_resource.erl:161-174 | src/ocs_rest_res_hub_role.erl:154-167 | src/ocs_rest_res_hub_service.erl:161-174 | src/ocs_rest_res_hub_usage.erl:163-176 | src/ocs_rest_res_hub_user.erl:161-174 — 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 · Duplicated block (45–46 lines × 12) · ×1
  • Duplicated block (45–46 lines × 12) src/ocs_diameter_3gpp_gx_application_cb.erl:191 — src/ocs_diameter_3gpp_gx_application_cb.erl:191-236 | src/ocs_diameter_3gpp_ro_application_cb.erl:206-251 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:242-287 | src/ocs_diameter_3gpp_s6a_application_cb.erl:554-599 | src/ocs_diameter_3gpp_s6b_application_cb.erl:282-326 | src/ocs_diameter_3gpp_sta_application_cb.erl:326-370 | src/ocs_diameter_3gpp_swm_application_cb.erl:326-370 | src/ocs_diameter_3gpp_swx_application_cb.erl:273-318 | src/ocs_diameter_base_application_cb.erl:182-226 | src/ocs_diameter_cc_application_cb.erl:191-236 | src/ocs_diameter_eap_application_cb.erl:185-230 | src/ocs_diameter_nas_application_cb.erl:184-229 — before extracting anything, compare `src/ocs_diameter_3gpp_ro_application_cb.erl` and `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 135 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×1
  • Duplicated block (42 lines × 2) src/ocs_diameter_acct_service_fsm.erl:147 — src/ocs_diameter_acct_service_fsm.erl:147-188 | src/ocs_diameter_auth_service_fsm.erl:165-206 — before extracting anything, compare `src/ocs_diameter_acct_service_fsm.erl` and `src/ocs_diameter_auth_service_fsm.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (34–38 lines × 2) · ×1
  • Duplicated block (34–38 lines × 2) src/ocs_rating.erl:1480 — src/ocs_rating.erl:1480-1513 | src/ocs_rating.erl:1559-1596 — both copies are in the same file, so extract the 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 (32 lines × 3) · ×1
  • Duplicated block (32 lines × 3) src/ocs_rating.erl:1108 — src/ocs_rating.erl:1108-1139 | src/ocs_rating.erl:1249-1280 | src/ocs_rating.erl:1384-1415 — 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 (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) src/ocs_eap_aka_fsm.erl:1367 — src/ocs_eap_aka_fsm.erl:1367-1397 | src/ocs_eap_akap_fsm.erl:1385-1415 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (30 lines × 2) · ×1
  • Duplicated block (30 lines × 2) src/ocs_rest_res_role.erl:168 — src/ocs_rest_res_role.erl:168-197 | src/ocs_rest_res_user.erl:93-122 — before extracting anything, compare `src/ocs_rest_res_role.erl` and `src/ocs_rest_res_user.erl` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 204 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (27–29 lines × 2) · ×1
  • Duplicated block (27–29 lines × 2) src/ocs_rating.erl:1028 — src/ocs_rating.erl:1028-1054 | src/ocs_rating.erl:1083-1111 — both copies are in the same file, so extract the 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 (24 lines × 7) · ×1
  • Duplicated block (24 lines × 7) src/ocs_rest_res_usage.erl:3238 — src/ocs_rest_res_usage.erl:3238-3261 | src/ocs_rest_res_usage.erl:3279-3302 | src/ocs_rest_res_usage.erl:3321-3344 | src/ocs_rest_res_usage.erl:3354-3377 | src/ocs_rest_res_usage.erl:3387-3410 | src/ocs_rest_res_usage.erl:3420-3443 | src/ocs_rest_res_usage.erl:3453-3476 — 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 (22 lines × 5) · ×1
  • Duplicated block (22 lines × 5) src/ocs_rest_res_balance.erl:1049 — src/ocs_rest_res_balance.erl:1049-1070 | src/ocs_rest_res_client.erl:447-468 | src/ocs_rest_res_product.erl:2408-2429 | src/ocs_rest_res_resource.erl:397-418 | src/ocs_rest_res_service.erl:839-860 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×1
  • Duplicated block (22 lines × 3) src/ocs_rest_res_role.erl:150 — src/ocs_rest_res_role.erl:150-171 | src/ocs_rest_res_usage.erl:128-149 | src/ocs_rest_res_user.erl:75-96 — before extracting anything, compare `src/ocs_rest_res_role.erl` and `src/ocs_rest_res_usage.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) src/ocs_rating.erl:1051 — src/ocs_rating.erl:1051-1072 | src/ocs_rating.erl:1199-1220 — both copies are in the same file, so extract the 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 (21 lines × 5) · ×1
  • Duplicated block (21 lines × 5) src/ocs_rest_res_balance.erl:1141 — src/ocs_rest_res_balance.erl:1141-1161 | src/ocs_rest_res_client.erl:535-555 | src/ocs_rest_res_product.erl:2499-2519 | src/ocs_rest_res_resource.erl:476-496 | src/ocs_rest_res_service.erl:927-947 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) src/ocs_eap_aka_fsm.erl:1259 — src/ocs_eap_aka_fsm.erl:1259-1279 | src/ocs_eap_akap_fsm.erl:1277-1297 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) src/ocs.erl:2135 — src/ocs.erl:2135-2153 | src/ocs.erl:2221-2240 | src/ocs.erl:2284-2303 — 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 (20 lines × 2) · ×1
  • Duplicated block (20 lines × 2) src/ocs_diameter_acct_service_fsm.erl:254 — src/ocs_diameter_acct_service_fsm.erl:254-273 | src/ocs_diameter_auth_service_fsm.erl:263-282 — before extracting anything, compare `src/ocs_diameter_acct_service_fsm.erl` and `src/ocs_diameter_auth_service_fsm.erl` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 109 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) src/ocs_rest_res_product.erl:763 — src/ocs_rest_res_product.erl:763-782 | src/ocs_rest_res_product.erl:870-888 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18 lines × 6) · ×1
  • Duplicated block (18 lines × 6) src/ocs_rest_res_balance.erl:1081 — src/ocs_rest_res_balance.erl:1081-1098 | src/ocs_rest_res_client.erl:479-496 | src/ocs_rest_res_product.erl:2440-2457 | src/ocs_rest_res_resource.erl:429-446 | src/ocs_rest_res_service.erl:871-888 | src/ocs_rest_res_usage.erl:160-177 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1647 — src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1647-1664 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1780-1797 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1840-1857 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1889-1906 — 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 (18 lines × 3) · ×1
  • Duplicated block (18 lines × 3) src/ocs_eap_aka.erl:155 — src/ocs_eap_aka.erl:155-172 | src/ocs_eap_pwd_fsm.erl:1078-1095 | src/ocs_eap_ttls_fsm.erl:1307-1324 — 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–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) src/ocs_diameter_3gpp_s6a_application_cb.erl:688 — src/ocs_diameter_3gpp_s6a_application_cb.erl:688-704 | src/ocs_eap_aka_auc_fsm.erl:664-681 — 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 (5–17 lines × 3) · ×1
  • Duplicated block (5–17 lines × 3) src/ocs_eap_aka_fsm.erl:424 — src/ocs_eap_aka_fsm.erl:424-440 | src/ocs_eap_akap_fsm.erl:434-450 | src/ocs_eap_pwd_fsm.erl:249-253 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–16 lines × 4) · ×1
  • Duplicated block (14–16 lines × 4) src/ocs_rating.erl:1172 — src/ocs_rating.erl:1172-1186 | src/ocs_rating.erl:1223-1236 | src/ocs_rating.erl:1310-1325 | src/ocs_rating.erl:1357-1372 — 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 (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) src/ocs_rest_res_role.erl:279 — src/ocs_rest_res_role.erl:279-294 | src/ocs_rest_res_user.erl:359-373 — before extracting anything, compare `src/ocs_rest_res_role.erl` and `src/ocs_rest_res_user.erl` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 204 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–15 lines × 8) · ×1
  • Duplicated block (14–15 lines × 8) src/ocs_rating.erl:1113 — src/ocs_rating.erl:1113-1126 | src/ocs_rating.erl:1129-1142 | src/ocs_rating.erl:1254-1267 | src/ocs_rating.erl:1270-1283 | src/ocs_rating.erl:1326-1339 | src/ocs_rating.erl:1373-1386 | src/ocs_rating.erl:1389-1402 | src/ocs_rating.erl:1405-1419 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (15 lines × 6) · ×1
  • Duplicated block (15 lines × 6) src/ocs.erl:1877 — src/ocs.erl:1877-1891 | src/ocs.erl:1921-1935 | src/ocs.erl:1989-2003 | src/ocs.erl:2098-2112 | src/ocs.erl:2161-2175 | src/ocs.erl:2248-2262 — 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 (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) src/ocs_rating.erl:947 — src/ocs_rating.erl:947-959 | src/ocs_rating.erl:1343-1357 — both copies are in the same file, so extract the 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 × 10) · ×1
  • Duplicated block (14 lines × 10) src/ocs_rest_res_balance.erl:1135 — src/ocs_rest_res_balance.erl:1135-1148 | src/ocs_rest_res_balance.erl:1160-1173 | src/ocs_rest_res_client.erl:529-542 | src/ocs_rest_res_client.erl:554-567 | src/ocs_rest_res_resource.erl:470-483 | src/ocs_rest_res_resource.erl:495-508 | src/ocs_rest_res_role.erl:363-376 | src/ocs_rest_res_service.erl:921-934 | src/ocs_rest_res_service.erl:946-959 | src/ocs_rest_res_user.erl:479-492 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 7) · ×1
  • Duplicated block (14 lines × 7) src/ocs_rest_res_balance.erl:443 — src/ocs_rest_res_balance.erl:443-456 | src/ocs_rest_res_balance.erl:502-515 | src/ocs_rest_res_balance.erl:543-556 | src/ocs_rest_res_product.erl:89-102 | src/ocs_rest_res_product.erl:148-161 | src/ocs_rest_res_role.erl:77-90 | src/ocs_rest_res_user.erl:209-222 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_product.erl` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) src/ocs.erl:275 — src/ocs.erl:275-288 | src/ocs.erl:458-471 | src/ocs.erl:1000-1013 | src/ocs.erl:1449-1462 | src/ocs.erl:1718-1731 | src/ocs.erl:2321-2334 — 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 (13–14 lines × 3) · ×1
  • Duplicated block (13–14 lines × 3) src/ocs_rating.erl:808 — src/ocs_rating.erl:808-820 | src/ocs_rating.erl:859-871 | src/ocs_rating.erl:1069-1082 — 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 (13 lines × 8) · ×1
  • Duplicated block (13 lines × 8) src/ocs_rest_res_hub_balance.erl:161 — src/ocs_rest_res_hub_balance.erl:161-173 | src/ocs_rest_res_hub_product.erl:165-177 | src/ocs_rest_res_hub_product.erl:262-274 | src/ocs_rest_res_hub_resource.erl:162-174 | src/ocs_rest_res_hub_role.erl:155-167 | src/ocs_rest_res_hub_service.erl:162-174 | src/ocs_rest_res_hub_usage.erl:164-176 | src/ocs_rest_res_hub_user.erl:162-174 — before extracting anything, compare `src/ocs_rest_res_hub_balance.erl` and `src/ocs_rest_res_hub_product.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×1
  • Duplicated block (13 lines × 6) src/ocs_rest_res_balance.erl:1067 — src/ocs_rest_res_balance.erl:1067-1079 | src/ocs_rest_res_client.erl:465-477 | src/ocs_rest_res_product.erl:2426-2438 | src/ocs_rest_res_resource.erl:415-427 | src/ocs_rest_res_service.erl:857-869 | src/ocs_rest_res_usage.erl:146-158 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–13 lines × 5) · ×1
  • Duplicated block (11–13 lines × 5) src/mod_ocs_rest_delete.erl:122 — src/mod_ocs_rest_delete.erl:122-132 | src/mod_ocs_rest_get.erl:179-189 | src/mod_ocs_rest_head.erl:173-183 | src/mod_ocs_rest_patch.erl:135-147 | src/mod_ocs_rest_post.erl:127-139 — before extracting anything, compare `src/mod_ocs_rest_delete.erl` and `src/mod_ocs_rest_get.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×1
  • Duplicated block (13 lines × 5) src/mod_ocs_rest_delete.erl:289 — src/mod_ocs_rest_delete.erl:289-301 | src/mod_ocs_rest_get.erl:560-572 | src/mod_ocs_rest_head.erl:305-317 | src/mod_ocs_rest_patch.erl:335-347 | src/mod_ocs_rest_post.erl:342-354 — before extracting anything, compare `src/mod_ocs_rest_delete.erl` and `src/mod_ocs_rest_get.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) src/ocs_rating.erl:1007 — src/ocs_rating.erl:1007-1019 | src/ocs_rating.erl:1056-1068 | src/ocs_rating.erl:1159-1171 | src/ocs_rating.erl:1204-1216 — 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 (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) src/ocs_rest_res_role.erl:175 — src/ocs_rest_res_role.erl:175-187 | src/ocs_rest_res_usage.erl:153-165 | src/ocs_rest_res_user.erl:100-112 — before extracting anything, compare `src/ocs_rest_res_role.erl` and `src/ocs_rest_res_usage.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–12 lines × 17) · ×1
  • Duplicated block (11–12 lines × 17) src/ocs_rest_res_balance.erl:1139 — src/ocs_rest_res_balance.erl:1139-1149 | src/ocs_rest_res_balance.erl:1164-1175 | src/ocs_rest_res_client.erl:533-543 | src/ocs_rest_res_client.erl:558-569 | src/ocs_rest_res_resource.erl:474-484 | src/ocs_rest_res_resource.erl:499-510 | src/ocs_rest_res_role.erl:367-378 | src/ocs_rest_res_service.erl:925-935 | src/ocs_rest_res_service.erl:950-961 | src/ocs_rest_res_usage.erl:3252-3262 | src/ocs_rest_res_usage.erl:3293-3303 | src/ocs_rest_res_usage.erl:3335-3345 | src/ocs_rest_res_usage.erl:3368-3378 | src/ocs_rest_res_usage.erl:3401-3411 | src/ocs_rest_res_usage.erl:3434-3444 | src/ocs_rest_res_usage.erl:3467-3478 | src/ocs_rest_res_user.erl:483-494 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12 lines × 8) · ×1
  • Duplicated block (12 lines × 8) src/ocs_rest_res_balance.erl:1044 — src/ocs_rest_res_balance.erl:1044-1055 | src/ocs_rest_res_client.erl:442-453 | src/ocs_rest_res_product.erl:2403-2414 | src/ocs_rest_res_resource.erl:392-403 | src/ocs_rest_res_role.erl:145-156 | src/ocs_rest_res_service.erl:834-845 | src/ocs_rest_res_usage.erl:123-134 | src/ocs_rest_res_user.erl:70-81 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) src/ocs_rest_res_balance.erl:1125 — src/ocs_rest_res_balance.erl:1125-1136 | src/ocs_rest_res_client.erl:519-530 | src/ocs_rest_res_product.erl:2483-2494 | src/ocs_rest_res_resource.erl:460-471 | src/ocs_rest_res_service.erl:911-922 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) src/ocs_eap_pwd_fsm.erl:1139 — src/ocs_eap_pwd_fsm.erl:1139-1149 | src/ocs_eap_pwd_fsm.erl:1164-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.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×1
  • Duplicated block (11 lines × 6) src/ocs_rest_res_hub_balance.erl:135 — src/ocs_rest_res_hub_balance.erl:135-145 | src/ocs_rest_res_hub_resource.erl:137-147 | src/ocs_rest_res_hub_role.erl:130-140 | src/ocs_rest_res_hub_service.erl:137-147 | src/ocs_rest_res_hub_usage.erl:138-148 | src/ocs_rest_res_hub_user.erl:137-147 — before extracting anything, compare `src/ocs_rest_res_hub_balance.erl` and `src/ocs_rest_res_hub_resource.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (4–11 lines × 6) · ×1
  • Duplicated block (4–11 lines × 6) src/mod_ocs_rest_delete.erl:230 — src/mod_ocs_rest_delete.erl:230-240 | src/mod_ocs_rest_get.erl:489-499 | src/mod_ocs_rest_head.erl:234-244 | src/mod_ocs_rest_patch.erl:253-263 | src/mod_ocs_rest_post.erl:262-265 | src/mod_ocs_rest_post.erl:271-281 — before extracting anything, compare `src/mod_ocs_rest_delete.erl` and `src/mod_ocs_rest_get.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) src/ocs_diameter_auth_port_server.erl:558 — src/ocs_diameter_auth_port_server.erl:558-568 | src/ocs_diameter_auth_port_server.erl:579-589 | src/ocs_diameter_auth_port_server.erl:600-610 | src/ocs_diameter_auth_port_server.erl:621-631 — 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–11 lines × 3) · ×1
  • Duplicated block (8–11 lines × 3) src/ocs_deregister_fsm.erl:331 — src/ocs_deregister_fsm.erl:331-341 | src/ocs_terminate_fsm.erl:352-359 | src/ocs_terminate_fsm.erl:368-375 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×1
  • Duplicated block (10 lines × 5) src/mod_ocs_rest_delete.erl:242 — src/mod_ocs_rest_delete.erl:242-251 | src/mod_ocs_rest_get.erl:501-510 | src/mod_ocs_rest_head.erl:246-255 | src/mod_ocs_rest_patch.erl:265-274 | src/mod_ocs_rest_post.erl:283-292 — before extracting anything, compare `src/mod_ocs_rest_delete.erl` and `src/mod_ocs_rest_get.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) src/ocs_log.erl:4201 — src/ocs_log.erl:4201-4210 | src/ocs_log.erl:4220-4229 | src/ocs_log.erl:4319-4328 | src/ocs_log.erl:4457-4466 — 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 (3–10 lines × 3) · ×1
  • Duplicated block (3–10 lines × 3) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1029 — src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1029-1038 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1095-1097 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1183-1192 — 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 (9 lines × 6) · ×1
  • Duplicated block (9 lines × 6) src/ocs_eap_aka_fsm.erl:578 — src/ocs_eap_aka_fsm.erl:578-586 | src/ocs_eap_aka_fsm.erl:858-866 | src/ocs_eap_aka_fsm.erl:870-878 | src/ocs_eap_aka_fsm.erl:884-892 | src/ocs_eap_aka_fsm.erl:895-903 | src/ocs_eap_aka_fsm.erl:912-920 — 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 lines × 4) · ×1
  • Duplicated block (9 lines × 4) src/ocs_eap_aka_fsm.erl:1378 — src/ocs_eap_aka_fsm.erl:1378-1386 | src/ocs_eap_aka_fsm.erl:1399-1407 | src/ocs_eap_akap_fsm.erl:1396-1404 | src/ocs_eap_akap_fsm.erl:1417-1425 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×1
  • Duplicated block (8–9 lines × 3) src/ocs_rest_res_product.erl:1033 — src/ocs_rest_res_product.erl:1033-1041 | src/ocs_rest_res_product.erl:1054-1062 | src/ocs_rest_res_product.erl:1146-1153 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) src/ocs_diameter_auth_port_server.erl:433 — src/ocs_diameter_auth_port_server.erl:433-441 | src/ocs_diameter_auth_port_server.erl:484-491 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (7–8 lines × 9) · ×1
  • Duplicated block (7–8 lines × 9) src/mod_ocs_rest_delete.erl:214 — src/mod_ocs_rest_delete.erl:214-220 | src/mod_ocs_rest_delete.erl:256-262 | src/mod_ocs_rest_get.erl:473-479 | src/mod_ocs_rest_get.erl:515-521 | src/mod_ocs_rest_head.erl:218-224 | src/mod_ocs_rest_head.erl:260-266 | src/mod_ocs_rest_patch.erl:232-239 | src/mod_ocs_rest_patch.erl:279-285 | src/mod_ocs_rest_post.erl:297-303 — before extracting anything, compare `src/mod_ocs_rest_delete.erl` and `src/mod_ocs_rest_get.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 8) · ×1
  • Duplicated block (8 lines × 8) src/ocs_rest_res_balance.erl:1065 — src/ocs_rest_res_balance.erl:1065-1072 | src/ocs_rest_res_client.erl:463-470 | src/ocs_rest_res_product.erl:2424-2431 | src/ocs_rest_res_resource.erl:413-420 | src/ocs_rest_res_role.erl:166-173 | src/ocs_rest_res_service.erl:855-862 | src/ocs_rest_res_usage.erl:144-151 | src/ocs_rest_res_user.erl:91-98 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×1
  • Duplicated block (8 lines × 6) src/ocs_eap_aka_fsm.erl:1300 — src/ocs_eap_aka_fsm.erl:1300-1307 | src/ocs_eap_aka_fsm.erl:1329-1336 | src/ocs_eap_aka_fsm.erl:1357-1364 | src/ocs_eap_akap_fsm.erl:1318-1325 | src/ocs_eap_akap_fsm.erl:1347-1354 | src/ocs_eap_akap_fsm.erl:1375-1382 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) src/ocs_eap_aka_fsm.erl:1262 — src/ocs_eap_aka_fsm.erl:1262-1269 | src/ocs_eap_aka_fsm.erl:1281-1288 | src/ocs_eap_akap_fsm.erl:1280-1287 | src/ocs_eap_akap_fsm.erl:1299-1306 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) src/ocs_rating.erl:2408 — src/ocs_rating.erl:2408-2415 | src/ocs_rating.erl:2423-2430 | src/ocs_rating.erl:2453-2459 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 11) · ×1
  • Duplicated block (7 lines × 11) src/ocs_rest_res_balance.erl:1133 — src/ocs_rest_res_balance.erl:1133-1139 | src/ocs_rest_res_balance.erl:1158-1164 | src/ocs_rest_res_client.erl:527-533 | src/ocs_rest_res_client.erl:552-558 | src/ocs_rest_res_product.erl:2491-2497 | src/ocs_rest_res_product.erl:2516-2522 | src/ocs_rest_res_resource.erl:468-474 | src/ocs_rest_res_resource.erl:493-499 | src/ocs_rest_res_service.erl:919-925 | src/ocs_rest_res_service.erl:944-950 | src/ocs_rest_res_user.erl:477-483 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–7 lines × 6) · ×1
  • Duplicated block (6–7 lines × 6) src/ocs_log.erl:4204 — src/ocs_log.erl:4204-4209 | src/ocs_log.erl:4223-4228 | src/ocs_log.erl:4322-4327 | src/ocs_log.erl:4460-4465 | src/ocs_log.erl:7432-7438 | src/ocs_log.erl:7451-7456 — 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 (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) src/ocs_rest_res_balance.erl:1035 — src/ocs_rest_res_balance.erl:1035-1041 | src/ocs_rest_res_client.erl:433-439 | src/ocs_rest_res_product.erl:2394-2400 | src/ocs_rest_res_resource.erl:383-389 | src/ocs_rest_res_service.erl:825-831 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (3–7 lines × 3) · ×1
  • Duplicated block (3–7 lines × 3) src/ocs_log.erl:7014 — src/ocs_log.erl:7014-7016 | src/ocs_log.erl:7018-7024 | src/ocs_log.erl:7027-7033 — 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 lines × 8) · ×1
  • Duplicated block (6 lines × 8) src/ocs_rest_res_balance.erl:1081 — src/ocs_rest_res_balance.erl:1081-1086 | src/ocs_rest_res_client.erl:479-484 | src/ocs_rest_res_product.erl:2440-2445 | src/ocs_rest_res_resource.erl:429-434 | src/ocs_rest_res_role.erl:182-187 | src/ocs_rest_res_service.erl:871-876 | src/ocs_rest_res_usage.erl:160-165 | src/ocs_rest_res_user.erl:107-112 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5–6 lines × 4) · ×1
  • Duplicated block (5–6 lines × 4) src/ocs_rest_res_usage.erl:3085 — src/ocs_rest_res_usage.erl:3085-3090 | src/ocs_rest_res_usage.erl:3113-3118 | src/ocs_rest_res_usage.erl:3141-3146 | src/ocs_rest_res_user.erl:440-444 — before extracting anything, compare `src/ocs_rest_res_usage.erl` and `src/ocs_rest_res_user.erl` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5–6 lines × 2) · ×1
  • Duplicated block (5–6 lines × 2) src/ocs_rating.erl:3388 — src/ocs_rating.erl:3388-3393 | src/ocs_rating.erl:3443-3447 — both copies are in the same file, so extract the 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 × 27) · ×1
  • Duplicated block (5 lines × 27) src/ocs_rest_res_usage.erl:1123 — src/ocs_rest_res_usage.erl:1123-1127 | src/ocs_rest_res_usage.erl:1145-1149 | src/ocs_rest_res_usage.erl:1167-1171 | src/ocs_rest_res_usage.erl:1177-1181 | src/ocs_rest_res_usage.erl:1187-1191 | src/ocs_rest_res_usage.erl:1197-1201 | src/ocs_rest_res_usage.erl:1207-1211 | src/ocs_rest_res_usage.erl:1217-1221 | src/ocs_rest_res_usage.erl:1227-1231 | src/ocs_rest_res_usage.erl:1237-1241 | src/ocs_rest_res_usage.erl:1259-1263 | src/ocs_rest_res_usage.erl:1269-1273 | src/ocs_rest_res_usage.erl:1279-1283 | src/ocs_rest_res_usage.erl:1289-1293 | src/ocs_rest_res_usage.erl:1299-1303 | src/ocs_rest_res_usage.erl:1309-1313 | src/ocs_rest_res_usage.erl:1319-1323 | src/ocs_rest_res_usage.erl:1329-1333 | src/ocs_rest_res_usage.erl:1339-1343 | src/ocs_rest_res_usage.erl:1349-1353 | src/ocs_rest_res_usage.erl:1383-1387 | src/ocs_rest_res_usage.erl:1426-1430 | src/ocs_rest_res_usage.erl:1468-1472 | src/ocs_rest_res_usage.erl:1524-1528 | src/ocs_rest_res_usage.erl:1534-1538 | src/ocs_rest_res_usage.erl:1579-1583 | src/ocs_rest_res_usage.erl:1601-1605 — all 27 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 lines × 15) · ×1
  • Duplicated block (5 lines × 15) src/ocs_rest_res_balance.erl:1111 — src/ocs_rest_res_balance.erl:1111-1115 | src/ocs_rest_res_balance.erl:1152-1156 | src/ocs_rest_res_client.erl:509-513 | src/ocs_rest_res_client.erl:546-550 | src/ocs_rest_res_product.erl:2470-2474 | src/ocs_rest_res_product.erl:2510-2514 | src/ocs_rest_res_resource.erl:450-454 | src/ocs_rest_res_resource.erl:487-491 | src/ocs_rest_res_role.erl:356-360 | src/ocs_rest_res_service.erl:901-905 | src/ocs_rest_res_service.erl:938-942 | src/ocs_rest_res_usage.erl:3224-3228 | src/ocs_rest_res_usage.erl:3265-3269 | src/ocs_rest_res_usage.erl:3306-3310 | src/ocs_rest_res_user.erl:471-475 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 11) · ×1
  • Duplicated block (5 lines × 11) src/ocs_eap_aka_fsm.erl:582 — src/ocs_eap_aka_fsm.erl:582-587 | src/ocs_eap_aka_fsm.erl:862-867 | src/ocs_eap_aka_fsm.erl:874-878 | src/ocs_eap_aka_fsm.erl:888-892 | src/ocs_eap_aka_fsm.erl:899-904 | src/ocs_eap_aka_fsm.erl:916-921 | src/ocs_eap_akap_fsm.erl:599-604 | src/ocs_eap_akap_fsm.erl:881-886 | src/ocs_eap_akap_fsm.erl:893-897 | src/ocs_eap_akap_fsm.erl:907-911 | src/ocs_eap_akap_fsm.erl:918-923 — before extracting anything, compare `src/ocs_eap_aka_fsm.erl` and `src/ocs_eap_akap_fsm.erl` as WHOLE FILES: this scan already matched 31 separate duplicated blocks between them, totalling at least 329 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (4–5 lines × 7) · ×1
  • Duplicated block (4–5 lines × 7) src/ocs_rest_res_balance.erl:79 — src/ocs_rest_res_balance.erl:79-82 | src/ocs_rest_res_balance.erl:223-227 | src/ocs_rest_res_client.erl:87-91 | src/ocs_rest_res_product.erl:254-258 | src/ocs_rest_res_product.erl:305-309 | src/ocs_rest_res_resource.erl:351-355 | src/ocs_rest_res_service.erl:153-157 — before extracting anything, compare `src/ocs_rest_res_balance.erl` and `src/ocs_rest_res_client.erl` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (4–5 lines × 3) · ×1
  • Duplicated block (4–5 lines × 3) src/ocs.erl:3408 — src/ocs.erl:3408-3411 | src/ocs.erl:3432-3436 | src/ocs.erl:3469-3473 — 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 (3–5 lines × 3) · ×1
  • Duplicated block (3–5 lines × 3) src/ocs_rating.erl:171 — src/ocs_rating.erl:171-175 | src/ocs_rating.erl:481-485 | src/ocs_rating.erl:1847-1849 — 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 lines × 2) · ×1
  • Duplicated block (33 lines × 2) src/ocs_diameter_3gpp_sta_application_cb.erl:249 — src/ocs_diameter_3gpp_sta_application_cb.erl:249-281 | src/ocs_diameter_3gpp_swm_application_cb.erl:249-281 — before extracting anything, compare `src/ocs_diameter_3gpp_sta_application_cb.erl` and `src/ocs_diameter_3gpp_swm_application_cb.erl` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 150 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 7) · ×1
  • Duplicated block (10 lines × 7) src/ocs_rest_res_hub_balance.erl:62 — src/ocs_rest_res_hub_balance.erl:62-71 | src/ocs_rest_res_hub_product.erl:65-74 | src/ocs_rest_res_hub_resource.erl:63-72 | src/ocs_rest_res_hub_role.erl:100-109 | src/ocs_rest_res_hub_service.erl:63-72 | src/ocs_rest_res_hub_usage.erl:63-72 | src/ocs_rest_res_hub_user.erl:63-72 — before extracting anything, compare `src/ocs_rest_res_hub_balance.erl` and `src/ocs_rest_res_hub_product.erl` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 12) · ×1
  • Duplicated block (5 lines × 12) src/ocs_deregister_fsm_sup.erl:42 — src/ocs_deregister_fsm_sup.erl:42-46 | src/ocs_diameter_acct_top_sup.erl:42-46 | src/ocs_diameter_auth_sup.erl:42-46 | src/ocs_diameter_disconnect_fsm_sup.erl:42-46 | src/ocs_eap_aka_fsm_sup_sup.erl:42-46 | src/ocs_eap_pwd_fsm_sup.erl:42-46 | src/ocs_eap_ttls_fsm_sup_sup.erl:42-46 | src/ocs_pgw_fsm_sup.erl:42-46 | src/ocs_radius_acct_top_sup.erl:42-46 | src/ocs_radius_auth_sup.erl:42-46 | src/ocs_simple_auth_fsm_sup.erl:42-46 | src/ocs_terminate_fsm_sup.erl:42-46 — 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 12 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×1
  • Duplicated block (12 lines × 4) src/ocs_rest_res_product.erl:601 — src/ocs_rest_res_product.erl:601-612 | src/ocs_rest_res_product.erl:737-748 | src/ocs_rest_res_resource.erl:718-729 | src/ocs_rest_res_service.erl:330-341 — before extracting anything, compare `src/ocs_rest_res_product.erl` and `src/ocs_rest_res_resource.erl` as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 208 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 7) · ×1
  • Duplicated block (7 lines × 7) src/ocs_rest_res_nrf.erl:1231 — src/ocs_rest_res_nrf.erl:1231-1237 | src/ocs_rest_res_nrf.erl:1239-1245 | src/ocs_rest_res_nrf.erl:1247-1253 | src/ocs_rest_res_nrf.erl:1255-1261 | src/ocs_rest_res_nrf.erl:1263-1269 | src/ocs_rest_res_nrf.erl:1271-1277 | src/ocs_rest_res_nrf.erl:1279-1285 — 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 (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) src/ocs_rest_res_health.erl:472 — src/ocs_rest_res_health.erl:472-478 | src/ocs_rest_res_health.erl:482-488 | src/ocs_rest_res_health.erl:492-498 | src/ocs_rest_res_health.erl:502-508 | src/ocs_rest_res_health.erl:512-518 | src/ocs_rest_res_health.erl:533-539 — 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 (5 lines × 21) · ×1
  • Duplicated block (5 lines × 21) src/mod_ocs_rest_accepted_content.erl:268 — src/mod_ocs_rest_accepted_content.erl:268-272 | src/mod_ocs_rest_delete.erl:127-132 | src/mod_ocs_rest_delete.erl:216-220 | src/mod_ocs_rest_delete.erl:247-251 | src/mod_ocs_rest_delete.erl:258-262 | src/mod_ocs_rest_get.erl:184-189 | src/mod_ocs_rest_get.erl:475-479 | src/mod_ocs_rest_get.erl:506-510 | src/mod_ocs_rest_get.erl:517-521 | src/mod_ocs_rest_head.erl:178-183 | src/mod_ocs_rest_head.erl:220-224 | src/mod_ocs_rest_head.erl:251-255 | src/mod_ocs_rest_head.erl:262-266 | src/mod_ocs_rest_patch.erl:142-147 | src/mod_ocs_rest_patch.erl:234-239 | src/mod_ocs_rest_patch.erl:270-274 | src/mod_ocs_rest_patch.erl:281-285 | src/mod_ocs_rest_patch.erl:316-320 | src/mod_ocs_rest_post.erl:134-139 | src/mod_ocs_rest_post.erl:288-292 | src/mod_ocs_rest_post.erl:299-303 — before extracting anything, compare `src/mod_ocs_rest_delete.erl` and `src/mod_ocs_rest_get.erl` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 99 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.
M1 · Documentation (README) · README may be stale · ×1
  • README may be stale — 100 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 45 plain JS — the untyped files are priv/www/src/ocs-icons.js, priv/www/src/sig-access-list.js, priv/www/src/sig-accounting-list.js, priv/www/src/sig-app.js, priv/www/src/sig-balance-list.js, priv/www/src/sig-bucket-add.js (+39 more).
R10 · Code Duplication · Duplicated block (130 lines × 2 locations) · ×1
  • Duplicated block (130 lines × 2 locations) priv/www/src/sig-dashboard.js:1739 — priv/www/src/sig-dashboard.js:1739 · priv/www/src/sig-dashboard.js:1870 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (118 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (118 matched lines × 2 locations) priv/www/src/sig-tariff-rate-update.js:140 — priv/www/src/sig-tariff-rate-update.js:140 · priv/www/src/sig-tariff-roaming-update.js:144 — the two spans are one implementation copied and then locally edited — 801 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (89 lines × 2 locations) · ×1
  • Duplicated block (89 lines × 2 locations) priv/www/src/sig-tariff-rate-add.js:91 — priv/www/src/sig-tariff-rate-add.js:91 · priv/www/src/sig-tariff-roaming-add.js:95 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (80 lines × 6 locations) · ×1
  • Duplicated block (80 lines × 6 locations) priv/www/src/sig-dashboard.js:387 — priv/www/src/sig-dashboard.js:387 · priv/www/src/sig-dashboard.js:470 · priv/www/src/sig-dashboard.js:553 · priv/www/src/sig-dashboard.js:636 · +2 more site(s) not listed — 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.
R10 · Code Duplication · Duplicated block (72 lines × 2 locations) · ×1
  • Duplicated block (72 lines × 2 locations) priv/www/src/sig-ipdr-list-voip.js:257 — priv/www/src/sig-ipdr-list-voip.js:257 · REDACTED:354 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Wholesale file copy (62 identical lines × 4 files) · ×1
  • Wholesale file copy (62 identical lines × 4 files) priv/www/src/sig-period-table-add.js:14 — priv/www/src/sig-period-table-add.js:14 · priv/www/src/sig-policy-table-add.js:14 · priv/www/src/sig-rate-table-add.js:14 · priv/www/src/sig-roaming-table-add.js:14 — these 4 files are line-for-line copies of one another — 62 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (60 identical lines × 3 files) · ×1
  • Wholesale file copy (60 identical lines × 3 files) priv/www/src/sig-period-table-list.js:14 — priv/www/src/sig-period-table-list.js:14 · priv/www/src/sig-rate-table-list.js:14 · priv/www/src/sig-roaming-table-list.js:14 — these 3 files are line-for-line copies of one another — 60 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (60 lines × 3 locations) · ×1
  • Duplicated block (60 lines × 3 locations) priv/www/src/sig-tariff-period-list.js:159 — priv/www/src/sig-tariff-period-list.js:159 · priv/www/src/sig-tariff-rate-list.js:130 · priv/www/src/sig-tariff-roaming-list.js:119 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (56 lines × 2 locations) · ×1
  • Duplicated block (56 lines × 2 locations) priv/www/src/sig-product-list.js:171 — priv/www/src/sig-product-list.js:171 · priv/www/src/sig-sub-list.js:138 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (52 lines × 3 locations) · ×1
  • Duplicated block (52 lines × 3 locations) priv/www/src/sig-tariff-period-update.js:185 — priv/www/src/sig-tariff-period-update.js:185 · priv/www/src/sig-tariff-rate-update.js:127 · priv/www/src/sig-tariff-roaming-update.js:131 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (50 lines × 3 locations) · ×1
  • Duplicated block (50 lines × 3 locations) priv/www/src/sig-sub-add.js:740 — priv/www/src/sig-sub-add.js:740 · priv/www/src/sig-sub-add.js:810 · priv/www/src/sig-sub-update.js:543 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (47 lines × 3 locations) · ×1
  • Duplicated block (47 lines × 3 locations) priv/www/src/sig-bucket-list.js:361 — priv/www/src/sig-bucket-list.js:361 · priv/www/src/sig-product-list.js:287 · priv/www/src/sig-sub-list.js:255 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (46 lines × 3 locations) · ×1
  • Duplicated block (46 lines × 3 locations) priv/www/src/sig-tariff-period-list.js:224 — priv/www/src/sig-tariff-period-list.js:224 · priv/www/src/sig-tariff-rate-list.js:189 · priv/www/src/sig-tariff-roaming-list.js:178 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (44 lines × 3 locations) · ×1
  • Duplicated block (44 lines × 3 locations) priv/www/src/sig-tariff-period-add.js:196 — priv/www/src/sig-tariff-period-add.js:196 · priv/www/src/sig-tariff-rate-add.js:139 · priv/www/src/sig-tariff-roaming-add.js:143 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (42 lines × 2 locations) · ×1
  • Duplicated block (42 lines × 2 locations) priv/www/src/sig-accounting-list.js:453 — priv/www/src/sig-accounting-list.js:453 · priv/www/src/sig-balance-list.js:245 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (42 lines × 3 locations) · ×1
  • Duplicated block (42 lines × 3 locations) priv/www/src/sig-tariff-period-add.js:143 — priv/www/src/sig-tariff-period-add.js:143 · priv/www/src/sig-tariff-rate-add.js:98 · priv/www/src/sig-tariff-roaming-add.js:102 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (41 lines × 2 locations) · ×1
  • Duplicated block (41 lines × 2 locations) priv/www/src/sig-bucket-list.js:249 — priv/www/src/sig-bucket-list.js:249 · priv/www/src/sig-product-list.js:189 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (40 lines × 2 locations) · ×1
  • Duplicated block (40 lines × 2 locations) priv/www/src/sig-access-list.js:165 — priv/www/src/sig-access-list.js:165 · priv/www/src/sig-accounting-list.js:314 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (39 lines × 3 locations) · ×1
  • Duplicated block (39 lines × 3 locations) priv/www/src/sig-client-list.js:249 — priv/www/src/sig-client-list.js:249 · priv/www/src/sig-product-list.js:305 · priv/www/src/sig-sub-list.js:273 — the 3 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block (38 lines × 2 locations) · ×1
  • Duplicated block (38 lines × 2 locations) REDACTED:1841 — REDACTED:1841 · REDACTED:1884 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (34 lines × 2 locations) · ×1
  • Duplicated block (34 lines × 2 locations) REDACTED:1973 — REDACTED:1973 · REDACTED:2719 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (33 lines × 5 locations) · ×1
  • Duplicated block (33 lines × 5 locations) priv/www/src/sig-access-list.js:277 — priv/www/src/sig-access-list.js:277 · priv/www/src/sig-accounting-list.js:462 · priv/www/src/sig-balance-list.js:254 · priv/www/src/sig-ipdr-list-voip.js:296 · +1 more site(s) not listed — the 5 copies are spread across 5 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (32 lines × 2 locations) · ×1
  • Duplicated block (32 lines × 2 locations) REDACTED:3454 — REDACTED:3454 · REDACTED:3486 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (30 lines × 2 locations) · ×1
  • Duplicated block (30 lines × 2 locations) priv/www/src/sig-client-update.js:219 — priv/www/src/sig-client-update.js:219 · priv/www/src/sig-tariff-period-update.js:185 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (27 lines × 2 locations) · ×1
  • Duplicated block (27 lines × 2 locations) REDACTED:2304 — REDACTED:2304 · REDACTED:2350 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (27 lines × 4 locations) · ×1
  • Duplicated block (27 lines × 4 locations) priv/www/src/sig-policy-list.js:523 — priv/www/src/sig-policy-list.js:523 · priv/www/src/sig-tariff-period-list.js:194 · priv/www/src/sig-tariff-rate-list.js:165 · priv/www/src/sig-tariff-roaming-list.js:154 — the 4 copies are spread across 4 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (27 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (27 matched lines × 2 locations) priv/www/src/sig-tariff-period-update.js:325 — priv/www/src/sig-tariff-period-update.js:325 · priv/www/src/sig-tariff-roaming-update.js:206 — the two spans are one implementation copied and then locally edited — 197 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (26 lines × 4 locations) · ×1
  • Duplicated block (26 lines × 4 locations) priv/www/src/sig-dashboard.js:954 — priv/www/src/sig-dashboard.js:954 · priv/www/src/sig-dashboard.js:980 · priv/www/src/sig-dashboard.js:1006 · priv/www/src/sig-dashboard.js:1032 — 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.
R10 · Code Duplication · Duplicated block (24 lines × 4 locations) · ×1
  • Duplicated block (24 lines × 4 locations) priv/www/src/sig-sub-add.js:563 — priv/www/src/sig-sub-add.js:563 · priv/www/src/sig-sub-add.js:592 · priv/www/src/sig-sub-update.js:632 · priv/www/src/sig-sub-update.js:659 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (23 lines × 2 locations) · ×1
  • Duplicated block (23 lines × 2 locations) priv/www/src/sig-client-update.js:190 — priv/www/src/sig-client-update.js:190 · priv/www/src/sig-user-update.js:126 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (23 lines × 3 locations) · ×1
  • Duplicated block (23 lines × 3 locations) priv/www/src/sig-client-update.js:275 — priv/www/src/sig-client-update.js:275 · priv/www/src/sig-client-update.js:349 · priv/www/src/sig-user-update.js:198 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R2 · Cyclomatic Complexity · Complex function _updateOfferPrice (cyclomatic 186, cognitive 237) · ×1
  • Complex function _updateOfferPrice (cyclomatic 186, cognitive 237) REDACTED:1951 — _updateOfferPrice has cyclomatic complexity 186 and cognitive complexity 237; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _updateOfferAlteration (cyclomatic 104, cognitive 120) · ×1
  • Complex function _updateOfferAlteration (cyclomatic 104, cognitive 120) REDACTED:2694 — _updateOfferAlteration has cyclomatic complexity 104 and cognitive complexity 120; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function mapPrice (cyclomatic 82, cognitive 120) · ×1
  • Complex function mapPrice (cyclomatic 82, cognitive 120) priv/www/src/sig-offer-add.js:1454 — mapPrice has cyclomatic complexity 82 and cognitive complexity 120; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _updateProductOffer (cyclomatic 82, cognitive 95) · ×1
  • Complex function _updateProductOffer (cyclomatic 82, cognitive 95) REDACTED:1637 — _updateProductOffer has cyclomatic complexity 82 and cognitive complexity 95; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _activeItemChanged (cyclomatic 79, cognitive 182) · ×1
  • Complex function _activeItemChanged (cyclomatic 79, cognitive 182) REDACTED:991 — _activeItemChanged has cyclomatic complexity 79 and cognitive complexity 182; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleAjaxResponse (cyclomatic 78, cognitive 232) · ×1
  • Complex function handleAjaxResponse (cyclomatic 78, cognitive 232) priv/www/src/sig-dashboard.js:892 — handleAjaxResponse has cyclomatic complexity 78 and cognitive complexity 232; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _updateAddPrice (cyclomatic 78, cognitive 120) · ×1
  • Complex function _updateAddPrice (cyclomatic 78, cognitive 120) REDACTED:3210 — _updateAddPrice has cyclomatic complexity 78 and cognitive complexity 120; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _addPrice (cyclomatic 48, cognitive 33) · ×1
  • Complex function _addPrice (cyclomatic 48, cognitive 33) priv/www/src/sig-offer-add.js:2002 — _addPrice has cyclomatic complexity 48 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _updatePricesDialog (cyclomatic 45, cognitive 121) · ×1
  • Complex function _updatePricesDialog (cyclomatic 45, cognitive 121) REDACTED:1344 — _updatePricesDialog has cyclomatic complexity 45 and cognitive complexity 121; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function refresh (cyclomatic 35, cognitive 68) · ×1
  • Complex function refresh (cyclomatic 35, cognitive 68) priv/www/src/sig-app.js:389 — refresh has cyclomatic complexity 35 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _addOffer (cyclomatic 32, cognitive 39) · ×1
  • Complex function _addOffer (cyclomatic 32, cognitive 39) priv/www/src/sig-offer-add.js:1301 — _addOffer has cyclomatic complexity 32 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleAjaxResponse (cyclomatic 30, cognitive 108) · ×1
  • Complex function handleAjaxResponse (cyclomatic 30, cognitive 108) priv/www/src/sig-bucket-list.js:271 — handleAjaxResponse has cyclomatic complexity 30 and cognitive complexity 108; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _addAlteration (cyclomatic 29, cognitive 17) · ×1
  • Complex function _addAlteration (cyclomatic 29, cognitive 17) priv/www/src/sig-offer-add.js:2170 — _addAlteration has cyclomatic complexity 29 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleAjaxResponse (cyclomatic 28, cognitive 101) · ×1
  • Complex function handleAjaxResponse (cyclomatic 28, cognitive 101) priv/www/src/sig-product-list.js:211 — handleAjaxResponse has cyclomatic complexity 28 and cognitive complexity 101; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _addUpdatePriceDialog (cyclomatic 28, cognitive 43) · ×1
  • Complex function _addUpdatePriceDialog (cyclomatic 28, cognitive 43) priv/www/src/sig-offer-add.js:1071 — _addUpdatePriceDialog has cyclomatic complexity 28 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _serviceAddSubmit (cyclomatic 27, cognitive 34) · ×1
  • Complex function _serviceAddSubmit (cyclomatic 27, cognitive 34) priv/www/src/sig-sub-add.js:533 — _serviceAddSubmit has cyclomatic complexity 27 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function updateSubscriberAuthorization (cyclomatic 25, cognitive 54) · ×1
  • Complex function updateSubscriberAuthorization (cyclomatic 25, cognitive 54) priv/www/src/sig-sub-update.js:616 — updateSubscriberAuthorization has cyclomatic complexity 25 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _routePageChanged (cyclomatic 25, cognitive 16) · ×1
  • Complex function _routePageChanged (cyclomatic 25, cognitive 16) priv/www/src/sig-app.js:680 — _routePageChanged has cyclomatic complexity 25 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleAjaxResponse (cyclomatic 23, cognitive 57) · ×1
  • Complex function handleAjaxResponse (cyclomatic 23, cognitive 57) priv/www/src/sig-offer-list.js:195 — handleAjaxResponse has cyclomatic complexity 23 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleAjaxResponse (cyclomatic 22, cognitive 66) · ×1
  • Complex function handleAjaxResponse (cyclomatic 22, cognitive 66) priv/www/src/sig-policy-list.js:523 — handleAjaxResponse has cyclomatic complexity 22 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 3761 lines of code REDACTED:1 — REDACTED has 3761 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · priv/www/src/sig-offer-add.js · ×1
  • priv/www/src/sig-offer-add.js: 2343 lines of code priv/www/src/sig-offer-add.js:1 — priv/www/src/sig-offer-add.js has 2343 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · priv/www/src/sig-dashboard.js · ×1
  • priv/www/src/sig-dashboard.js: 2040 lines of code priv/www/src/sig-dashboard.js:1 — priv/www/src/sig-dashboard.js has 2040 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · priv/www/src/sig-sub-add.js · ×1
  • priv/www/src/sig-sub-add.js: 930 lines of code priv/www/src/sig-sub-add.js:1 — priv/www/src/sig-sub-add.js has 930 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · priv/www/src/sig-sub-update.js · ×1
  • priv/www/src/sig-sub-update.js: 895 lines of code priv/www/src/sig-sub-update.js:1 — priv/www/src/sig-sub-update.js has 895 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · priv/www/src/sig-app.js · ×1
  • priv/www/src/sig-app.js: 852 lines of code priv/www/src/sig-app.js:1 — priv/www/src/sig-app.js has 852 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · priv/www/src/sig-policy-list.js · ×1
  • priv/www/src/sig-policy-list.js: 767 lines of code priv/www/src/sig-policy-list.js:1 — priv/www/src/sig-policy-list.js has 767 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · priv/www/src/sig-accounting-list.js · ×1
  • priv/www/src/sig-accounting-list.js: 487 lines of code priv/www/src/sig-accounting-list.js:1 — priv/www/src/sig-accounting-list.js has 487 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · priv/www/src/sig-client-update.js · ×1
  • priv/www/src/sig-client-update.js: 417 lines of code priv/www/src/sig-client-update.js:1 — priv/www/src/sig-client-update.js has 417 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 417 lines of code REDACTED:1 — REDACTED has 417 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · priv/www/src/sig-bucket-list.js · ×1
  • priv/www/src/sig-bucket-list.js: 403 lines of code priv/www/src/sig-bucket-list.js:1 — priv/www/src/sig-bucket-list.js has 403 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R4 · Test Coverage · Test Coverage · ×1
  • Test Coverage — 0% of 45 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
Minor — 10 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×2
  • Orphaned file src/mod_oauth.erl: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 src/ocs_rest_res_role.erl: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.
X10 · Duplicated predicate · Duplicated predicate · ×2
  • Duplicated predicate priv/www/src/sig-bucket-list.js:238 — `column !== undefined && model.item.entityClass !== undefined` appears character-identically in 4 files — priv/www/src/sig-bucket-list.js, priv/www/src/sig-offer-list.js, priv/www/src/sig-product-list.js, priv/www/src/sig-sub-list.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate priv/www/src/sig-accounting-list.js:303 — `grid.detailsOpenedItems && grid.detailsOpenedItems.some(checkExist)` appears character-identically in 3 files — priv/www/src/sig-accounting-list.js, priv/www/src/sig-bucket-list.js, priv/www/src/sig-policy-list.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 68 significant file(s) lose their only recent owner: src/ocs_log.erl, src/ocs_rest_res_usage.erl, src/ocs_rating.erl, src/ocs.erl, src/ocs_rest_res_product.erl, src/ocs_diameter_3gpp_ro_nrf_app_cb.erl, src/ocs_eap_akap_fsm.erl, src/ocs_eap_aka_fsm.erl (+60 more). Pair on, review, or document these before any departure.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 2 of 93 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (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; 93 of the 118 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: src/mod_oauth.erl, src/ocs_rest_res_role.erl. 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.
M1 · Documentation (README) · Thin README · ×1
  • Thin README — The root README is 10 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, it found no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add dialyzer or elvis — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

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/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-df98f8bc1a844e31bf6ad9445a3b3c99/history.json --exit-code 0 --source .2artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-df98f8bc1a844e31bf6ad9445a3b3c99/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/watchdog-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 .18artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnone (no readable dependency manifest)—none (no readable dependency manifest): 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), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — 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—
D36 · Supply-chain Provenance & Signingprovenance—provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesnone (no readable dependency manifest)—none (no readable dependency manifest): 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), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).0—

Run 01a18b3f-9a53-75da-8761-335cef35e7cc · 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