Public report of sigscale/ocs, published 15 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 15 November 2026, 06:30 UTC · Survey ID cd_1d7ecba59705435c8d86d4c1cfcc5d37
sigscale/ocs
Measured 15 November 2026, 06:29 UTC, at code version 1fd9a5d
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
No change 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: Code Health, 15
Findings by how serious they are
6 critical1047 serious11 minor
34 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 06:29 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
37of 37 dimensions measured by tools.
1056of 1064 findings point to an exact file and line, so you can open each one in the code. The other 8 concern the repository as a whole, such as missing documentation.
37dimensions across 7 lenses, read from 67,571 lines of product code.
sigscale/ocs falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 30 out of 100 and is rated Weak, and two of its six critical findings are leaked passwords or keys.
Code Health, at 15, is the weakest lens and counts most in the score. The best first step is making the naming consistent, worth about 4 points. Adding type checking would lift Code Health itself, worth about 3 points. Raising Code Health to 70 would lift the score to about 42.
Two passwords or keys 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 forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Code Health rose from 15 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: 204 findings
These 204 critical or serious findings weren't in the previous survey, on 30 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Code Duplication · Edited copy of a member (93 corresponding lines) src/ocs_diameter_acct_service_fsm.erl
Code Duplication · Edited copy of a member (48 corresponding lines) src/ocs_rest_res_product.erl
Code Duplication · Edited copy of a member (56 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (75 corresponding lines) src/ocs_rest_res_product.erl
Code Duplication · Edited copy of a member (71 corresponding lines) src/ocs_mib.erl
Code Duplication · Edited copy of a member (35 corresponding lines) src/ocs_rest_res_balance.erl
Code Duplication · Edited copy of a member (37 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (34 corresponding lines) src/ocs_eap_aka_auc_fsm.erl
Code Duplication · Edited copy of a member (31 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (29 corresponding lines) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl
Code Duplication · Edited copy of a member (29 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (26 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (33 corresponding lines) src/ocs_diameter_auth_port_server.erl
Code Duplication · Edited copy of a member (31 corresponding lines) src/ocs_eap_aka_fsm.erl
Code Duplication · Edited copy of a member (38 corresponding lines) src/ocs_diameter_auth_port_server.erl
Code Duplication · Edited copy of a member (37 corresponding lines) src/ocs_rest_res_resource.erl
Code Duplication · Edited copy of a member (38 corresponding lines) src/ocs_rest_res_product.erl
Code Duplication · Edited copies of one member (7 members, 30+ corresponding lines) src/ocs_rest_res_hub_balance.erl
Code Duplication · Edited copy of a member (29 corresponding lines) src/ocs_rest_res_role.erl
Code Duplication · Edited copy of a member (23 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (32 corresponding lines) src/ocs_pgw_fsm.erl
Code Duplication · Edited copy of a member (25 corresponding lines) src/ocs_rest_res_usage.erl
Code Duplication · Edited copy of a member (24 corresponding lines) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl
Code Duplication · Edited copy of a member (17 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (27 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (29 corresponding lines) src/ocs_rest_res_role.erl
Code Duplication · Edited copy of a member (17 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (15 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (26 corresponding lines) src/ocs.erl
Code Duplication · Edited copy of a member (26 corresponding lines) src/ocs.erl
Code Duplication · Edited copy of a member (20 corresponding lines) src/ocs_eap_pwd_fsm.erl
Code Duplication · Edited copy of a member (26 corresponding lines) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl
Code Duplication · Edited copy of a member (24 corresponding lines) src/ocs_diameter_3gpp_ro_application_cb.erl
Code Duplication · Edited copy of a member (25 corresponding lines) src/ocs_rest_res_resource.erl
Code Duplication · Edited copy of a member (25 corresponding lines) src/ocs_rest_res_nrf.erl
Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (22 corresponding lines) src/ocs_rest_res_client.erl
Code Duplication · Edited copy of a member (8 corresponding lines) src/ocs_diameter_3gpp_ro_application_cb.erl
Code Duplication · Edited copies of one member (4 members, 28+ corresponding lines) src/ocs_log.erl
Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) src/ocs_rest_res_product.erl
Code Duplication · Edited copy of a member (16 corresponding lines) src/ocs_diameter_3gpp_sta_application_cb.erl
Code Duplication · Edited copy of a member (21 corresponding lines) src/ocs_diameter_acct_service_fsm.erl
Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) src/ocs_rest.erl
Code Duplication · Edited copy of a member (22 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (25 corresponding lines) src/ocs_diameter_eap_application_cb.erl
Code Duplication · Edited copy of a member (14 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (19 corresponding lines) src/ocs_diameter_3gpp_ro_application_cb.erl
Code Duplication · Edited copy of a member (9 corresponding lines) src/ocs_diameter_auth_port_server.erl
Code Duplication · Edited copy of a member (13 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (15 corresponding lines) src/ocs_eap_ttls_fsm.erl
Code Duplication · Edited copy of a member (11 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copies of one member (4 members, 22+ corresponding lines) src/ocs_rest_res_product.erl
Code Duplication · Edited copies of one member (5 members, 14+ corresponding lines) src/ocs_rest_res_usage.erl
Code Duplication · Edited copy of a member (18 corresponding lines) src/ocs.erl
Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) src/ocs_gtt.erl
Code Duplication · Edited copy of a member (16 corresponding lines) src/ocs_eap_aka_auc_fsm.erl
Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) src/ocs_rating.erl
Code Duplication · Edited copy of a member (17 corresponding lines) src/ocs_app.erl
Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (16 corresponding lines) src/ocs.erl
Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (14 corresponding lines) src/ocs.erl
Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) src/ocs_rest_res_resource.erl
Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (7 corresponding lines) src/ocs_rest.erl
Code Duplication · Edited copy of a member (11 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (12 corresponding lines) src/ocs_rest_res_usage.erl
Code Duplication · Edited copy of a member (17 corresponding lines) src/ocs.erl
Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) src/ocs_log.erl
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) src/ocs.erl
Code Duplication · Edited copy of a member (12 corresponding lines) src/ocs_rest_res_product.erl
Code Duplication · Edited copy of a member (11 corresponding lines) src/user_default.erl
Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) src/ocs_app.erl
Code Duplication · Edited copy of a member (11 corresponding lines) src/ocs_rest_res_hub_product.erl
Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) src/ocs_rest_res_product.erl
Code Duplication · Edited copies of one member (8 members, 11+ corresponding lines) src/ocs_diameter_codec_s6b.erl
Code Duplication · Edited copies of one member (8 members, 11+ corresponding lines) src/ocs_diameter_codec_sta.erl
Code Duplication · Edited copies of one member (8 members, 11+ corresponding lines) src/ocs_diameter_codec_swm.erl
Code Duplication · Edited copies of one member (5 members, 18+ corresponding lines) src/mod_ocs_rest_delete.erl
Code Duplication · Edited copy of a member (14 corresponding lines) src/ocs_rest_res_product.erl
Code Duplication · Edited copy of a member (14 corresponding lines) src/ocs_rest_res_usage.erl
Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) src/ocs_rest_res_usage.erl
Code Duplication · Edited copy of a member (18 corresponding lines) src/ocs_diameter_eap_application_cb.erl
Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) src/ocs_eap_pwd_fsm.erl
Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) src/ocs_log.erl
Code Duplication · Edited copy of a member (10 corresponding lines) src/ocs.erl
Code Duplication · Edited copy of a member (10 corresponding lines) src/ocs_log.erl
Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) src/ocs_rest_res_balance.erl
Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) src/ocs_rest_res_usage.erl
Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) src/ocs_app.erl
Code Duplication · Edited copy of a member (8 corresponding lines) src/ocs_diameter_auth_port_server.erl
Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) src/ocs_diameter_3gpp_gx_application_cb.erl
Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) src/ocs_rest_res_product.erl
Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) src/ocs_diameter_auth_port_sup.erl
Code Duplication · Edited copies of one member (8 members, 11+ corresponding lines) src/ocs_diameter_codec_s6b.erl
Code Duplication · Edited copies of one member (8 members, 11+ corresponding lines) src/ocs_diameter_codec_sta.erl
Code Duplication · Edited copies of one member (8 members, 11+ corresponding lines) src/ocs_diameter_codec_swm.erl
Code Duplication · Edited copy of a member (10 corresponding lines) src/ocs_rest_res_product.erl
Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) src/ocs_rest_res_resource.erl
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 229 findings
These 229 critical or serious findings were in the previous survey, on 30 October 2026, and are gone from this one. The first 100 are listed here.
€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 problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.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.
Size
Medium: 67,571 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 `classID` spells `ID` where 14 names in the project spell it `Id` finding(s) in Naming Consistency — start with sig-policy-add.js.
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 4 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 Code Health, at 15 (Critical). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 1 `classID` spells `ID` where 14 names in the project spell it `Id` finding(s) in Naming Consistency. Of all the actions in this report, it raises the score most for the work it takes: about 4 points for low effort, because it clears the 1 Naming Consistency 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 4.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 9% to 20% 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 15.9 to 95.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 our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
At a glance — Code Health · 15% · Critical · gated by D1, D2, D4, R1, R10, R2, R3 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
18
Medium
A07:2025 — Authentication Failures
3
High / Critical
Roadmap
Top priorities: Resolve the 1 `classID` spells `ID` where 14 names in the project spell it `Id` finding(s) in Naming Consistency — start with sig-policy-add.js; Add a CI workflow that builds and runs the test suite on every push/PR; 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.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 `classID` spells `ID` where 14 names in the project spell it `Id` finding(s) in Naming Consistency — start with sig-policy-add.js.
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.
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.
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.
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 — 6
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 — 1047
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 — 11
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 34
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 37 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 37 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1056 of 1064 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D5 Coupling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: 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.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The ADR expectation is gated on whether a repository ships a deployable product. Our repo-kind classifier reads .NET project files and the host and package markers of the other ecosystems it knows (a Go `package main`, a Cargo binary, a package.json `bin`, `start` script or application dev server such as Vite or Next, Python console scripts or a Django/WSGI entry point, a Spring Boot / WAR / Gradle application build, a Rack or Rails app, a Composer project, an OTP release or escript, a Dockerfile, a Procfile, a Platform.sh `.platform/routes.yaml`, and the corresponding published-package manifests, including an OTP `*.app.src`, a Drupal module's `*.info` and a Claude Code `.claude-plugin/plugin.json`), and found none here, so we could not tell what kind of repository this is and did not assess its ADR log. This is a gap in our analyzer, not a finding about this repository. No manifest, project file or entry point of any ecosystem it reads exists in this tree.
D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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.
D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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. We then boot 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 109 further occurrence(s) are not listed individually; the score already reflects all 149.
R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 5 further occurrence(s) are not listed individually; the score already reflects all 45.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, 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, got, undici, node:http; 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.
X21 Side-effecting pattern guard — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X26 Unsynchronised callback handoff — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and 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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 76 further occurrence(s) are not listed individually; the score already reflects all 116.
X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
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.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
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.
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.
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.
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.
+ 85 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with offerUpdate._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 2 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.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 75 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 5 bodies over 120 down to 120 or less in Cognitive Complexity — start with _updateOfferPrice (cognitive 237), dashBoard._healthChart::handleAjaxResponse (cognitive 232), offerUpdate._activeItemChanged (cognitive 182). — 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 5 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.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
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.
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).
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).
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).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
434 duplicated block group(s) detected. 22.5 % of the production lines (15,172 of 67,571) are in a reported copy. A further 190 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
+ 211 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 44 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with ocs_rating.erl (7), mod_ocs_rest_get.erl (7), ocs_log.erl (6). — One of this dimension's main actionable groups (44 warning-level).
Resolve the 37 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with ocs_log.erl (17), ocs_rating.erl (4), ocs_mib.erl (2). — One of this dimension's main actionable groups (37 warning-level).
Resolve the 36 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with ocs_log.erl (6), ocs_rating.erl (6), ocs_diameter_auth_port_server.erl (3). — One of this dimension's main actionable groups (36 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
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.
REDACTED scan ran and found no leaked secrets. 1 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
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
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.
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.
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.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.
1 naming inconsistencies among 15 declarations measured against a convention their peers follow.
`classID` spells `ID` where 14 names in the project spell it `Id`priv/www/src/sig-policy-add.js:210
What to do
Resolve the 1 `classID` spells `ID` where 14 names in the project spell it `Id` finding(s) in Naming Consistency — start with sig-policy-add.js. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
0 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
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.
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
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
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.
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.
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.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 4 Change coupling finding(s) in Change Coupling — start with ocs_diameter_eap_application_cb.erl, mod_ocs_rest_accepted_content.erl, ocs_diameter_acct_service_fsm.erl. — One of this dimension's main actionable groups (4 warning-level).
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).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with ocs_diameter_3gpp_sta_application_cb.erl. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
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.
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.
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.
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.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether 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.
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.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
The root README is 10 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, 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. — README:1
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.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Do you agree with this assessment?
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.
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.
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`).
Do you agree with this assessment?
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.
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): 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. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. 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.
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
handleAjaxResponse has cyclomatic complexity 22 and cognitive complexity 59; 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-list.js:178
_updateAlterationsDialog has cyclomatic complexity 22 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. — REDACTED:1536
_addServiceResponse has cyclomatic complexity 20 and cognitive complexity 44; 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:701
_updateAddAlteration has cyclomatic complexity 19 and cognitive complexity 11; 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. — REDACTED:3581
updateSubscriberProduct has cyclomatic complexity 17 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-update.js:793
updateSubscriberBalance has cyclomatic complexity 17 and cognitive complexity 32; 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:542
_loadingChanged has cyclomatic complexity 17 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 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:861
_addProductResponse has cyclomatic complexity 16 and cognitive complexity 31; 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:805
_tableAdd has cyclomatic complexity 16 and cognitive complexity 15; 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. (×3) — priv/www/src/sig-period-table-add.js:125, priv/www/src/sig-rate-table-add.js:125, priv/www/src/sig-roaming-table-add.js:125
_add has cyclomatic complexity 15 and cognitive complexity 31; 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-add.js:217
updateAltsDialog has cyclomatic complexity 15 and cognitive complexity 13; 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:1199
_bucketAddSubmit has cyclomatic complexity 14 and cognitive complexity 21; 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-add.js:261
handleAjaxResponse has cyclomatic complexity 13 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 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-accounting-list.js:367
_checkRecurringAlt has cyclomatic complexity 13 and cognitive complexity 15; 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:1941
checkRecurringAlt has cyclomatic complexity 13 and cognitive complexity 15; 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:3147
_tableAdd has cyclomatic complexity 13 and cognitive complexity 12; 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-policy-table-add.js:123
_updateUserSubmit has cyclomatic complexity 11 and cognitive complexity 20; 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-user-update.js:194
updateClientAuth has cyclomatic complexity 11 and cognitive complexity 18; 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-client-update.js:271
Do you agree with this assessment?
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.
Do you agree with this assessment?
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).
Do you agree with this assessment?
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.
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.
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)
Do you agree with this assessment?
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).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 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 — 86 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
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .erl source were not judged.
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.
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.
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
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
ES2 Immutable events — not applicable — the code was read and holds no persisted event, so there is nothing for this check to judge
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 — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `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 scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: 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.
X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 24% of this repository's production lines — erlang (67,571 lines), c (413 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 24% of this repository's production lines — erlang (67,571 lines), c (413 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — 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.
X21 Side-effecting pattern guard — X21 reached only 24% of this repository's production lines — erlang (67,571 lines), c (413 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not 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
X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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 — 6 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.
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.
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: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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:386` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:1571` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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_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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_log.erl:858` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_log.erl:2276` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_log.erl:3518` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_pgw_fsm.erl:295` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_pgw_fsm.erl:336` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rating.erl:2800` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_product.erl:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_resource.erl:968` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) 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.
Duplicated block (5 lines × 2) src/ocs_diameter_3gpp_s6a_application_cb.erl:622— src/ocs_diameter_3gpp_s6a_application_cb.erl:622-626 | src/ocs_eap_aka_auc_fsm.erl:590-594 — 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_s6a_application_cb.erl:638— src/ocs_diameter_3gpp_s6a_application_cb.erl:638-642 | src/ocs_eap_aka_auc_fsm.erl:606-610 — 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_eap_aka_fsm_sup.erl:61— src/ocs_eap_aka_fsm_sup.erl:61-66 | src/ocs_eap_akap_fsm_sup.erl:61-65 — before extracting anything, compare `src/ocs_eap_aka_fsm_sup.erl` and `src/ocs_eap_akap_fsm_sup.erl` as WHOLE FILES: 91% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm_sup.erl:61` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) src/ocs_radius_acct_top_sup.erl:60— src/ocs_radius_acct_top_sup.erl:60-64 | src/ocs_radius_auth_sup.erl:60-64 — before extracting anything, compare `src/ocs_radius_acct_top_sup.erl` and `src/ocs_radius_auth_sup.erl` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_radius_acct_top_sup.erl:60` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/ocs_rating.erl:3616— src/ocs_rating.erl:3616-3620 | src/ocs_scheduler.erl:231-235 — 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.
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) src/ocs_eap_ttls_aaah_fsm.erl: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.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:3465` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/ocs.erl:3472` calls `end_period` and `src/ocs.erl:3490` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) 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 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_acct_service_fsm.erl:290` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) 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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:403` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_pgw_fsm.erl:302` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
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: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_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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_simple_auth_fsm.erl:389` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/ocs_eap_aka_auc_fsm.erl:339— src/ocs_eap_aka_auc_fsm.erl:339-345 | src/ocs_eap_aka_auc_fsm.erl:372-378 — both copies are in the same file, so extract the block into 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 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 × 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1015` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) 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.
Duplicated block (7 lines × 2) src/ocs_rest_res_role.erl:70— src/ocs_rest_res_role.erl:70-76 | src/ocs_rest_res_user.erl:202-208 — 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 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_role.erl:70` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_deregister_fsm.erl:377` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:2268` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) 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_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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_pwd_fsm.erl:1180` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_pwd_fsm.erl:1190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_pgw_fsm.erl:255` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_pgw_fsm.erl:279` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_pgw_fsm.erl:362` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) 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.
Duplicated block (6 lines × 2) src/ocs_rest_res_nrf.erl:235— src/ocs_rest_res_nrf.erl:235-240 | src/ocs_rest_res_nrf.erl:360-365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_nrf.erl:360` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/ocs_rest_res_role.erl:355— src/ocs_rest_res_role.erl:355-360 | src/ocs_rest_res_user.erl:470-475 — 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 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.
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.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:2118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_deregister_fsm.erl:188` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_ro_application_cb.erl:841` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_ro_application_cb.erl:858` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_ro_application_cb.erl:870` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1017` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) 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 330 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 330 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_log.erl:991` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) 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/mod_ocs_rest_patch.erl:178— src/mod_ocs_rest_patch.erl:178-187 | src/mod_ocs_rest_patch.erl:219-228 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
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 206 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_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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_deregister_fsm.erl:190` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_auth_port_server.erl:488` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:540` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 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 330 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_nrf.erl:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 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 209 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 209 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 209 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 209 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_rating.erl:720— src/ocs_rating.erl:720-728 | src/ocs_rating.erl:872-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 (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_ro_application_cb.erl:682` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 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 216 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.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:1372` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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 330 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_balance.erl:330` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_nrf.erl:386` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) 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 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_service.erl:310` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_simple_auth_fsm.erl:397` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/ocs_rating.erl:3474— src/ocs_rating.erl:3474-3484 | src/ocs_rating.erl:3495-3505 — both copies are in the same file, so extract the block into 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/mod_ocs_rest_get.erl:570— src/mod_ocs_rest_get.erl:570-580 | src/mod_ocs_rest_head.erl:315-325 — before extracting anything, compare `src/mod_ocs_rest_get.erl` and `src/mod_ocs_rest_head.erl` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 143 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_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 216 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 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_user.erl:322` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_product.erl:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) 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 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_sta_application_cb.erl:109` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:3390` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/ocs.erl:3472` calls `end_period` and `src/ocs.erl:3490` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 3) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1009` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_codec_s6b.erl:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_codec_s6b.erl:111` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_codec_s6b.erl:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_codec_s6b.erl:191` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_codec_s6b.erl:232` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_codec_s6b.erl:271` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_codec_s6b.erl:310` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_codec_s6b.erl:349` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) 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_diameter_cc_application_cb.erl:163— src/ocs_diameter_cc_application_cb.erl:163-168 | src/ocs_diameter_eap_application_cb.erl:157-162 | src/ocs_diameter_nas_application_cb.erl:156-161 — before extracting anything, compare `src/ocs_diameter_cc_application_cb.erl` and `src/ocs_diameter_eap_application_cb.erl` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:431` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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_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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_radius_auth_port_server.erl:457` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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 — before extracting anything, compare `src/ocs_diameter_acct_service_fsm_sup.erl` and `src/ocs_diameter_auth_service_fsm_sup.erl` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_acct_service_fsm_sup.erl:60` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_auth_port_server.erl:386` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 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 — before extracting anything, compare `src/ocs_diameter_auth_port_sup.erl` and `src/ocs_radius_auth_port_sup.erl` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_auth_port_sup.erl:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×10
Edited copy of a member (10 corresponding lines) src/ocs.erl:371— src/ocs.erl:371-381 | src/ocs.erl:1796-1805 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/ocs_log.erl:1309— src/ocs_log.erl:1309-1318 | src/ocs_log.erl:1328-1338 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/ocs_rest_res_product.erl:965— src/ocs_rest_res_product.erl:965-974 | src/ocs_rest_res_resource.erl:952-961 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/ocs_gtt.erl:142— src/ocs_gtt.erl:142-151 | src/ocs_gtt.erl:178-194 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/ocs.erl:1425— src/ocs.erl:1425-1438 | src/ocs.erl:1698-1707 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/ocs_eap_aka_auc_fsm.erl:743— src/ocs_eap_aka_auc_fsm.erl:743-752 | src/ocs_eap_aka_auc_fsm.erl:781-791 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/ocs_rest_res_resource.erl:216— src/ocs_rest_res_resource.erl:216-225 | src/ocs_rest_res_resource.erl:264-273 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/ocs_log.erl:6029— src/ocs_log.erl:6029-6038 | src/ocs_log.erl:6430-6439 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/ocs_log.erl:6441— src/ocs_log.erl:6441-6450 | src/ocs_log.erl:6464-6473 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/ocs_log.erl:6074— src/ocs_log.erl:6074-6083 | src/ocs_log.erl:6755-6765 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×10
Edited copy of a member (4 corresponding lines) src/ocs_log.erl:4483— src/ocs_log.erl:4483-4486 | src/ocs_rest_res_http.erl:113-116 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/ocs_log.erl:4478— src/ocs_log.erl:4478-4481 | src/ocs_rest_res_http.erl:108-111 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/ocs_log.erl:4473— src/ocs_log.erl:4473-4476 | src/ocs_rest_res_http.erl:103-106 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/ocs_log.erl:4488— src/ocs_log.erl:4488-4491 | src/ocs_rest_res_http.erl:118-121 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/ocs_log.erl:4493— src/ocs_log.erl:4493-4496 | src/ocs_rest_res_http.erl:123-126 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/ocs_log.erl:4503— src/ocs_log.erl:4503-4506 | src/ocs_rest_res_http.erl:133-136 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/ocs_log.erl:4498— src/ocs_log.erl:4498-4501 | src/ocs_rest_res_http.erl:128-131 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/ocs.erl:3555— src/ocs.erl:3555-3558 | src/ocs_rest_res_role.erl:272-275 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/ocs_diameter_eap_application_cb.erl:354— src/ocs_diameter_eap_application_cb.erl:354-357 | src/ocs_diameter_nas_application_cb.erl:319-322 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (4 corresponding lines) src/ocs_eap_akap_fsm_sup_sup.erl:42— src/ocs_eap_akap_fsm_sup_sup.erl:42-45 | src/ocs_log_rotate_sup.erl:49-52 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
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.
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 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_service.erl:323` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 3) 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_pgw_fsm.erl:247— src/ocs_pgw_fsm.erl:247-255 | src/ocs_pgw_fsm.erl:265-273 | src/ocs_pgw_fsm.erl:281-289 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_pgw_fsm.erl:247` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) src/ocs_pgw_fsm.erl:354— src/ocs_pgw_fsm.erl:354-362 | src/ocs_pgw_fsm.erl:372-380 | src/ocs_pgw_fsm.erl:388-396 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_pgw_fsm.erl:354` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) src/ocs_simple_auth_fsm.erl:404— src/ocs_simple_auth_fsm.erl:404-412 | src/ocs_simple_auth_fsm.erl:423-431 | src/ocs_simple_auth_fsm.erl:442-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_simple_auth_fsm.erl:404` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) 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 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_product.erl:631` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) 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 151 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_auth_port_server.erl:244` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_akap_fsm.erl:391` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/ocs_eap_akap_fsm.erl:402` calls `decrypt_imsi`, `compressed_imsi` and `src/ocs_eap_akap_fsm.erl:390` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_log.erl:3509` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) 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 — before extracting anything, compare `src/ocs_radius_acct_server_sup.erl` and `src/ocs_radius_auth_server_sup.erl` as WHOLE FILES: 90% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_hub_balance.erl:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_hub_product.erl:95` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_hub_resource.erl:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_hub_service.erl:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_hub_usage.erl:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_hub_user.erl:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_scheduler.erl:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication· 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· Edited copy of a member (6 corresponding lines) · ×7
Edited copy of a member (6 corresponding lines) src/ocs_diameter_auth_port_server.erl:373— src/ocs_diameter_auth_port_server.erl:373-380 | src/ocs_radius_auth_port_server.erl:448-453 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) src/ocs.erl:3269— src/ocs.erl:3269-3274 | src/ocs.erl:3287-3292 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) src/ocs_diameter_acct_port_sup.erl:52— src/ocs_diameter_acct_port_sup.erl:52-57 | src/ocs_radius_acct_port_sup.erl:52-58 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) src/ocs_eap_codec.erl:345— src/ocs_eap_codec.erl:345-350 | src/ocs_eap_codec.erl:357-362 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) src/ocs_log.erl:7319— src/ocs_log.erl:7319-7324 | src/ocs_log.erl:7340-7345 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) src/user_default.erl:275— src/user_default.erl:275-281 | src/ocs_rest_res_health.erl:555-560 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) src/ocs_diameter_3gpp_ro_application_cb.erl:934— src/ocs_diameter_3gpp_ro_application_cb.erl:934-939 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:2082-2087 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1312` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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 209 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 — before extracting anything, compare `src/ocs_diameter_acct_port_sup.erl` and `src/ocs_radius_acct_port_sup.erl` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_acct_port_sup.erl:72` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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 — before extracting anything, compare `src/ocs_event_log_sup.erl` and `src/ocs_rest_hub_sup.erl` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_event_log_sup.erl:42` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_product.erl:993` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 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· Edited copy of a member (14 corresponding lines) · ×6
Edited copy of a member (14 corresponding lines) src/ocs_log.erl:2089— src/ocs_log.erl:2089-2102 | src/ocs_log.erl:2388-2403 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/ocs.erl:1474— src/ocs.erl:1474-1487 | src/ocs_gtt.erl:317-330 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/ocs_rest_res_product.erl:349— src/ocs_rest_res_product.erl:349-362 | src/ocs_rest_res_product.erl:404-417 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/ocs_rest_res_usage.erl:3481— src/ocs_rest_res_usage.erl:3481-3494 | src/ocs_rest_res_user.erl:520-533 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/user_default.erl:309— src/user_default.erl:309-322 | src/user_default.erl:330-345 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/ocs_rest_res_balance.erl:192— src/ocs_rest_res_balance.erl:192-205 | src/ocs_rest_res_client.erl:56-69 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 11+ corresponding lines) · ×6
Edited copies of one member (8 members, 11+ corresponding lines) src/ocs_diameter_codec_s6b.erl:68— src/ocs_diameter_codec_s6b.erl:68-78 | src/ocs_diameter_codec_s6b.erl:109-119 | src/ocs_diameter_codec_s6b.erl:148-158 | src/ocs_diameter_codec_s6b.erl:189-199 | src/ocs_diameter_codec_s6b.erl:230-240 | src/ocs_diameter_codec_s6b.erl:269-279 | src/ocs_diameter_codec_s6b.erl:308-318 | src/ocs_diameter_codec_s6b.erl:347-357 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
Edited copies of one member (8 members, 11+ corresponding lines) src/ocs_diameter_codec_sta.erl:68— src/ocs_diameter_codec_sta.erl:68-78 | src/ocs_diameter_codec_sta.erl:109-119 | src/ocs_diameter_codec_sta.erl:148-158 | src/ocs_diameter_codec_sta.erl:189-199 | src/ocs_diameter_codec_sta.erl:230-240 | src/ocs_diameter_codec_sta.erl:269-279 | src/ocs_diameter_codec_sta.erl:308-318 | src/ocs_diameter_codec_sta.erl:347-357 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
Edited copies of one member (8 members, 11+ corresponding lines) src/ocs_diameter_codec_swm.erl:68— src/ocs_diameter_codec_swm.erl:68-78 | src/ocs_diameter_codec_swm.erl:109-119 | src/ocs_diameter_codec_swm.erl:148-158 | src/ocs_diameter_codec_swm.erl:189-199 | src/ocs_diameter_codec_swm.erl:230-240 | src/ocs_diameter_codec_swm.erl:269-279 | src/ocs_diameter_codec_swm.erl:308-318 | src/ocs_diameter_codec_swm.erl:347-357 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
Edited copies of one member (8 members, 11+ corresponding lines) src/ocs_diameter_codec_s6b.erl:46— src/ocs_diameter_codec_s6b.erl:46-56 | src/ocs_diameter_codec_s6b.erl:88-98 | src/ocs_diameter_codec_s6b.erl:128-138 | src/ocs_diameter_codec_s6b.erl:168-178 | src/ocs_diameter_codec_s6b.erl:209-219 | src/ocs_diameter_codec_s6b.erl:249-259 | src/ocs_diameter_codec_s6b.erl:288-298 | src/ocs_diameter_codec_s6b.erl:327-337 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
Edited copies of one member (8 members, 11+ corresponding lines) src/ocs_diameter_codec_sta.erl:46— src/ocs_diameter_codec_sta.erl:46-56 | src/ocs_diameter_codec_sta.erl:88-98 | src/ocs_diameter_codec_sta.erl:128-138 | src/ocs_diameter_codec_sta.erl:168-178 | src/ocs_diameter_codec_sta.erl:209-219 | src/ocs_diameter_codec_sta.erl:249-259 | src/ocs_diameter_codec_sta.erl:288-298 | src/ocs_diameter_codec_sta.erl:327-337 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
Edited copies of one member (8 members, 11+ corresponding lines) src/ocs_diameter_codec_swm.erl:46— src/ocs_diameter_codec_swm.erl:46-56 | src/ocs_diameter_codec_swm.erl:88-98 | src/ocs_diameter_codec_swm.erl:128-138 | src/ocs_diameter_codec_swm.erl:168-178 | src/ocs_diameter_codec_swm.erl:209-219 | src/ocs_diameter_codec_swm.erl:249-259 | src/ocs_diameter_codec_swm.erl:288-298 | src/ocs_diameter_codec_swm.erl:327-337 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:369` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) 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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1087` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/ocs.erl:1164— src/ocs.erl:1164-1176 | src/ocs.erl:1266-1278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:1164` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) src/ocs.erl:1150— src/ocs.erl:1150-1162 | src/ocs.erl:1252-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:1150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/ocs.erl:1250` calls `read`, `list_to_binary` and `src/ocs.erl:1149` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11 lines × 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 11 separate duplicated blocks between them, totalling at least 143 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_auth_port_server.erl:647` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_radius_auth_port_server.erl:463` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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 238 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_terminate_fsm.erl:230` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 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.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:3428` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (6–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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_pgw_fsm.erl:244` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6–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· Edited copy of a member (11 corresponding lines) · ×5
Edited copy of a member (11 corresponding lines) src/ocs_log.erl:844— src/ocs_log.erl:844-855 | src/ocs_log.erl:1082-1092 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/ocs_log.erl:1917— src/ocs_log.erl:1917-1927 | src/ocs_log.erl:2160-2173 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/user_default.erl:528— src/user_default.erl:528-538 | src/user_default.erl:558-568 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/ocs_rest_res_hub_product.erl:134— src/ocs_rest_res_hub_product.erl:134-149 | src/ocs_rest_res_hub_product.erl:237-247 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) src/ocs_rating.erl:3002— src/ocs_rating.erl:3002-3012 | src/ocs_rating.erl:3019-3029 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×5
Edited copy of a member (7 corresponding lines) src/ocs_rest.erl:335— src/ocs_rest.erl:335-343 | src/ocs_rest.erl:383-389 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/ocs_rest_res_balance.erl:927— src/ocs_rest_res_balance.erl:927-933 | src/ocs_rest_res_balance.erl:965-971 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/ocs_rest_res_usage.erl:1745— src/ocs_rest_res_usage.erl:1745-1751 | src/ocs_rest_res_usage.erl:1754-1760 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/ocs_log.erl:914— src/ocs_log.erl:914-924 | src/ocs_log.erl:4613-4619 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) src/ocs_radius_authentication.erl:60— src/ocs_radius_authentication.erl:60-66 | src/ocs_radius_accounting.erl:51-57 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
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 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_sta_application_cb.erl:292` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_auth_port_server.erl:742` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_auth_port_server.erl:758` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) 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.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:1822` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) 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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:411` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:571` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_akap_fsm.erl:588` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) 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 330 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_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 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_s6b_application_cb.erl:253` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1272` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 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.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_nrf.erl:176` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 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_log.erl:6888— src/ocs_log.erl:6888-6894 | src/ocs_log.erl:6924-6930 | src/ocs_log.erl:6954-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 (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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/ocs_rest_res_user.erl:132` calls `get_user` and `src/ocs_rest_res_client.erl:133` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:575` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/ocs_eap_aka_fsm.erl:881` calls `cast`, `self` and `src/ocs_eap_aka_fsm.erl:895` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 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 330 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.
Duplicated block (6 lines × 4) 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 — 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 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.
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 72% of the time (18 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 18 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 58% of the time (63 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 63 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 55% of the time (34 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 34 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: 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· Edited copy of a member (29 corresponding lines) · ×4
Edited copy of a member (29 corresponding lines) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1008— src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1008-1038 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1164-1192 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) src/ocs_log.erl:857— src/ocs_log.erl:857-886 | src/ocs_log.erl:1094-1122 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) src/ocs_rest_res_role.erl:323— src/ocs_rest_res_role.erl:323-352 | src/ocs_rest_res_user.erl:439-467 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (29 corresponding lines) src/ocs_rest_res_role.erl:61— src/ocs_rest_res_role.erl:61-90 | src/ocs_rest_res_user.erl:194-222 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×4
Edited copy of a member (26 corresponding lines) src/ocs_log.erl:990— src/ocs_log.erl:990-1016 | src/ocs_log.erl:1257-1282 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) src/ocs.erl:203— src/ocs.erl:203-228 | src/ocs.erl:238-264 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) src/ocs.erl:2454— src/ocs.erl:2454-2479 | src/ocs.erl:2500-2527 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (26 corresponding lines) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1996— src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1996-2022 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:2025-2050 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×4
Edited copy of a member (25 corresponding lines) src/ocs_rest_res_usage.erl:965— src/ocs_rest_res_usage.erl:965-989 | src/ocs_rest_res_usage.erl:992-1021 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/ocs_rest_res_resource.erl:749— src/ocs_rest_res_resource.erl:749-773 | src/ocs_rest_res_resource.erl:903-935 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/ocs_rest_res_nrf.erl:208— src/ocs_rest_res_nrf.erl:208-232 | src/ocs_rest_res_nrf.erl:333-357 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (25 corresponding lines) src/ocs_diameter_eap_application_cb.erl:319— src/ocs_diameter_eap_application_cb.erl:319-343 | src/ocs_diameter_nas_application_cb.erl:284-308 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×4
Edited copy of a member (17 corresponding lines) src/ocs_log.erl:939— src/ocs_log.erl:939-957 | src/ocs_log.erl:1210-1226 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/ocs_log.erl:1516— src/ocs_log.erl:1516-1532 | src/ocs_log.erl:1534-1553 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/ocs_app.erl:57— src/ocs_app.erl:57-77 | src/ocs_app.erl:88-104 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/ocs.erl:2481— src/ocs.erl:2481-2498 | src/ocs.erl:2529-2545 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×4
Edited copy of a member (8 corresponding lines) src/ocs_diameter_3gpp_ro_application_cb.erl:1287— src/ocs_diameter_3gpp_ro_application_cb.erl:1287-1294 | src/ocs_log.erl:7059-7066 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/ocs_diameter_auth_port_server.erl:117— src/ocs_diameter_auth_port_server.erl:117-124 | src/ocs_radius_auth_port_server.erl:95-103 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/ocs_deregister_fsm.erl:118— src/ocs_deregister_fsm.erl:118-125 | src/ocs_terminate_fsm.erl:104-112 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) src/ocs_diameter_eap_application_cb.erl:360— src/ocs_diameter_eap_application_cb.erl:360-367 | src/ocs_diameter_nas_application_cb.erl:325-332 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×4
Edited copy of a member (16 corresponding lines) src/ocs_diameter_3gpp_sta_application_cb.erl:219— src/ocs_diameter_3gpp_sta_application_cb.erl:219-234 | src/ocs_diameter_3gpp_swm_application_cb.erl:218-234 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/ocs_eap_aka_auc_fsm.erl:690— src/ocs_eap_aka_auc_fsm.erl:690-705 | src/ocs_eap_aka_auc_fsm.erl:763-779 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/ocs.erl:411— src/ocs.erl:411-426 | src/ocs.erl:1079-1099 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) src/ocs_rest_res_balance.erl:123— src/ocs_rest_res_balance.erl:123-138 | src/ocs_rest_res_service.erl:192-207 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 14+ corresponding lines) · ×4
Edited copies of one member (3 members, 14+ corresponding lines) src/ocs_rest.erl:318— src/ocs_rest.erl:318-333 | src/ocs_rest.erl:345-358 | src/ocs_rest.erl:368-381 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) src/ocs_rating.erl:3203— src/ocs_rating.erl:3203-3219 | src/ocs_rating.erl:3253-3269 | src/ocs_rating.erl:3282-3295 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) src/ocs_log.erl:5560— src/ocs_log.erl:5560-5573 | src/ocs_log.erl:5671-5684 | src/ocs_log.erl:5781-5794 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) src/ocs_log.erl:5593— src/ocs_log.erl:5593-5606 | src/ocs_log.erl:5704-5717 | src/ocs_log.erl:5814-5827 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×4
Edited copies of one member (3 members, 11+ corresponding lines) src/ocs_rest_res_resource.erl:938— src/ocs_rest_res_resource.erl:938-949 | src/ocs_rest_res_resource.erl:964-976 | src/ocs_rest_res_resource.erl:979-989 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) src/ocs_log.erl:2430— src/ocs_log.erl:2430-2440 | src/ocs_log.erl:2442-2452 | src/ocs_log.erl:2454-2464 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) src/ocs_rest_res_product.erl:1012— src/ocs_rest_res_product.erl:1012-1023 | src/ocs_rest_res_product.erl:1068-1079 | src/ocs_rest_res_service.erl:416-426 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) src/ocs_rest_res_resource.erl:736— src/ocs_rest_res_resource.erl:736-746 | src/ocs_rest_res_resource.erl:838-848 | src/ocs_rest_res_resource.erl:890-900 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:1993` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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.
Duplicated block (18 lines × 2) src/ocs_rating.erl:260— src/ocs_rating.erl:260-277 | src/ocs_rating.erl:299-316 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) 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 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_acct_service_fsm.erl:103` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_eap_application_cb.erl:320` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1304` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) 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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1320` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) 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 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 (14 lines × 2) src/ocs_log.erl:1759— src/ocs_log.erl:1759-1772 | src/ocs_log.erl:1868-1881 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 3) 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:2124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_service.erl:314` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 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 238 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_product.erl:219` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
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.
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· Edited copy of a member (15 corresponding lines) · ×3
Edited copy of a member (15 corresponding lines) src/ocs_log.erl:1929— src/ocs_log.erl:1929-1946 | src/ocs_log.erl:2175-2189 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/ocs_eap_ttls_fsm.erl:675— src/ocs_eap_ttls_fsm.erl:675-689 | src/ocs_eap_ttls_fsm.erl:914-928 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) src/ocs_rest_res_client.erl:143— src/ocs_rest_res_client.erl:143-157 | src/ocs_rest_res_client.erl:408-426 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×3
Edited copy of a member (13 corresponding lines) src/ocs_log.erl:1472— src/ocs_log.erl:1472-1484 | src/ocs_log.erl:1486-1500 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/ocs_app.erl:628— src/ocs_app.erl:628-640 | src/ocs_app.erl:1023-1035 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/ocs_diameter_acct_service_fsm.erl:199— src/ocs_diameter_acct_service_fsm.erl:199-212 | src/ocs_diameter_auth_service_fsm.erl:217-229 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×3
Edited copies of one member (3 members, 12+ corresponding lines) src/ocs_gtt.erl:204— src/ocs_gtt.erl:204-215 | src/ocs_gtt.erl:225-240 | src/ocs_gtt.erl:250-261 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) src/ocs_app.erl:1138— src/ocs_app.erl:1138-1149 | src/ocs_app.erl:1151-1162 | src/ocs_app.erl:1164-1175 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 12+ corresponding lines) src/ocs_app.erl:1225— src/ocs_app.erl:1225-1236 | src/ocs_app.erl:1238-1249 | src/ocs_app.erl:1251-1262 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×3
Edited copies of one member (3 members, 9+ corresponding lines) src/ocs_log.erl:431— src/ocs_log.erl:431-439 | src/ocs_log.erl:698-706 | src/ocs_log.erl:1648-1657 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) src/ocs_rest_res_balance.erl:935— src/ocs_rest_res_balance.erl:935-943 | src/ocs_rest_res_balance.erl:945-953 | src/ocs_rest_res_balance.erl:955-963 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) src/ocs_event_log_fsm.erl:62— src/ocs_event_log_fsm.erl:62-70 | src/ocs_rest_hub_fsm.erl:68-76 | src/ocs_rest_hub_fsm.erl:88-96 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) src/ocs_rest_res_usage.erl:1618— src/ocs_rest_res_usage.erl:1618-1629 | src/ocs_rest_res_usage.erl:1921-1932 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/ocs_rest_res_product.erl:1287— src/ocs_rest_res_product.erl:1287-1301 | src/ocs_rest_res_product.erl:1315-1326 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/ocs.erl:2343— src/ocs.erl:2343-2354 | src/ocs_rest_res_nrf.erl:469-481 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×3
Edited copies of one member (3 members, 16+ corresponding lines) src/ocs_app.erl:139— src/ocs_app.erl:139-154 | src/ocs_app.erl:174-189 | src/ocs_app.erl:393-408 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) src/ocs_eap_pwd_fsm.erl:667— src/ocs_eap_pwd_fsm.erl:667-683 | src/ocs_eap_pwd_fsm.erl:703-718 | src/ocs_eap_pwd_fsm.erl:902-918 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 16+ corresponding lines) src/ocs_rest_res_resource.erl:616— src/ocs_rest_res_resource.erl:616-631 | src/ocs_rest_res_role.erl:104-119 | src/ocs_rest_res_user.erl:320-335 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1337` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 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.
Duplicated block (12 lines × 3) src/ocs_deregister_fsm.erl:213— src/ocs_deregister_fsm.erl:213-224 | src/ocs_deregister_fsm.erl:238-249 | src/ocs_deregister_fsm.erl:263-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_deregister_fsm.erl:213` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–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 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_sta_application_cb.erl:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 4) 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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1262` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) src/ocs_eap_aka_fsm.erl:452— src/ocs_eap_aka_fsm.erl:452-459 | src/ocs_eap_aka_fsm.erl:1101-1108 | src/ocs_eap_akap_fsm.erl:463-470 | src/ocs_eap_akap_fsm.erl:1119-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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:452` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 4) src/ocs_log.erl:6868— src/ocs_log.erl:6868-6875 | src/ocs_log.erl:6883-6890 | src/ocs_log.erl:6904-6911 | src/ocs_log.erl:6919-6926 — 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 × 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_pgw_fsm.erl:245` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_resource.erl:758` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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.
Complex function _tableAdd (cyclomatic 16, cognitive 15) priv/www/src/sig-period-table-add.js:125— _tableAdd has cyclomatic complexity 16 and cognitive complexity 15; 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.
Complex function _tableAdd (cyclomatic 16, cognitive 15) priv/www/src/sig-rate-table-add.js:125— _tableAdd has cyclomatic complexity 16 and cognitive complexity 15; 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.
Complex function _tableAdd (cyclomatic 16, cognitive 15) priv/www/src/sig-roaming-table-add.js:125— _tableAdd has cyclomatic complexity 16 and cognitive complexity 15; 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.
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.
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· Edited copy of a member (37 corresponding lines) · ×2
Edited copy of a member (37 corresponding lines) src/ocs_log.erl:3495— src/ocs_log.erl:3495-3531 | src/ocs_log.erl:3590-3639 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) src/ocs_rest_res_resource.erl:789— src/ocs_rest_res_resource.erl:789-835 | src/ocs_rest_res_resource.erl:851-887 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×2
Edited copy of a member (31 corresponding lines) src/ocs_log.erl:1737— src/ocs_log.erl:1737-1774 | src/ocs_log.erl:1853-1883 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) src/ocs_eap_aka_fsm.erl:1080— src/ocs_eap_aka_fsm.erl:1080-1110 | src/ocs_eap_akap_fsm.erl:1098-1128 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×2
Edited copy of a member (38 corresponding lines) src/ocs_diameter_auth_port_server.erl:738— src/ocs_diameter_auth_port_server.erl:738-775 | src/ocs_radius_auth_port_server.erl:535-572 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (38 corresponding lines) src/ocs_rest_res_product.erl:116— src/ocs_rest_res_product.erl:116-161 | src/ocs_rest_res_service.erl:63-100 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:983— src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:983-1006 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1134-1162 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/ocs_diameter_3gpp_ro_application_cb.erl:841— src/ocs_diameter_3gpp_ro_application_cb.erl:841-867 | src/ocs_diameter_3gpp_ro_application_cb.erl:870-893 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) src/ocs_rest_res_client.erl:349— src/ocs_rest_res_client.erl:349-370 | src/ocs_rest_res_client.erl:372-394 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) src/ocs_log.erl:3472— src/ocs_log.erl:3472-3493 | src/ocs_log.erl:3555-3576 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×2
Edited copy of a member (9 corresponding lines) src/ocs_diameter_auth_port_server.erl:300— src/ocs_diameter_auth_port_server.erl:300-310 | src/ocs_radius_auth_port_server.erl:270-278 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/ocs_rest_res_product.erl:1001— src/ocs_rest_res_product.erl:1001-1009 | src/ocs_rest_res_product.erl:1082-1090 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×2
Edited copy of a member (18 corresponding lines) src/ocs.erl:633— src/ocs.erl:633-650 | src/ocs.erl:910-927 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/ocs_diameter_eap_application_cb.erl:246— src/ocs_diameter_eap_application_cb.erl:246-263 | src/ocs_diameter_nas_application_cb.erl:245-262 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×2
Edited copies of one member (3 members, 10+ corresponding lines) src/ocs_log.erl:5548— src/ocs_log.erl:5548-5558 | src/ocs_log.erl:5659-5669 | src/ocs_log.erl:5770-5779 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 10+ corresponding lines) src/ocs_rest_res_usage.erl:1763— src/ocs_rest_res_usage.erl:1763-1772 | src/ocs_rest_res_usage.erl:1802-1811 | src/ocs_rest_res_usage.erl:1824-1833 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×2
Edited copies of one member (3 members, 13+ corresponding lines) src/ocs.erl:484— src/ocs.erl:484-496 | src/ocs.erl:498-511 | src/ocs.erl:1052-1066 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 13+ corresponding lines) src/ocs_log.erl:959— src/ocs_log.erl:959-972 | src/ocs_log.erl:1228-1241 | src/ocs_log.erl:1243-1255 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×2
Edited copy of a member (5 corresponding lines) src/ocs_diameter_auth_port_sup.erl:105— src/ocs_diameter_auth_port_sup.erl:105-110 | src/ocs_sup.erl:111-115 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) src/ocs_eap_akap_fsm_sup_sup.erl:59— src/ocs_eap_akap_fsm_sup_sup.erl:59-63 | src/ocs_eap_ttls_fsm_sup_sup.erl:60-64 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 4+ corresponding lines) · ×2
Edited copies of one member (3 members, 4+ corresponding lines) src/ocs_diameter_acct_service_fsm_sup.erl:42— src/ocs_diameter_acct_service_fsm_sup.erl:42-45 | src/ocs_diameter_auth_service_fsm_sup.erl:42-45 | src/ocs_eap_ttls_fsm_sup.erl:42-46 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) src/ocs_diameter_acct_top_sup.erl:60— src/ocs_diameter_acct_top_sup.erl:60-63 | src/ocs_diameter_auth_sup.erl:60-63 | src/ocs_eap_aka_fsm_sup_sup.erl:60-63 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 4+ corresponding lines) · ×2
Edited copies of one member (4 members, 4+ corresponding lines) src/ocs_event_log_sup.erl:60— src/ocs_event_log_sup.erl:60-63 | src/ocs_rest_hub_sup.erl:60-63 | src/ocs_rest_pagination_sup.erl:60-63 | src/ocs_statistics_sup.erl:60-63 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 4+ corresponding lines) src/ocs.erl:3654— src/ocs.erl:3654-3657 | src/ocs_event_log_fsm.erl:211-214 | src/ocs_rest_hub_fsm.erl:348-352 | src/ocs_rest_res_nrf.erl:1324-1327 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:1925` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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.
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 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_role.erl:168` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (30 lines × 2) src/ocs_log.erl:6858— src/ocs_log.erl:6858-6887 | src/ocs_log.erl:6894-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.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_deregister_fsm.erl:211` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_ro_application_cb.erl:263` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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.
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 6 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 (20 lines × 2) src/ocs_diameter_acct_service_fsm.erl:331— src/ocs_diameter_acct_service_fsm.erl:331-350 | src/ocs_diameter_auth_service_fsm.erl:380-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 6 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 (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 11 separate duplicated blocks between them, totalling at least 143 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:1881` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1339` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) 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.
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 9 separate duplicated blocks between them, totalling at least 117 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.
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 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_s6b_application_cb.erl:189` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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 206 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–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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (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.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:1903` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (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.
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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 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.
Duplicated block (11 lines × 4) src/ocs_log.erl:4200— src/ocs_log.erl:4200-4210 | src/ocs_log.erl:4219-4229 | src/ocs_log.erl:4318-4328 | src/ocs_log.erl:4456-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.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:2056` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:441` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/ocs_diameter_auth_port_server.erl:645` calls `which_children`, `keyfind` and `src/ocs_diameter_auth_port_server.erl:695` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_radius_auth_port_server.erl:463` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/ocs_radius_auth_port_server.erl:461` calls `which_children`, `keyfind` and `src/ocs_radius_auth_port_server.erl:514` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8–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.
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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1389` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_auth_port_server.erl:570` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 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 206 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_health.erl:471` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 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 206 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 × 5) 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 — 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 206 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/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 8 separate duplicated blocks between them, totalling at least 102 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.
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 206 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_terminate_fsm.erl:231` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/ocs_rest_res_hub_role.erl:199` calls `is_list`, `length` and `src/ocs_rest_res_hub_balance.erl:204` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (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 — before extracting anything, compare `src/ocs_deregister_fsm_sup.erl` and `src/ocs_diameter_disconnect_fsm_sup.erl` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_deregister_fsm_sup.erl:60` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1274` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (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.
Duplicated block (7 lines × 6) src/ocs_pgw_fsm.erl:253— src/ocs_pgw_fsm.erl:253-259 | src/ocs_pgw_fsm.erl:271-277 | src/ocs_pgw_fsm.erl:287-293 | src/ocs_pgw_fsm.erl:360-366 | src/ocs_pgw_fsm.erl:378-384 | src/ocs_pgw_fsm.erl:394-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_pgw_fsm.erl:253` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_health.erl:472` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
_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.
_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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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 src/ocs_diameter_3gpp_sta_application_cb.erl— `src/ocs_diameter_3gpp_sta_application_cb.erl` changes together with 3 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` — 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.
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.
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.
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.
Near-duplicate member pair (69 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: 69 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (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.
Near-duplicate member pair (46 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: 46 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (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.
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.
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· Edited copy of a member (93 corresponding lines) · ×1
Edited copy of a member (93 corresponding lines) src/ocs_diameter_acct_service_fsm.erl:372— src/ocs_diameter_acct_service_fsm.erl:372-466 | src/ocs_diameter_auth_service_fsm.erl:420-512 — These two members are one piece of code written twice and then edited apart: 93 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (48 corresponding lines) · ×1
Edited copy of a member (48 corresponding lines) src/ocs_rest_res_product.erl:1635— src/ocs_rest_res_product.erl:1635-1690 | src/ocs_rest_res_product.erl:1785-1832 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (56 corresponding lines) · ×1
Edited copy of a member (56 corresponding lines) src/ocs_log.erl:2191— src/ocs_log.erl:2191-2255 | src/ocs_log.erl:2331-2386 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (75 corresponding lines) · ×1
Edited copy of a member (75 corresponding lines) src/ocs_rest_res_product.erl:1692— src/ocs_rest_res_product.erl:1692-1773 | src/ocs_rest_res_product.erl:1834-1908 — These two members are one piece of code written twice and then edited apart: 75 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (71 corresponding lines) · ×1
Edited copy of a member (71 corresponding lines) src/ocs_mib.erl:431— src/ocs_mib.erl:431-507 | src/ocs_mib.erl:509-579 — These two members are one piece of code written twice and then edited apart: 71 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) src/ocs_rest_res_balance.erl:626— src/ocs_rest_res_balance.erl:626-660 | src/ocs_rest_res_balance.erl:737-774 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) src/ocs_eap_aka_auc_fsm.erl:445— src/ocs_eap_aka_auc_fsm.erl:445-488 | src/ocs_eap_aka_auc_fsm.erl:500-533 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) src/ocs_diameter_auth_port_server.erl:232— src/ocs_diameter_auth_port_server.erl:232-267 | src/ocs_radius_auth_port_server.erl:205-237 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 30+ corresponding lines) · ×1
Edited copies of one member (7 members, 30+ corresponding lines) src/ocs_rest_res_hub_balance.erl:85— src/ocs_rest_res_hub_balance.erl:85-114 | src/ocs_rest_res_hub_product.erl:89-118 | src/ocs_rest_res_hub_product.erl:192-221 | src/ocs_rest_res_hub_resource.erl:87-116 | src/ocs_rest_res_hub_service.erl:87-116 | src/ocs_rest_res_hub_usage.erl:87-116 | src/ocs_rest_res_hub_user.erl:87-116 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×1
Edited copy of a member (23 corresponding lines) src/ocs_log.erl:6046— src/ocs_log.erl:6046-6068 | src/ocs_log.erl:6334-6356 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) src/ocs_pgw_fsm.erl:513— src/ocs_pgw_fsm.erl:513-554 | src/ocs_terminate_fsm.erl:350-381 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) src/ocs_log.erl:2046— src/ocs_log.erl:2046-2072 | src/ocs_log.erl:2303-2329 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) src/ocs_eap_pwd_fsm.erl:1178— src/ocs_eap_pwd_fsm.erl:1178-1197 | src/ocs_simple_auth_fsm.erl:536-556 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 17+ corresponding lines) · ×1
Edited copies of one member (4 members, 17+ corresponding lines) src/ocs_log.erl:5448— src/ocs_log.erl:5448-5464 | src/ocs_log.erl:5575-5591 | src/ocs_log.erl:5686-5702 | src/ocs_log.erl:5796-5812 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 28+ corresponding lines) · ×1
Edited copies of one member (4 members, 28+ corresponding lines) src/ocs_log.erl:5495— src/ocs_log.erl:5495-5524 | src/ocs_log.erl:5608-5635 | src/ocs_log.erl:5719-5746 | src/ocs_log.erl:5829-5864 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) src/ocs_rest_res_product.erl:1026— src/ocs_rest_res_product.erl:1026-1044 | src/ocs_rest_res_product.erl:1047-1065 | src/ocs_rest_res_product.erl:1139-1156 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) src/ocs_diameter_acct_service_fsm.erl:97— src/ocs_diameter_acct_service_fsm.erl:97-117 | src/ocs_diameter_auth_service_fsm.erl:115-135 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) src/ocs_diameter_3gpp_ro_application_cb.erl:1207— src/ocs_diameter_3gpp_ro_application_cb.erl:1207-1225 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:878-898 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 22+ corresponding lines) · ×1
Edited copies of one member (4 members, 22+ corresponding lines) src/ocs_rest_res_product.erl:74— src/ocs_rest_res_product.erl:74-102 | src/ocs_rest_res_product.erl:175-198 | src/ocs_rest_res_product.erl:212-235 | src/ocs_rest_res_service.erl:114-135 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 14+ corresponding lines) · ×1
Edited copies of one member (5 members, 14+ corresponding lines) src/ocs_rest_res_usage.erl:1632— src/ocs_rest_res_usage.erl:1632-1645 | src/ocs_rest_res_usage.erl:1698-1711 | src/ocs_rest_res_usage.erl:1714-1732 | src/ocs_rest_res_usage.erl:1836-1852 | src/ocs_rest_res_usage.erl:2064-2077 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) src/ocs_rest_res_product.erl:459— src/ocs_rest_res_product.erl:459-475 | src/ocs_rest_res_product.erl:629-645 | src/ocs_rest_res_service.erl:383-399 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 18+ corresponding lines) · ×1
Edited copies of one member (5 members, 18+ corresponding lines) src/mod_ocs_rest_delete.erl:94— src/mod_ocs_rest_delete.erl:94-111 | src/mod_ocs_rest_get.erl:147-168 | src/mod_ocs_rest_head.erl:141-162 | src/mod_ocs_rest_patch.erl:96-113 | src/mod_ocs_rest_post.erl:96-113 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) src/ocs_rest_res_usage.erl:921— src/ocs_rest_res_usage.erl:921-932 | src/ocs_rest_res_usage.erl:1024-1034 | src/ocs_rest_res_usage.erl:1036-1046 | src/ocs_rest_res_usage.erl:1108-1118 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×1
Edited copies of one member (3 members, 6+ corresponding lines) src/ocs_diameter_3gpp_gx_application_cb.erl:163— src/ocs_diameter_3gpp_gx_application_cb.erl:163-168 | src/ocs_diameter_3gpp_ro_application_cb.erl:176-183 | src/ocs_diameter_3gpp_s6a_application_cb.erl:175-180 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) src/ocs_diameter_auth_port_sup.erl:71— src/ocs_diameter_auth_port_sup.erl:71-77 | src/ocs_radius_acct_port_sup.erl:75-81 | src/ocs_radius_auth_port_sup.erl:68-74 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 9+ corresponding lines) · ×1
Edited copies of one member (5 members, 9+ corresponding lines) src/ocs_rest_res_usage.erl:1058— src/ocs_rest_res_usage.erl:1058-1066 | src/ocs_rest_res_usage.erl:1068-1076 | src/ocs_rest_res_usage.erl:1078-1086 | src/ocs_rest_res_usage.erl:1088-1096 | src/ocs_rest_res_usage.erl:1097-1105 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) src/ocs_rest_res_usage.erl:1433— src/ocs_rest_res_usage.erl:1433-1441 | src/ocs_rest_res_usage.erl:1443-1451 | src/ocs_rest_res_usage.erl:2024-2031 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 10+ corresponding lines) · ×1
Edited copies of one member (4 members, 10+ corresponding lines) src/ocs.erl:513— src/ocs.erl:513-522 | src/ocs.erl:1068-1077 | src/ocs.erl:1489-1498 | src/ocs_gtt.erl:332-341 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 6+ corresponding lines) · ×1
Edited copies of one member (4 members, 6+ corresponding lines) src/ocs_log.erl:5389— src/ocs_log.erl:5389-5394 | src/ocs_log.erl:5541-5546 | src/ocs_log.erl:5652-5657 | src/ocs_log.erl:5763-5768 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 4+ corresponding lines) · ×1
Edited copies of one member (7 members, 4+ corresponding lines) src/ocs_rest_res_hub_balance.erl:183— src/ocs_rest_res_hub_balance.erl:183-186 | src/ocs_rest_res_hub_product.erl:284-287 | src/ocs_rest_res_hub_resource.erl:184-187 | src/ocs_rest_res_hub_role.erl:177-180 | src/ocs_rest_res_hub_service.erl:184-187 | src/ocs_rest_res_hub_usage.erl:186-189 | src/ocs_rest_res_hub_user.erl:184-187 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 4+ corresponding lines) · ×1
Edited copies of one member (6 members, 4+ corresponding lines) src/mod_ocs_rest_accepted_content.erl:314— src/mod_ocs_rest_accepted_content.erl:314-317 | src/mod_ocs_rest_delete.erl:305-308 | src/mod_ocs_rest_get.erl:583-586 | src/mod_ocs_rest_head.erl:328-331 | src/mod_ocs_rest_patch.erl:351-354 | src/mod_ocs_rest_post.erl:358-361 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (2 corresponding lines) · ×1
Edited copy of a member (2 corresponding lines) src/ocs_event.erl:83— src/ocs_event.erl:83-84 | src/ocs_event_log.erl:81-83 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (45 lines × 2) src/ocs_diameter_acct_service_fsm.erl:144— src/ocs_diameter_acct_service_fsm.erl:144-188 | src/ocs_diameter_auth_service_fsm.erl:162-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 6 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_acct_service_fsm.erl:144` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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.
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.
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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1367` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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.
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.
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 206 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 (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.
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.
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 206 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_balance.erl:1141` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1259` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19–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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:2135` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_product.erl:870` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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 206 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 (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.
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.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_s6a_application_cb.erl:688` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5–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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:424` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/ocs_eap_akap_fsm.erl:450` calls `self` and `src/ocs_eap_pwd_fsm.erl:253` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (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.
Duplicated block (16–17 lines × 2) src/ocs_rest_res_role.erl:278— src/ocs_rest_res_role.erl:278-294 | src/ocs_rest_res_user.erl:358-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 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 (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.
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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:1877` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13–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.
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 206 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_balance.erl:1135` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 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 184 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_balance.erl:443` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:275` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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.
Duplicated block (29 lines × 2) src/ocs.erl:1205— src/ocs.erl:1205-1233 | src/ocs.erl:1313-1341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:1205` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 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 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_hub_balance.erl:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/ocs_rest_res_hub_resource.erl:161` calls `get_hub`, `whereis_name` and `src/ocs_rest_res_hub_product.erl:260` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 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 206 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_balance.erl:1067` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–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 8 separate duplicated blocks between them, totalling at least 102 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 (26 lines × 5) src/mod_ocs_rest_delete.erl:276— src/mod_ocs_rest_delete.erl:276-301 | src/mod_ocs_rest_get.erl:547-572 | src/mod_ocs_rest_head.erl:292-317 | src/mod_ocs_rest_patch.erl:322-347 | src/mod_ocs_rest_post.erl:329-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 8 separate duplicated blocks between them, totalling at least 102 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 × 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.
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.
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 206 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_balance.erl:1139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 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 206 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_balance.erl:1044` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 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 206 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_balance.erl:1125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_pwd_fsm.erl:1139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (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 47 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 (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 8 separate duplicated blocks between them, totalling at least 102 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: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 8 separate duplicated blocks between them, totalling at least 102 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–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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_deregister_fsm.erl:331` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 5) src/mod_ocs_rest_delete.erl:242— src/mod_ocs_rest_delete.erl:242-261 | src/mod_ocs_rest_get.erl:501-520 | src/mod_ocs_rest_head.erl:246-265 | src/mod_ocs_rest_patch.erl:265-284 | src/mod_ocs_rest_post.erl:283-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 8 separate duplicated blocks between them, totalling at least 102 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–17 lines × 3) src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1022— src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1022-1038 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1090-1099 | src/ocs_diameter_3gpp_ro_nrf_app_cb.erl:1176-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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:578` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/ocs_eap_aka_fsm.erl:881` calls `cast`, `self` and `src/ocs_eap_aka_fsm.erl:895` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_akap_fsm.erl:595` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/ocs_eap_akap_fsm.erl:900` calls `cast`, `self` and `src/ocs_eap_akap_fsm.erl:914` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1378` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_product.erl:1033` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_auth_port_server.erl:433` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7–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 8 separate duplicated blocks between them, totalling at least 102 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 × 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 206 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 × 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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_eap_aka_fsm.erl:1300` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–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.
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 206 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–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.
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.
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 206 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_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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 7) 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 — 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 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_hub_balance.erl:188` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (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.
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.
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.
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 206 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 × 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 330 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/ocs_eap_aka_fsm.erl:881` calls `cast`, `self` and `src/ocs_eap_aka_fsm.erl:895` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (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 206 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 × 6) src/ocs_rest_res_usage.erl:1393— src/ocs_rest_res_usage.erl:1393-1398 | src/ocs_rest_res_usage.erl:1404-1409 | src/ocs_rest_res_usage.erl:1415-1420 | src/ocs_rest_res_usage.erl:1502-1507 | src/ocs_rest_res_usage.erl:1513-1518 | src/ocs_rest_res_usage.erl:1556-1561 — 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 (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. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs.erl:3408` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/ocs.erl:3437` calls `subscription` and `src/ocs.erl:3411` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (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.
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 151 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_diameter_3gpp_sta_application_cb.erl:249` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
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 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (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 — before extracting anything, compare `src/ocs_deregister_fsm_sup.erl` and `src/ocs_diameter_disconnect_fsm_sup.erl` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_deregister_fsm_sup.erl:42` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 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 209 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/ocs_rest_res_resource.erl:718` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 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.
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 8 separate duplicated blocks between them, totalling at least 102 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 (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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Complex function handleAjaxResponse (cyclomatic 22, cognitive 59) priv/www/src/sig-sub-list.js:178— handleAjaxResponse has cyclomatic complexity 22 and cognitive complexity 59; 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.
Complex function _updateAlterationsDialog (cyclomatic 22, cognitive 34) REDACTED:1536— _updateAlterationsDialog has cyclomatic complexity 22 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.
Complex function _addServiceResponse (cyclomatic 20, cognitive 44) priv/www/src/sig-sub-add.js:701— _addServiceResponse has cyclomatic complexity 20 and cognitive complexity 44; 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.
Complex function _updateAddAlteration (cyclomatic 19, cognitive 11) REDACTED:3581— _updateAddAlteration has cyclomatic complexity 19 and cognitive complexity 11; 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.
Complex function updateSubscriberProduct (cyclomatic 17, cognitive 34) priv/www/src/sig-sub-update.js:793— updateSubscriberProduct has cyclomatic complexity 17 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.
Complex function updateSubscriberBalance (cyclomatic 17, cognitive 32) priv/www/src/sig-sub-update.js:542— updateSubscriberBalance has cyclomatic complexity 17 and cognitive complexity 32; 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.
Complex function _loadingChanged (cyclomatic 17, cognitive 17) priv/www/src/sig-app.js:861— _loadingChanged has cyclomatic complexity 17 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 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.
Complex function _addProductResponse (cyclomatic 16, cognitive 31) priv/www/src/sig-sub-add.js:805— _addProductResponse has cyclomatic complexity 16 and cognitive complexity 31; 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.
Complex function _add (cyclomatic 15, cognitive 31) priv/www/src/sig-policy-add.js:217— _add has cyclomatic complexity 15 and cognitive complexity 31; 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.
Complex function updateAltsDialog (cyclomatic 15, cognitive 13) priv/www/src/sig-offer-add.js:1199— updateAltsDialog has cyclomatic complexity 15 and cognitive complexity 13; 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.
Complex function _bucketAddSubmit (cyclomatic 14, cognitive 21) priv/www/src/sig-bucket-add.js:261— _bucketAddSubmit has cyclomatic complexity 14 and cognitive complexity 21; 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.
Complex function handleAjaxResponse (cyclomatic 13, cognitive 33) priv/www/src/sig-accounting-list.js:367— handleAjaxResponse has cyclomatic complexity 13 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 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.
Complex function _checkRecurringAlt (cyclomatic 13, cognitive 15) priv/www/src/sig-offer-add.js:1941— _checkRecurringAlt has cyclomatic complexity 13 and cognitive complexity 15; 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.
Complex function checkRecurringAlt (cyclomatic 13, cognitive 15) REDACTED:3147— checkRecurringAlt has cyclomatic complexity 13 and cognitive complexity 15; 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.
Complex function _tableAdd (cyclomatic 13, cognitive 12) priv/www/src/sig-policy-table-add.js:123— _tableAdd has cyclomatic complexity 13 and cognitive complexity 12; 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.
Complex function _updateUserSubmit (cyclomatic 11, cognitive 20) priv/www/src/sig-user-update.js:194— _updateUserSubmit has cyclomatic complexity 11 and cognitive complexity 20; 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.
Complex function updateClientAuth (cyclomatic 11, cognitive 18) priv/www/src/sig-client-update.js:271— updateClientAuth has cyclomatic complexity 11 and cognitive complexity 18; 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: 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.
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.
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.
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
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.
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.
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.
D21 · Naming Consistency· `classID` spells `ID` where 14 names in the project spell it `Id` · ×1
`classID` spells `ID` where 14 names in the project spell it `Id` priv/www/src/sig-policy-add.js:210— 14 of 15 names in project repository spell the token `Id` (14 of 15; unit: names in project repository containing `Id`). Peers: offerAdd.deleteBucketId (priv/www/src/sig-bucket-add.js:257); offerAdd.productId (priv/www/src/sig-bucket-add.js:299); tariffPeriodList.activeTableId (priv/www/src/sig-period-table-list.js:136); policyList.polId (priv/www/src/sig-policy-list.js:431); policyList.classId (priv/www/src/sig-policy-list.js:443). Rename to `classId`. [rule N6]
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.
Thin README README:1— The root README is 10 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, in the README and in the repository documents it links, 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.
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.
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.
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).
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
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.
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.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
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 01a1dde5-dcfe-704a-829b-fa37a226200a · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 6 · Warnings: 1047 · Recommendations: 11 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 15-11-2026 @ 06:29 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.