Public report — ExoPlayer, published 6 Aug 2026. Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version; ask the repo owner for the full report.
Watchdog 06-08-2026 @ 13:21 UTC Public
Code Health Audit

Google/ExoPlayer

No baseline yet — first run
49% Weak
CriticalWeakAdequateStrongExemplary
upper third — near Adequate

Large · 301,488 LoC · rebuild ~2.8 person-years · weakest lens: Readiness (26%)

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

19/21dimensions tool-verifieddeterministic · confidence 1.0 · 2 LLM-assisted, advisory
831findings with an exact file:lineof 837 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
21/94dimensions across the health lenses301488 LoC — wide & deep

Executive summary

Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.

google/ExoPlayer carries serious gaps (49%). Several issues below can materially affect correctness, security, or the cost of changing it — and propagate to everything that depends on it.

It is strongest in Architecture (100%) — the structure is clean and changes stay contained. Security (90%) is solid too.

The area that most needs attention is Readiness (26%) — releases are harder to depend on — versioning, release notes and dependency hygiene are thin, so consumers can't easily tell what changed or trust an upgrade. Maturity (61%) is the next concern — onboarding is slow — key decisions and the architecture aren't written down, so contributors have to reverse-engineer the intent.

Leadership focus, highest impact first: CI workflow that builds and runs the test suite on every push/PR (CI/CD gates); Stamp a version in your build/package manifest (e.g. csproj <Version> (Release Hygiene); Expand the README with getting-started (Documentation (README)).

For scale: Large (~301,488 production lines); rebuilding it from scratch would take roughly ~2.8 person-years (~1–6 engineers). Approximate, ±~30%.

It builds on a genuinely strong Architecture foundation (100%); the priorities above are the highest-leverage way to bring the rest up to that level.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Readiness 26% · 47% weightMaturity 61% · 26% weightCode Health 65% · 14% weightSecurity 90% · 8% weightArchitecture 100% · 4% weight

Raise Readiness 26 → 70 (the Healthy floor) ⇒ headline 49 → ~67.

Code composition — where the lines go
Tests 100%
Rebuild cost & value ~ Modeled — €140,000–€680,000
Cost to rebuild€140,000–€680,000 (1.4–4.3 person-years (2,270–7,201 h), ~1–6 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.7× (at 49% quality) — the last 20% of quality is most of the work
Size & shapeLarge · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

This codebase represents roughly ~2.8 person-years of build effort (about ~€410,000 to rebuild). Its weakest lens is Readiness at 26% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Add a CI workflow that builds and runs the test suite on every push/PR.
+22.2 pts · Medium effort · CI/CD gates
2
Stamp a version in your build/package manifest (e.g. csproj <Version>, package.json, pyproject.toml, Cargo.toml, or a VERSION file) or tag releases with semver so builds and releases are traceable.
+19.4 pts · Medium effort · Release Hygiene
3
Resolve the 3 Largest orphaned file finding(s) in Knowledge Freshness — start with SimpleBasePlayer.java, DefaultTrackSelector.java, ExoPlayerImplInternal.java.
+4.1 pts · Low effort · Knowledge Freshness

Diagnosis — what's actually going on

Value concentrated against a weak lens · High · Value at risk
This is a Large asset (~2.8 person-years to rebuild), and its weakest lens is Readiness at 26%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~2.8 person-years rebuild (301,488 LoC) · weakest lens: Readiness 26%
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Add a CI workflow that builds and runs the test suite on every push/PR. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Add a CI workflow that builds and runs the test suite on every push/PR.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 5.9/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 5–12% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 5.9/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.

Architecture — module dependency matrix

92 modules, 459 dependencies — 4 dependency cycles, shown as the red cell(s) above the diagonal. Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

(global)…id.exoplayer2.decoder…layer2.upstream.cache…exoplayer2.mediacodec…d.exoplayer2.metadata…d.exoplayer2.upstream…r2.source.mediaparser…roid.exoplayer2.video…oplayer2.source.chunk…layer2.trackselection…droid.exoplayer2.util…oplayer2.metadata.id3…id.exoplayer2.offline….exoplayer2.extractor…droid.exoplayer2.text…android.exoplayer2.ui…exoplayer2.source.ads…oid.exoplayer2.source…ndroid.exoplayer2.drm…roid.exoplayer2.audio….exoplayer2.analytics…le.android.exoplayer2…oid.exoplayer2.effect…d.exoplayer2.ext.flac…id.exoplayer2.ext.ima…player2.metadata.emsg…2.source.hls.playlist…xoplayer2.source.rtsp…ource.smoothstreaming…d.exoplayer2.testutil…droid.exoplayer2.demo…player2.extractor.mp4…xoplayer2.robolectric….source.dash.manifest…xoplayer2.transformer…layer2.extractor.jpeg…xoplayer2.source.dash…exoplayer2.source.hls…2.source.dash.offline…er2.playbacktests.gts(global)1…id.exoplayer2.decoder2…layer2.upstream.cache3…exoplayer2.mediacodec4…d.exoplayer2.metadata5…d.exoplayer2.upstream6…r2.source.mediaparser7…roid.exoplayer2.video8…oplayer2.source.chunk9…layer2.trackselection10…droid.exoplayer2.util11…oplayer2.metadata.id312…id.exoplayer2.offline13….exoplayer2.extractor14…droid.exoplayer2.text15…android.exoplayer2.ui16…exoplayer2.source.ads17…oid.exoplayer2.source18…ndroid.exoplayer2.drm19…roid.exoplayer2.audio20….exoplayer2.analytics21…le.android.exoplayer222…oid.exoplayer2.effect23…d.exoplayer2.ext.flac24…id.exoplayer2.ext.ima25…player2.metadata.emsg26…2.source.hls.playlist27…xoplayer2.source.rtsp28…ource.smoothstreaming29…d.exoplayer2.testutil30…droid.exoplayer2.demo31…player2.extractor.mp432…xoplayer2.robolectric33….source.dash.manifest34…xoplayer2.transformer35…layer2.extractor.jpeg36…xoplayer2.source.dash37…exoplayer2.source.hls38…2.source.dash.offline39…er2.playbacktests.gts406310221212111101653141212181221511131133227212182217246228333133154121217412411131111581112354714515915216431292223832449722210732412163916822782126944307215254172247363911172435113261317151571151319411014148127411118437323181219121112874112353103533569533641123592312612924621951332727124243513334931225241111019361220481111111211421242141533174272236294911262612620219112121142315436225111+52 more modules (most-connected shown)

At a glance — Code Health · 65% · Adequate · gated by D2

At a glance — Architecture · 100% · Exemplary

At a glance — Maturity · 61% · Adequate · gated by D34, M2

At a glance — Readiness · 26% · Weak · gated by P1, P3

At a glance — Security · 90% · Exemplary

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A02:2021 — Cryptographic Failures3High / Critical

Roadmap

First, establish a CI/CD pipeline to automatically build and test every change. Next, implement versioning in your build manifests to ensure all releases are traceable. Then, expand the README with clear getting-started instructions and an architecture overview. Finally, create architecture decision records to document key technical choices and resolve the largest orphaned files to keep knowledge current.

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

Do thisHelpsEffortDimension
Add a CI workflow that builds and runs the test suite on every push/PR.+22.2 ptsMediumCI/CD gates
Stamp a version in your build/package manifest (e.g. csproj <Version>, package.json, pyproject.toml, Cargo.toml, or a VERSION file) or tag releases with semver so builds and releases are traceable.+19.4 ptsMediumRelease Hygiene
Resolve the 3 Largest orphaned file finding(s) in Knowledge Freshness — start with SimpleBasePlayer.java, DefaultTrackSelector.java, ExoPlayerImplInternal.java.+4.1 ptsLowKnowledge Freshness
Expand the README with getting-started, architecture overview and a project map.+5.4 ptsMediumDocumentation (README)
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).+5.4 ptsMediumArchitecture documentation
Resolve the 1 The ExoPlayer website is hosted on GitHub Pages and uses Jekyll static… finding(s) in Documentation Quality — start with README.md.+1.9 ptsLowDocumentation Quality
Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness.+1.7 ptsLowKnowledge Freshness
Resolve the 2 Secret finding(s) in Secrets (history) — start with H264Reader.java (2).+0.5 ptsLowSecrets (history)

File quality

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

FileScoreBandWorst signal
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H264Reader.java4.6MixedSecrets (history): Secret: generic-api-key
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java7.0MixedCyclomatic Complexity: DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping (cyclomatic 526)
library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java7.0MixedCyclomatic Complexity: MediaCodecVideoRenderer.evaluateDeviceNeedsSetOutputSurfaceWorkaround (cyclomatic 163)
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java7.0MixedCyclomatic Complexity: Track.initializeOutput (cyclomatic 66)
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java7.0MixedCyclomatic Complexity: AtomParsers.parseStbl (cyclomatic 57)
library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java7.0MixedCyclomatic Complexity: ExoPlayerImplInternal.handleMessage (cyclomatic 49)
library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java7.0MixedCyclomatic Complexity: SimpleBasePlayer.updateStateAndInformListeners (cyclomatic 39)
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java7.0MixedCyclomatic Complexity: MediaCodecRenderer.feedInputBuffer (cyclomatic 37)
library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java7.0MixedCyclomatic Complexity: TtmlDecoder.parseStyleAttributes (cyclomatic 35)
library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java7.0MixedCyclomatic Complexity: Builder.populate (cyclomatic 35)
library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java7.0MixedCyclomatic Complexity: DvbParser.generateDefault8BitClutEntries (cyclomatic 34)
library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java7.0MixedCyclomatic Complexity: NalUnitUtil.parseH265SpsNalUnitPayload (cyclomatic 32)
library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java7.0MixedCyclomatic Complexity: MediaCodecUtil.isCodecUsableDecoder (cyclomatic 28)
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java7.0MixedCyclomatic Complexity: PlayerView.<init> (cyclomatic 25)
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java7.0MixedCyclomatic Complexity: DashManifestParser.parseMediaPresentationDescription (cyclomatic 24)
library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java7.0MixedCyclomatic Complexity: DashMediaSource.updateLiveConfiguration (cyclomatic 24)
library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java7.0MixedCyclomatic Complexity: StyledPlayerControlView.<init> (cyclomatic 24)
library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java7.0MixedCyclomatic Complexity: FragmentedMp4Extractor.readAtomHeader (cyclomatic 21)
library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java7.0MixedCyclomatic Complexity: PlayerControlView.updateTimeline (cyclomatic 19)
library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java7.0MixedCyclomatic Complexity: VideoTrackInfo.<init> (cyclomatic 17)

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 19 of 21 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 2 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.5 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 21 dimensions across the health lenses
D1D2D3D4D13D15D16D19D21D28D29D34D35D37M1M2M3M4P1P3P6

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

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
jscpdCode duplication✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.302✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.302✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 019fd73c-6bcd-7ba7-80fc-d10533fa0628.

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

Run transparency — what happened this run

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

  • D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity (jscpd) — 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.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • 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.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • 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.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • 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.

The LLM boundary

LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity4.3 / 10Weak✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 4.3 / 10 · rule-coverage 100% · ceiling Prevented

163 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping at 526. A further 30 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 ExperimentalBandwidthMeter.getInitialBitrateCountryGroupAssignment at 239 — they are counted neither in the figure above nor in this dimension's score.

DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping (cyclomatic 526)library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:45
MediaCodecVideoRenderer.evaluateDeviceNeedsSetOutputSurfaceWorkaround (cyclomatic 163)library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:2541
HlsPlaylistParser.parseMediaPlaylist (cyclomatic 83)library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:639
Ac3Util.parseAc3SyncframeInfo (cyclomatic 71)library/extractor/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java:258
Track.initializeOutput (cyclomatic 66)library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:2053

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

What to do

  1. Resolve the 1 DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping… finding(s) in Cyclomatic Complexity — start with DeviceMappedEncoderBitrateProvider.java. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 MediaCodecVideoRenderer.evaluateDeviceNeedsSetOutputSurfaceWorkaround… finding(s) in Cyclomatic Complexity — start with MediaCodecVideoRenderer.java. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 HlsPlaylistParser.parseMediaPlaylist (cyclomatic 83) finding(s) in Cyclomatic Complexity — start with HlsPlaylistParser.java. — One of this dimension's main actionable groups (1 warning-level).
  4. Stand up a CI pipeline, then gate Cyclomatic Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 3.8 / 10 · rule-coverage 100% · ceiling Prevented

329 method(s) exceeded the cognitive complexity threshold of 15; the worst was DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping at 796.

DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping (cognitive 796)library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:45
HlsPlaylistParser.parseMediaPlaylist (cognitive 744)library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:639
Ac3Util.parseAc3SyncframeInfo (cognitive 257)library/extractor/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java:258
AtomParsers.parseVideoSampleEntry (cognitive 166)library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1173
MatroskaExtractor.binaryElement (cognitive 116)library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:1150

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

What to do

  1. Resolve the 1 DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping… finding(s) in Cognitive Complexity — start with DeviceMappedEncoderBitrateProvider.java. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 HlsPlaylistParser.parseMediaPlaylist (cognitive 744) finding(s) in Cognitive Complexity — start with HlsPlaylistParser.java. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Ac3Util.parseAc3SyncframeInfo (cognitive 257) finding(s) in Cognitive Complexity — start with Ac3Util.java. — One of this dimension's main actionable groups (1 warning-level).
  4. Stand up a CI pipeline, then gate Cognitive Complexity in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes8.4 / 10Strong✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Prevented

149 god class(es) detected.

FileTooLong: exoplayer2/ExoPlayerImpl.java · ×76library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:0
TooManyMethods: ExoPlayerImpl · ×73library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:120

What to do

  1. Resolve the 76 FileTooLong finding(s) in God Classes — start with ExoPlayerImpl.java, DefaultTrackSelector.java, ExoPlayerImplInternal.java. — One of this dimension's main actionable groups (76 warning-level).
  2. Resolve the 73 TooManyMethods finding(s) in God Classes — start with DefaultTrackSelector.java (3), ExoPlayerImpl.java (2), ForwardingPlayer.java (2). — One of this dimension's main actionable groups (73 warning-level).
  3. Stand up a CI pipeline, then gate God Classes in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.7 / 10Exemplary✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Verified

183 duplicated block group(s) detected.

Duplicated block (8 lines × 2) · ×22library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceInsertCommand.java:180
Duplicated block (10 lines × 2) · ×20extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetDataSource.java:469
Duplicated block (12 lines × 2) · ×16demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/MainActivity.java:156
Duplicated block (9 lines × 2) · ×14extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerCommandQueue.java:419
Duplicated block (7 lines × 2) · ×14library/core/src/main/java/com/google/android/exoplayer2/source/ads/ServerSideAdInsertionUtil.java:231

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

✓ On the Gold path — maintain.

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

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D16 · Bus Factor10.0 / 10Exemplary✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No source file's living knowledge is concentrated in a single author.

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md.

D19 · Documentation Quality / 10Strong◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: DocumentedVerifiedPrevented · effective Strong / 10 · rule-coverage 100% · ceiling Documented

The ExoPlayer documentation is comprehensive and well-organized across READMEs for the library's many modules (e.g. media3 migration, playback tests, UI, smooth streaming, RTSP, HLS, DASH, extractor, decoder, database, dash), with each module having a short getting-started gradle snippet plus links to developer guides and Javadoc. The top-level README also serves as an overview of the library modules and how to use them. There is no single missing document; the only visible gap is that none of the modules' own READMEs link directly to their own internal documentation (e.g. the extractor module's README does not link to its own API docs), which would be a minor detail rather than an omission.

The ExoPlayer website is hosted on GitHub Pages and uses Jekyll static site generation, but there is no link from the documentation to the actual site itself (the body of this README does not show a link).docs/README.md

What to do

  1. Resolve the 1 The ExoPlayer website is hosted on GitHub Pages and uses Jekyll static… finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).

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

D21 · Naming Consistency / 10Exemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: DocumentedVerifiedPrevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D28 · Secrets (history)7.0 / 10Strong✓ Tool-verified

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

Method: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.

Maturity: DocumentedVerifiedPrevented · effective 7.0 / 10 · rule-coverage 100% · ceiling Documented

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

Secret: generic-api-key · ×2library/src/main/java/com/google/android/exoplayer/extractor/ts/H264Reader.java:489detected by gitleaks finding
Rotate the exposed credentials — git history can't be un-committed

What to do

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

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

D29 · Static Analysis (SAST)10.0 / 10Exemplary○ Nothing flagged

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

semgrep found no security issues.

✓ On the Gold path — maintain.

Detailed fixes: d29_recommendation.md.

D34 · Knowledge Freshness0.1 / 10Critical✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 0.1 / 10 · rule-coverage 100% · ceiling Documented

895 of 903 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java.

Largest orphaned file · ×3library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java
Dormant codebase

What to do

  1. Resolve the 3 Largest orphaned file finding(s) in Knowledge Freshness — start with SimpleBasePlayer.java, DefaultTrackSelector.java, ExoPlayerImplInternal.java. — One of this dimension's main actionable groups (3 recommendation-level).
  2. Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

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

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

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

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling; coupling through a build step, config, or non-source file isn't seen.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: ExoAssetLoaderVideoRenderer.java↔VideoSamplePipeline.java 55%

Change coupling: ExoAssetLoaderVideoRenderer.java ↔ VideoSamplePipeline.javalibrary/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExoAssetLoaderVideoRenderer.java

✓ On the Gold path — maintain.

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

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

Frontend & cross-cutting dimensions

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

M1 · Documentation (README)6.0 / 10Adequate✓ Tool-verified

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

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

  • The root README is 96 words — likely missing build/run/architecture context.

What to do

  • Expand the README with getting-started, architecture overview and a project map.
  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
M2 · Architecture documentation3.0 / 10Weak✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no `NNNN-title.md` documents 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 significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

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

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

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

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

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

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

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) — 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 to do

  • Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Stamp a version in your build/package manifest (e.g. csproj <Version>, package.json, pyproject.toml, Cargo.toml, or a VERSION file) or tag releases with semver so builds and releases are traceable.

Reference — by lens

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

LensScoreRatingImpact
Code Health65%Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture100%ExemplaryStrongest area.
Maturity61%Adequate — gated by D34, M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness26%Weak — gated by P1, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security90%ExemplarySolid.
Not included — 73 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — no DI registrations detected
  • AX10 Code composition — not assessed — code composition is computed by ROLE over a document set 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
  • AX2 Stateful singletons — no singleton implementations detected
  • 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 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
  • 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 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
  • 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 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
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — 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.
  • 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.
  • D10 Test Quality — ~142415 lines of test source are present (.java, .ts) but the test-quality collector reads C# only, 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
  • D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Gradle version catalogue and a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems)), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
  • D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D22 Internal API Consistency — No exposed public API
  • D23 Boundary Type-Coupling — Production source is present (.java, .ts) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. 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 — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, 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 Gradle version catalogue and a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
  • D33 JS/npm Dependency Vulnerabilities — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .gitlab-ci.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, Jenkinsfile, .circleci); there is no build to attest provenance for.
  • D38 OSV Dependency Vulnerabilities — No supported non-.NET dependency lockfile found outside build output (npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven pom.xml, Gradle lockfiles, Python requirements.txt/poetry.lock/Pipfile.lock/pdm.lock, PHP composer.lock, Ruby Gemfile.lock, Elixir mix.lock, Dart pubspec.lock, Swift Package.resolved); nothing for OSV to scan. A NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
  • D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is .java, .ts, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • D9 Test Distribution — Test source is present (.java, .ts) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 273 value object(s); 1 domain event(s)
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this check looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this check looks for
  • GD1 Unfinished & placeholder code — no source files
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — no CI workflow found
  • P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, 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
  • P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
  • P8 Schema migrations — not assessed — schema-migration practice is read from 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
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (JaCoCo XML — the Gradle `jacocoTestReport` task) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • 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 analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X2 Cancellation propagation — 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
  • X3 Exception handling — 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
  • 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

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.

Issue — 2 finding(s)
D28 · Secrets (history) · Secret · ×2
  • Secret: generic-api-key library/src/main/java/com/google/android/exoplayer/extractor/ts/H264Reader.java:489 — matched rule 'generic-api-key'
  • Secret: generic-api-key library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H264Reader.java:570 — matched rule 'generic-api-key'
Warning — 825 finding(s)
D3 · God Classes · FileTooLong · ×76
  • FileTooLong: exoplayer2/ExoPlayerImpl.java library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:0 — FileTooLong — 2339 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: trackselection/DefaultTrackSelector.java library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:0 — FileTooLong — 2240 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: exoplayer2/ExoPlayerImplInternal.java library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:0 — FileTooLong — 2191 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: exoplayer2/SimpleBasePlayer.java library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:0 — FileTooLong — 2181 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: mkv/MatroskaExtractor.java library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:0 — FileTooLong — 1857 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: MatroskaExtractor (87-2561). 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: video/MediaCodecVideoRenderer.java library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:0 — FileTooLong — 1684 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: manifest/DashManifestParser.java library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:0 — FileTooLong — 1533 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: DashManifestParser (74-2102). 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: mp4/AtomParsers.java library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:0 — FileTooLong — 1518 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: util/Util.java library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:0 — FileTooLong — 1489 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: mediacodec/MediaCodecRenderer.java library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:0 — FileTooLong — 1420 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: MediaCodecRenderer (98-2599). 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: audio/DefaultAudioSink.java library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:0 — FileTooLong — 1400 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: DefaultAudioSink (85-2280). 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: transformer/DeviceMappedEncoderBitrateProvider.java library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:0 — FileTooLong — 1393 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ui/StyledPlayerControlView.java library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:0 — FileTooLong — 1351 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: StyledPlayerControlView (197-2150). 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: mp4/FragmentedMp4Extractor.java library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:0 — FileTooLong — 1238 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: FragmentedMp4Extractor (78-1914). 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: exoplayer2/MediaItem.java library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java:0 — FileTooLong — 1226 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: MediaItem (49-2302). 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: hls/HlsSampleStreamWrapper.java library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java:0 — FileTooLong — 1153 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: playlist/HlsPlaylistParser.java library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:0 — FileTooLong — 1032 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: HlsPlaylistParser (76-1334). 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: cea/Cea708Decoder.java library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java:0 — FileTooLong — 1018 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Cea708Decoder (57-1468). 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: dash/DashMediaSource.java library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:0 — FileTooLong — 1008 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ima/AdTagLoader.java extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java:0 — FileTooLong — 982 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: mediacodec/MediaCodecUtil.java library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:0 — FileTooLong — 970 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ima/ImaServerSideAdInsertionMediaSource.java extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.java:0 — FileTooLong — 945 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: ImaServerSideAdInsertionMediaSource (122-1470). 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: cast/CastPlayer.java extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java:0 — FileTooLong — 940 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: CastPlayer (88-1506). 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: ads/ServerSideAdInsertionMediaSource.java library/core/src/main/java/com/google/android/exoplayer2/source/ads/ServerSideAdInsertionMediaSource.java:0 — FileTooLong — 886 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: exoplayer2/MediaMetadata.java library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:0 — FileTooLong — 875 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: MediaMetadata (50-1459). 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.
  • + 51 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×73
  • TooManyMethods: ExoPlayerImpl library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:120 — TooManyMethods — 176 methods. 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: Util library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:141 — TooManyMethods — 154 methods. 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: SimpleExoPlayer library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java:61 — TooManyMethods — 140 methods. 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: ForwardingPlayer library/common/src/main/java/com/google/android/exoplayer2/ForwardingPlayer.java:43 — TooManyMethods — 129 methods. 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: SimpleBasePlayer library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:106 — TooManyMethods — 129 methods. 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: ExoPlayerImplInternal library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:81 — TooManyMethods — 125 methods. 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: MediaCodecRenderer library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:98 — TooManyMethods — 96 methods. 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: DefaultAnalyticsCollector library/core/src/main/java/com/google/android/exoplayer2/analytics/DefaultAnalyticsCollector.java:76 — TooManyMethods — 86 methods. 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: MediaCodecVideoRenderer library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:123 — TooManyMethods — 84 methods. 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: StyledPlayerView library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:180 — TooManyMethods — 81 methods. 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: DashManifestParser library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:74 — TooManyMethods — 75 methods. 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: PlayerView library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:259 — TooManyMethods — 74 methods. 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: StubPlayer testutils/src/main/java/com/google/android/exoplayer2/testutil/StubPlayer.java:45 — TooManyMethods — 74 methods. 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: StyledPlayerControlView library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:197 — TooManyMethods — 71 methods. 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: EventLogger library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java:58 — TooManyMethods — 69 methods. Most of these members implement analytics.AnalyticsListener (46 of 62 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: DefaultAudioSink library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:85 — TooManyMethods — 67 methods. 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: Builder library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:746 — TooManyMethods — 66 methods. 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: StubExoPlayer testutils/src/main/java/com/google/android/exoplayer2/testutil/StubExoPlayer.java:49 — TooManyMethods — 65 methods. Most of these members implement exoplayer2.ExoPlayer (57 of 58 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: BasePlayer library/common/src/main/java/com/google/android/exoplayer2/BasePlayer.java:37 — TooManyMethods — 64 methods. 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: HlsSampleStreamWrapper library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java:99 — TooManyMethods — 62 methods. 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: ConcatenatingMediaSource library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java:59 — TooManyMethods — 59 methods. 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: SampleQueue library/core/src/main/java/com/google/android/exoplayer2/source/SampleQueue.java:63 — TooManyMethods — 58 methods. 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: ParametersBuilder library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:129 — TooManyMethods — 58 methods. 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: ParsableByteArray library/common/src/main/java/com/google/android/exoplayer2/util/ParsableByteArray.java:37 — TooManyMethods — 57 methods. 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: DefaultTimeBar library/ui/src/main/java/com/google/android/exoplayer2/ui/DefaultTimeBar.java:134 — TooManyMethods — 56 methods. 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.
  • + 48 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×22
  • Duplicated block (8 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceInsertCommand.java:180 — library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceInsertCommand.java:180-187 | library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceScheduleCommand.java:159-166 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceInsertCommand.java:180` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:435 — library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:435-442 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:746-753 — both copies are in the same file, so extract the 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 `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:435` 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) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:941 — library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:941-948 | library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:994-1002 — both copies are in the same file, so extract the 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 `library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:941` 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) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:143 — library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:143-150 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:174-181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java:550 — library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java:550-557 | library/core/src/main/java/com/google/android/exoplayer2/MediaSourceList.java:435-442 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java:550` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:567 — library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:567-574 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:590-597 — both copies are in the same file, so extract the 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 `library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:567` 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) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:439 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:439-446 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:484-491 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:439` 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) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:462 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:462-469 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:501-508 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (8 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:701 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:701-708 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:827-834 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:701` 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) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1000 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1000-1007 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1245-1252 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1000` 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) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1217 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1217-1224 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1553-1560 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1342 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1342-1349 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1412-1419 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1342` 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) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1433 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1433-1440 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1535-1542 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:429 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:429-436 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:473-480 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:429` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:828 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:828-835 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:872-879 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:828` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/video/spherical/ProjectionDecoder.java:104 — library/core/src/main/java/com/google/android/exoplayer2/video/spherical/ProjectionDecoder.java:104-111 | library/core/src/main/java/com/google/android/exoplayer2/video/spherical/ProjectionDecoder.java:152-159 — both copies are in the same file, so extract the 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 `library/core/src/main/java/com/google/android/exoplayer2/video/spherical/ProjectionDecoder.java:104` 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) testutils/src/main/java/com/google/android/exoplayer2/testutil/truth/SpannedSubject.java:875 — testutils/src/main/java/com/google/android/exoplayer2/testutil/truth/SpannedSubject.java:875-882 | testutils/src/main/java/com/google/android/exoplayer2/testutil/truth/SpannedSubject.java:914-921 — both copies are in the same file, so extract the 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 `testutils/src/main/java/com/google/android/exoplayer2/testutil/truth/SpannedSubject.java:875` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) testutils/src/main/java/com/google/android/exoplayer2/testutil/OggFileAudioBufferSink.java:200 — testutils/src/main/java/com/google/android/exoplayer2/testutil/OggFileAudioBufferSink.java:200-207 | testutils/src/main/java/com/google/android/exoplayer2/testutil/OggFileAudioBufferSink.java:213-220 — both copies are in the same file, so extract the block into 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) library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:97 — library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:97-104 | library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:1036-1043 — both copies are in the same file, so extract the 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 what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
  • Duplicated block (8 lines × 2) library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:114 — library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:114-121 | library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:1054-1061 — both copies are in the same file, so extract the 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 what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
  • Duplicated block (8 lines × 2) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:200 — library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:200-207 | library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:966-973 — both copies are in the same file, so extract the 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 what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
  • Duplicated block (8 lines × 2) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:1259 — library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:1259-1266 | library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:1621-1628 — both copies are in the same file, so extract the 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 what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×20
  • Duplicated block (10 lines × 2) extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetDataSource.java:469 — extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetDataSource.java:469-478 | library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.java:210-219 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceInsertCommand.java:104 — library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceInsertCommand.java:104-113 | library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceScheduleCommand.java:94-103 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (10 lines × 2) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:1115 — library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:1115-1124 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:1149-1158 — both copies are in the same file, so extract the block into 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) library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:3561 — library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:3561-3570 | library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:3724-3735 — both copies are in the same file, so extract the 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 `library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:3561` 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) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:508 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:508-517 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:494-503 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:508` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1419 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1419-1428 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1521-1530 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1419` 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) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:708 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:708-717 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:752-761 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:708` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:1221 — library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:1221-1230 | library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:1254-1263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:536 — library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:536-545 | library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:1483-1492 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:536` 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) library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java:327 — library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java:327-336 | library/core/src/main/java/com/google/android/exoplayer2/analytics/PlaybackStatsListener.java:294-303 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java:327` 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) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/AsynchronousMediaCodecBufferEnqueuer.java:324 — library/core/src/main/java/com/google/android/exoplayer2/mediacodec/AsynchronousMediaCodecBufferEnqueuer.java:324-333 | library/core/src/main/java/com/google/android/exoplayer2/mediacodec/AsynchronousMediaCodecBufferEnqueuer.java:345-354 — both copies are in the same file, so extract the 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 `library/core/src/main/java/com/google/android/exoplayer2/mediacodec/AsynchronousMediaCodecBufferEnqueuer.java:324` 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) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:558 — library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:558-568 | library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:577-586 — both copies are in the same file, so extract the 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 `library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:558` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:572 — library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:572-581 | library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:597-607 — both copies are in the same file, so extract the 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 `library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:572` 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 (10 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:784 — library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:784-793 | library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:813-822 — both copies are in the same file, so extract the 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 `library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:784` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) library/effect/src/main/java/com/google/android/exoplayer2/effect/OverlayShaderProgram.java:195 — library/effect/src/main/java/com/google/android/exoplayer2/effect/OverlayShaderProgram.java:195-204 | library/effect/src/main/java/com/google/android/exoplayer2/effect/OverlayShaderProgram.java:256-265 — both copies are in the same file, so extract the 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 `library/effect/src/main/java/com/google/android/exoplayer2/effect/OverlayShaderProgram.java:195` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1248 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1248-1257 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1262-1271 — both copies are in the same file, so extract the 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 `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1248` 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 (10 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:133 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:133-142 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:146-155 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:133` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:177 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:177-186 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:193-202 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:177` 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) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java:176 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java:176-185 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java:213-222 — both copies are in the same file, so extract the 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 `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) testutils/src/main/java/com/google/android/exoplayer2/testutil/TimelineAsserts.java:240 — testutils/src/main/java/com/google/android/exoplayer2/testutil/TimelineAsserts.java:240-249 | testutils/src/main/java/com/google/android/exoplayer2/testutil/TimelineAsserts.java:256-265 — both copies are in the same file, so extract the 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 `testutils/src/main/java/com/google/android/exoplayer2/testutil/TimelineAsserts.java:240` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×16
  • Duplicated block (12 lines × 2) demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/MainActivity.java:156 — demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/MainActivity.java:156-167 | demos/surface/src/main/java/com/google/android/exoplayer2/surfacedemo/MainActivity.java:200-211 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/MainActivity.java:156` 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) extensions/okhttp/src/main/java/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSource.java:537 — extensions/okhttp/src/main/java/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSource.java:537-548 | library/datasource/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java:772-783 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:667 — library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:667-678 | library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java:751-762 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:667` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/audio/MpegAudioUtil.java:125 — library/extractor/src/main/java/com/google/android/exoplayer2/audio/MpegAudioUtil.java:125-136 | library/extractor/src/main/java/com/google/android/exoplayer2/audio/MpegAudioUtil.java:189-200 — both copies are in the same file, so extract the 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 `library/extractor/src/main/java/com/google/android/exoplayer2/audio/MpegAudioUtil.java:125` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java:453 — library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java:453-464 | library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java:513-524 — both copies are in the same file, so extract the block into 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) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:422 — library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:422-433 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:704-715 — both copies are in the same file, so extract the 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 `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:422` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:536 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:536-547 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:657-668 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:536` 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) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:859 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:859-870 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1011-1022 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:859` 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 (12 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1106 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1106-1117 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1381-1392 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (12 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1190 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1190-1201 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1486-1497 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1190` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1149 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1149-1160 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1234-1245 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1149` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:477 — library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:477-488 | library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:646-657 — both copies are in the same file, so extract the 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 `library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:477` 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) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:739 — library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:739-750 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EncoderUtil.java:397-410 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:368 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:368-379 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java:372-383 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:368` 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) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultDecoderFactory.java:74 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultDecoderFactory.java:74-85 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultDecoderFactory.java:131-143 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultDecoderFactory.java:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:328 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:328-339 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java:359-370 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×14
  • Duplicated block (9 lines × 2) extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerCommandQueue.java:419 — extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerCommandQueue.java:419-427 | extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerCommandQueue.java:457-465 — both copies are in the same file, so extract the 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 `extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerCommandQueue.java:419` 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) library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceInsertCommand.java:147 — library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceInsertCommand.java:147-155 | library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceScheduleCommand.java:134-142 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceInsertCommand.java:147` 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) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:718 — library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:718-726 | library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java:532-540 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:724 — library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:724-733 | library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:932-940 — both copies are in the same file, so extract the 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 `library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:724` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:475 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:475-483 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:525-533 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:475` 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) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1359 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1359-1367 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1429-1437 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1359` 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) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:174 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:174-182 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/SplitParallelSampleBandwidthEstimator.java:170-178 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:174` 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) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:194 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:194-202 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/SplitParallelSampleBandwidthEstimator.java:192-200 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (9 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:490 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:490-498 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:534-542 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:490` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:1080 — library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:1080-1088 | library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:1112-1120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:346 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:346-354 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:418-426 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:346` 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) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java:155 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java:155-163 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsDurationReader.java:142-150 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (9 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java:192 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java:192-200 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsDurationReader.java:178-186 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (9 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EncoderUtil.java:318 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EncoderUtil.java:318-326 | testutils/src/main/java/com/google/android/exoplayer2/testutil/DecodeOneFrameUtil.java:235-243 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EncoderUtil.java:318` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×14
  • Duplicated block (7 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/source/ads/ServerSideAdInsertionUtil.java:231 — library/core/src/main/java/com/google/android/exoplayer2/source/ads/ServerSideAdInsertionUtil.java:231-237 | library/core/src/main/java/com/google/android/exoplayer2/source/ads/ServerSideAdInsertionUtil.java:268-274 — both copies are in the same file, so extract the 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 `library/core/src/main/java/com/google/android/exoplayer2/source/ads/ServerSideAdInsertionUtil.java:231` 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 lines × 2) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:308 — library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:308-314 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:331-337 — both copies are in the same file, so extract the block into 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) library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java:700 — library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java:700-707 | library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java:738-744 — both copies are in the same file, so extract the block into 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) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:609 — library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:609-615 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:625-631 — both copies are in the same file, so extract the 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 `library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:609` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:414 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:414-420 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:435-441 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (7 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1177 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1177-1183 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1471-1477 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1177` 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) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/ContentDataSource.java:166 — library/datasource/src/main/java/com/google/android/exoplayer2/upstream/ContentDataSource.java:166-172 | library/datasource/src/main/java/com/google/android/exoplayer2/upstream/RawResourceDataSource.java:245-251 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:2519 — library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:2519-2525 | library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:608-614 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:2519` 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 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/SeiReader.java:54 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/SeiReader.java:54-60 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/UserDataReader.java:53-59 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/SeiReader.java:54` 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) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/AudioSamplePipeline.java:82 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/AudioSamplePipeline.java:82-88 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EncodedSamplePipeline.java:61-67 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (7 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:354 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:354-360 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java:385-391 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:372 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:372-378 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java:403-409 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (7 lines × 2) testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeAdaptiveMediaPeriod.java:157 — testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeAdaptiveMediaPeriod.java:157-163 | testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeMediaPeriod.java:268-274 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeAdaptiveMediaPeriod.java:157` 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 × 2) library/core/src/main/java/com/google/android/exoplayer2/MediaPeriodHolder.java:378 — library/core/src/main/java/com/google/android/exoplayer2/MediaPeriodHolder.java:378-384 | library/core/src/main/java/com/google/android/exoplayer2/MediaPeriodHolder.java:391-397 — both copies are in the same file, so extract the 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 `library/core/src/main/java/com/google/android/exoplayer2/MediaPeriodHolder.java:378` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×10
  • Duplicated block (13 lines × 2) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:725 — library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:725-737 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:775-787 — both copies are in the same file, so extract the block into 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) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTracker.java:316 — library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/DefaultHlsPlaylistTracker.java:316-328 | library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java:517-529 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDialogueFormat.java:70 — library/extractor/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDialogueFormat.java:70-82 | library/extractor/src/main/java/com/google/android/exoplayer2/text/ssa/SsaStyle.java:384-396 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDialogueFormat.java: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:908 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:908-920 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1100-1112 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:908` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:797 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:797-809 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:803-815 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:797` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1491 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1491-1503 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1606-1618 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1491` 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) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:131 — library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:131-143 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:169-181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:131` 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) library/effect/src/main/java/com/google/android/exoplayer2/effect/ColorLutShaderProgram.java:61 — library/effect/src/main/java/com/google/android/exoplayer2/effect/ColorLutShaderProgram.java:61-73 | library/effect/src/main/java/com/google/android/exoplayer2/effect/HslShaderProgram.java:59-71 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (13 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:79 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:79-91 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Extractor.java:87-99 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:79` 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) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java:234 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java:234-248 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsExtractor.java:111-123 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java:234` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×10
  • Duplicated block (11 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:298 — library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:298-309 | library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:191-201 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:298` 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) library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java:654 — library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java:654-664 | library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java:697-707 — both copies are in the same file, so extract the block into 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) library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ContainerMediaChunk.java:127 — library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ContainerMediaChunk.java:127-137 | library/core/src/main/java/com/google/android/exoplayer2/source/chunk/InitializationChunk.java:100-110 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ContainerMediaChunk.java:127` 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 × 2) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:341 — library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:341-351 | library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java:298-308 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:341` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:989 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:989-999 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1229-1239 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:989` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1053 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1053-1063 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1290-1300 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (11 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:697 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:697-707 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:701-711 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (11 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:259 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:259-269 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:249-259 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:259` 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 × 2) library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java:177 — library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java:177-187 | library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java:194-204 — both copies are in the same file, so extract the 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 `library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java:177` 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 × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsBinarySearchSeeker.java:115 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsBinarySearchSeeker.java:115-125 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsBinarySearchSeeker.java:119-129 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsBinarySearchSeeker.java:115` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×9
  • Duplicated block (5 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/TeeAudioProcessor.java:207 — library/core/src/main/java/com/google/android/exoplayer2/audio/TeeAudioProcessor.java:207-211 | testutils/src/main/java/com/google/android/exoplayer2/testutil/OggFileAudioBufferSink.java:235-239 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/audio/TeeAudioProcessor.java:207` 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) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:449 — library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:449-453 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:753-757 — both copies are in the same file, so extract the 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 `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:449` 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) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:943 — library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:943-947 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:1026-1030 — both copies are in the same file, so extract the block into 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) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:1542 — library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:1542-1546 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:1554-1558 — both copies are in the same file, so extract the 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 `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:1542` 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) library/core/src/main/java/com/google/android/exoplayer2/source/SilenceMediaSource.java:204 — library/core/src/main/java/com/google/android/exoplayer2/source/SilenceMediaSource.java:204-208 | library/core/src/main/java/com/google/android/exoplayer2/source/SingleSampleMediaPeriod.java:130-134 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/source/SilenceMediaSource.java:204` 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) library/common/src/main/java/com/google/android/exoplayer2/util/ColorParser.java:107 — library/common/src/main/java/com/google/android/exoplayer2/util/ColorParser.java:107-111 | library/common/src/main/java/com/google/android/exoplayer2/util/ColorParser.java:115-119 — both copies are in the same file, so extract the 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 `library/common/src/main/java/com/google/android/exoplayer2/util/ColorParser.java:107` 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 × 2) library/common/src/main/java/com/google/android/exoplayer2/util/ParsableByteArray.java:351 — library/common/src/main/java/com/google/android/exoplayer2/util/ParsableByteArray.java:351-355 | library/common/src/main/java/com/google/android/exoplayer2/util/ParsableByteArray.java:363-367 — both copies are in the same file, so extract the block into 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) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FloatAudioMixingAlgorithm.java:107 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FloatAudioMixingAlgorithm.java:107-111 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FloatAudioMixingAlgorithm.java:158-162 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FloatAudioMixingAlgorithm.java:107` 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 × 2) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2107 — library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2107-2111 | library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2165-2169 — both copies are in the same file, so extract the 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 `library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×7
  • Duplicated block (15 lines × 2) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpVp8Reader.java:127 — library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpVp8Reader.java:127-142 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpVp9Reader.java:127-141 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpVp8Reader.java:127` 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 (15 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtil.java:112 — library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtil.java:112-126 | library/extractor/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParser.java:685-699 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtil.java:112` 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 (15 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:328 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:328-342 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:305-319 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:328` 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 (15 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:229 — library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:229-243 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:251-265 — both copies are in the same file, so extract the 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 `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:229` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:782 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:782-796 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:826-840 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:782` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PesReader.java:250 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PesReader.java:250-264 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsExtractor.java:397-411 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PesReader.java:250` 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 (15 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:393 — library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:393-407 | library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:418-432 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:393` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×7
  • Duplicated block (14 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java:330 — library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java:330-343 | library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:414-427 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java: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. 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 (14 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkSampleStream.java:425 — library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkSampleStream.java:425-438 | library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java:851-864 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkSampleStream.java:425` 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 (14 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:779 — library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:779-792 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:837-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. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:779` 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) library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:809 — library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:809-824 | library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:1768-1781 — both copies are in the same file, so extract the 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 (14 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:477 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:477-490 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:463-476 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (14 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:585 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:585-598 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:573-586 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:585` 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) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Reader.java:150 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Reader.java:150-163 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Reader.java:152-165 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Reader.java:150` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×6
  • Duplicated block (16 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:486 — library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:486-501 | library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:724-739 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:486` 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) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMediaSource.java:306 — library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMediaSource.java:306-321 | library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java:339-356 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMediaSource.java:306` 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) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1282 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1282-1297 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1475-1490 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1282` 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) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1198 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1198-1213 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1563-1579 — both copies are in the same file, so extract the 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 `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1198` 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) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:153 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:153-168 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:167-182 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:153` 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) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H264Reader.java:155 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H264Reader.java:155-170 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H265Reader.java:158-174 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×5
  • Duplicated block (21 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:422 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:422-442 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1371-1391 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:422` 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) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:677 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:677-697 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1563-1583 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:677` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:701 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:701-721 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1014-1034 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:701` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:964 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:964-984 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1017-1037 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:964` 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) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1138 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1138-1158 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1175-1195 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×5
  • Duplicated block (17 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:778 — library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:778-794 | library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:390-406 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:778` 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) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java:119 — library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java:119-135 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH265Reader.java:113-129 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java:119` 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) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java:270 — library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java:270-286 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH265Reader.java:235-251 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java:270` 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) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:374 — library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:374-390 | library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:420-436 — both copies are in the same file, so extract the 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 `library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:374` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (17 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:388 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:388-404 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:415-431 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×4
  • Duplicated block (23 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:130 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:130-152 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:397-419 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:130` 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 (23 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:246 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:246-268 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:806-828 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:246` 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 (23 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:759 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:759-781 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1112-1134 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:759` 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 (23 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1224 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1224-1246 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1514-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. Read the line range as the matched WINDOW rather than a finished unit: at `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×4
  • Duplicated block (22 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1235 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1235-1256 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1326-1348 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1235` 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 (22 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:84 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:84-105 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:805-826 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:902 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:902-923 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1152-1173 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:902` 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 (22 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1025 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1025-1046 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1069-1090 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1025` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×4
  • Duplicated block (6 lines × 3) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:890 — library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:890-895 | library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:941-946 | library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:994-999 — 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 `library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:890` 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) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:602 — library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:602-607 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:610-615 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:626-631 — 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 `library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:602` 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) testutils/src/main/java/com/google/android/exoplayer2/testutil/truth/SpannedSubject.java:214 — testutils/src/main/java/com/google/android/exoplayer2/testutil/truth/SpannedSubject.java:214-219 | testutils/src/main/java/com/google/android/exoplayer2/testutil/truth/SpannedSubject.java:251-257 | testutils/src/main/java/com/google/android/exoplayer2/testutil/truth/SpannedSubject.java:570-577 — 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 `testutils/src/main/java/com/google/android/exoplayer2/testutil/truth/SpannedSubject.java:570` 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 (6 lines × 3) testutils/src/main/java/com/google/android/exoplayer2/testutil/OggFileAudioBufferSink.java:153 — testutils/src/main/java/com/google/android/exoplayer2/testutil/OggFileAudioBufferSink.java:153-160 | testutils/src/main/java/com/google/android/exoplayer2/testutil/OggFileAudioBufferSink.java:194-201 | testutils/src/main/java/com/google/android/exoplayer2/testutil/OggFileAudioBufferSink.java:210-215 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×3
  • Duplicated block (10 lines × 6) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:1226 — library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:1226-1235 | library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsMediaPlaylist.java:516-525 | library/core/src/main/java/com/google/android/exoplayer2/analytics/PlaybackStats.java:593-602 | library/core/src/main/java/com/google/android/exoplayer2/analytics/PlaybackStats.java:608-617 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/Transformer.java:598-607 | testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeTimeline.java:254-263 — there are 6 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
  • Duplicated block (10 lines × 6) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:501 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:501-510 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:778-787 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:812-821 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:545-554 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:822-831 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:856-865 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:501` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 6) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:620 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:620-629 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:777-786 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:811-820 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:664-673 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:821-830 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:855-864 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:620` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×3
  • Duplicated block (6 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitleViewUtils.java:71 — library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitleViewUtils.java:71-76 | library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitleViewUtils.java:94-100 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitleViewUtils.java:71` 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 (6 lines × 2) robolectricutils/src/main/java/com/google/android/exoplayer2/robolectric/TestPlayerRunHelper.java:199 — robolectricutils/src/main/java/com/google/android/exoplayer2/robolectric/TestPlayerRunHelper.java:199-204 | robolectricutils/src/main/java/com/google/android/exoplayer2/robolectric/TestPlayerRunHelper.java:279-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `robolectricutils/src/main/java/com/google/android/exoplayer2/robolectric/TestPlayerRunHelper.java:199` 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) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:1690 — library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:1690-1695 | library/common/src/main/java/com/google/android/exoplayer2/Timeline.java:416-421 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:484 — library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:484-503 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/FlacStreamMetadata.java:331-350 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:484` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (20 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:828 — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:828-847 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1134-1153 — both copies are in the same file, so extract the 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 `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:828` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:492 — library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:492-510 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:727-745 — both copies are in the same file, so extract the 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 `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:492` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:445 — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:445-463 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:429-447 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:445` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:707 — library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:707-724 | library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:685-702 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:707` 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) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:136 — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:136-153 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Extractor.java:146-163 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×2
  • Duplicated block (14 lines × 3) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2569 — library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2569-2582 | library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2587-2600 | library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2605-2620 — 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 `library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2605` 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 (14 lines × 3) library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:483 — library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:483-496 | library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:502-515 | library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:521-535 — 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 `library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:483` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×2
  • Duplicated block (11 lines × 3) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:157 — library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:157-167 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:424-434 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:706-716 — 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 `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:157` 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) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/AssetDataSource.java:128 — library/datasource/src/main/java/com/google/android/exoplayer2/upstream/AssetDataSource.java:128-138 | library/datasource/src/main/java/com/google/android/exoplayer2/upstream/ContentDataSource.java:177-187 | library/datasource/src/main/java/com/google/android/exoplayer2/upstream/RawResourceDataSource.java:256-266 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/datasource/src/main/java/com/google/android/exoplayer2/upstream/AssetDataSource.java:128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×2
  • Duplicated block (8 lines × 4) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:572 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:572-579 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:694-701 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:616-623 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:738-745 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:572` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 4) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:598 — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:598-605 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:680-687 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:642-649 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:724-731 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:598` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D1 · Cyclomatic Complexity · DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping (cyclomatic 526) · ×1
  • DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping (cyclomatic 526) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:45 — DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping has cyclomatic complexity 526 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MediaCodecVideoRenderer.evaluateDeviceNeedsSetOutputSurfaceWorkaround (cyclomatic 163) · ×1
  • MediaCodecVideoRenderer.evaluateDeviceNeedsSetOutputSurfaceWorkaround (cyclomatic 163) library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:2541 — MediaCodecVideoRenderer.evaluateDeviceNeedsSetOutputSurfaceWorkaround has cyclomatic complexity 163 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · HlsPlaylistParser.parseMediaPlaylist (cyclomatic 83) · ×1
  • HlsPlaylistParser.parseMediaPlaylist (cyclomatic 83) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:639 — HlsPlaylistParser.parseMediaPlaylist has cyclomatic complexity 83 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Ac3Util.parseAc3SyncframeInfo (cyclomatic 71) · ×1
  • Ac3Util.parseAc3SyncframeInfo (cyclomatic 71) library/extractor/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java:258 — Ac3Util.parseAc3SyncframeInfo has cyclomatic complexity 71 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Track.initializeOutput (cyclomatic 66) · ×1
  • Track.initializeOutput (cyclomatic 66) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:2053 — Track.initializeOutput has cyclomatic complexity 66 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MatroskaExtractor.integerElement (cyclomatic 61) · ×1
  • MatroskaExtractor.integerElement (cyclomatic 61) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:843 — MatroskaExtractor.integerElement has cyclomatic complexity 61 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · AtomParsers.parseStbl (cyclomatic 57) · ×1
  • AtomParsers.parseStbl (cyclomatic 57) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:436 — AtomParsers.parseStbl has cyclomatic complexity 57 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AtomParsers.parseAudioSampleEntry (cyclomatic 54) · ×1
  • AtomParsers.parseAudioSampleEntry (cyclomatic 54) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1503 — AtomParsers.parseAudioSampleEntry has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExoPlayerImplInternal.handleMessage (cyclomatic 49) · ×1
  • ExoPlayerImplInternal.handleMessage (cyclomatic 49) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:502 — ExoPlayerImplInternal.handleMessage has cyclomatic complexity 49 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AtomParsers.parseVideoSampleEntry (cyclomatic 47) · ×1
  • AtomParsers.parseVideoSampleEntry (cyclomatic 47) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1173 — AtomParsers.parseVideoSampleEntry has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Id3Decoder.decodeFrame (cyclomatic 45) · ×1
  • Id3Decoder.decodeFrame (cyclomatic 45) library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java:288 — Id3Decoder.decodeFrame has cyclomatic complexity 45 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Cea708Decoder.handleC1Command (cyclomatic 45) · ×1
  • Cea708Decoder.handleC1Command (cyclomatic 45) library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java:427 — Cea708Decoder.handleC1Command has cyclomatic complexity 45 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · MediaMetricsListener.getErrorInfo (cyclomatic 45) · ×1
  • MediaMetricsListener.getErrorInfo (cyclomatic 45) library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java:698 — MediaMetricsListener.getErrorInfo 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.
D1 · Cyclomatic Complexity · ExoPlayerImplInternal.doSomeWork (cyclomatic 43) · ×1
  • ExoPlayerImplInternal.doSomeWork (cyclomatic 43) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:1009 — ExoPlayerImplInternal.doSomeWork has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HlsPlaylistParser.parseMultivariantPlaylist (cyclomatic 40) · ×1
  • HlsPlaylistParser.parseMultivariantPlaylist (cyclomatic 40) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:332 — HlsPlaylistParser.parseMultivariantPlaylist has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Format.toLogString (cyclomatic 40) · ×1
  • Format.toLogString (cyclomatic 40) library/common/src/main/java/com/google/android/exoplayer2/Format.java:1143 — Format.toLogString has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MimeTypes.getMediaMimeType (cyclomatic 39) · ×1
  • MimeTypes.getMediaMimeType (cyclomatic 39) library/common/src/main/java/com/google/android/exoplayer2/util/MimeTypes.java:398 — MimeTypes.getMediaMimeType has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SimpleBasePlayer.updateStateAndInformListeners (cyclomatic 39) · ×1
  • SimpleBasePlayer.updateStateAndInformListeners (cyclomatic 39) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:3287 — SimpleBasePlayer.updateStateAndInformListeners has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MediaCodecRenderer.feedInputBuffer (cyclomatic 37) · ×1
  • MediaCodecRenderer.feedInputBuffer (cyclomatic 37) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:1221 — MediaCodecRenderer.feedInputBuffer has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MessageListener.handleRtspResponse (cyclomatic 35) · ×1
  • MessageListener.handleRtspResponse (cyclomatic 35) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspClient.java:537 — MessageListener.handleRtspResponse has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TtmlDecoder.parseStyleAttributes (cyclomatic 35) · ×1
  • TtmlDecoder.parseStyleAttributes (cyclomatic 35) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:497 — TtmlDecoder.parseStyleAttributes has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MatroskaExtractor.binaryElement (cyclomatic 35) · ×1
  • MatroskaExtractor.binaryElement (cyclomatic 35) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:1150 — MatroskaExtractor.binaryElement has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Builder.populate (cyclomatic 35) · ×1
  • Builder.populate (cyclomatic 35) library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:470 — Builder.populate has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DefaultAudioSink.handleBuffer (cyclomatic 34) · ×1
  • DefaultAudioSink.handleBuffer (cyclomatic 34) library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:830 — DefaultAudioSink.handleBuffer has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DvbParser.generateDefault8BitClutEntries (cyclomatic 34) · ×1
  • DvbParser.generateDefault8BitClutEntries (cyclomatic 34) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:589 — DvbParser.generateDefault8BitClutEntries has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaMetadata.toBundle (cyclomatic 34) · ×1
  • MediaMetadata.toBundle (cyclomatic 34) library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:1198 — MediaMetadata.toBundle has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TextInformationFrame.populateMediaMetadata (cyclomatic 33) · ×1
  • TextInformationFrame.populateMediaMetadata (cyclomatic 33) library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/TextInformationFrame.java:85 — TextInformationFrame.populateMediaMetadata has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · RtspHeaders.convertToStandardHeaderName (cyclomatic 33) · ×1
  • RtspHeaders.convertToStandardHeaderName (cyclomatic 33) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspHeaders.java:232 — RtspHeaders.convertToStandardHeaderName has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NalUnitUtil.parseH265SpsNalUnitPayload (cyclomatic 32) · ×1
  • NalUnitUtil.parseH265SpsNalUnitPayload (cyclomatic 32) library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:543 — NalUnitUtil.parseH265SpsNalUnitPayload 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.
D1 · Cyclomatic Complexity · MetadataUtil.parseIlstElement (cyclomatic 32) · ×1
  • MetadataUtil.parseIlstElement (cyclomatic 32) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/MetadataUtil.java:360 — MetadataUtil.parseIlstElement has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FileTypes.inferFileTypeFromUri (cyclomatic 30) · ×1
  • FileTypes.inferFileTypeFromUri (cyclomatic 30) library/common/src/main/java/com/google/android/exoplayer2/util/FileTypes.java:199 — FileTypes.inferFileTypeFromUri has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NalUnitUtil.parseSpsNalUnitPayload (cyclomatic 30) · ×1
  • NalUnitUtil.parseSpsNalUnitPayload (cyclomatic 30) library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:372 — NalUnitUtil.parseSpsNalUnitPayload has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SessionDescriptionParser.parse (cyclomatic 29) · ×1
  • SessionDescriptionParser.parse (cyclomatic 29) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/SessionDescriptionParser.java:78 — SessionDescriptionParser.parse has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TtmlRenderUtil.applyStylesToSpan (cyclomatic 29) · ×1
  • TtmlRenderUtil.applyStylesToSpan (cyclomatic 29) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtil.java:91 — TtmlRenderUtil.applyStylesToSpan has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MatroskaExtractor.endMasterElement (cyclomatic 29) · ×1
  • MatroskaExtractor.endMasterElement (cyclomatic 29) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:726 — MatroskaExtractor.endMasterElement has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SampleReader.appendToNalUnit (cyclomatic 29) · ×1
  • SampleReader.appendToNalUnit (cyclomatic 29) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H264Reader.java:353 — SampleReader.appendToNalUnit has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefaultDashChunkSource.getNextChunk (cyclomatic 28) · ×1
  • DefaultDashChunkSource.getNextChunk (cyclomatic 28) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:323 — DefaultDashChunkSource.getNextChunk has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TextRenderer.render (cyclomatic 28) · ×1
  • TextRenderer.render (cyclomatic 28) library/core/src/main/java/com/google/android/exoplayer2/text/TextRenderer.java:200 — TextRenderer.render has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaCodecUtil.isCodecUsableDecoder (cyclomatic 28) · ×1
  • MediaCodecUtil.isCodecUsableDecoder (cyclomatic 28) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:532 — MediaCodecUtil.isCodecUsableDecoder has cyclomatic complexity 28 (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.
D1 · Cyclomatic Complexity · DefaultExtractorsFactory.addExtractorsForFileType (cyclomatic 28) · ×1
  • DefaultExtractorsFactory.addExtractorsForFileType (cyclomatic 28) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/DefaultExtractorsFactory.java:375 — DefaultExtractorsFactory.addExtractorsForFileType has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HlsMediaPeriod.buildAndPrepareMainSampleStreamWrapper (cyclomatic 27) · ×1
  • HlsMediaPeriod.buildAndPrepareMainSampleStreamWrapper (cyclomatic 27) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaPeriod.java:585 — HlsMediaPeriod.buildAndPrepareMainSampleStreamWrapper has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HlsSampleStreamWrapper.selectTracks (cyclomatic 27) · ×1
  • HlsSampleStreamWrapper.selectTracks (cyclomatic 27) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java:352 — HlsSampleStreamWrapper.selectTracks has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SubtitlePainter.setupTextLayout (cyclomatic 27) · ×1
  • SubtitlePainter.setupTextLayout (cyclomatic 27) library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitlePainter.java:236 — SubtitlePainter.setupTextLayout has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NalUnitUtil.skipShortTermReferencePictureSets (cyclomatic 27) · ×1
  • NalUnitUtil.skipShortTermReferencePictureSets (cyclomatic 27) library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:867 — NalUnitUtil.skipShortTermReferencePictureSets has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MatroskaExtractor.writeSampleData (cyclomatic 27) · ×1
  • MatroskaExtractor.writeSampleData (cyclomatic 27) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:1469 — MatroskaExtractor.writeSampleData has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SampleListLoader.readEntry (cyclomatic 26) · ×1
  • SampleListLoader.readEntry (cyclomatic 26) demos/main/src/main/java/com/google/android/exoplayer2/demo/SampleChooserActivity.java:393 — SampleListLoader.readEntry has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · AacUtil.parseAudioSpecificConfig (cyclomatic 26) · ×1
  • AacUtil.parseAudioSpecificConfig (cyclomatic 26) library/extractor/src/main/java/com/google/android/exoplayer2/audio/AacUtil.java:206 — AacUtil.parseAudioSpecificConfig has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · StyledPlayerView.<init> (cyclomatic 26) · ×1
  • StyledPlayerView.<init> (cyclomatic 26) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:304 — StyledPlayerView.<init> has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MediaCodecVideoRenderer.processOutputBuffer (cyclomatic 26) · ×1
  • MediaCodecVideoRenderer.processOutputBuffer (cyclomatic 26) library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:1121 — MediaCodecVideoRenderer.processOutputBuffer has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlayerView.<init> (cyclomatic 25) · ×1
  • PlayerView.<init> (cyclomatic 25) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:327 — PlayerView.<init> has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MediaCodecRenderer.onInputFormatChanged (cyclomatic 25) · ×1
  • MediaCodecRenderer.onInputFormatChanged (cyclomatic 25) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:1487 — MediaCodecRenderer.onInputFormatChanged has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExoPlayerImpl.updatePlaybackInfo (cyclomatic 25) · ×1
  • ExoPlayerImpl.updatePlaybackInfo (cyclomatic 25) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:1960 — ExoPlayerImpl.updatePlaybackInfo has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SessionCallback.buildAllowedCommands (cyclomatic 24) · ×1
  • SessionCallback.buildAllowedCommands (cyclomatic 24) extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/SessionCallback.java:220 — SessionCallback.buildAllowedCommands has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefaultMediaMetadataProvider.getMetadata (cyclomatic 24) · ×1
  • DefaultMediaMetadataProvider.getMetadata (cyclomatic 24) extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java:1045 — DefaultMediaMetadataProvider.getMetadata has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DashManifestParser.parseMediaPresentationDescription (cyclomatic 24) · ×1
  • DashManifestParser.parseMediaPresentationDescription (cyclomatic 24) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:124 — DashManifestParser.parseMediaPresentationDescription has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DashMediaSource.updateLiveConfiguration (cyclomatic 24) · ×1
  • DashMediaSource.updateLiveConfiguration (cyclomatic 24) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:944 — DashMediaSource.updateLiveConfiguration has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Cea608Decoder.decode (cyclomatic 24) · ×1
  • Cea608Decoder.decode (cyclomatic 24) library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java:463 — Cea608Decoder.decode has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StyledPlayerControlView.<init> (cyclomatic 24) · ×1
  • StyledPlayerControlView.<init> (cyclomatic 24) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:368 — StyledPlayerControlView.<init> has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PlaybackStatsTracker.onEvents (cyclomatic 24) · ×1
  • PlaybackStatsTracker.onEvents (cyclomatic 24) library/core/src/main/java/com/google/android/exoplayer2/analytics/PlaybackStatsListener.java:492 — PlaybackStatsTracker.onEvents has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MediaCodecInfo.canReuseCodec (cyclomatic 24) · ×1
  • MediaCodecInfo.canReuseCodec (cyclomatic 24) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.java:424 — MediaCodecInfo.canReuseCodec has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefaultTsPayloadReaderFactory.createPayloadReader (cyclomatic 24) · ×1
  • DefaultTsPayloadReaderFactory.createPayloadReader (cyclomatic 24) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/DefaultTsPayloadReaderFactory.java:150 — DefaultTsPayloadReaderFactory.createPayloadReader has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · H262Reader.consume (cyclomatic 24) · ×1
  • H262Reader.consume (cyclomatic 24) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:132 — H262Reader.consume has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PmtReader.consume (cyclomatic 24) · ×1
  • PmtReader.consume (cyclomatic 24) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java:587 — PmtReader.consume has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TransformerActivity.createVideoEffectsFromBundle (cyclomatic 23) · ×1
  • TransformerActivity.createVideoEffectsFromBundle (cyclomatic 23) demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/TransformerActivity.java:433 — TransformerActivity.createVideoEffectsFromBundle has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · CronetDataSource.open (cyclomatic 23) · ×1
  • CronetDataSource.open (cyclomatic 23) extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetDataSource.java:529 — CronetDataSource.open has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlayerCommandQueue.processPendingCommandOnHandler (cyclomatic 23) · ×1
  • PlayerCommandQueue.processPendingCommandOnHandler (cyclomatic 23) extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerCommandQueue.java:280 — PlayerCommandQueue.processPendingCommandOnHandler has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SegmentDownloader.download (cyclomatic 23) · ×1
  • SegmentDownloader.download (cyclomatic 23) library/core/src/main/java/com/google/android/exoplayer2/offline/SegmentDownloader.java:156 — SegmentDownloader.download has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TtmlStyle.inherit (cyclomatic 23) · ×1
  • TtmlStyle.inherit (cyclomatic 23) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlStyle.java:246 — TtmlStyle.inherit has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebViewSubtitleOutput.updateWebView (cyclomatic 23) · ×1
  • WebViewSubtitleOutput.updateWebView (cyclomatic 23) library/ui/src/main/java/com/google/android/exoplayer2/ui/WebViewSubtitleOutput.java:171 — WebViewSubtitleOutput.updateWebView has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CacheDataSource.openNextSource (cyclomatic 23) · ×1
  • CacheDataSource.openNextSource (cyclomatic 23) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSource.java:710 — CacheDataSource.openNextSource has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RawResourceDataSource.open (cyclomatic 23) · ×1
  • RawResourceDataSource.open (cyclomatic 23) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/RawResourceDataSource.java:122 — RawResourceDataSource.open has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaCodecRenderer.drainOutputBuffer (cyclomatic 23) · ×1
  • MediaCodecRenderer.drainOutputBuffer (cyclomatic 23) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:1855 — MediaCodecRenderer.drainOutputBuffer has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaCodecUtil.getDecoderInfosInternal (cyclomatic 23) · ×1
  • MediaCodecUtil.getDecoderInfosInternal (cyclomatic 23) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:388 — MediaCodecUtil.getDecoderInfosInternal has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Sniffer.sniffInternal (cyclomatic 23) · ×1
  • Sniffer.sniffInternal (cyclomatic 23) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Sniffer.java:114 — Sniffer.sniffInternal has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PsExtractor.read (cyclomatic 23) · ×1
  • PsExtractor.read (cyclomatic 23) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsExtractor.java:180 — PsExtractor.read has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TsExtractor.read (cyclomatic 23) · ×1
  • TsExtractor.read (cyclomatic 23) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java:307 — TsExtractor.read has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AdTagLoader.handleTimelineOrPositionChanged (cyclomatic 22) · ×1
  • AdTagLoader.handleTimelineOrPositionChanged (cyclomatic 22) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java:867 — AdTagLoader.handleTimelineOrPositionChanged has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ToInt16PcmAudioProcessor.queueInput (cyclomatic 22) · ×1
  • ToInt16PcmAudioProcessor.queueInput (cyclomatic 22) library/common/src/main/java/com/google/android/exoplayer2/audio/ToInt16PcmAudioProcessor.java:65 — ToInt16PcmAudioProcessor.queueInput has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DefaultAudioSink.writeBuffer (cyclomatic 22) · ×1
  • DefaultAudioSink.writeBuffer (cyclomatic 22) library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:1097 — DefaultAudioSink.writeBuffer has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DashManifestParser.parseAdaptationSet (cyclomatic 22) · ×1
  • DashManifestParser.parseAdaptationSet (cyclomatic 22) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:391 — DashManifestParser.parseAdaptationSet has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebvttCssParser.parseStyleDeclaration (cyclomatic 22) · ×1
  • WebvttCssParser.parseStyleDeclaration (cyclomatic 22) library/extractor/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCssParser.java:173 — WebvttCssParser.parseStyleDeclaration has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · StyledPlayerControlView.updateTimeline (cyclomatic 22) · ×1
  • StyledPlayerControlView.updateTimeline (cyclomatic 22) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1185 — StyledPlayerControlView.updateTimeline has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExoPlayerImplInternal.resolvePositionForPlaylistChange (cyclomatic 22) · ×1
  • ExoPlayerImplInternal.resolvePositionForPlaylistChange (cyclomatic 22) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:2655 — ExoPlayerImplInternal.resolvePositionForPlaylistChange has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Ac4Util.parseAc4SyncframeInfo (cyclomatic 21) · ×1
  • Ac4Util.parseAc4SyncframeInfo (cyclomatic 21) library/extractor/src/main/java/com/google/android/exoplayer2/audio/Ac4Util.java:135 — Ac4Util.parseAc4SyncframeInfo has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TtmlDecoder.parseRegionAttributes (cyclomatic 21) · ×1
  • TtmlDecoder.parseRegionAttributes (cyclomatic 21) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:339 — TtmlDecoder.parseRegionAttributes has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefaultHttpDataSource.open (cyclomatic 21) · ×1
  • DefaultHttpDataSource.open (cyclomatic 21) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java:373 — DefaultHttpDataSource.open has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FragmentedMp4Extractor.readAtomHeader (cyclomatic 21) · ×1
  • FragmentedMp4Extractor.readAtomHeader (cyclomatic 21) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:364 — FragmentedMp4Extractor.readAtomHeader has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FragmentedMp4Extractor.readSample (cyclomatic 21) · ×1
  • FragmentedMp4Extractor.readSample (cyclomatic 21) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:1351 — FragmentedMp4Extractor.readSample has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PesReader.consume (cyclomatic 21) · ×1
  • PesReader.consume (cyclomatic 21) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PesReader.java:95 — PesReader.consume has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DefaultEncoderFactory.createForVideoEncoding (cyclomatic 21) · ×1
  • DefaultEncoderFactory.createForVideoEncoding (cyclomatic 21) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultEncoderFactory.java:208 — DefaultEncoderFactory.createForVideoEncoding has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebServerDispatcher.dispatch (cyclomatic 21) · ×1
  • WebServerDispatcher.dispatch (cyclomatic 21) testutils/src/main/java/com/google/android/exoplayer2/testutil/WebServerDispatcher.java:264 — WebServerDispatcher.dispatch has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExoPlayerImplInternal.maybeTriggerPendingMessages (cyclomatic 21) · ×1
  • ExoPlayerImplInternal.maybeTriggerPendingMessages (cyclomatic 21) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:1655 — ExoPlayerImplInternal.maybeTriggerPendingMessages has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExoPlayerImplInternal.maybeUpdateReadingPeriod (cyclomatic 21) · ×1
  • ExoPlayerImplInternal.maybeUpdateReadingPeriod (cyclomatic 21) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:2091 — ExoPlayerImplInternal.maybeUpdateReadingPeriod has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DownloadService.onStartCommand (cyclomatic 20) · ×1
  • DownloadService.onStartCommand (cyclomatic 20) library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadService.java:616 — DownloadService.onStartCommand has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HlsChunkSource.getNextChunk (cyclomatic 20) · ×1
  • HlsChunkSource.getNextChunk (cyclomatic 20) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsChunkSource.java:384 — HlsChunkSource.getNextChunk has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RtpVp9Reader.validateVp9Descriptor (cyclomatic 20) · ×1
  • RtpVp9Reader.validateVp9Descriptor (cyclomatic 20) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpVp9Reader.java:156 — RtpVp9Reader.validateVp9Descriptor has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CueBuilder.buildCurrentLine (cyclomatic 20) · ×1
  • CueBuilder.buildCurrentLine (cyclomatic 20) library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java:1054 — CueBuilder.buildCurrentLine has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DvbParser.parseSubtitlingSegment (cyclomatic 20) · ×1
  • DvbParser.parseSubtitlingSegment (cyclomatic 20) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:268 — DvbParser.parseSubtitlingSegment has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SpannedToHtmlConverter.getOpeningTag (cyclomatic 20) · ×1
  • SpannedToHtmlConverter.getOpeningTag (cyclomatic 20) library/ui/src/main/java/com/google/android/exoplayer2/ui/SpannedToHtmlConverter.java:155 — SpannedToHtmlConverter.getOpeningTag has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ComponentListener.onClick (cyclomatic 20) · ×1
  • ComponentListener.onClick (cyclomatic 20) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1696 — ComponentListener.onClick has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FinalShaderProgramWrapper.ensureConfigured (cyclomatic 20) · ×1
  • FinalShaderProgramWrapper.ensureConfigured (cyclomatic 20) library/effect/src/main/java/com/google/android/exoplayer2/effect/FinalShaderProgramWrapper.java:396 — FinalShaderProgramWrapper.ensureConfigured has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · MediaMetadata.fromBundle (cyclomatic 20) · ×1
  • MediaMetadata.fromBundle (cyclomatic 20) library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:1306 — MediaMetadata.fromBundle has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ExoPlayerImplInternal.resetInternal (cyclomatic 20) · ×1
  • ExoPlayerImplInternal.resetInternal (cyclomatic 20) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:1441 — ExoPlayerImplInternal.resetInternal has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaCodecAudioRenderer.supportsFormat (cyclomatic 19) · ×1
  • MediaCodecAudioRenderer.supportsFormat (cyclomatic 19) library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java:288 — MediaCodecAudioRenderer.supportsFormat has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DashManifestParser.parseContentProtection (cyclomatic 19) · ×1
  • DashManifestParser.parseContentProtection (cyclomatic 19) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:580 — DashManifestParser.parseContentProtection has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Cea708Decoder.processCurrentPacket (cyclomatic 19) · ×1
  • Cea708Decoder.processCurrentPacket (cyclomatic 19) library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java:292 — Cea708Decoder.processCurrentPacket has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TtmlDecoder.parseNode (cyclomatic 19) · ×1
  • TtmlDecoder.parseNode (cyclomatic 19) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:644 — TtmlDecoder.parseNode has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TtmlNode.cleanUpText (cyclomatic 19) · ×1
  • TtmlNode.cleanUpText (cyclomatic 19) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlNode.java:439 — TtmlNode.cleanUpText has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WebvttCueParser.parseCueText (cyclomatic 19) · ×1
  • WebvttCueParser.parseCueText (cyclomatic 19) library/extractor/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParser.java:253 — WebvttCueParser.parseCueText has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DownloadNotificationHelper.buildProgressNotification (cyclomatic 19) · ×1
  • DownloadNotificationHelper.buildProgressNotification (cyclomatic 19) library/core/src/main/java/com/google/android/exoplayer2/ui/DownloadNotificationHelper.java:87 — DownloadNotificationHelper.buildProgressNotification has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlayerControlView.updateTimeline (cyclomatic 19) · ×1
  • PlayerControlView.updateTimeline (cyclomatic 19) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:947 — PlayerControlView.updateTimeline has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NotificationBroadcastReceiver.onReceive (cyclomatic 19) · ×1
  • NotificationBroadcastReceiver.onReceive (cyclomatic 19) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java:1536 — NotificationBroadcastRece...

    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.