Public report of google/ExoPlayer, published 24 October 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 24 October 2026, 05:26 UTC · Survey ID cd_80efe4a231cf4ce894636c976d69a947
google/ExoPlayer
Measured 24 October 2026, 05:22 UTC, at code version dd430f7
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
Test reliability is not measured: The suite could not be re-run, but the repository declares tests of its own unreliable.
CAI scoreWeak
CriticalWeakAdequateStrongExemplary
Down 9 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A large codebase: 297,336 lines of product code in 37 projects, tests not counted · Estimated rebuild effort: about 2.5 person-years · Weakest lens: Accessibility, 18
Findings by how serious they are
20 critical1899 serious1042 minor
16 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 October 2026, 05:22 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
59of 62 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
2951of 2961 findings point to an exact file and line, so you can open each one in the code. The other 10 concern the repository as a whole, such as missing documentation.
62dimensions across 7 lenses, read from 297,336 lines of product code in 37 projects.
google/ExoPlayer scores 38 out of 100 and is rated Weak, while five of its seven lenses score higher still: Architecture at 96 and Security and Compliance at 93, both rated Exemplary, Code Health at 80 and Maturity at 60, both rated Adequate, and Performance at 74, rated Strong.
The score is lower than those five because the weakest lens counts most, and here that is Accessibility, which scores 18 and is rated Critical. Its Visual & motion safety dimension scores 1 out of 10, and until that reaches 4, Accessibility can't be rated higher than Adequate. The first actions are to keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1 and to give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label, and if Accessibility rose to 70, the score would rise from 38 to about 54.
20 findings are critical: 14 in Forms & labels, three in Secrets (history), one in Change Coupling, one in Test Quality and one in Test Reliability.
Watchdog couldn't measure 14 dimensions in this code, among them Code Coverage, ADR Quality and Internal API Consistency, so they are left out of the score. The product code is 297,336 lines, which would take an estimated 2.5 person-years, around €370,000, to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Accessibility rose from 18 to 70, the lowest score rated Strong, the score would rise from 38 to about 54.
Code composition: what the lines of code are
Product code 69%Tests 31%
New since the last survey: 6 findings
These 6 critical or serious findings weren't in the previous survey, on 10 October 2026.
Visual & motion safety · Focus outline removed in CSS without a :focus replacement docs/doc/reference/jquery/jquery-ui.css
Visual & motion safety · Focus outline removed in CSS without a :focus replacement docs/doc/reference/jquery/jquery-ui.css
Visual & motion safety · Focus outline removed in CSS without a :focus replacement docs/doc/reference/jquery/jquery-ui.structure.css
Visual & motion safety · Focus outline removed in CSS without a :focus replacement docs/doc/reference/jquery/jquery-ui.structure.css
Visual & motion safety · Focus outline removed in CSS without a :focus replacement docs/_sass/common/_reset.scss
Visual & motion safety · Focus outline removed in CSS without a :focus replacement docs/_sass/common/_reset.scss
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 220 findings
These 220 critical or serious findings were in the previous survey, on 10 October 2026, and are gone from this one. The first 100 are listed here.
Test Quality · No assertions: downloadRenewReleaseKey library/core/src/test/java/com/google/android/exoplayer2/drm/OfflineLicenseHelperTest.java
Test Quality · No assertions: addAndGetDownload_nonExistingId_returnsTheSameDownload library/core/src/test/java/com/google/android/exoplayer2/offline/DefaultDownloadIndexTest.java
Test Quality · No assertions: downloadIndex_upgradesFromVersion2 library/core/src/test/java/com/google/android/exoplayer2/offline/DefaultDownloadIndexTest.java
Test Quality · No assertions: setSingleDownloadStopReason_notTerminalState_doesNotSetStopReason library/core/src/test/java/com/google/android/exoplayer2/offline/DefaultDownloadIndexTest.java
Test Quality · No assertions: setSingleDownloadStopReason_setReason library/core/src/test/java/com/google/android/exoplayer2/offline/DefaultDownloadIndexTest.java
Test Quality · No assertions: setSingleDownloadStopReason_setReasonToNone library/core/src/test/java/com/google/android/exoplayer2/offline/DefaultDownloadIndexTest.java
Test Quality · No assertions: setStopReason_notTerminalState_doesNotSetStopReason library/core/src/test/java/com/google/android/exoplayer2/offline/DefaultDownloadIndexTest.java
Test Quality · No assertions: setStopReason_setReason library/core/src/test/java/com/google/android/exoplayer2/offline/DefaultDownloadIndexTest.java
Test Quality · No assertions: setStopReason_setReasonToNone library/core/src/test/java/com/google/android/exoplayer2/offline/DefaultDownloadIndexTest.java
Test Quality · No assertions: downloadAfterRemove_maxDownloadIsOne_isNotStarted library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: downloadAndRemove_withDifferentIds_maxDownloadsIsOne_executeInParallel library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: downloadRequest_downloads library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: download_WhenRemovalInProgress_doesNotCancelRemoval library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: downloads_withDifferentIds_executeInParallel library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: downloads_withDifferentIds_maxDownloadsIsOne_executedSequentially library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: downloads_withSameIdsAndDifferentStreamKeys_areMerged library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: mergeRequest_completedWithStopReason_becomesStopped library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: mergeRequest_failed_becomesQueued library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: mergeRequest_removing_becomesRestarting library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: mergeRequest_stopped_staysStopped library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: pauseAndResume_pausesAndResumesDownload library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: pause_doesNotCancelRemove library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: removeAllDownloads_removesAllDownloads library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: removeRequest_cancelsAndRemovesDownload library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: remove_WhenRemovalInProgress_doesNothing library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: remove_removesStoppedDownload library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: setAndClearStopReason_stopsAndRestartsDownload library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: setStopReason_doesNotStopOtherDownload library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java
Test Quality · No assertions: mergeRequest_withSameRequest library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadRequestTest.java
Test Quality · No assertions: copy library/dash/src/test/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestTest.java
Test Quality · No assertions: copySameAdaptationIndexButDifferentPeriod library/dash/src/test/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestTest.java
Test Quality · No assertions: copySkipPeriod library/dash/src/test/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestTest.java
Test Quality · No assertions: merge library/dash/src/test/java/com/google/android/exoplayer2/source/dash/manifest/RangedUriTest.java
Test Quality · No assertions: mergeUnbounded library/dash/src/test/java/com/google/android/exoplayer2/source/dash/manifest/RangedUriTest.java
Test Quality · No assertions: mergeWithBaseUri library/dash/src/test/java/com/google/android/exoplayer2/source/dash/manifest/RangedUriTest.java
Test Quality · No assertions: nonMerge library/dash/src/test/java/com/google/android/exoplayer2/source/dash/manifest/RangedUriTest.java
Test Quality · No assertions: iso8601ParserParse library/dash/src/test/java/com/google/android/exoplayer2/source/dash/DashMediaSourceTest.java
Test Quality · No assertions: copy library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestTest.java
Test Quality · No assertions: copyRemoveStreamElement library/smoothstreaming/src/test/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestTest.java
Test Quality · No assertions: prepareUsingBundledExtractors_updatesSourceInfoBeforeOnPreparedCallback library/core/src/test/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriodTest.java
Test Quality · No assertions: prepareUsingMediaParser_updatesSourceInfoBeforeOnPreparedCallback library/core/src/test/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriodTest.java
Test Quality · No assertions: adjustUpstreamFormat library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: allowPlayClearSamplesWithoutKeysReadsClearSamples library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: capacityIncreases library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: discardUpstream library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: discardUpstreamAfterRead library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: discardUpstreamBeforeRead library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: discardUpstreamFrom library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: discardUpstreamFromAfterRead library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: discardUpstreamFromBeforeRead library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: discardUpstreamFromMulti library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: discardUpstreamFromNonSampleTimestamps library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: discardUpstreamMulti library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: equalFormatsDeduplicated library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: invalidateUpstreamFormatAdjustment library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: multipleFormatsDeduplicated library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: readMultiSamplesTwice library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: readSingleSampleWithLoadingFinished library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: readSingleSamples library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: readWithoutWrite library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: resetReleasesAllocations library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: setSampleOffsetBeforeData library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: setSampleOffsetBetweenSamples library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: skipToEnd library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: skipToEndRetainsUnassignedData library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: splice library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: spliceAfterRead library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: spliceWithSampleOffset library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java
Test Quality · No assertions: defaultShuffleOrder library/core/src/test/java/com/google/android/exoplayer2/source/ShuffleOrderTest.java
Test Quality · No assertions: unshuffledShuffleOrder library/core/src/test/java/com/google/android/exoplayer2/source/ShuffleOrderTest.java
Test Quality · No assertions: singleCueSample library/extractor/src/test/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttDecoderTest.java
Test Quality · No assertions: twoCuesSample library/extractor/src/test/java/com/google/android/exoplayer2/text/webvtt/Mp4WebvttDecoderTest.java
Test Quality · No assertions: getInputLimit library/extractor/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCssParserTest.java
Test Quality · No assertions: multiplePropertiesInBlock library/extractor/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCssParserTest.java
Test Quality · No assertions: parseMethodMultipleRulesInBlockInput library/extractor/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCssParserTest.java
Test Quality · No assertions: parseMethodSimpleInput library/extractor/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCssParserTest.java
Test Quality · No assertions: rgbaColorExpression library/extractor/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCssParserTest.java
Test Quality · No assertions: skipWhitespacesAndComments library/extractor/src/test/java/com/google/android/exoplayer2/text/webvtt/WebvttCssParserTest.java
Test Quality · No assertions: writeRead library/common/src/test/java/com/google/android/exoplayer2/util/AtomicFileTest.java
Test Quality · No assertions: getObjectTypeFromMp4aRFC6381CodecString_onValidInput_returnsCorrectObjectType library/common/src/test/java/com/google/android/exoplayer2/util/MimeTypesTest.java
Test Quality · No assertions: readInt library/common/src/test/java/com/google/android/exoplayer2/util/ParsableByteArrayTest.java
Test Quality · No assertions: readLong library/common/src/test/java/com/google/android/exoplayer2/util/ParsableByteArrayTest.java
Test Quality · No assertions: readShort library/common/src/test/java/com/google/android/exoplayer2/util/ParsableByteArrayTest.java
Test Quality · No assertions: readUnsignedInt library/common/src/test/java/com/google/android/exoplayer2/util/ParsableByteArrayTest.java
Test Quality · No assertions: escapeUnescapeFileName_returnsEscapedString library/common/src/test/java/com/google/android/exoplayer2/util/UtilTest.java
Test Quality · No assertions: discardToSps library/container/src/test/java/com/google/android/exoplayer2/util/NalUnitUtilTest.java
Test Quality · No assertions: unescapeDoesNotModifyBuffersWithoutStartCodes library/container/src/test/java/com/google/android/exoplayer2/util/NalUnitUtilTest.java
Test Quality · No assertions: unescapeModifiesBuffersWithStartCodes library/container/src/test/java/com/google/android/exoplayer2/util/NalUnitUtilTest.java
Test Quality · No assertions: convertsAngleAxisToRotationMatrix library/core/src/test/java/com/google/android/exoplayer2/video/spherical/FrameRotationQueueTest.java
Test Quality · No assertions: recentering_yawAndPitch library/core/src/test/java/com/google/android/exoplayer2/video/spherical/FrameRotationQueueTest.java
Test Quality · No assertions: recentering_yawAndPitch2 library/core/src/test/java/com/google/android/exoplayer2/video/spherical/FrameRotationQueueTest.java
Test Quality · No assertions: recentering_yawAndPitchAndRoll library/core/src/test/java/com/google/android/exoplayer2/video/spherical/FrameRotationQueueTest.java
Test Quality · No assertions: decodeMshp library/core/src/test/java/com/google/android/exoplayer2/video/spherical/ProjectionDecoderTest.java
Test Quality · No assertions: decodeProj library/core/src/test/java/com/google/android/exoplayer2/video/spherical/ProjectionDecoderTest.java
Test Quality · No assertions: argumentValidation library/core/src/test/java/com/google/android/exoplayer2/video/spherical/ProjectionTest.java
Test Quality · No assertions: absoluteSizeSpan_wrongFlags testutils/src/test/java/com/google/android/exoplayer2/testutil/truth/SpannedSubjectTest.java
Test Quality · No assertions: absoluteSizeSpan_wrongIndex testutils/src/test/java/com/google/android/exoplayer2/testutil/truth/SpannedSubjectTest.java
Test Quality · No assertions: alignmentSpan_mismatchedIndex testutils/src/test/java/com/google/android/exoplayer2/testutil/truth/SpannedSubjectTest.java
Test Quality · No assertions: alignmentSpan_wrongFlags testutils/src/test/java/com/google/android/exoplayer2/testutil/truth/SpannedSubjectTest.java
Test Quality · No assertions: backgroundColorSpan_mismatchedIndex testutils/src/test/java/com/google/android/exoplayer2/testutil/truth/SpannedSubjectTest.java
Rebuild cost: about €370,000 · Estimate
Cost to rebuild
€120,000 to €620,000, for 2,044 to 6,484 hours of work, about 2.5 person-years for 1 to 5 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 38. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 297,336 lines of product code
How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Raises the score by about 10 points · Medium effort · Forms & labels
3
Enforce accessibility in the toolchain your project already uses: assert accessibility in your UI test suite with your toolkit's own matcher (Flutter `meetsGuideline`, Espresso `AccessibilityChecks`, XCTest `performAccessibilityAudit`), then gate that test in CI so a regression blocks the merge.
Raises the score by about 7 points · Medium effort · A11y enforcement
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €370,000 to build again, about 2.5 person-years of work. Its weakest lens is Accessibility, at 18 (Critical). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1. Of all the actions in this report, it raises the score most for the work it takes: about 10 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 6.8 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 3% to 6% on every change.
How this is estimated: It rests on an assumption of Watchdog's own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4)
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
100 modules, with 408 dependencies between them. 4 loops run through 30 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 60 more are left out to keep it readable.
Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
decoder uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break decoder, while a change to decoder can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
mediacodec uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break mediacodec, while a change to mediacodec can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metadata uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break metadata, while a change to metadata can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
source.mediaparser uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break source.mediaparser, while a change to source.mediaparser can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
video uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break video, while a change to video can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
27 pairs of types, where a type in source.chunk uses a type in upstream. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
source.chunk uses source.mediaparser, so a change to source.mediaparser can break source.chunk, while a change to source.chunk can't break source.mediaparser.
Position
Below the diagonal: source.chunk uses a module listed above it, which is the healthy direction.
source.chunk uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break source.chunk, while a change to source.chunk can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
29 pairs of types, where a type in trackselection uses a type in source. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
trackselection uses audio, so a change to audio can break trackselection, while a change to trackselection can't break audio.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→23 trackselection uses com.google.android.exoplayer2part of a loop✕
Connections
33 pairs of types, where a type in trackselection uses a type in com.google.android.exoplayer2. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
trackselection uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break trackselection, while a change to trackselection can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
util uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break util, while a change to util can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
metadata.id3 uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break metadata.id3, while a change to metadata.id3 can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
offline uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break offline, while a change to offline can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
video.spherical uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break video.spherical, while a change to video.spherical can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
extractor uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break extractor, while a change to extractor can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
text uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break text, while a change to text can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
ui uses source, so a change to source can break ui, while a change to ui can't break source.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
16→23 ui uses com.google.android.exoplayer2part of a loop✕
Connections
35 pairs of types, where a type in ui uses a type in com.google.android.exoplayer2. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ui uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break ui, while a change to ui can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
source.ads uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break source.ads, while a change to source.ads can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
source uses analytics, so a change to analytics can break source, while a change to source can't break analytics.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
18→23 source uses com.google.android.exoplayer2part of a loop✕
Connections
91 pairs of types, where a type in source uses a type in com.google.android.exoplayer2. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
source uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break source, while a change to source can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
drm uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break drm, while a change to drm can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
audio uses analytics, so a change to analytics can break audio, while a change to audio can't break analytics.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
20→23 audio uses com.google.android.exoplayer2part of a loop✕
Connections
30 pairs of types, where a type in audio uses a type in com.google.android.exoplayer2. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
audio uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break audio, while a change to audio can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
analytics uses audio, so a change to audio can break analytics, while a change to analytics can't break audio.
Position
Below the diagonal: analytics uses a module listed above it, which is the healthy direction.
21→23 analytics uses com.google.android.exoplayer2part of a loop✕
Connections
54 pairs of types, where a type in analytics uses a type in com.google.android.exoplayer2. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
analytics uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break analytics, while a change to analytics can't break com.google.android.exoplayer2.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
com.google.android.exoplayer2 uses decoder, so a change to decoder can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break decoder.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
com.google.android.exoplayer2 uses mediacodec, so a change to mediacodec can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break mediacodec.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
com.google.android.exoplayer2 uses metadata, so a change to metadata can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break metadata.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
com.google.android.exoplayer2 uses upstream, so a change to upstream can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break upstream.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
com.google.android.exoplayer2 uses video, so a change to video can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break video.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
com.google.android.exoplayer2 uses trackselection, so a change to trackselection can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break trackselection.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
36 pairs of types, where a type in com.google.android.exoplayer2 uses a type in util. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com.google.android.exoplayer2 uses util, so a change to util can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break util.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
com.google.android.exoplayer2 uses offline, so a change to offline can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break offline.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
com.google.android.exoplayer2 uses video.spherical, so a change to video.spherical can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break video.spherical.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
com.google.android.exoplayer2 uses text, so a change to text can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break text.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
com.google.android.exoplayer2 uses source.ads, so a change to source.ads can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break source.ads.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
62 pairs of types, where a type in com.google.android.exoplayer2 uses a type in source. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
com.google.android.exoplayer2 uses source, so a change to source can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break source.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
com.google.android.exoplayer2 uses drm, so a change to drm can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break drm.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
com.google.android.exoplayer2 uses audio, so a change to audio can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break audio.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
com.google.android.exoplayer2 uses analytics, so a change to analytics can break com.google.android.exoplayer2, while a change to com.google.android.exoplayer2 can't break analytics.
Position
Below the diagonal: com.google.android.exoplayer2 uses a module listed above it, which is the healthy direction.
ext.flac uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break ext.flac, while a change to ext.flac can't break com.google.android.exoplayer2.
Position
Below the diagonal: ext.flac uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in ext.ima uses a type in com.google.android.exoplayer2. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ext.ima uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break ext.ima, while a change to ext.ima can't break com.google.android.exoplayer2.
Position
Below the diagonal: ext.ima uses a module listed above it, which is the healthy direction.
metadata.emsg uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break metadata.emsg, while a change to metadata.emsg can't break com.google.android.exoplayer2.
Position
Below the diagonal: metadata.emsg uses a module listed above it, which is the healthy direction.
source.hls.playlist uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break source.hls.playlist, while a change to source.hls.playlist can't break com.google.android.exoplayer2.
Position
Below the diagonal: source.hls.playlist uses a module listed above it, which is the healthy direction.
27→36 source.hls.playlist uses source.hlspart of a loop✕
Connections
2 pairs of types, where a type in source.hls.playlist uses a type in source.hls.
source.hls.playlist uses source.hls, so a change to source.hls can break source.hls.playlist, while a change to source.hls.playlist can't break source.hls.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
source.rtsp uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break source.rtsp, while a change to source.rtsp can't break com.google.android.exoplayer2.
Position
Below the diagonal: source.rtsp uses a module listed above it, which is the healthy direction.
53 pairs of types, where a type in testutil uses a type in trackselection. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
131 pairs of types, where a type in testutil uses a type in com.google.android.exoplayer2. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
testutil uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break testutil, while a change to testutil can't break com.google.android.exoplayer2.
Position
Below the diagonal: testutil uses a module listed above it, which is the healthy direction.
48 pairs of types, where a type in transformer uses a type in com.google.android.exoplayer2. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
transformer uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break transformer, while a change to transformer can't break com.google.android.exoplayer2.
Position
Below the diagonal: transformer uses a module listed above it, which is the healthy direction.
extractor.mp4 uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break extractor.mp4, while a change to extractor.mp4 can't break com.google.android.exoplayer2.
Position
Below the diagonal: extractor.mp4 uses a module listed above it, which is the healthy direction.
robolectric uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break robolectric, while a change to robolectric can't break com.google.android.exoplayer2.
Position
Below the diagonal: robolectric uses a module listed above it, which is the healthy direction.
source.dash.manifest uses upstream, so a change to upstream can break source.dash.manifest, while a change to source.dash.manifest can't break upstream.
Position
Below the diagonal: source.dash.manifest uses a module listed above it, which is the healthy direction.
source.dash.manifest uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break source.dash.manifest, while a change to source.dash.manifest can't break com.google.android.exoplayer2.
Position
Below the diagonal: source.dash.manifest uses a module listed above it, which is the healthy direction.
source.dash.manifest uses metadata.emsg, so a change to metadata.emsg can break source.dash.manifest, while a change to source.dash.manifest can't break metadata.emsg.
Position
Below the diagonal: source.dash.manifest uses a module listed above it, which is the healthy direction.
33→35 source.dash.manifest uses source.dashpart of a loop✕
Connections
4 pairs of types, where a type in source.dash.manifest uses a type in source.dash.
source.dash.manifest uses source.dash, so a change to source.dash can break source.dash.manifest, while a change to source.dash.manifest can't break source.dash.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
42 pairs of types, where a type in source.dash uses a type in upstream. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
source.dash uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break source.dash, while a change to source.dash can't break com.google.android.exoplayer2.
Position
Below the diagonal: source.dash uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in source.dash uses a type in source.dash.manifest. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
source.dash uses source.dash.manifest, so a change to source.dash.manifest can break source.dash, while a change to source.dash can't break source.dash.manifest.
Position
Below the diagonal: source.dash uses a module listed above it, which is the healthy direction.
36 pairs of types, where a type in source.hls uses a type in upstream. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
source.hls uses source.mediaparser, so a change to source.mediaparser can break source.hls, while a change to source.hls can't break source.mediaparser.
Position
Below the diagonal: source.hls uses a module listed above it, which is the healthy direction.
26 pairs of types, where a type in source.hls uses a type in extractor. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
source.hls uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break source.hls, while a change to source.hls can't break com.google.android.exoplayer2.
Position
Below the diagonal: source.hls uses a module listed above it, which is the healthy direction.
source.hls uses source.hls.playlist, so a change to source.hls.playlist can break source.hls, while a change to source.hls can't break source.hls.playlist.
Position
Below the diagonal: source.hls uses a module listed above it, which is the healthy direction.
source.smoothstreaming.manifest uses upstream, so a change to upstream can break source.smoothstreaming.manifest, while a change to source.smoothstreaming.manifest can't break upstream.
Position
Below the diagonal: source.smoothstreaming.manifest uses a module listed above it, which is the healthy direction.
source.smoothstreaming.manifest uses offline, so a change to offline can break source.smoothstreaming.manifest, while a change to source.smoothstreaming.manifest can't break offline.
Position
Below the diagonal: source.smoothstreaming.manifest uses a module listed above it, which is the healthy direction.
source.smoothstreaming.manifest uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break source.smoothstreaming.manifest, while a change to source.smoothstreaming.manifest can't break com.google.android.exoplayer2.
Position
Below the diagonal: source.smoothstreaming.manifest uses a module listed above it, which is the healthy direction.
source.smoothstreaming.manifest uses extractor.mp4, so a change to extractor.mp4 can break source.smoothstreaming.manifest, while a change to source.smoothstreaming.manifest can't break extractor.mp4.
Position
Below the diagonal: source.smoothstreaming.manifest uses a module listed above it, which is the healthy direction.
source.dash.offline uses upstream.cache, so a change to upstream.cache can break source.dash.offline, while a change to source.dash.offline can't break upstream.cache.
Position
Below the diagonal: source.dash.offline uses a module listed above it, which is the healthy direction.
source.dash.offline uses extractor, so a change to extractor can break source.dash.offline, while a change to source.dash.offline can't break extractor.
Position
Below the diagonal: source.dash.offline uses a module listed above it, which is the healthy direction.
source.dash.offline uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break source.dash.offline, while a change to source.dash.offline can't break com.google.android.exoplayer2.
Position
Below the diagonal: source.dash.offline uses a module listed above it, which is the healthy direction.
source.dash.offline uses source.dash.manifest, so a change to source.dash.manifest can break source.dash.offline, while a change to source.dash.offline can't break source.dash.manifest.
Position
Below the diagonal: source.dash.offline uses a module listed above it, which is the healthy direction.
source.dash.offline uses source.dash, so a change to source.dash can break source.dash.offline, while a change to source.dash.offline can't break source.dash.
Position
Below the diagonal: source.dash.offline uses a module listed above it, which is the healthy direction.
28 pairs of types, where a type in source.smoothstreaming uses a type in upstream. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
source.smoothstreaming uses upstream, so a change to upstream can break source.smoothstreaming, while a change to source.smoothstreaming can't break upstream.
Position
Below the diagonal: source.smoothstreaming uses a module listed above it, which is the healthy direction.
source.smoothstreaming uses source.chunk, so a change to source.chunk can break source.smoothstreaming, while a change to source.smoothstreaming can't break source.chunk.
Position
Below the diagonal: source.smoothstreaming uses a module listed above it, which is the healthy direction.
source.smoothstreaming uses trackselection, so a change to trackselection can break source.smoothstreaming, while a change to source.smoothstreaming can't break trackselection.
Position
Below the diagonal: source.smoothstreaming uses a module listed above it, which is the healthy direction.
source.smoothstreaming uses offline, so a change to offline can break source.smoothstreaming, while a change to source.smoothstreaming can't break offline.
Position
Below the diagonal: source.smoothstreaming uses a module listed above it, which is the healthy direction.
source.smoothstreaming uses source, so a change to source can break source.smoothstreaming, while a change to source.smoothstreaming can't break source.
Position
Below the diagonal: source.smoothstreaming uses a module listed above it, which is the healthy direction.
source.smoothstreaming uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break source.smoothstreaming, while a change to source.smoothstreaming can't break com.google.android.exoplayer2.
Position
Below the diagonal: source.smoothstreaming uses a module listed above it, which is the healthy direction.
source.smoothstreaming uses source.smoothstreaming.manifest, so a change to source.smoothstreaming.manifest can break source.smoothstreaming, while a change to source.smoothstreaming can't break source.smoothstreaming.manifest.
Position
Below the diagonal: source.smoothstreaming uses a module listed above it, which is the healthy direction.
playbacktests.gts uses upstream.cache, so a change to upstream.cache can break playbacktests.gts, while a change to playbacktests.gts can't break upstream.cache.
Position
Below the diagonal: playbacktests.gts uses a module listed above it, which is the healthy direction.
playbacktests.gts uses trackselection, so a change to trackselection can break playbacktests.gts, while a change to playbacktests.gts can't break trackselection.
Position
Below the diagonal: playbacktests.gts uses a module listed above it, which is the healthy direction.
playbacktests.gts uses com.google.android.exoplayer2, so a change to com.google.android.exoplayer2 can break playbacktests.gts, while a change to playbacktests.gts can't break com.google.android.exoplayer2.
Position
Below the diagonal: playbacktests.gts uses a module listed above it, which is the healthy direction.
playbacktests.gts uses source.dash.offline, so a change to source.dash.offline can break playbacktests.gts, while a change to playbacktests.gts can't break source.dash.offline.
Position
Below the diagonal: playbacktests.gts uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 80% · Adequate · gated by D2 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A07:2025 — Authentication Failures
4
High / Critical
A05:2025 — Injection
2
Medium
Roadmap
First, address immediate visual and motion safety by ensuring visible focus styles, respecting reduced motion preferences, and fixing low-contrast colors. Next, make all form controls and buttons programmatically accessible by adding proper labels. Then, integrate accessibility checks into your UI test suite and enforce them in CI to prevent regressions. Finally, establish a CI pipeline to run tests on every push and add security scanning to block builds with vulnerabilities.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Enforce accessibility in the toolchain your project already uses: assert accessibility in your UI test suite with your toolkit's own matcher (Flutter `meetsGuideline`, Espresso `AccessibilityChecks`, XCTest `performAccessibilityAudit`), then gate that test in CI so a regression blocks the merge.
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.
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
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.
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 20
A definite problem that already costs you something and drags the score down: a
missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here
tends to cause failures elsewhere.
Serious — 1899
Likely wrong, but not failing yet. It degrades
the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to
carry for two years either.
Minor — 1042
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 16
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 59 of 62 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — 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 — 62 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 2951 of 2961 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.java) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (JaCoCo XML — the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (JaCoCo XML — the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository declares 1 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.java), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Gradle build (build.gradle/build.gradle.kts), but the licence verdict published here was taken over its gem dependencies. Nothing was read about its Gradle dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
D20 ADR Quality — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The ADR expectation is gated on whether a repository ships a deployable product. Our repo-kind classifier reads .NET project files and the host and package markers of the other ecosystems it knows (a Go `package main`, a Cargo binary, a package.json `bin`, `start` script or application dev server such as Vite or Next, Python console scripts or a Django/WSGI entry point, a Spring Boot / WAR / Gradle application build, a Rack or Rails app, a Composer project, an OTP release or escript, a Dockerfile, a Procfile, a Platform.sh `.platform/routes.yaml`, and the corresponding published-package manifests, including an OTP `*.app.src`, a Drupal module's `*.info` and a Claude Code `.claude-plugin/plugin.json`), and found none here, so we could not tell what kind of repository this is and did not assess its ADR log. This is a gap in our analyzer, not a finding about this repository.
D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `docs/_includes/scripts/components/lightbox.js`, `docs/_includes/scripts/lib/gallery.js`, `docs/_includes/search-providers/default/search-data.js`, `docs/assets/search.js`, `extensions/media2/src/androidTest/res/raw/video_not_seekable.ts`, … (+2 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AXB1 Runtime evidence locked — no reproducible boot — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: a native UI project (extensions/av1/src/main/AndroidManifest.xml). The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Java, c, cpp is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala or Kotlin was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
X2 Cancellation propagation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D19 Documentation Quality: Documentation quality 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. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
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.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
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").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
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.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
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; each names its own sample and method on its card. They 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.
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.
192 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping at 526. A further 31 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. 14 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java (DefaultBandwidthMeter.getInitialBitrateCountryGroupAssignment at 239), library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java (ExperimentalBandwidthMeter.getInitialBitrateCountryGroupAssignment at 239), library/common/src/main/java/com/google/android/exoplayer2/PlaybackException.java (PlaybackException.getErrorCodeName at 38), library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioTrackBufferSizeProvider.java (DefaultAudioTrackBufferSizeProvider.getMaximumEncodedRateBytesPerSecond at 24), library/common/src/main/java/com/google/android/exoplayer2/util/NetworkTypeObserver.java (NetworkTypeObserver.getMobileNetworkType at 22), and 9 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 187 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 240 down to 240 or less in Cyclomatic Complexity — start with DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping (cyclomatic 526). — Refactoring it lifts Cyclomatic Complexity from 4.3 to about 5.1/10.
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.
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.
355 method(s) exceeded the cognitive complexity threshold of 15; the worst was DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping at 796.
+ 350 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 240 down to 240 or less in Cognitive Complexity — start with DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping (cognitive 796). — Refactoring it lifts Cognitive Complexity from 3.8 to about 5.1/10.
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.
Do you agree with this assessment?
D3 · God Classes8.1 / 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.
Resolve the 81 FileTooLong finding(s) in God Classes — start with jquery.js, jquery-3.5.1.js, ExoPlayerImpl.java. — One of this dimension's main actionable groups (81 warning-level).
Resolve the 74 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 (74 warning-level).
Resolve the 54 ClassTooLong finding(s) in God Classes — start with MatroskaExtractor.java, DashManifestParser.java, MediaCodecRenderer.java. — One of this dimension's main actionable groups (54 warning-level).
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.
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.
256 duplicated block group(s) detected. A further 4 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 1 of the 260 are in trees this repository does not ship — vendored, example/demo, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.
+ 88 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 19 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with OggFileAudioBufferSink.java (2), DefaultTrackSelector.java, ProjectionDecoder.java. — One of this dimension's main actionable groups (19 warning-level).
Resolve the 18 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with CombinedParallelSampleBandwidthEstimator.java (3), H262Reader.java (2), SpliceInsertCommand.java (2). — One of this dimension's main actionable groups (18 warning-level).
Resolve the 14 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with Util.java (2), PlayerControlView.java (2), MediaSourceList.java. — One of this dimension's main actionable groups (14 warning-level).
Stand up a CI pipeline, then gate Code Duplication in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
37 production modules (Gradle+CMake), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 0 module(s) off the main sequence, with abstractness counted on 31 of the 37 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 20 Low cohesion finding(s) in Cohesion (LCOM4) — start with MediaItem.java (4), SimpleBasePlayer.java (3), CmcdHeadersFactory.java (2). — One of this dimension's main actionable groups (20 warning-level).
Stand up a CI pipeline, then gate Cohesion (LCOM4) in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
4099 test methods: 4099 unit, 0 integration, 0 BDD, 0 e2e.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality8.7 / 10Adequategated by 1 critical finding✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
21 skipped (21 with a documented reason), 388 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 4099 tests (1 harness-style project(s) excluded from the assertion penalty).
No assertions (empty test): setStartTimelibrary/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java:1390
No assertions: getCastTimelinePersistsDuration · ×349extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastTimelineTrackerTest.java:63
Test project verifies nothing: ffmpeg · ×4extensions/ffmpeg/src/test/java/com/google/android/exoplayer2/ext/ffmpeg/DefaultRenderersFactoryTest.java:31
No direct assertions: createAudioSampleEntryBox_forMp4a_matchesExpected · ×38library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:207
Resolve the 1 No assertions (empty test) finding(s) in Test Quality — start with SampleQueueTest.java. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 349 No assertions finding(s) in Test Quality — start with TextEmphasisTest.java (46), ExoPlayerTest.java (26), MediaItemExportTest.java (21). — One of this dimension's main actionable groups (349 warning-level).
Resolve the 4 Test project verifies nothing finding(s) in Test Quality — start with DefaultRenderersFactoryTest.java (3), DefaultDataSourceTest.java. — One of this dimension's main actionable groups (4 warning-level).
Stand up a CI pipeline, then gate Test Quality 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: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
0 outdated direct gem(s), 1 pinning defect(s). 3 declaration(s) graded against rubygems.org, none of them against a committed Gemfile.lock — this repository commits none, which a published gem correctly does not, so currency is read off the declared requirements: a declaration that does not cap below the current release resolves to it on `bundle install`. 1 declaration(s) carry a requirement that EXCLUDES the current release; that is a deliberate constraint (a supported-version ceiling or a held-back CI pin) and is counted, not charged. Whether any of these gems is DEPRECATED or YANKED is not graded — rubygems.org publishes no deprecation marker, and a yank removes a version rather than flagging it. Whether any is UNMAINTAINED is not graded either: no registry publishes a maintenance status, and release age does not stand in for one. Whether any is UNUSED is a source question, not a registry one. Known CVEs in this dependency graph are D30's question, read from the manifest there.
No Gemfile.lock committed by an application
What to do
Resolve the 1 No Gemfile.lock committed by an application finding(s) in Dependency Hygiene. — One of this dimension's main actionable groups (1 warning-level).
Stand up a CI pipeline, then gate Dependency Hygiene in it to reach Verified (currently Documented). — This repository has no CI pipeline, so there is nothing to add a gate to yet — the pipeline comes first. Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
0 of 3 shipped gem(s) use a banned license. Licences were resolved from rubygems.org over the 3 runtime gem(s) this repository declares. It commits no Gemfile.lock to close that set over, so the verdict covers the declarations rather than the whole resolved graph. Development-group and `add_development_dependency` gems are excluded: they are not distributed with this repository. ★ COVERAGE OF THIS VERDICT: it grades this repository's gem dependencies and nothing else. The repository also declares a Gradle build (build.gradle/build.gradle.kts), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
No source file's living knowledge is concentrated in a single author. Counted over 891 of the 1184 production source files in this repository: 292 are under the ~2,400-byte size floor this dimension measures over, and the remaining 1 have no attributable history left to measure.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
436 deducted task-comment markers across 297336 LoC (0.1/KLoC) → score 9.7. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 435 TodoComment finding(s) in Explicit Debt — start with Cea708Decoder.java (25), DefaultVideoFrameProcessorPixelTest.java (20), DefaultVideoFrameProcessorTextureOutputPixelTest.java (13). — One of this dimension's main actionable groups (435 warning-level).
Resolve the 1 HackComment finding(s) in Explicit Debt — start with PlaybackOutput.java. — One of this dimension's main actionable groups (1 warning-level).
Stand up a CI pipeline, then gate Explicit Debt 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: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
The repository's root README is a well-written project-deprecation notice with migration guidance and two bulleted facts about the repo's state (dev-v2 branch stopped pushing commits, last artifact exoplayer:2.19.1). The demos/README, docs/, extensions/, library/, playbacktests/, robolectricutils/, testdata/, testutils/ READMEs each document their own directory (demos/cast, docs/website, extensions/av1) and are well-structured with headings and examples; the only shared element is a 'missing-overview' defect for the root README. The quality score reflects the high-directory-level documentation quality. The repository's READMEs document each extension directory independently and are mostly complete for their own tiers: the ExoPlayer IMA, Leanback, Media2, Mediasession, OkHttp, Opus modules all carry an overview paragraph plus install/build instructions (gradle dependency or local clone) and a usage link to the developer guide. The architecture/design docs (1674 files) are external documentation not shown here, so they fall outside scope of this review. There is no single repository-level README covering installation/usage/contributing/licence; each extension's own README is judged against its own directory.
What to do
Improve Documentation Quality — currently 8.0/10. — The repository's root README is a well-written project-deprecation notice with migration guidance and two bulleted facts about the repo's state (dev-v2 branch stopped pushing commits, last artifact exoplayer:2.19.1). The demos/README, docs/, extensions/, library/, playbacktests/, robolectricutils/, testdata/, testutils/ READMEs each document their own directory (demos/cast, docs/website, extensions/av1) and are well-structured with headings and examples; the only shared element is a 'missing-overview' defect for the root README. The quality score reflects the high-directory-level documentation quality. The repository's READMEs document each extension directory independently and are mostly complete for their own tiers: the ExoPlayer IMA, Leanback, Media2, Mediasession, OkHttp, Opus modules all carry an overview paragraph plus install/build instructions (gradle dependency or local clone) and a usage link to the developer guide. The architecture/design docs (1674 files) are external documentation not shown here, so they fall outside scope of this review. There is no single repository-level README covering installation/usage/contributing/licence; each extension's own README is judged against its own directory.
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.
5 of 32 build units (Bundler, Gradle) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.
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.
REDACTED
REDACTED
What to do
Resolve the 3 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
2 finding(s): 0 critical, 0 high, 2 medium, 0 low. semgrep hit a parse error in 40 file(s) — `docs/_data/locale.yml`, `docs/_includes/article-header.html`, `docs/_includes/article-info.html` (lines 1–63, lines 68–73, lines 75–86, …), `docs/_includes/article-list.html`, `docs/_includes/article-section-navigator.html`, … (+35 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.
No known-vulnerable dependencies in any ecosystem this repository declares. No known-vulnerable gem among the 3 declared gem(s) osv.dev was asked about. This repository commits no Gemfile.lock — which a published gem correctly does not — so osv-scanner had no resolved graph to read, and the question was put to osv.dev instead over the releases `bundle install` resolves this repository's 3 declared requirement(s) to. The verdict therefore covers the DIRECT declarations at their resolved releases, not the transitive graph a lock would close over.
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.
892 of 892 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. Counted over 892 of the 1184 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Most significant orphaned file · ×3library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:1
Dormant codebase
What to do
Resolve the 889 Orphaned file finding(s) in Knowledge Freshness — start with build.gradle (9), MainActivity.java (3), FlacExtractor.java (2). — One of this dimension's main actionable groups (889 recommendation-level).
Resolve the 3 Most significant 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).
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.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with FfmpegLibrary.java. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 5 Change coupling finding(s) in Change Coupling — start with DefaultMediaSourceFactory.java, AnalyticsListener.java, AnalyticsCollector.java. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with ForwardingAudioSink.java. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.
No dependency in any ecosystem this repository declares is published as malicious. No known-vulnerable gem among the 3 declared gem(s) osv.dev was asked about. This repository commits no Gemfile.lock — which a published gem correctly does not — so osv-scanner had no resolved graph to read, and the question was put to osv.dev instead over the releases `bundle install` resolves this repository's 3 declared requirement(s) to. The verdict therefore covers the DIRECT declarations at their resolved releases, not the transitive graph a lock would close over.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 6 platform declaration(s) and 9 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC2 · Forms & labels1.3 / 10Critical✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×10) — docs/doc/reference/jquery/external/jquery/jquery.js:1329, docs/doc/reference/jquery/external/jquery/jquery.js:1386, docs/doc/reference/jquery/external/jquery/jquery.js:2945, …
A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label. (×4) — docs/doc/reference/jquery/external/jquery/jquery.js:1385, docs/doc/reference/jquery/external/jquery/jquery.js:2932, docs/doc/reference/jquery/jquery-3.5.1.js:1385, …
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
`.ui-helper-reset` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — docs/doc/reference/jquery/jquery-ui.css:26, docs/doc/reference/jquery/jquery-ui.structure.css:30
`.ui-menu` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — docs/doc/reference/jquery/jquery-ui.css:104, docs/doc/reference/jquery/jquery-ui.structure.css:108
`button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — docs/_sass/common/_reset.scss:145
`input:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — docs/_sass/common/_reset.scss:153
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
Coverage: Population: the repository's own tooling configuration — lint config, test and CI files — NOT the markup. It is read for a configured accessibility checker and an automated accessibility assertion (axe/pa11y/Lighthouse, or a native-toolkit equivalent), and it credits an INVOCATION, never a mention: a licence filename, an import comment or a doc reference earns no rung. Enforcement configured entirely outside the repository leaves no evidence here and cannot be credited.
No accessibility enforcement found — no accessibility linting at author time and no automated accessibility check in tests or CI. Add your UI toolkit's own accessibility assertion to the test suite (Flutter `meetsGuideline`, Espresso `AccessibilityChecks`, XCTest `performAccessibilityAudit`), then gate that test in the pipeline. What was searched, so you can tell an absence from a miss: the 3 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
Enforce accessibility in the toolchain your project already uses: assert accessibility in your UI test suite with your toolkit's own matcher (Flutter `meetsGuideline`, Espresso `AccessibilityChecks`, XCTest `performAccessibilityAudit`), then gate that test in CI so a regression blocks the merge.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
`ExtractorInput` declares 16 abstract methods under just 12 distinct name(s): `advancePeekPosition`, `advancePeekPosition`, `getLength`, `getPeekPosition`, `getPosition`, `peek`, `peekFully`, `peekFully`, `read`, `readFully`, `readFully`, `resetPeekPosition`, `setRetryPosition`, `skip`, `skipFully`, `skipFully`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 12 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 16 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ExtractorInput.java:73
`Cache` declares 19 abstract methods: `addListener`, `applyContentMetadataMutations`, `commitFile`, `getCacheSpace`, `getCachedBytes`, `getCachedLength`, `getCachedSpans`, `getContentMetadata`, `getKeys`, `getUid`, `isCached`, `release`, `releaseHoleSpan`, `removeListener`, `removeResource`, `removeSpan`, `startFile`, `startReadWrite`, `startReadWriteNonBlocking`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — library/datasource/src/main/java/com/google/android/exoplayer2/upstream/cache/Cache.java:48
`AudioSink` declares 26 abstract methods: `configure`, `disableTunneling`, `enableTunnelingV21`, `experimentalFlushWithoutAudioTrackRelease`, `flush`, `getAudioAttributes`, `getCurrentPositionUs`, `getFormatSupport`, `getPlaybackParameters`, `getSkipSilenceEnabled`, `handleBuffer`, `handleDiscontinuity`, `hasPendingData`, `isEnded`, `pause`, `play`, `playToEndOfStream`, `reset`, `setAudioAttributes`, `setAudioSessionId`, `setAuxEffectInfo`, `setListener`, `setPlaybackParameters`, `setSkipSilenceEnabled`, `setVolume`, `supportsFormat`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — library/core/src/main/java/com/google/android/exoplayer2/audio/AudioSink.java:71
`ExoMediaDrm` declares 21 abstract methods: `acquire`, `closeSession`, `createCryptoConfig`, `getCryptoType`, `getKeyRequest`, `getMetrics`, `getPropertyByteArray`, `getPropertyString`, `getProvisionRequest`, `openSession`, `provideKeyResponse`, `provideProvisionResponse`, `queryKeyStatus`, `release`, `requiresSecureDecoder`, `restoreKeys`, `setOnEventListener`, `setOnExpirationUpdateListener`, `setOnKeyStatusChangeListener`, `setPropertyByteArray`, `setPropertyString`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — library/core/src/main/java/com/google/android/exoplayer2/drm/ExoMediaDrm.java:63
`AnalyticsCollector` declares 24 abstract methods: `addListener`, `notifySeekStarted`, `onAudioCodecError`, `onAudioDecoderInitialized`, `onAudioDecoderReleased`, `onAudioDisabled`, `onAudioEnabled`, `onAudioInputFormatChanged`, `onAudioPositionAdvancing`, `onAudioSinkError`, `onAudioUnderrun`, `onDroppedFrames`, `onRenderedFirstFrame`, `onVideoCodecError`, `onVideoDecoderInitialized`, `onVideoDecoderReleased`, `onVideoDisabled`, `onVideoEnabled`, `onVideoFrameProcessingOffset`, `onVideoInputFormatChanged`, `release`, `removeListener`, `setPlayer`, `updateMediaPeriodQueueInfo`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsCollector.java:49
`MediaCodecAdapter` declares 17 abstract methods: `dequeueInputBufferIndex`, `dequeueOutputBufferIndex`, `flush`, `getInputBuffer`, `getMetrics`, `getOutputBuffer`, `getOutputFormat`, `needsReconfiguration`, `queueInputBuffer`, `queueSecureInputBuffer`, `release`, `releaseOutputBuffer`, `releaseOutputBuffer`, `setOnFrameRenderedListener`, `setOutputSurface`, `setParameters`, `setVideoScalingMode`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 17 declarations carry 16 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 16 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecAdapter.java:45
`ExoPlayer` declares 64 abstract methods: `addAnalyticsListener`, `addAudioOffloadListener`, `addMediaSource`, `addMediaSource`, `addMediaSources`, `addMediaSources`, `clearAuxEffectInfo`, `clearCameraMotionListener`, `clearVideoFrameMetadataListener`, `createMessage`, `experimentalIsSleepingForOffload`, `experimentalSetOffloadSchedulingEnabled`, `getAnalyticsCollector`, `getAudioComponent`, `getAudioDecoderCounters`, `getAudioFormat`, `getAudioSessionId`, `getClock`, `getCurrentTrackGroups`, `getCurrentTrackSelections`, `getDeviceComponent`, `getPauseAtEndOfMediaItems`, `getPlaybackLooper`, `getPlayerError`, `getRenderer`, `getRendererCount`, `getRendererType`, `getSeekParameters`, `getSkipSilenceEnabled`, `getTextComponent`, `getTrackSelector`, `getVideoChangeFrameRateStrategy`, `getVideoComponent`, `getVideoDecoderCounters`, `getVideoFormat`, `getVideoScalingMode`, `isTunnelingEnabled`, `prepare`, `prepare`, `removeAnalyticsListener`, and 24 more. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 64 declarations carry 57 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 57 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java:164
`VideoComponent` declares 18 abstract methods: `clearCameraMotionListener`, `clearVideoFrameMetadataListener`, `clearVideoSurface`, `clearVideoSurface`, `clearVideoSurfaceHolder`, `clearVideoSurfaceView`, `clearVideoTextureView`, `getVideoChangeFrameRateStrategy`, `getVideoScalingMode`, `getVideoSize`, `setCameraMotionListener`, `setVideoChangeFrameRateStrategy`, `setVideoFrameMetadataListener`, `setVideoScalingMode`, `setVideoSurface`, `setVideoSurfaceHolder`, `setVideoSurfaceView`, `setVideoTextureView`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 18 declarations carry 17 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 17 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java:239
`Renderer` declares 22 abstract methods: `disable`, `enable`, `getCapabilities`, `getMediaClock`, `getName`, `getReadingPositionUs`, `getState`, `getStream`, `getTrackType`, `hasReadStreamToEnd`, `init`, `isCurrentStreamFinal`, `isEnded`, `isReady`, `maybeThrowStreamError`, `render`, `replaceStream`, `reset`, `resetPosition`, `setCurrentStreamFinal`, `start`, `stop`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — library/core/src/main/java/com/google/android/exoplayer2/Renderer.java:62
`Player` declares 127 abstract methods: `addListener`, `addMediaItem`, `addMediaItem`, `addMediaItems`, `addMediaItems`, `canAdvertiseSession`, `clearMediaItems`, `clearVideoSurface`, `clearVideoSurface`, `clearVideoSurfaceHolder`, `clearVideoSurfaceView`, `clearVideoTextureView`, `decreaseDeviceVolume`, `decreaseDeviceVolume`, `getApplicationLooper`, `getAudioAttributes`, `getAvailableCommands`, `getBufferedPercentage`, `getBufferedPosition`, `getContentBufferedPosition`, `getContentDuration`, `getContentPosition`, `getCurrentAdGroupIndex`, `getCurrentAdIndexInAdGroup`, `getCurrentCues`, `getCurrentLiveOffset`, `getCurrentManifest`, `getCurrentMediaItem`, `getCurrentMediaItemIndex`, `getCurrentPeriodIndex`, `getCurrentPosition`, `getCurrentTimeline`, `getCurrentTracks`, `getCurrentWindowIndex`, `getDeviceInfo`, `getDeviceVolume`, `getDuration`, `getMaxSeekToPreviousPosition`, `getMediaItemAt`, `getMediaItemCount`, and 87 more. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 127 declarations carry 114 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 114 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — library/common/src/main/java/com/google/android/exoplayer2/Player.java:179
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Where the width is an overload set rather than separate responsibilities, collapse the overloads instead — segregating those relieves no caller.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Java: methods that only throw a "not implemented" exception, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×38) — extensions/flac/src/androidTest/java/com/google/android/exoplayer2/ext/flac/FlacExtractorSeekTest.java:79, extensions/flac/src/androidTest/java/com/google/android/exoplayer2/ext/flac/FlacExtractorSeekTest.java:97, extensions/flac/src/androidTest/java/com/google/android/exoplayer2/ext/flac/FlacExtractorSeekTest.java:117, …
What to do
Clear the softer debt: re-enable or delete @Disabled/@Ignore tests, decide whether each empty method or UnsupportedOperationException is deliberate (and say so in a comment), and replace @SuppressWarnings("all") with targeted, justified suppressions.
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, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
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.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the 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.
demos/transformer/README.md documents the environment variable `MEDIAPIPE_ROOT`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — demos/transformer/README.md:23
demos/transformer/README.md documents the environment variable `MEDIAPIPE_TRANSFORMER_ROOT`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — demos/transformer/README.md:24
demos/transformer/README.md documents the environment variable `TRANSFORMER_DEMO_ROOT`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — demos/transformer/README.md:26
docs/_page_fragments/supported-formats-progressive.md links to `customization.html#enabling-constant-bitrate-seeking`, but `docs/_page_fragments/customization.html` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/_page_fragments/supported-formats-progressive.md:32
extensions/av1/README.md documents the environment variable `AV1_MODULE_PATH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — extensions/av1/README.md:27
extensions/ffmpeg/README.md documents the environment variable `FFMPEG_PATH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — extensions/ffmpeg/README.md:52
extensions/flac/README.md documents the environment variable `FLAC_MODULE_PATH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — extensions/flac/README.md:26
extensions/opus/README.md documents the environment variable `OPUS_MODULE_PATH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — extensions/opus/README.md:26
extensions/vp9/README.md documents the environment variable `VP9_MODULE_PATH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — extensions/vp9/README.md:26
extensions/vp9/README.md documents the environment variable `LIBVPX_PATH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — extensions/vp9/README.md:44
What to do
Reconcile the README with reality: demos/transformer/README.md documents the environment variable `MEDIAPIPE_ROOT`, but no code, script or configuration file names it; demos/transformer/README.md documents the environment variable `MEDIAPIPE_TRANSFORMER_ROOT`, but no code, script or configuration file names it; demos/transformer/README.md documents the environment variable `TRANSFORMER_DEMO_ROOT`, but no code, script or configuration file names it; docs/_page_fragments/supported-formats-progressive.md links to `customization.html#enabling-constant-bitrate-seeking`, but `docs/_page_fragments/customization.html` does not exist; extensions/av1/README.md documents the environment variable `AV1_MODULE_PATH`, but no code, script or configuration file names it.
Do you agree with this assessment?
P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
Add a CI workflow that builds and runs the test suite on every push/PR.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
No static application security testing detected. For this repository's stack, add 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 was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
What to do
Run what this repository's stack ships: 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.
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.
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 870 use(s) across 319,031 production line(s) (~2.7/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
Java: on hot paths, work through buffer views (ByteBuffer/LongBuffer slices, MemorySegment) instead of copies, avoid boxing with primitive collections (fastutil, Eclipse Collections, HPPC, Trove), presize collections and StringBuilders, and pool expensive buffers (Netty's pooled allocator, commons-pool).
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader2.4 / 10Critical✓ Tool-verified
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
`entryCount` is read from the bytes being parsed at line 281 (`readInt`), then used to size a `new String[]` at line 282 — and nowhere in its scope is `entryCount` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `entryCount` against the bytes actually remaining and a maximum the format allows before allocating. — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:282
`entryCount` is read from the bytes being parsed at line 1479 (`readUnsignedIntToInt`), then used to size a `new long[]` at line 1480 — and nowhere in its scope is `entryCount` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `entryCount` against the bytes actually remaining and a maximum the format allows before allocating. — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1480
`pictureDataLength` is read from the bytes being parsed at line 168 (`readInt`), then used to size a `new byte[]` at line 169 — and nowhere in its scope is `pictureDataLength` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `pictureDataLength` against the bytes actually remaining and a maximum the format allows before allocating. — library/extractor/src/main/java/com/google/android/exoplayer2/metadata/flac/PictureFrame.java:169
`subFrameCount` is read from the bytes being parsed at line 64 (`readInt`), then used to size a `new Id3Frame[]` at line 65 — and nowhere in its scope is `subFrameCount` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `subFrameCount` against the bytes actually remaining and a maximum the format allows before allocating. — library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/ChapterTocFrame.java:65
`subFrameCount` is read from the bytes being parsed at line 72 (`readInt`), then used to size a `new Id3Frame[]` at line 73 — and nowhere in its scope is `subFrameCount` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `subFrameCount` against the bytes actually remaining and a maximum the format allows before allocating. — library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/ChapterFrame.java:73
What to do
Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×3) — extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/SessionPlayerConnector.java:641, extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/SessionPlayerConnector.java:649, extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerCommandQueue.java:346
`catch (RuntimeException)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:2008
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×3) — library/common/src/main/java/com/google/android/exoplayer2/util/EGLSurfaceTexture.java:197, library/datasource/src/main/java/com/google/android/exoplayer2/upstream/cache/CachedContentIndex.java:361, library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameworkMuxer.java:261
What to do
Swallowed exception (caught, then discarded)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether Java packages are null-marked and not undermined by heavy nullness suppression — a package under `@NullMarked` (or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, or a NullAway/Checker Framework configuration naming it) makes an unannotated reference exclude null, and `@SuppressWarnings("NullAway")`, `("nullness")`, `("null")` and `castToNonNull(…)` are what silence it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
85/107 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.
What to do
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 5 of 55 WCAG 2.2 Level A/AA success criteria (9%; ≈10% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 50 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
D11 Test Reliability — 1 observation(s) recorded · This repository declares 1 of its own test(s) unreliable. The built-in reliability runner does not support this repository's ecosystem (.java), so the suite was not re-run and no reliability score is given — these are the repository's own declarations, not our measurement.
X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 5 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 49 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
AC3 Page structure — No structural check found in the parsed markup — AC3 not applicable here.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
AX1 Captive dependencies — Not applicable: this repository's Java imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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.
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 — Repository kind not determined
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.java), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 7 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
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.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 166 value object(s); 2 domain event(s); its domain events are published by services or handlers — no domain entity raises one
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
P12 CI test-gate honesty — no CI workflow found
P2 Observability — This repository's JavaScript/TypeScript, JVM source (31 module(s), 1059 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM, JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (JaCoCo XML — the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a pom.xml, Gradle or sbt build, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X17 Uncapped recursion over a caller-supplied document — 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
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Java was read, and it logs through none that an assembled message defeats: java.util.logging's level methods, log4j 1, commons-logging, JBoss Logging and Flogger take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J or log4j 2 (`org.slf4j.Logger`, `org.apache.logging.log4j.Logger`, Lombok's `@Slf4j`) would be judged.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
Critical — 20 finding(s)
AC2 · Forms & labels· <select> without a programmatic label · ×6
<select> without a programmatic label docs/doc/reference/jquery/external/jquery/jquery.js:1329— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label docs/doc/reference/jquery/external/jquery/jquery.js:1386— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label docs/doc/reference/jquery/external/jquery/jquery.js:4957— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label docs/doc/reference/jquery/jquery-3.5.1.js:1329— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label docs/doc/reference/jquery/jquery-3.5.1.js:1386— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<select> without a programmatic label docs/doc/reference/jquery/jquery-3.5.1.js:4957— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· Link with no accessible name · ×4
Link with no accessible name docs/doc/reference/jquery/external/jquery/jquery.js:1385— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name docs/doc/reference/jquery/external/jquery/jquery.js:2932— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name docs/doc/reference/jquery/jquery-3.5.1.js:1385— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
Link with no accessible name docs/doc/reference/jquery/jquery-3.5.1.js:2932— A link with no text, aria-label or labelled child (e.g. an icon-only link) has no accessible name, so assistive tech can't say where it goes. Add visible text or an aria-label.
AC2 · Forms & labels· <input> without a programmatic label · ×2
<input> without a programmatic label docs/doc/reference/jquery/external/jquery/jquery.js:2945— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<input> without a programmatic label docs/doc/reference/jquery/jquery-3.5.1.js:2945— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC2 · Forms & labels· <textarea> without a programmatic label · ×2
<textarea> without a programmatic label docs/doc/reference/jquery/external/jquery/jquery.js:4927— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
<textarea> without a programmatic label docs/doc/reference/jquery/jquery-3.5.1.js:4927— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D10 · Test Quality· No assertions (empty test) · ×1
No assertions (empty test): setStartTime library/core/src/test/java/com/google/android/exoplayer2/source/SampleQueueTest.java:1390— Test method has an empty body — it asserts nothing and exercises no code.
D11 · Test Reliability· Test declared unreliable · ×1
Test declared unreliable: saveAndLoadActionFile library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadManagerDashTest.java:112— This test is disabled or skipped with a reason naming unreliability — the repository's own words: "Disabled due to flakiness". A test that is skipped for flakiness is neither passing nor protecting the code it covers; either stabilise it or delete it, but do not leave it disabled indefinitely. (Found by reading the repository's own test source — the suite itself was not re-run, since the reliability runner does not support this ecosystem.)
Boundary-crossing change coupling: FfmpegLibrary.java ↔ DefaultRenderersFactory.java extensions/ffmpeg/src/main/java/com/google/android/exoplayer2/ext/ffmpeg/FfmpegLibrary.java:1— `extensions/ffmpeg/src/main/java/com/google/android/exoplayer2/ext/ffmpeg/FfmpegLibrary.java` (context extensions) and `library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java` (context library) sit in DIFFERENT parts of the tree yet change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `16db5db3` Remove FfmpegVideoRenderer from 2.19.0 release; `b332d66c` Remove FfmpegVideoRenderer from 2.1.18 release; `da947c0c` Remove FfmpegVideoRenderer from the 2.17.0 release branch — run `git show` on any of them.
TodoComment demos/cast/src/main/java/com/google/android/exoplayer2/castdemo/MainActivity.java:212— // TODO: Solve coloring using the theme's ColorStateList. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment demos/main/src/main/java/com/google/android/exoplayer2/demo/PlayerActivity.java:102— // TODO: Annotate this and serverSideAdsLoaderState below with @OptIn when it can be applied to — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment demos/main/src/main/java/com/google/android/exoplayer2/demo/DownloadTracker.java:212— // TODO(internal b/163107948): Support cases where DrmInitData are not in the manifest. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment demos/transformer/src/withMediaPipe/java/com/google/android/exoplayer2/transformerdemo/MediaPipeShaderProgram.java:115— // TODO(b/227624622): Confirm whether MediaPipeShaderProgram could support HDR colors. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment demos/transformer/src/withMediaPipe/java/com/google/android/exoplayer2/transformerdemo/MediaPipeShaderProgram.java:179— // TODO(b/238302213): Handle timestamps restarting from 0 when applying effects to a playlist. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment demos/transformer/src/withMediaPipe/java/com/google/android/exoplayer2/transformerdemo/MediaPipeShaderProgram.java:193— // TODO(b/241782273): Avoid retrying continuously until the frame is accepted by using a — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment demos/transformer/src/withMediaPipe/java/com/google/android/exoplayer2/transformerdemo/MediaPipeShaderProgram.java:248— // TODO(b/238302341) Support seeking in MediaPipeShaderProgram. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastTimelineTracker.java:112— // TODO: Reset state when the app instance changes [Internal ref: b/129672468]. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java:131— // TODO: Allow custom implementations of CastTimelineTracker. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java:453— // TODO(internal b/182261884): queue `onMediaItemTransition` event when the media item is — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java:497— // TODO(b/69792021): Support or emulate stop without position reset. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java:567— // TODO: Support shuffle mode. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java:572— // TODO: Support shuffle mode. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java:626— // TODO: Fill the cast timeline information with ProgressListener's duration updates. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/CastPlayer.java:961— // TODO: Differentiate TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED and — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetDataSource.java:86— // TODO: Remove @Nullable annotation when CronetEngineWrapper is deleted. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetDataSource.java:90— // TODO: Remove when CronetEngineWrapper is deleted. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetDataSource.java:93— // TODO: Remove when CronetEngineWrapper is deleted. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetDataSource.java:841— // TODO: Uncomment when https://bugs.chromium.org/p/chromium/issues/detail?id=711810 is fixed
TodoComment extensions/flac/src/androidTest/java/com/google/android/exoplayer2/ext/flac/FlacExtractorTest.java:27— // TODO(internal: b/26110951): Use org.junit.runners.Parameterized (and corresponding methods on — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaUtil.java:272— // TODO: Find out what other errors need to be handled (if any), and whether each one relates to — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaUtil.java:515— // TODO(bachinger): Remove margin constant by making sure the VOD ad group times are adjusted — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaUtil.java:965— // TODO(b/217187518) Support seeking backwards. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.java:765— // TODO(b/192231683) Use getEndTimeMs()/getStartTimeMs() after jar target was removed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java:1075— // TODO: Handle the skipped event so the ad can be marked as skipped rather than played. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
No assertions: getCastTimelinePersistsDuration extensions/cast/src/test/java/com/google/android/exoplayer2/ext/cast/CastTimelineTrackerTest.java:63— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: callbackFromPreviousRequest extensions/cronet/src/test/java/com/google/android/exoplayer2/ext/cronet/CronetDataSourceTest.java:233— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: createRenderers_instantiatesFfmpegAudioRenderer extensions/ffmpeg/src/test/java/com/google/android/exoplayer2/ext/ffmpeg/DefaultRenderersFactoryTest.java:31— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: createRenderers_instantiatesFlacRenderer extensions/flac/src/test/java/com/google/android/exoplayer2/ext/flac/DefaultRenderersFactoryTest.java:29— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: startAfterRelease extensions/ima/src/test/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoaderTest.java:247— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: startAndCallbacksAfterRelease extensions/ima/src/test/java/com/google/android/exoplayer2/ext/ima/ImaAdsLoaderTest.java:254— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: createRenderers_instantiatesOpusRenderer extensions/opus/src/test/java/com/google/android/exoplayer2/ext/opus/DefaultRenderersFactoryTest.java:29— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: openRtmpDataSpec_instantiatesRtmpDataSourceViaReflection extensions/rtmp/src/test/java/com/google/android/exoplayer2/ext/rtmp/DefaultDataSourceTest.java:32— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: createRenderers_instantiatesVpxRenderer extensions/vp9/src/test/java/com/google/android/exoplayer2/ext/vp9/DefaultRenderersFactoryTest.java:29— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: handlesSpecializedAudioProcessorArray library/core/src/test/java/com/google/android/exoplayer2/audio/DefaultAudioSinkTest.java:73— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: removeDownload_nonExistingId_doesNotFail library/core/src/test/java/com/google/android/exoplayer2/offline/DefaultDownloadIndexTest.java:129— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: removeRequests_runSequentially library/core/src/test/java/com/google/android/exoplayer2/offline/DownloadManagerTest.java:716— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: createPeriod_createsChildContentMediaPeriod library/core/src/test/java/com/google/android/exoplayer2/source/ads/AdsMediaSourceTest.java:199— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: createPeriod_createsChildPrerollAdMediaPeriod library/core/src/test/java/com/google/android/exoplayer2/source/ads/AdsMediaSourceTest.java:181— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: releasePeriod_releasesChildMediaPeriodsAndSources library/core/src/test/java/com/google/android/exoplayer2/source/ads/AdsMediaSourceTest.java:212— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: emsgNearToPeriodBoundary library/dash/src/test/java/com/google/android/exoplayer2/source/dash/e2etest/DashPlaybackTest.java:83— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: renderMetadata_withEarlyOutput library/dash/src/test/java/com/google/android/exoplayer2/source/dash/e2etest/DashPlaybackTest.java:135— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: renderMetadata_withTimelyOutput library/dash/src/test/java/com/google/android/exoplayer2/source/dash/e2etest/DashPlaybackTest.java:105— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: parseMediaPresentationDescription library/dash/src/test/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParserTest.java:91— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: downloadAllRepresentations library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DashDownloaderTest.java:158— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: downloadRepresentation library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DashDownloaderTest.java:105— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: downloadRepresentationInSmallParts library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DashDownloaderTest.java:120— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: downloadRepresentations library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DashDownloaderTest.java:139— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: remove library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DashDownloaderTest.java:296— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: staticDownloadHelperForDash_doesNotThrow library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadHelperTest.java:34— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
FileTooLong: jquery/jquery.js docs/doc/reference/jquery/external/jquery/jquery.js— FileTooLong — 5233 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4733 over it, 10.47× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: jquery/jquery-3.5.1.js docs/doc/reference/jquery/jquery-3.5.1.js— FileTooLong — 5233 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4733 over it, 10.47× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: exoplayer2/ExoPlayerImpl.java library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java— FileTooLong — 2339 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1839 over it, 4.68× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: trackselection/DefaultTrackSelector.java library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java— FileTooLong — 2240 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1740 over it, 4.48× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: exoplayer2/ExoPlayerImplInternal.java library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java— FileTooLong — 2191 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1691 over it, 4.38× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: exoplayer2/SimpleBasePlayer.java library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java— FileTooLong — 2181 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1681 over it, 4.36× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: mkv/MatroskaExtractor.java library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java— FileTooLong — 1857 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: MatroskaExtractor (87-2561). The bar is 500 significant lines; this is 1357 over it, 3.71× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: jquery/jquery-ui.js docs/doc/reference/jquery/jquery-ui.js— FileTooLong — 1546 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1046 over it, 3.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: video/MediaCodecVideoRenderer.java library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java— FileTooLong — 1544 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1044 over it, 3.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: manifest/DashManifestParser.java library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java— FileTooLong — 1533 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: DashManifestParser (74-2102). The bar is 500 significant lines; this is 1033 over it, 3.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: mp4/AtomParsers.java library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java— FileTooLong — 1518 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1018 over it, 3.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: util/Util.java library/common/src/main/java/com/google/android/exoplayer2/util/Util.java— FileTooLong — 1489 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 989 over it, 2.98× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: mediacodec/MediaCodecRenderer.java library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java— FileTooLong — 1420 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: MediaCodecRenderer (98-2599). The bar is 500 significant lines; this is 920 over it, 2.84× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: audio/DefaultAudioSink.java library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java— FileTooLong — 1400 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: DefaultAudioSink (85-2280). The bar is 500 significant lines; this is 900 over it, 2.80× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: transformer/DeviceMappedEncoderBitrateProvider.java library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java— FileTooLong — 1393 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 893 over it, 2.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ui/StyledPlayerControlView.java library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java— FileTooLong — 1351 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: StyledPlayerControlView (197-2150). The bar is 500 significant lines; this is 851 over it, 2.70× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: mp4/FragmentedMp4Extractor.java library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java— FileTooLong — 1238 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: FragmentedMp4Extractor (78-1914). The bar is 500 significant lines; this is 738 over it, 2.48× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: exoplayer2/MediaItem.java library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java— FileTooLong — 1226 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: MediaItem (49-2302). The bar is 500 significant lines; this is 726 over it, 2.45× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: hls/HlsSampleStreamWrapper.java library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java— FileTooLong — 1153 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 653 over it, 2.31× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: playlist/HlsPlaylistParser.java library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java— FileTooLong — 1032 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: HlsPlaylistParser (76-1334). The bar is 500 significant lines; this is 532 over it, 2.06× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: cea/Cea708Decoder.java library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java— FileTooLong — 1018 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Cea708Decoder (57-1468). The bar is 500 significant lines; this is 518 over it, 2.04× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: dash/DashMediaSource.java library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java— FileTooLong — 1008 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 508 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ima/AdTagLoader.java extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java— FileTooLong — 982 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 482 over it, 1.96× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: mediacodec/MediaCodecUtil.java library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java— FileTooLong — 970 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 470 over it, 1.94× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ima/ImaServerSideAdInsertionMediaSource.java extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.java— FileTooLong — 945 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: ImaServerSideAdInsertionMediaSource (122-1470). The bar is 500 significant lines; this is 445 over it, 1.89× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
TooManyMethods: ExoPlayerImpl library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:120— TooManyMethods — 176 methods. The bar is 30 methods; this is 146 over it, 5.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Util library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:141— TooManyMethods — 154 methods. The bar is 30 methods; this is 124 over it, 5.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SimpleExoPlayer library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java:61— TooManyMethods — 140 methods. The bar is 30 methods; this is 110 over it, 4.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ForwardingPlayer library/common/src/main/java/com/google/android/exoplayer2/ForwardingPlayer.java:43— TooManyMethods — 129 methods. The bar is 30 methods; this is 99 over it, 4.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SimpleBasePlayer library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:106— TooManyMethods — 129 methods. The bar is 30 methods; this is 99 over it, 4.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ExoPlayerImplInternal library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:81— TooManyMethods — 125 methods. The bar is 30 methods; this is 95 over it, 4.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MediaCodecRenderer library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:98— TooManyMethods — 96 methods. The bar is 30 methods; this is 66 over it, 3.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultAnalyticsCollector library/core/src/main/java/com/google/android/exoplayer2/analytics/DefaultAnalyticsCollector.java:76— TooManyMethods — 86 methods. The bar is 30 methods; this is 56 over it, 2.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MediaCodecVideoRenderer library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:123— TooManyMethods — 84 methods. The bar is 30 methods; this is 54 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StyledPlayerView library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:180— TooManyMethods — 81 methods. The bar is 30 methods; this is 51 over it, 2.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DashManifestParser library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:74— TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PlayerView library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:259— TooManyMethods — 74 methods. The bar is 30 methods; this is 44 over it, 2.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StubPlayer testutils/src/main/java/com/google/android/exoplayer2/testutil/StubPlayer.java:45— TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StyledPlayerControlView library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:197— TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: EventLogger library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java:58— TooManyMethods — 69 methods. The bar is 30 methods; this is 39 over it, 2.30× the bar. 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. The bar is 30 methods; this is 37 over it, 2.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Builder library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:746— TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BasePlayer library/common/src/main/java/com/google/android/exoplayer2/BasePlayer.java:37— TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: StubExoPlayer testutils/src/main/java/com/google/android/exoplayer2/testutil/StubExoPlayer.java:49— TooManyMethods — 64 methods. The bar is 30 methods; this is 34 over it, 2.13× the bar. Most of these members implement exoplayer2.ExoPlayer (57 of 57 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: HlsSampleStreamWrapper library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java:99— TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ConcatenatingMediaSource library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java:59— TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SampleQueue library/core/src/main/java/com/google/android/exoplayer2/source/SampleQueue.java:63— TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ParametersBuilder library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:129— TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ParsableByteArray library/common/src/main/java/com/google/android/exoplayer2/util/ParsableByteArray.java:37— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: DefaultTimeBar library/ui/src/main/java/com/google/android/exoplayer2/ui/DefaultTimeBar.java:134— TooManyMethods — 56 methods. The bar is 30 methods; this is 26 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MatroskaExtractor library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:87— ClassTooLong — 1797 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 1397 over it, 4.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DashManifestParser library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:74— ClassTooLong — 1486 significant lines (blank, comment-only and punctuation-only lines excluded), 75 methods. The bar is 400 significant lines; this is 1086 over it, 3.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MediaCodecRenderer library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:98— ClassTooLong — 1349 significant lines (blank, comment-only and punctuation-only lines excluded), 96 methods. The bar is 400 significant lines; this is 949 over it, 3.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DefaultAudioSink library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:85— ClassTooLong — 1348 significant lines (blank, comment-only and punctuation-only lines excluded), 67 methods. The bar is 400 significant lines; this is 948 over it, 3.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: StyledPlayerControlView library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:197— ClassTooLong — 1274 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods. The bar is 400 significant lines; this is 874 over it, 3.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MediaItem library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java:49— ClassTooLong — 1204 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 804 over it, 3.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FragmentedMp4Extractor library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:78— ClassTooLong — 1187 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 787 over it, 2.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Cea708Decoder library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java:57— ClassTooLong — 987 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 587 over it, 2.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: HlsPlaylistParser library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:76— ClassTooLong — 983 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 583 over it, 2.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MediaMetadata library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:50— ClassTooLong — 853 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 453 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ImaServerSideAdInsertionMediaSource extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.java:122— ClassTooLong — 850 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 450 over it, 2.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DownloadManager library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadManager.java:78— ClassTooLong — 825 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 425 over it, 2.06× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DefaultAnalyticsCollector library/core/src/main/java/com/google/android/exoplayer2/analytics/DefaultAnalyticsCollector.java:76— ClassTooLong — 802 significant lines (blank, comment-only and punctuation-only lines excluded), 86 methods. The bar is 400 significant lines; this is 402 over it, 2.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: StyledPlayerView library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:180— ClassTooLong — 779 significant lines (blank, comment-only and punctuation-only lines excluded), 81 methods. The bar is 400 significant lines; this is 379 over it, 1.95× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: SimpleExoPlayer library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java:61— ClassTooLong — 773 significant lines (blank, comment-only and punctuation-only lines excluded), 140 methods. The bar is 400 significant lines; this is 373 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DefaultDashChunkSource library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:71— ClassTooLong — 706 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 306 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PlayerView library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:259— ClassTooLong — 686 significant lines (blank, comment-only and punctuation-only lines excluded), 74 methods. The bar is 400 significant lines; this is 286 over it, 1.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PlayerNotificationManager library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java:180— ClassTooLong — 686 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 286 over it, 1.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: AdPlaybackState library/common/src/main/java/com/google/android/exoplayer2/source/ads/AdPlaybackState.java:58— ClassTooLong — 685 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods. The bar is 400 significant lines; this is 285 over it, 1.71× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MediaSessionConnector extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java:107— ClassTooLong — 680 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 280 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: Format library/common/src/main/java/com/google/android/exoplayer2/Format.java:126— ClassTooLong — 679 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 279 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: DefaultBandwidthMeter library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:48— ClassTooLong — 632 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. The bar is 400 significant lines; this is 232 over it, 1.58× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: WebvttCueParser library/extractor/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParser.java:73— ClassTooLong — 624 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 224 over it, 1.56× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: TtmlDecoder library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:75— ClassTooLong — 622 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 222 over it, 1.56× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MediaMetricsListener library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java:94— ClassTooLong — 608 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 208 over it, 1.52× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
MethodTooLong: DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:45— MethodTooLong — getBitrateMultiplierFromMapping runs 1379 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1279 over it, 13.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DefaultBandwidthMeter.getInitialBitrateCountryGroupAssignment library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:472— MethodTooLong — getInitialBitrateCountryGroupAssignment runs 408 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 308 over it, 4.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ExperimentalBandwidthMeter.getInitialBitrateCountryGroupAssignment library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:428— MethodTooLong — getInitialBitrateCountryGroupAssignment runs 408 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 308 over it, 4.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: HlsPlaylistParser.parseMediaPlaylist library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:639— MethodTooLong — parseMediaPlaylist runs 347 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 247 over it, 3.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Track.initializeOutput library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:2053— MethodTooLong — initializeOutput runs 265 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 165 over it, 2.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AtomParsers.parseStbl library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:436— MethodTooLong — parseStbl runs 262 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 162 over it, 2.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: HlsPlaylistParser.parseMultivariantPlaylist library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:332— MethodTooLong — parseMultivariantPlaylist runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StyledPlayerControlView.<init> library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:368— MethodTooLong — <init> runs 224 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 124 over it, 2.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AtomParsers.parseVideoSampleEntry library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1173— MethodTooLong — parseVideoSampleEntry runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AtomParsers.parseAudioSampleEntry library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1503— MethodTooLong — parseAudioSampleEntry runs 198 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 98 over it, 1.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MatroskaExtractor.integerElement library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:843— MethodTooLong — integerElement runs 186 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 86 over it, 1.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StyledPlayerControlViewLayoutManager.<init> library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:88— MethodTooLong — <init> runs 186 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 86 over it, 1.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ExoPlayerImpl.<init> library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:229— MethodTooLong — <init> runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Ac3Util.parseAc3SyncframeInfo library/extractor/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java:258— MethodTooLong — parseAc3SyncframeInfo runs 167 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 67 over it, 1.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: StyledPlayerView.<init> library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:304— MethodTooLong — <init> runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: PlayerView.<init> library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:327— MethodTooLong — <init> runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ExoPlayerImplInternal.handleMessage library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:502— MethodTooLong — handleMessage runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MatroskaExtractor.binaryElement library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:1150— MethodTooLong — binaryElement runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WebViewSubtitleOutput.updateWebView library/ui/src/main/java/com/google/android/exoplayer2/ui/WebViewSubtitleOutput.java:171— MethodTooLong — updateWebView runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DashManifestParser.parseAdaptationSet library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:391— MethodTooLong — parseAdaptationSet runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Id3Decoder.decodeFrame library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java:288— MethodTooLong — decodeFrame runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: MatroskaExtractor.writeSampleData library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:1469— MethodTooLong — writeSampleData runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ExoPlayerImpl.updatePlaybackInfo library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:1960— MethodTooLong — updatePlaybackInfo runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DefaultDashChunkSource.getNextChunk library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:323— MethodTooLong — getNextChunk runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TtmlRenderUtil.applyStylesToSpan library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtil.java:91— MethodTooLong — applyStylesToSpan runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Low cohesion: Builder (LCOM4 41) library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:746— Builder's methods fall into 41 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 41 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 33) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:112— Builder's methods fall into 33 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 33 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 32) library/common/src/main/java/com/google/android/exoplayer2/Format.java:137— Builder's methods fall into 32 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 32 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 16) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:1214— Builder's methods fall into 16 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 16 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 12) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/SessionDescription.java:45— Builder's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: WebvttCssStyle (LCOM4 9) library/extractor/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCssStyle.java:49— WebvttCssStyle's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ElementParser (LCOM4 8) library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParser.java:100— ElementParser's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 8) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtpPacket.java:68— Builder's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 8) library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java:586— Builder's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 7) library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:224— Builder's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 7) library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java:1476— Builder's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 6) library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioTrackBufferSizeProvider.java:62— Builder's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 5) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/MediaDescription.java:113— Builder's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 5) library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:273— Builder's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 5) library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:552— Builder's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 5) library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java:1243— Builder's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 5) library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java:1754— Builder's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 4) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:42— Builder's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 4) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/SplitParallelSampleBandwidthEstimator.java:42— Builder's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: Builder (LCOM4 4) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:1784— Builder's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Duplicated block (8 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-3568 | library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:3724-3733 — both copies are in the same file, so extract the 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `AudioTrackInfo` in one and `TextTrackInfo` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:3571` calls `compareFalseFirst` and `library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:3736` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (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) 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-173 | library/datasource/src/main/java/com/google/android/exoplayer2/upstream/RawResourceDataSource.java:245-252 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/datasource/src/main/java/com/google/android/exoplayer2/upstream/ContentDataSource.java:166` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 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-61 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/UserDataReader.java:53-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `idGenerator` to `TrackIdGenerator` in one and `TsPayloadReader.TrackIdGenerator` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/SeiReader.java:62` calls `getFormatId` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/UserDataReader.java:61` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/AudioSamplePipeline.java:81— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/AudioSamplePipeline.java:81-88 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EncodedSamplePipeline.java:60-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) 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 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 2) robolectricutils/src/main/java/com/google/android/exoplayer2/robolectric/TestPlayerRunHelper.java:199— robolectricutils/src/main/java/com/google/android/exoplayer2/robolectric/TestPlayerRunHelper.java:199-206 | robolectricutils/src/main/java/com/google/android/exoplayer2/robolectric/TestPlayerRunHelper.java:279-286 — both copies are in the same file, so extract the 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 (8 lines × 2) 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 — both copies are in the same file, so extract the block into 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) 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) 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 runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/VideoProcessingGLSurfaceView.java:214— demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/VideoProcessingGLSurfaceView.java:214-221 | library/core/src/main/java/com/google/android/exoplayer2/video/spherical/SphericalGLSurfaceView.java:255-262 — 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/VideoProcessingGLSurfaceView.java:214` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) extensions/okhttp/src/main/java/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSource.java:379— extensions/okhttp/src/main/java/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSource.java:379-386 | library/datasource/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java:491-498 — 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 (8 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/TeeAudioProcessor.java:163— library/core/src/main/java/com/google/android/exoplayer2/audio/TeeAudioProcessor.java:163-170 | testutils/src/main/java/com/google/android/exoplayer2/testutil/OggFileAudioBufferSink.java:98-105 — 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 (8 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameworkMuxer.java:87— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameworkMuxer.java:87-94 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/InAppMuxer.java:121-128 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) extensions/av1/src/main/java/com/google/android/exoplayer2/ext/av1/Libgav1VideoRenderer.java:165— extensions/av1/src/main/java/com/google/android/exoplayer2/ext/av1/Libgav1VideoRenderer.java:165-172 | extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/LibvpxVideoRenderer.java:163-170 — 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 (8 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/drm/DrmSessionEventListener.java:195— library/core/src/main/java/com/google/android/exoplayer2/drm/DrmSessionEventListener.java:195-202 | library/core/src/main/java/com/google/android/exoplayer2/source/MediaSourceEventListener.java:480-487 — 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 (8 lines × 2) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaPeriod.java:363— library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaPeriod.java:363-370 | library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaPeriod.java:229-236 — 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 (8 lines × 2) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSource.java:115— library/datasource/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSource.java:115-122 | library/datasource/src/main/java/com/google/android/exoplayer2/upstream/DefaultDataSourceFactory.java:96-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) REDACTED:500— REDACTED:500-507 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H265Reader.java:376-383 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) 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-546 | library/datasource/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java:772-781 — 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/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:872— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:872-881 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:828-837 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:872` it begins part-way through the construct above it, so those 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/CombinedParallelSampleBandwidthEstimator.java:173— library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:173-182 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/SplitParallelSampleBandwidthEstimator.java:169-178 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/SplitParallelSampleBandwidthEstimator.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:173` 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/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-203 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/SplitParallelSampleBandwidthEstimator.java:192-201 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/SplitParallelSampleBandwidthEstimator.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java:171— library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java:171-180 | library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java:188-197 — both copies are in the same file, so extract the 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:171` it begins part-way through the construct above it, so those 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 — before extracting anything, compare `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:191` calls `onData` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:176` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:345— library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:345-354 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:417-426 — before extracting anything, compare `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 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-124 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsBinarySearchSeeker.java:119-128 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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.
Duplicated block (10 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-156 | library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceScheduleCommand.java:134-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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 (10 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceInsertCommand.java:177— library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceInsertCommand.java:177-186 | library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceScheduleCommand.java:156-165 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/metadata/scte35/SpliceInsertCommand.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.
Duplicated block (10 lines × 2) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:142— library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:142-151 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:173-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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:142` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:438— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:438-447 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:483-492 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:438` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:448` calls `findViewById` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:493` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 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-1442 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1535-1544 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1548` calls `SuppressWarnings` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1444` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 2) library/common/src/main/java/com/google/android/exoplayer2/util/ParsableBitArray.java:145— library/common/src/main/java/com/google/android/exoplayer2/util/ParsableBitArray.java:145-154 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/VorbisBitArray.java:93-102 — 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/core/src/main/java/com/google/android/exoplayer2/MediaSourceList.java:388— library/core/src/main/java/com/google/android/exoplayer2/MediaSourceList.java:388-397 | library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java:854-863 — 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/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:823— library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:823-832 | library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java:881-890 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:206— library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:206-215 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/SplitParallelSampleBandwidthEstimator.java:204-213 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/SplitParallelSampleBandwidthEstimator.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:206` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java:232— library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java:232-241 | library/core/src/main/java/com/google/android/exoplayer2/video/VideoRendererEventListener.java:254-263 — 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 (11 lines × 2) library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:1079— library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:1079-1089 | library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:1111-1121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `array` to `int[]` in one and `long[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 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-1231 | library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:1254-1264 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `array` to `int[]` in one and `long[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/MediaSourceList.java:432— library/core/src/main/java/com/google/android/exoplayer2/MediaSourceList.java:432-442 | library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java:547-557 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `mediaPeriodId` to `MediaSource.MediaPeriodId` in one and `MediaPeriodId` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/AsynchronousMediaCodecBufferEnqueuer.java:323— library/core/src/main/java/com/google/android/exoplayer2/mediacodec/AsynchronousMediaCodecBufferEnqueuer.java:323-333 | library/core/src/main/java/com/google/android/exoplayer2/mediacodec/AsynchronousMediaCodecBufferEnqueuer.java:344-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `int[]` in one and `byte[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:535— library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:535-545 | library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:1482-1492 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:716— library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:716-726 | library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java:530-540 — before extracting anything, compare `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java` and `library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:716` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (11 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-432 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:704-714 — both copies are in the same file, so extract the 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 (11 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-186 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java:213-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/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-577 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:590-600 — both copies are in the same file, so extract the 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 (11 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-485 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:525-535 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) 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-869 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1011-1022 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `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 (11 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:811— library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:811-821 | library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java:661-671 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/video/AvcConfig.java:154— library/extractor/src/main/java/com/google/android/exoplayer2/video/AvcConfig.java:154-164 | library/extractor/src/main/java/com/google/android/exoplayer2/video/HevcConfig.java:186-196 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/video/AvcConfig.java:154` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (11 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:57— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:57-67 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java:55-65 — before extracting anything, compare `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java` and `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 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-349 | library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java:298-306 — before extracting anything, compare `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java` and `library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:434— library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:434-442 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:745-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:434` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:443` calls `checkLanguageConsistency`, `getAttributeValue`, `checkContentTypeConsistency` and `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:754` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 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-1256 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1262-1270 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) 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, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (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, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 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-662 | library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java:697-705 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) 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-422 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:435-443 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:431` calls `from`, `inflate`, `setDescendantFocusability` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:413` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 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-1225 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1553-1561 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1341— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1341-1349 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1411-1419 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/BitmapOverlayVideoProcessor.java:161— demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/BitmapOverlayVideoProcessor.java:161-169 | library/core/src/main/java/com/google/android/exoplayer2/video/spherical/ProjectionRenderer.java:214-222 — 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. Note first that the copies are not typed on the same thing: `Log` names `android.util.Log` in one and `com.google.android.exoplayer2.util.Log` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:129— library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:129-137 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/SplitParallelSampleBandwidthEstimator.java:129-137 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/SplitParallelSampleBandwidthEstimator.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:957— library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:957-965 | library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:1687-1695 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java:196— library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java:196-204 | library/core/src/main/java/com/google/android/exoplayer2/video/VideoRendererEventListener.java:203-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 `library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java:196` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 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, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2107— library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2107-2112 | library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2165-2170 — both copies are in the same file, so extract the 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.
Duplicated block (6 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-2524 | library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:608-613 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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.
Duplicated block (6 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-614 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:625-630 — both copies are in the same file, so extract the 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 (6 lines × 2) extensions/av1/src/main/java/com/google/android/exoplayer2/ext/av1/Libgav1VideoRenderer.java:124— extensions/av1/src/main/java/com/google/android/exoplayer2/ext/av1/Libgav1VideoRenderer.java:124-129 | extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/LibvpxVideoRenderer.java:122-127 — 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 `extensions/av1/src/main/java/com/google/android/exoplayer2/ext/av1/Libgav1VideoRenderer.java:124` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:2273— library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:2273-2278 | library/core/src/main/java/com/google/android/exoplayer2/source/mediaparser/MediaParserUtil.java:87-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsBinarySearchSeeker.java:211— library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsBinarySearchSeeker.java:211-216 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsDurationReader.java:225-230 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlStyle.java:126— library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlStyle.java:126-131 | library/extractor/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCssStyle.java:195-200 — 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 (6 lines × 2) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java:294— library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java:294-299 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH265Reader.java:259-264 — before extracting anything, compare `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java` and `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH265Reader.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/AudioSamplePipeline.java:328— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/AudioSamplePipeline.java:328-333 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EncodedSamplePipeline.java:114-119 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1327— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1327-1332 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1397-1402 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) library/effect/src/main/java/com/google/android/exoplayer2/effect/Crop.java:102— library/effect/src/main/java/com/google/android/exoplayer2/effect/Crop.java:102-107 | library/effect/src/main/java/com/google/android/exoplayer2/effect/ScaleAndRotateTransformation.java:164-169 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/source/SilenceMediaSource.java:203— library/core/src/main/java/com/google/android/exoplayer2/source/SilenceMediaSource.java:203-208 | library/core/src/main/java/com/google/android/exoplayer2/source/SingleSampleMediaPeriod.java:129-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, 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:203` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `library/core/src/main/java/com/google/android/exoplayer2/source/SilenceMediaSource.java:202` calls `constrainSeekPosition` and `library/core/src/main/java/com/google/android/exoplayer2/source/SingleSampleMediaPeriod.java:128` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 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-431 | extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerCommandQueue.java:457-469 — both copies are in the same file, so extract the block into 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/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:665— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:665-677 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:621-633 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:665` it begins part-way through the construct above it, so those 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/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. Note first that the copies are not typed on the same thing: the declarations holding them bind `loadable` to `ParsingLoadable<HlsPlaylist>` in one and `ParsingLoadable<SsManifest>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 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-330 | testutils/src/main/java/com/google/android/exoplayer2/testutil/DecodeOneFrameUtil.java:235-247 — 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/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:311— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:311-323 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java:342-354 — before extracting anything, compare `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java` and `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 (13 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-366 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java:385-397 — before extracting anything, compare `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java` and `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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/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-384 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java:403-415 — before extracting anything, compare `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java` and `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
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 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:797` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1148— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1148-1160 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1233-1245 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:767— library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:767-779 | library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java:496-508 — before extracting anything, compare `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java` and `library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:767` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (13 lines × 2) library/effect/src/main/java/com/google/android/exoplayer2/effect/BitmapOverlay.java:118— library/effect/src/main/java/com/google/android/exoplayer2/effect/BitmapOverlay.java:118-130 | library/effect/src/main/java/com/google/android/exoplayer2/effect/TextOverlay.java:68-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/effect/src/main/java/com/google/android/exoplayer2/effect/BitmapOverlay.java:118` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:848— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:848-869 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:804-825 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:848` it begins part-way through the construct above it, so those 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/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java:115— library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java:115-136 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH265Reader.java:109-130 — before extracting anything, compare `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java` and `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH265Reader.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java:115` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:149— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:149-170 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:501-522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:149` it begins part-way through the construct above it, so those 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:147— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:147-168 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:704-725 — both copies are in the same file, so extract the 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:147` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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:422— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:422-443 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1371-1392 — both copies are in the same file, so extract the 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. 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 (22 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:485— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:485-506 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:920-941 — both copies are in the same file, so extract the 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:485` it begins part-way through the construct above it, so those 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:677— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:677-698 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1563-1584 — both copies are in the same file, so extract the 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 (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:925— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:925-946 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1022-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. 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:925` it begins part-way through the construct above it, so those 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:1138— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1138-1159 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1175-1196 — both copies are in the same file, so extract the 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.
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.
Duplicated block (7 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-947 | library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:994-1001 — both copies are in the same file, so extract the 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 (7 lines × 2) testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeAdaptiveMediaPeriod.java:156— testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeAdaptiveMediaPeriod.java:156-162 | testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeMediaPeriod.java:267-273 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeAdaptiveMediaPeriod.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 (7 lines × 2) library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java:1389— library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java:1389-1395 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/ServiceDescriptionElement.java:67-73 — 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/common/src/main/java/com/google/android/exoplayer2/MediaItem.java:1389` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (7 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1218— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1218-1224 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1306-1312 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) library/common/src/main/java/com/google/android/exoplayer2/HeartRating.java:99— library/common/src/main/java/com/google/android/exoplayer2/HeartRating.java:99-105 | library/common/src/main/java/com/google/android/exoplayer2/ThumbRating.java:98-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/metadata/MetadataRenderer.java:272— library/core/src/main/java/com/google/android/exoplayer2/metadata/MetadataRenderer.java:272-278 | library/core/src/main/java/com/google/android/exoplayer2/text/TextRenderer.java:382-388 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportException.java:323— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportException.java:323-329 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationException.java:306-312 — before extracting anything, compare `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportException.java` and `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationException.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The 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/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-949 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:1026-1032 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:1033` calls `parseLastSegmentNumberSupplementalProperty` and `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:950` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkSampleStream.java:424— library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkSampleStream.java:424-438 | library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java:850-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:424` 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/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-141 | library/core/src/main/java/com/google/android/exoplayer2/source/chunk/InitializationChunk.java:100-114 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (15 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:752— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:752-766 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:708-722 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:752` it begins part-way through the construct above it, so those 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/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-75 | library/effect/src/main/java/com/google/android/exoplayer2/effect/HslShaderProgram.java:59-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `library/effect/src/main/java/com/google/android/exoplayer2/effect/HslShaderProgram.java:78` calls `setFloatUniform` and `library/effect/src/main/java/com/google/android/exoplayer2/effect/ColorLutShaderProgram.java:76` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:533— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:533-547 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:654-668 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:504— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:504-518 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:490-504 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:504` it begins part-way through the construct above it, so those 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 runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:536— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:536-550 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:524-538 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:536` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `newPlayerView` to `PlayerView` in one and `StyledPlayerView` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 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-110 | library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:1036-1049 — both copies are in the same file, so extract the 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 (14 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-127 | library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:1054-1067 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 (14 lines × 2) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:1112— library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:1112-1125 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:1146-1159 — both copies are in the same file, so extract the 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/DashMediaSource.java:1112` 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) REDACTED:155— REDACTED:155-168 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H265Reader.java:158-172 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (14 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDialogueFormat.java:69— library/extractor/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDialogueFormat.java:69-82 | library/extractor/src/main/java/com/google/android/exoplayer2/text/ssa/SsaStyle.java:383-396 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDialogueFormat.java:69` 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 (14 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-341 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java:359-372 — before extracting anything, compare `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java` and `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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 (14 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1188— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1188-1201 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1484-1497 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1188` it begins part-way through the construct above it, so those 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 (14 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:695— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:695-708 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:699-712 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java:325— library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java:325-336 | library/core/src/main/java/com/google/android/exoplayer2/analytics/PlaybackStatsListener.java:292-303 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
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, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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/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-795 | library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:813-824 — both copies are in the same file, so extract the block into 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/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/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:697— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:697-708 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:823-834 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:697` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:835` calls `setShowButton` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:709` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:2205— library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:2205-2216 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExoAssetLoaderVideoRenderer.java:164-175 — 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/effect/src/main/java/com/google/android/exoplayer2/effect/BitmapUtil.java:31— library/effect/src/main/java/com/google/android/exoplayer2/effect/BitmapUtil.java:31-42 | testutils/src/main/java/com/google/android/exoplayer2/testutil/BitmapPixelTestUtil.java:381-392 — 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.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×6
Focus outline removed in CSS without a :focus replacement docs/doc/reference/jquery/jquery-ui.css:26— `.ui-helper-reset` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement docs/doc/reference/jquery/jquery-ui.css:104— `.ui-menu` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement docs/doc/reference/jquery/jquery-ui.structure.css:30— `.ui-helper-reset` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement docs/doc/reference/jquery/jquery-ui.structure.css:108— `.ui-menu` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement docs/_sass/common/_reset.scss:145— `button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Focus outline removed in CSS without a :focus replacement docs/_sass/common/_reset.scss:153— `input:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
Duplicated block (23 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:703— library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:703-725 | library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:681-703 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java` and `library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:703` 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 (23 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java:320— library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java:320-342 | library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:404-426 — 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:320` it begins part-way through the construct above it, so those 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:126— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:126-148 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:193-215 — both copies are in the same file, so extract the 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:126` it begins part-way through the construct above it, so those 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 (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/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:471— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:471-493 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:457-479 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (23 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbSubtitle.java:36— library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbSubtitle.java:36-58 | library/extractor/src/main/java/com/google/android/exoplayer2/text/pgs/PgsSubtitle.java:36-58 — before extracting anything, compare `library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbSubtitle.java` and `library/extractor/src/main/java/com/google/android/exoplayer2/text/pgs/PgsSubtitle.java` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (18 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:824— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:824-841 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:780-797 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:824` it begins part-way through the construct above it, so those 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 (18 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-385 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java:372-389 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java:371` calls `processEndOfStreamReadingAtomHeader` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:367` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (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 — before extracting anything, compare `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Extractor.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:136` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (18 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-287 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH265Reader.java:235-252 — before extracting anything, compare `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH264Reader.java` and `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH265Reader.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `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 (18 lines × 2) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpVp8Reader.java:126— library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpVp8Reader.java:126-143 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpVp9Reader.java:125-142 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpVp8Reader.java:126` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 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-1017 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1245-1262 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1000` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 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/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-312 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:331-335 — both copies are in the same file, so extract the block into 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/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-75 | library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitleViewUtils.java:94-99 — both copies are in the same file, so extract the 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 (5 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/MediaSourceList.java:495— library/core/src/main/java/com/google/android/exoplayer2/MediaSourceList.java:495-499 | library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource.java:890-894 — 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 (5 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:116— library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:116-120 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Extractor.java:124-129 — before extracting anything, compare `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Extractor.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (5 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportException.java:269— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportException.java:269-273 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationException.java:253-257 — before extracting anything, compare `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportException.java` and `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationException.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportException.java:269` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Change coupling: DefaultMediaSourceFactory.java ↔ FakeMediaSourceFactory.java library/core/src/main/java/com/google/android/exoplayer2/source/DefaultMediaSourceFactory.java:1— `library/core/src/main/java/com/google/android/exoplayer2/source/DefaultMediaSourceFactory.java` and `testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeMediaSourceFactory.java` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `4949fbe5` Add missing IntDef on MediaSource.Factory.getSupportedTypes overrides; `d9760413` Add missing IntDef on MediaSource.Factory.getSupportedTypes overrides; `57182ac7` Remove `@Nullable` from `MediaSource.Factory` setters — run `git show` on any of them.
Change coupling: AnalyticsListener.java ↔ AudioRendererEventListener.java library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsListener.java:1— `library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsListener.java` and `library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java` change together 85% of the time (11 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `6118d94b` Add missing events to AnalyticsListener.; `36ef3328` Add missing events to AnalyticsListener.; `d55c6880` Remove reference to deprecated Player.EventListener. — run `git show` on any of them.
Change coupling: AnalyticsCollector.java ↔ AudioRendererEventListener.java library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsCollector.java:1— `library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsCollector.java` and `library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `6118d94b` Add missing events to AnalyticsListener.; `36ef3328` Add missing events to AnalyticsListener.; `ceb76f35` Align pattern of calling deprecated listener methods. — run `git show` on any of them.
Change coupling: ExoAssetLoaderVideoRenderer.java ↔ VideoSamplePipeline.java library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExoAssetLoaderVideoRenderer.java:1— `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExoAssetLoaderVideoRenderer.java` and `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/VideoSamplePipeline.java` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `9f2d2005` Add a tracing utility for debugging video related muxer timeout; `dd6a0c37` Transformer: Update TODOs to use new bug link; `b18fb368` Fix and simplify timestamps handling — run `git show` on any of them.
Change coupling: OutputConsumerAdapterV30.java ↔ HlsSampleStreamWrapper.java library/core/src/main/java/com/google/android/exoplayer2/source/mediaparser/OutputConsumerAdapterV30.java:1— `library/core/src/main/java/com/google/android/exoplayer2/source/mediaparser/OutputConsumerAdapterV30.java` and `library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `04ef3ae8` media3: Capitalize "MIME" for MIME types.; `4af06100` Shorten log tags to 23 char limit; `dd23cb13` Fix moving of DataReader — run `git show` on any of them.
X15 · Unvalidated length from an untrusted reader· Length read from the parsed input is spent without ever being bounded · ×5
Length read from the parsed input is spent without ever being bounded library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:282— `entryCount` is read from the bytes being parsed at line 281 (`readInt`), then used to size a `new String[]` at line 282 — and nowhere in its scope is `entryCount` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `entryCount` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1480— `entryCount` is read from the bytes being parsed at line 1479 (`readUnsignedIntToInt`), then used to size a `new long[]` at line 1480 — and nowhere in its scope is `entryCount` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `entryCount` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded library/extractor/src/main/java/com/google/android/exoplayer2/metadata/flac/PictureFrame.java:169— `pictureDataLength` is read from the bytes being parsed at line 168 (`readInt`), then used to size a `new byte[]` at line 169 — and nowhere in its scope is `pictureDataLength` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `pictureDataLength` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/ChapterTocFrame.java:65— `subFrameCount` is read from the bytes being parsed at line 64 (`readInt`), then used to size a `new Id3Frame[]` at line 65 — and nowhere in its scope is `subFrameCount` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `subFrameCount` against the bytes actually remaining and a maximum the format allows before allocating.
Length read from the parsed input is spent without ever being bounded library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/ChapterFrame.java:73— `subFrameCount` is read from the bytes being parsed at line 72 (`readInt`), then used to size a `new Id3Frame[]` at line 73 — and nowhere in its scope is `subFrameCount` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `subFrameCount` against the bytes actually remaining and a maximum the format allows before allocating.
D10 · Test Quality· Test project verifies nothing · ×4
Test project verifies nothing: ffmpeg extensions/ffmpeg/src/test/java/com/google/android/exoplayer2/ext/ffmpeg/DefaultRenderersFactoryTest.java:31— No conventional assertion call was detected in 1 of 1 tests in `ffmpeg` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
Test project verifies nothing: flac extensions/flac/src/test/java/com/google/android/exoplayer2/ext/flac/DefaultRenderersFactoryTest.java:29— No conventional assertion call was detected in 1 of 1 tests in `flac` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
Test project verifies nothing: rtmp extensions/rtmp/src/test/java/com/google/android/exoplayer2/ext/rtmp/DefaultDataSourceTest.java:32— No conventional assertion call was detected in 1 of 1 tests in `rtmp` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
Test project verifies nothing: vp9 extensions/vp9/src/test/java/com/google/android/exoplayer2/ext/vp9/DefaultRenderersFactoryTest.java:29— No conventional assertion call was detected in 1 of 1 tests in `vp9` — the project as a whole, not one method. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a suite that genuinely checks nothing. If it is the latter, this project passes unconditionally and cannot fail.
Duplicated block (20 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:150— library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:150-169 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:164-183 — before extracting anything, compare `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:163` calls `onData` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:149` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (20 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:408— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:408-427 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1455-1474 — both copies are in the same file, so extract the 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:408` it begins part-way through the construct above it, so those 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.
Duplicated block (20 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1410— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1410-1429 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1512-1531 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (19 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:410— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:410-428 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:383-401 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 (19 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:73— library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:73-91 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Extractor.java:81-99 — before extracting anything, compare `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Extractor.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:73` 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 (19 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:777— library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:777-795 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:835-853 — both copies are in the same file, so extract the 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:777` it begins part-way through the construct above it, so those 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/StyledPlayerControlViewLayoutManager.java:125— library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:125-143 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:163-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:125` 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.
Swallowed exception (caught, then discarded) extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/SessionPlayerConnector.java:641— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/SessionPlayerConnector.java:649— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerCommandQueue.java:346— `catch (Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:2008— `catch (RuntimeException)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
FunctionTooLong: gallery.window.Lazyload.js() docs/_includes/scripts/lib/gallery.js:4— FunctionTooLong — window.Lazyload.js() runs 150 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 50 over it, 1.50× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: swiper.window.Lazyload.js() docs/_includes/scripts/lib/swiper.js:3— FunctionTooLong — window.Lazyload.js() runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
FunctionTooLong: jquery-ui.$.fn.position docs/doc/reference/jquery/jquery-ui.js:873— FunctionTooLong — $.fn.position runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
Duplicated block (30 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-229 | library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:966-995 — both copies are in the same file, so extract the 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 (30 lines × 2) library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:469— library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:469-498 | library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:638-667 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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:469` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (30 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1269— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1269-1298 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1462-1491 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (28 lines × 2) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:483— library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:483-510 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:718-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: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.
Duplicated block (28 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:79— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:79-106 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:800-827 — both copies are in the same file, so extract the 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: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. 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 (28 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-355 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:305-332 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (27 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-804 | library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:390-416 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java` and `library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `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 (27 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:237— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:237-263 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:247-273 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (27 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PesReader.java:238— library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PesReader.java:238-264 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsExtractor.java:385-411 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PesReader.java:238` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 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-154 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:397-421 — both copies are in the same file, so extract the 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.
Duplicated block (25 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-270 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:806-830 — both copies are in the same file, so extract the 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 (25 lines × 2) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:936— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:936-960 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1170-1194 — both copies are in the same file, so extract the 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:936` it begins part-way through the construct above it, so those 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 × 3) library/common/src/main/java/com/google/android/exoplayer2/PlaybackException.java:394— library/common/src/main/java/com/google/android/exoplayer2/PlaybackException.java:394-416 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportException.java:359-381 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationException.java:348-370 — before extracting anything, compare `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportException.java` and `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationException.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `PlaybackException` in one and `ExportException` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (23 lines × 3) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:115— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:115-137 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:143-165 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1497-1519 — 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/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:115` it begins part-way through the construct above it, so those 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 (23 lines × 3) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:466— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:466-488 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1026-1048 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1070-1092 — 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/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:466` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 3) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:124— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:124-145 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:191-212 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1373-1394 — 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/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:124` it begins part-way through the construct above it, so those 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 × 3) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:702— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:702-723 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:962-983 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1015-1036 — 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/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:702` it begins part-way through the construct above it, so those 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 × 3) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:726— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:726-747 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:816-837 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1093-1114 — 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/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:726` it begins part-way through the construct above it, so those 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 (16 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-1274 | library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:1621-1636 — both copies are in the same file, so extract the 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 (16 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:905— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:905-920 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1097-1112 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:921` calls `setVisibility` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1113` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (16 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1352— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1352-1367 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1422-1437 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 6) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:549— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:549-558 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:835-844 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:861-870 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:505-514 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:791-800 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:817-826 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:549` it begins part-way through the construct above it, so those 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/DefaultBandwidthMeter.java:545— 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 | 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 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:545` it begins part-way through the construct above it, so those 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/DefaultBandwidthMeter.java:664— 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 | 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 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:664` it begins part-way through the construct above it, so those 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 × 4) library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:409— library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:409-417 | library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:532-540 | library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:694-702 | library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:790-798 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (9 lines × 4) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:616— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:616-624 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:738-746 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:572-580 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:694-702 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:616` it begins part-way through the construct above it, so those 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 × 4) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:752— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:752-760 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:848-856 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:708-716 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:804-812 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:752` it begins part-way through the construct above it, so those 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 (5 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-606 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:610-614 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:626-630 — 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 (5 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-218 | testutils/src/main/java/com/google/android/exoplayer2/testutil/truth/SpannedSubject.java:251-256 | 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:251` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) library/common/src/main/java/com/google/android/exoplayer2/util/ParsableBitArray.java:347— library/common/src/main/java/com/google/android/exoplayer2/util/ParsableBitArray.java:347-351 | library/container/src/main/java/com/google/android/exoplayer2/util/ParsableNalUnitBitArray.java:213-217 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/VorbisBitArray.java:125-129 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Swallowed exception (empty catch) library/common/src/main/java/com/google/android/exoplayer2/util/EGLSurfaceTexture.java:197— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/cache/CachedContentIndex.java:361— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameworkMuxer.java:261— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (4 members, 50+ identical tokens) library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:390— library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:390-419 | library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:521-542 | library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:672-704 | library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:782-800 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:125— library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:125-234 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:306-378 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:401-538 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:687-792 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (22 lines × 6) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:492— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:492-513 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:740-761 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:788-809 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1107-1128 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1204-1225 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1254-1275 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.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. 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 × 6) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:735— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:735-756 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:966-987 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1102-1123 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1199-1220 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1263-1284 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1503-1524 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:735` it begins part-way through the construct above it, so those 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/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-149 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:146-162 — before extracting anything, compare `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `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 (17 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1488— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1488-1504 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1603-1619 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1488` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/audio/MpegAudioUtil.java:124— library/extractor/src/main/java/com/google/android/exoplayer2/audio/MpegAudioUtil.java:124-138 | library/extractor/src/main/java/com/google/android/exoplayer2/audio/MpegAudioUtil.java:188-203 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15–16 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-88 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultDecoderFactory.java:131-146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 8) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:532— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:532-540 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:640-648 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:722-730 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:852-860 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:488-496 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:596-604 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:678-686 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:808-816 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:532` it begins part-way through the construct above it, so those 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 × 8) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:550— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:550-558 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:669-677 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:836-844 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:862-870 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:506-514 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:625-633 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:792-800 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:818-826 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.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 (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/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:306— library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:306-311 | library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsChunkSource.java:711-716 | library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/DefaultSsChunkSource.java:215-220 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. 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 × 3) demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/PeriodicVignetteShaderProgram.java:122— demos/transformer/src/main/java/com/google/android/exoplayer2/transformerdemo/PeriodicVignetteShaderProgram.java:122-129 | library/effect/src/main/java/com/google/android/exoplayer2/effect/DefaultShaderProgram.java:486-493 | library/effect/src/main/java/com/google/android/exoplayer2/effect/OverlayShaderProgram.java:172-179 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (8 lines × 3) library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java:183— library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java:183-191 | library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java:215-222 | library/core/src/main/java/com/google/android/exoplayer2/video/VideoRendererEventListener.java:187-195 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/audio/AudioRendererEventListener.java:183` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
AC7 · A11y enforcement· Accessibility enforcement below the top rung · ×1
Accessibility enforcement below the top rung — No accessibility enforcement found — no accessibility linting at author time and no automated accessibility check in tests or CI. Add your UI toolkit's own accessibility assertion to the test suite (Flutter `meetsGuideline`, Espresso `AccessibilityChecks`, XCTest `performAccessibilityAudit`), then gate that test in the pipeline. What was searched, so you can tell an absence from a miss: the 3 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
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.
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.
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.
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.
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. This is NOT this file's highest cyclomatic complexity: MatroskaExtractor.getElementType (cyclomatic 93) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
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. This is NOT this file's highest cyclomatic complexity: MatroskaExtractor.getElementType (cyclomatic 93) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
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.
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.
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.
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.
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.
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.
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.
jquery.defaultPrefilter (cyclomatic 45) docs/doc/reference/jquery/external/jquery/jquery.js:7324— jquery.defaultPrefilter has cyclomatic complexity 45 (threshold 15). Of this number, 41 points are the body's own statements and 4 belong to 3 function literals inside it that branch. 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.
jquery-3.5.1.defaultPrefilter (cyclomatic 45) docs/doc/reference/jquery/jquery-3.5.1.js:7324— jquery-3.5.1.defaultPrefilter has cyclomatic complexity 45 (threshold 15). Of this number, 41 points are the body's own statements and 4 belong to 3 function literals inside it that branch. 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.
swiper.window.Lazyload.js() (cyclomatic 44) docs/_includes/scripts/lib/swiper.js:3— swiper.window.Lazyload.js() has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 1 of the 44 points is its own statement and the rest belongs to 14 function items inside it that branch (a function literal at line 39, swiper::move, swiper::setOptions, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
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.
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.
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.
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, 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.
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.
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.
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.
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.
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. This is NOT this file's highest cyclomatic complexity: MatroskaExtractor.getElementType (cyclomatic 93) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
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. This is NOT this file's highest cyclomatic complexity: MediaMetadata.getFolderTypeFromMediaType (cyclomatic 37) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
gallery.window.Lazyload.js() (cyclomatic 35) docs/_includes/scripts/lib/gallery.js:4— gallery.window.Lazyload.js() has cyclomatic complexity 35 (threshold 15). Of this number, 17 points are the body's own statements and 18 belong to 11 function literals inside it that branch. 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.
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.
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.
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. This is NOT this file's highest cyclomatic complexity: MediaMetadata.getFolderTypeFromMediaType (cyclomatic 37) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
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.
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.
search.window.Lazyload.js() (cyclomatic 33) docs/_includes/search-providers/default/search.js:3— search.window.Lazyload.js() has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 110, searchByQuery, moveActiveIndex, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
jquery-ui.$.fn.position (cyclomatic 33) docs/doc/reference/jquery/jquery-ui.js:873— jquery-ui.$.fn.position has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 10 of the 33 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 903, 954, 1010, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
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.
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.
jquery.jQuery.Callbacks (cyclomatic 31) docs/doc/reference/jquery/external/jquery/jquery.js:3453— jquery.jQuery.Callbacks has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to 8 function items inside it that branch (fire, a function literal at line 3541, a function literal at line 3531, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
jquery-3.5.1.jQuery.Callbacks (cyclomatic 31) docs/doc/reference/jquery/jquery-3.5.1.js:3453— jquery-3.5.1.jQuery.Callbacks has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to 8 function items inside it that branch (fire, a function literal at line 3541, a function literal at line 3531, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
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.
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.
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.
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.
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. This is NOT this file's highest cyclomatic complexity: MatroskaExtractor.getElementType (cyclomatic 93) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
SampleReader.appendToNalUnit (cyclomatic 29) REDACTED: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.
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.
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.
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.
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.
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.
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.
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.
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. This is NOT this file's highest cyclomatic complexity: MatroskaExtractor.getElementType (cyclomatic 93) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
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.
jquery.jQuery.ajaxTransport() (cyclomatic 27) docs/doc/reference/jquery/external/jquery/jquery.js:9977— jquery.jQuery.ajaxTransport() has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 9983, 10023, 10075, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
jquery-3.5.1.jQuery.ajaxTransport() (cyclomatic 27) docs/doc/reference/jquery/jquery-3.5.1.js:9977— jquery-3.5.1.jQuery.ajaxTransport() has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 9983, 10023, 10075, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
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.
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.
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.
search.window.Lazyload.js() (cyclomatic 26) docs/_includes/scripts/components/search.js:4— search.window.Lazyload.js() has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to 6 function items inside it that branch (handleModalChange, a function literal at line 45, a function literal at line 71, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
jquery.domManip (cyclomatic 26) docs/doc/reference/jquery/external/jquery/jquery.js:6047— jquery.domManip has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
jquery-3.5.1.domManip (cyclomatic 26) docs/doc/reference/jquery/jquery-3.5.1.js:6047— jquery-3.5.1.domManip has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
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.
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.
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.
jquery.ajaxConvert (cyclomatic 25) docs/doc/reference/jquery/external/jquery/jquery.js:9180— jquery.ajaxConvert 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.
jquery-3.5.1.ajaxConvert (cyclomatic 25) docs/doc/reference/jquery/jquery-3.5.1.js:9180— jquery-3.5.1.ajaxConvert 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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. This is NOT this file's highest cyclomatic complexity: MediaCodecUtil.hevcCodecStringToProfileLevel (cyclomatic 28) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
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.
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.
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.
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, 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.
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.
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. This is NOT this file's highest cyclomatic complexity: DefaultAudioSink.getFramesPerEncodedSample (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
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.
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.
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.
jquery.adjustCSS (cyclomatic 22) docs/doc/reference/jquery/external/jquery/jquery.js:4738— jquery.adjustCSS has cyclomatic complexity 22 (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.
jquery-3.5.1.adjustCSS (cyclomatic 22) docs/doc/reference/jquery/jquery-3.5.1.js:4738— jquery-3.5.1.adjustCSS has cyclomatic complexity 22 (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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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, 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.
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.
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.
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.
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.
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.
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.
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.
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.
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. This is NOT this file's highest cyclomatic complexity: MediaMetadata.getFolderTypeFromMediaType (cyclomatic 37) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
toc.window.Lazyload.js() (cyclomatic 20) docs/_includes/scripts/lib/toc.js:3— toc.window.Lazyload.js() has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 7 function items inside it that branch (toc::setState, toc::setOptions, toc::render, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
jquery.buildFragment (cyclomatic 20) docs/doc/reference/jquery/external/jquery/jquery.js:5002— jquery.buildFragment 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.
jquery-3.5.1.buildFragment (cyclomatic 20) docs/doc/reference/jquery/jquery-3.5.1.js:5002— jquery-3.5.1.buildFragment 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.
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.
NotificationBroadcastReceiver.onReceive (cyclomatic 19) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java:1536— NotificationBroadcastReceiver.onReceive 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.
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. This is NOT this file's highest cyclomatic complexity: Cea708Decoder.handleG2Character (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
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.
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.
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.
AviExtractor.read (cyclomatic 19) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/avi/AviExtractor.java:178— AviExtractor.read 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.
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.
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.
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.
MediaCodecVideoRenderer.getCodecMaxInputSize (cyclomatic 19) library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:882— MediaCodecVideoRenderer.getCodecMaxInputSize has cyclomatic complexity 19 (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.
MediaCodecVideoRenderer.handleMessage (cyclomatic 19) library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:659— MediaCodecVideoRenderer.handleMessage has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
MediaCodecVideoRenderer.supportsFormat (cyclomatic 19) library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:374— MediaCodecVideoRenderer.supportsFormat 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.
PlaybackStatsTracker.build (cyclomatic 19) library/core/src/main/java/com/google/android/exoplayer2/analytics/PlaybackStatsListener.java:592— PlaybackStatsTracker.build 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.
NalUnitUtil.findNalUnit (cyclomatic 19) library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:751— NalUnitUtil.findNalUnit 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.
archieve.window.Lazyload.js()::tagSelect (cyclomatic 19) docs/_includes/scripts/archieve.js:78— archieve.window.Lazyload.js()::tagSelect 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.
StyledPlayerControlView.dispatchMediaKeyEvent (cyclomatic 18) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1470— StyledPlayerControlView.dispatchMediaKeyEvent has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TransformerInternal.endInternal (cyclomatic 18) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformerInternal.java:335— TransformerInternal.endInternal has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HlsSampleStreamWrapper.buildTracksFromSampleStreams (cyclomatic 18) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java:1372— HlsSampleStreamWrapper.buildTracksFromSampleStreams has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DefaultEbmlReader.read (cyclomatic 18) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/DefaultEbmlReader.java:91— DefaultEbmlReader.read has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Mp3Extractor.synchronize (cyclomatic 18) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp3/Mp3Extractor.java:356— Mp3Extractor.synchronize has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ProgressiveMediaPeriod.selectTracks (cyclomatic 18) library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriod.java:260— ProgressiveMediaPeriod.selectTracks has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CmcdHeadersFactory.createHttpRequestHeaders (cyclomatic 18) library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:196— CmcdHeadersFactory.createHttpRequestHeaders has cyclomatic complexity 18 (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.
MediaCodecVideoRenderer.setOutput (cyclomatic 18) library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:711— MediaCodecVideoRenderer.setOutput has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PlaybackStatsTracker.resolveNewPlaybackState (cyclomatic 18) library/core/src/main/java/com/google/android/exoplayer2/analytics/PlaybackStatsListener.java:697— PlaybackStatsTracker.resolveNewPlaybackState has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cue.fromBundle (cyclomatic 18) library/common/src/main/java/com/google/android/exoplayer2/text/Cue.java:873— Cue.fromBundle has cyclomatic complexity 18 (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.
affix.window.Lazyload.js() (cyclomatic 18) docs/_includes/scripts/lib/affix.js:3— affix.window.Lazyload.js() has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 11 function items inside it that branch (affix::setOptions, affix::setState, affix::preCalc, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
jquery.Animation (cyclomatic 18) docs/doc/reference/jquery/external/jquery/jquery.js:7533— jquery.Animation has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (tick, a function literal at line 7595, a function literal at line 7589). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
jquery.jQuery.speed (cyclomatic 18) docs/doc/reference/jquery/external/jquery/jquery.js:7698— jquery.jQuery.speed has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
jquery.jQuery.ajaxPrefilter("json jsonp") (cyclomatic 18) docs/doc/reference/jquery/external/jquery/jquery.js:10203— jquery.jQuery.ajaxPrefilter("json jsonp") has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 2 function literals inside it that branch. 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.
jquery-3.5.1.Animation (cyclomatic 18) docs/doc/reference/jquery/jquery-3.5.1.js:7533— jquery-3.5.1.Animation has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (tick, a function literal at line 7595, a function literal at line 7589). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
jquery-3.5.1.jQuery.speed (cyclomatic 18) docs/doc/reference/jquery/jquery-3.5.1.js:7698— jquery-3.5.1.jQuery.speed has cyclomatic complexity 18 (threshold 15). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
jquery-3.5.1.jQuery.ajaxPrefilter("json jsonp") (cyclomatic 18) docs/doc/reference/jquery/jquery-3.5.1.js:10203— jquery-3.5.1.jQuery.ajaxPrefilter("json jsonp") has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 2 function literals inside it that branch. 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.
MediaPeriodAsserts.assertGetStreamKeysAndManifestFilterIntegration (cyclomatic 17) testutils/src/main/java/com/google/android/exoplayer2/testutil/MediaPeriodAsserts.java:93— MediaPeriodAsserts.assertGetStreamKeysAndManifestFilterIntegration has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PlayerControlView.updateProgress (cyclomatic 17) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1019— PlayerControlView.updateProgress has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
StyledPlayerView.setPlayer (cyclomatic 17) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:559— StyledPlayerView.setPlayer has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HlsChunkSource.getNextMediaSequenceAndPartIndex (cyclomatic 17) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsChunkSource.java:799— HlsChunkSource.getNextMediaSequenceAndPartIndex has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HlsMediaPeriod.selectTracks (cyclomatic 17) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaPeriod.java:291— HlsMediaPeriod.selectTracks has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Cea608Decoder.handleMiscCode (cyclomatic 17) library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java:641— Cea608Decoder.handleMiscCode has cyclomatic complexity 17 (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.
DvbParser.decode (cyclomatic 17) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:137— DvbParser.decode has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SsaDecoder.createCue (cyclomatic 17) library/extractor/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDecoder.java:335— SsaDecoder.createCue has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TtmlDecoder.decode (cyclomatic 17) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:122— TtmlDecoder.decode has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AdtsReader.checkSyncPositionValid (cyclomatic 17) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsReader.java:387— AdtsReader.checkSyncPositionValid has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PmtReader.readEsInfo (cyclomatic 17) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java:719— PmtReader.readEsInfo has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DefaultDashChunkSource.onChunkLoadError (cyclomatic 17) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:519— DefaultDashChunkSource.onChunkLoadError has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
VideoTrackInfo.<init> (cyclomatic 17) library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:3249— VideoTrackInfo.<init> has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
MediaCodecRenderer.render (cyclomatic 17) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:793— MediaCodecRenderer.render has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
State.<init> (cyclomatic 17) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:890— State.<init> has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OpusDecoder.<init> (cyclomatic 17) extensions/opus/src/main/java/com/google/android/exoplayer2/ext/opus/OpusDecoder.java:83— OpusDecoder.<init> has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MediaSessionConnector.invalidateMediaSessionPlaybackState (cyclomatic 17) extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java:772— MediaSessionConnector.invalidateMediaSessionPlaybackState has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ImaServerSideAdInsertionUriBuilder.build (cyclomatic 17) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionUriBuilder.java:257— ImaServerSideAdInsertionUriBuilder.build has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
jquery.getWidthOrHeight (cyclomatic 17) docs/doc/reference/jquery/external/jquery/jquery.js:6770— jquery.getWidthOrHeight has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
jquery-3.5.1.getWidthOrHeight (cyclomatic 17) docs/doc/reference/jquery/jquery-3.5.1.js:6770— jquery-3.5.1.getWidthOrHeight has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
StyledPlayerControlView.updateProgress (cyclomatic 16) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1264— StyledPlayerControlView.updateProgress has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ElementParser.parse (cyclomatic 16) library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParser.java:115— ElementParser.parse has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
QualityLevelParser.fourCCToMimeType (cyclomatic 16) library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParser.java:777— QualityLevelParser.fourCCToMimeType has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MatroskaExtractor.startMasterElement (cyclomatic 16) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:662— MatroskaExtractor.startMasterElement has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: MatroskaExtractor.getElementType (cyclomatic 93) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
FragmentedMp4Extractor.parseSampleGroups (cyclomatic 16) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:1164— FragmentedMp4Extractor.parseSampleGroups has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Mp4Extractor.readSample (cyclomatic 16) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java:608— Mp4Extractor.readSample has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ContentDataSource.open (cyclomatic 16) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/ContentDataSource.java:82— ContentDataSource.open has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DashManifestParser.parseRepresentation (cyclomatic 16) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:665— DashManifestParser.parseRepresentation has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AudioCapabilities.getEncodingAndChannelConfigForPassthrough (cyclomatic 16) library/core/src/main/java/com/google/android/exoplayer2/audio/AudioCapabilities.java:212— AudioCapabilities.getEncodingAndChannelConfigForPassthrough has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DefaultAudioSink.configure (cyclomatic 16) library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:637— DefaultAudioSink.configure has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: DefaultAudioSink.getFramesPerEncodedSample (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
DecoderVideoRenderer.processOutputBuffer (cyclomatic 16) library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:830— DecoderVideoRenderer.processOutputBuffer has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MediaCodecRenderer.maybeInitCodecOrBypass (cyclomatic 16) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:506— MediaCodecRenderer.maybeInitCodecOrBypass has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MediaCodecUtil.applyWorkarounds (cyclomatic 16) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:642— MediaCodecUtil.applyWorkarounds has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: MediaCodecUtil.hevcCodecStringToProfileLevel (cyclomatic 28) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
MediaPeriodQueue.getMediaPeriodInfoForContent (cyclomatic 16) library/core/src/main/java/com/google/android/exoplayer2/MediaPeriodQueue.java:955— MediaPeriodQueue.getMediaPeriodInfoForContent has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OkHttpDataSource.open (cyclomatic 16) extensions/okhttp/src/main/java/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSource.java:293— OkHttpDataSource.open has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ComponentListener.onPositionDiscontinuity (cyclomatic 16) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.java:836— ComponentListener.onPositionDiscontinuity has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
jquery.ajaxHandleResponses (cyclomatic 16) docs/doc/reference/jquery/external/jquery/jquery.js:9122— jquery.ajaxHandleResponses has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
jquery-3.5.1.ajaxHandleResponses (cyclomatic 16) docs/doc/reference/jquery/jquery-3.5.1.js:9122— jquery-3.5.1.ajaxHandleResponses has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D12 · Dependency Hygiene· No Gemfile.lock committed by an application · ×1
No Gemfile.lock committed by an application — This repository declares 3 gem(s) across 1 Bundler manifest(s) and ships no application `.gemspec`, so it is an APPLICATION — but no `Gemfile.lock` is committed. Nothing records the versions a working build resolved to, so `bundle install` re-resolves against whatever rubygems.org serves today and two deploys of this commit are not guaranteed to be the same deploy. Run `bundle install` and commit the resulting `Gemfile.lock`. (A published GEM correctly omits its lock, which is why this is asked only of a repository that ships no .gemspec.)
HackComment robolectricutils/src/main/java/com/google/android/exoplayer2/robolectric/PlaybackOutput.java:170— // hack of forcing presentationTimeUs to be >= 0. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping (cognitive 796) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:45— DeviceMappedEncoderBitrateProvider.getBitrateMultiplierFromMapping has cognitive complexity 796 (threshold 15). Drivers by points: match/switch 199 (796 pts) (nesting depth added 597). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Ac3Util.parseAc3SyncframeInfo (cognitive 229) library/extractor/src/main/java/com/google/android/exoplayer2/audio/Ac3Util.java:258— Ac3Util.parseAc3SyncframeInfo has cognitive complexity 229 (threshold 15). Drivers by points: if/else 56 (205 pts), boolean chains 10, loops 1 (6 pts), ternaries 3 (6 pts), match/switch 1 (2 pts) (nesting depth added 158). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
HlsPlaylistParser.parseMediaPlaylist (cognitive 184) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:639— HlsPlaylistParser.parseMediaPlaylist has cognitive complexity 184 (threshold 15). Drivers by points: if/else 67 (155 pts), ternaries 4 (13 pts), boolean chains 11, loops 3 (5 pts) (nesting depth added 99). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DvbParser.generateDefault8BitClutEntries (cognitive 112) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:589— DvbParser.generateDefault8BitClutEntries has cognitive complexity 112 (threshold 15). Drivers by points: ternaries 27 (105 pts), if/else 2 (3 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 81). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AtomParsers.parseStbl (cognitive 105) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:436— AtomParsers.parseStbl has cognitive complexity 105 (threshold 15). Drivers by points: if/else 29 (58 pts), loops 10 (23 pts), boolean chains 12, ternaries 8 (12 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MatroskaExtractor.binaryElement (cognitive 98) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:1150— MatroskaExtractor.binaryElement has cognitive complexity 98 (threshold 15). Drivers by points: if/else 16 (49 pts), loops 7 (36 pts), ternaries 2 (9 pts), boolean chains 3, match/switch 1 (nesting depth added 69). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
HlsPlaylistParser.parseMultivariantPlaylist (cognitive 84) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:332— HlsPlaylistParser.parseMultivariantPlaylist has cognitive complexity 84 (threshold 15). Drivers by points: if/else 32 (71 pts), ternaries 2 (5 pts), boolean chains 3, loops 3, match/switch 1 (2 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery.defaultPrefilter (cognitive 81) docs/doc/reference/jquery/external/jquery/jquery.js:7324— jquery.defaultPrefilter has cognitive complexity 81 (threshold 15). Drivers by points: if/else 27 (64 pts), boolean chains 12, loops 3 (5 pts) (nesting depth added 39). Of this number, 73 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
jquery-3.5.1.defaultPrefilter (cognitive 81) docs/doc/reference/jquery/jquery-3.5.1.js:7324— jquery-3.5.1.defaultPrefilter has cognitive complexity 81 (threshold 15). Drivers by points: if/else 27 (64 pts), boolean chains 12, loops 3 (5 pts) (nesting depth added 39). Of this number, 73 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AtomParsers.parseVideoSampleEntry (cognitive 80) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1173— AtomParsers.parseVideoSampleEntry has cognitive complexity 80 (threshold 15). Drivers by points: if/else 31 (53 pts), ternaries 5 (16 pts), boolean chains 6, match/switch 1 (4 pts), loops 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MatroskaExtractor.writeSampleData (cognitive 75) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:1469— MatroskaExtractor.writeSampleData has cognitive complexity 75 (threshold 15). Drivers by points: if/else 24 (59 pts), loops 3 (9 pts), ternaries 1 (5 pts), boolean chains 2 (nesting depth added 45). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AtomParsers.parseAudioSampleEntry (cognitive 74) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1503— AtomParsers.parseAudioSampleEntry has cognitive complexity 74 (threshold 15). Drivers by points: if/else 44 (59 pts), boolean chains 8, ternaries 2 (6 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery.ajaxConvert (cognitive 73) docs/doc/reference/jquery/external/jquery/jquery.js:9180— jquery.ajaxConvert has cognitive complexity 73 (threshold 15). Drivers by points: if/else 14 (47 pts), loops 3 (8 pts), ternaries 1 (7 pts), error handling 1 (6 pts), boolean chains 5 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
jquery-3.5.1.ajaxConvert (cognitive 73) docs/doc/reference/jquery/jquery-3.5.1.js:9180— jquery-3.5.1.ajaxConvert has cognitive complexity 73 (threshold 15). Drivers by points: if/else 14 (47 pts), loops 3 (8 pts), ternaries 1 (7 pts), error handling 1 (6 pts), boolean chains 5 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
NalUnitUtil.skipShortTermReferencePictureSets (cognitive 70) library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:867— NalUnitUtil.skipShortTermReferencePictureSets has cognitive complexity 70 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 8 (22 pts), ternaries 3 (11 pts), boolean chains 7 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NalUnitUtil.parseSpsNalUnitPayload (cognitive 66) library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:372— NalUnitUtil.parseSpsNalUnitPayload has cognitive complexity 66 (threshold 15). Drivers by points: if/else 19 (35 pts), ternaries 8 (24 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 35). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DefaultAudioSink.handleBuffer (cognitive 65) library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:830— DefaultAudioSink.handleBuffer has cognitive complexity 65 (threshold 15). Drivers by points: if/else 29 (58 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaMetricsListener.getErrorInfo (cognitive 62) library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java:698— MediaMetricsListener.getErrorInfo has cognitive complexity 62 (threshold 15). Drivers by points: if/else 35 (45 pts), boolean chains 14, ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HlsSampleStreamWrapper.selectTracks (cognitive 61) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java:352— HlsSampleStreamWrapper.selectTracks has cognitive complexity 61 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 4 (9 pts), boolean chains 5, ternaries 2 (5 pts) (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Format.toLogString (cognitive 61) library/common/src/main/java/com/google/android/exoplayer2/Format.java:1143— Format.toLogString has cognitive complexity 61 (threshold 15). Drivers by points: if/else 37 (57 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlayerCommandQueue.processPendingCommandOnHandler (cognitive 60) extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/PlayerCommandQueue.java:280— PlayerCommandQueue.processPendingCommandOnHandler has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (35 pts), error handling 4 (12 pts), loops 3 (8 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StyledPlayerControlView.updateTimeline (cognitive 59) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1185— StyledPlayerControlView.updateTimeline has cognitive complexity 59 (threshold 15). Drivers by points: if/else 13 (37 pts), ternaries 4 (12 pts), loops 3 (9 pts), boolean chains 1 (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DefaultMediaMetadataProvider.getMetadata (cognitive 59) extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java:1045— DefaultMediaMetadataProvider.getMetadata has cognitive complexity 59 (threshold 15). Drivers by points: if/else 18 (49 pts), loops 2 (7 pts), boolean chains 2, ternaries 1 (nesting depth added 36). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
H262Reader.consume (cognitive 58) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:132— H262Reader.consume has cognitive complexity 58 (threshold 15). Drivers by points: if/else 15 (37 pts), ternaries 4 (16 pts), boolean chains 4, loops 1 (nesting depth added 34). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Track.initializeOutput (cognitive 56) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:2053— Track.initializeOutput has cognitive complexity 56 (threshold 15). Drivers by points: if/else 25 (39 pts), ternaries 5 (10 pts), boolean chains 6, match/switch 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlayerControlView.updateTimeline (cognitive 55) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:947— PlayerControlView.updateTimeline has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (34 pts), ternaries 3 (11 pts), loops 3 (9 pts), boolean chains 1 (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ExoPlayerImplInternal.doSomeWork (cognitive 55) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:1009— ExoPlayerImplInternal.doSomeWork has cognitive complexity 55 (threshold 15). Drivers by points: if/else 22 (31 pts), boolean chains 18, loops 2 (4 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery.domManip (cognitive 55) docs/doc/reference/jquery/external/jquery/jquery.js:6047— jquery.domManip has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (39 pts), boolean chains 9, loops 2 (7 pts) (nesting depth added 32). Of this number, 53 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
jquery-3.5.1.domManip (cognitive 55) docs/doc/reference/jquery/jquery-3.5.1.js:6047— jquery-3.5.1.domManip has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (39 pts), boolean chains 9, loops 2 (7 pts) (nesting depth added 32). Of this number, 53 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
WebvttCueParser.parseCueText (cognitive 53) library/extractor/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParser.java:253— WebvttCueParser.parseCueText has cognitive complexity 53 (threshold 15). Drivers by points: if/else 11 (32 pts), ternaries 4 (13 pts), loops 3 (6 pts), match/switch 1 (2 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NalUnitUtil.parseH265SpsNalUnitPayload (cognitive 53) library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:543— NalUnitUtil.parseH265SpsNalUnitPayload has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (35 pts), ternaries 4 (9 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
swiper.window.Lazyload.js() (cognitive 53) docs/_includes/scripts/lib/swiper.js:3— swiper.window.Lazyload.js() has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 20, ternaries 6 (8 pts) (nesting depth added 7). None of this is in the body itself: all 53 points belong to 14 function items inside it that branch (a function literal at line 39, swiper::move, swiper::setOptions, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
TextRenderer.render (cognitive 51) library/core/src/main/java/com/google/android/exoplayer2/text/TextRenderer.java:200— TextRenderer.render has cognitive complexity 51 (threshold 15). Drivers by points: if/else 23 (43 pts), error handling 2 (3 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecRenderer.feedInputBuffer (cognitive 51) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:1221— MediaCodecRenderer.feedInputBuffer has cognitive complexity 51 (threshold 15). Drivers by points: if/else 31 (40 pts), boolean chains 5, error handling 3 (4 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Id3Decoder.decodeFrame (cognitive 48) library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java:288— Id3Decoder.decodeFrame has cognitive complexity 48 (threshold 15). Drivers by points: if/else 26 (27 pts), boolean chains 17, ternaries 3 (4 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
FragmentedMp4Extractor.readSample (cognitive 47) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:1351— FragmentedMp4Extractor.readSample has cognitive complexity 47 (threshold 15). Drivers by points: if/else 20 (37 pts), ternaries 1 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SegmentDownloader.download (cognitive 45) library/core/src/main/java/com/google/android/exoplayer2/offline/SegmentDownloader.java:156— SegmentDownloader.download has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 5 (6 pts), error handling 1 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultTrackSelector.selectTracksForType (cognitive 45) library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:2749— DefaultTrackSelector.selectTracksForType has cognitive complexity 45 (threshold 15). Drivers by points: if/else 7 (29 pts), loops 5 (15 pts), boolean chains 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SessionCallback.buildAllowedCommands (cognitive 45) extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/SessionCallback.java:220— SessionCallback.buildAllowedCommands has cognitive complexity 45 (threshold 15). Drivers by points: if/else 22 (40 pts), boolean chains 4, ternaries 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebViewSubtitleOutput.updateWebView (cognitive 44) library/ui/src/main/java/com/google/android/exoplayer2/ui/WebViewSubtitleOutput.java:171— WebViewSubtitleOutput.updateWebView has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 7 (19 pts), if/else 8 (14 pts), match/switch 2 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecInfo.canReuseCodec (cognitive 43) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.java:424— MediaCodecInfo.canReuseCodec has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
MimeTypes.getMediaMimeType (cognitive 43) library/common/src/main/java/com/google/android/exoplayer2/util/MimeTypes.java:398— MimeTypes.getMediaMimeType has cognitive complexity 43 (threshold 15). Drivers by points: if/else 28 (31 pts), boolean chains 10, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
HlsMediaPeriod.buildAndPrepareMainSampleStreamWrapper (cognitive 42) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaPeriod.java:585— HlsMediaPeriod.buildAndPrepareMainSampleStreamWrapper has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 5 (12 pts), boolean chains 11, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cea708Decoder.handleC1Command (cognitive 42) library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java:427— Cea708Decoder.handleC1Command has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 5 (10 pts), match/switch 1 (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Sniffer.sniffInternal (cognitive 42) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Sniffer.java:114— Sniffer.sniffInternal has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (33 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SampleReader.appendToNalUnit (cognitive 42) REDACTED:353— SampleReader.appendToNalUnit has cognitive complexity 42 (threshold 15). Drivers by points: if/else 25 (39 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecRenderer.drainOutputBuffer (cognitive 42) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:1855— MediaCodecRenderer.drainOutputBuffer has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 6, error handling 2 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExoPlayerImplInternal.handleMessage (cognitive 42) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:502— ExoPlayerImplInternal.handleMessage has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (21 pts), error handling 7, ternaries 2 (6 pts), loops 1 (4 pts), boolean chains 3, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecVideoRenderer.processOutputBuffer (cognitive 41) library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:1121— MediaCodecVideoRenderer.processOutputBuffer has cognitive complexity 41 (threshold 15). Drivers by points: if/else 24 (35 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImaUtil.handleAdPeriodRemovedFromTimeline (cognitive 41) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaUtil.java:710— ImaUtil.handleAdPeriodRemovedFromTimeline has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (36 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
search.window.Lazyload.js() (cognitive 41) docs/_includes/search-providers/default/search.js:3— search.window.Lazyload.js() has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 11, loops 6 (9 pts), ternaries 2 (nesting depth added 10). Most of this is not in the body itself: 2 of the 41 points are its own statements and the rest belongs to 8 function items inside it that branch (searchByQuery, a function literal at line 110, moveActiveIndex, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SubtitlePainter.setupTextLayout (cognitive 40) library/ui/src/main/java/com/google/android/exoplayer2/ui/SubtitlePainter.java:236— SubtitlePainter.setupTextLayout has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (24 pts), ternaries 4 (9 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RtpVp9Reader.validateVp9Descriptor (cognitive 40) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpVp9Reader.java:156— RtpVp9Reader.validateVp9Descriptor has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (33 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cea608Decoder.decode (cognitive 40) library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java:463— Cea608Decoder.decode has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DashManifestParser.parseMediaPresentationDescription (cognitive 40) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:124— DashManifestParser.parseMediaPresentationDescription has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (25 pts), ternaries 8 (13 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SimpleBasePlayer.updateStateAndInformListeners (cognitive 40) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:3287— SimpleBasePlayer.updateStateAndInformListeners has cognitive complexity 40 (threshold 15). Drivers by points: if/else 32 (33 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
HlsMediaPeriod.getStreamKeys (cognitive 39) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaPeriod.java:207— HlsMediaPeriod.getStreamKeys has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 5 (15 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CronetDataSource.open (cognitive 39) extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetDataSource.java:529— CronetDataSource.open has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 4 (10 pts), boolean chains 4, error handling 3 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery.jQuery.Callbacks (cognitive 39) docs/doc/reference/jquery/external/jquery/jquery.js:3453— jquery.jQuery.Callbacks has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 8, loops 3 (4 pts), ternaries 1 (nesting depth added 11). None of this is in the body itself: all 39 points belong to 8 function items inside it that branch (fire, a function literal at line 3531, a function literal at line 3541, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
jquery.buildFragment (cognitive 39) docs/doc/reference/jquery/external/jquery/jquery.js:5002— jquery.buildFragment has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 4 (9 pts), boolean chains 6, ternaries 1 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery-3.5.1.jQuery.Callbacks (cognitive 39) docs/doc/reference/jquery/jquery-3.5.1.js:3453— jquery-3.5.1.jQuery.Callbacks has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 8, loops 3 (4 pts), ternaries 1 (nesting depth added 11). None of this is in the body itself: all 39 points belong to 8 function items inside it that branch (fire, a function literal at line 3531, a function literal at line 3541, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
jquery-3.5.1.buildFragment (cognitive 39) docs/doc/reference/jquery/jquery-3.5.1.js:5002— jquery-3.5.1.buildFragment has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 4 (9 pts), boolean chains 6, ternaries 1 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TransformerInternal.endInternal (cognitive 38) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformerInternal.java:335— TransformerInternal.endInternal has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (23 pts), error handling 4 (10 pts), loops 3 (5 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionDescriptionParser.parse (cognitive 38) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/SessionDescriptionParser.java:78— SessionDescriptionParser.parse has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (34 pts), match/switch 1 (2 pts), error handling 1, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HlsMediaPeriod.selectTracks (cognitive 38) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaPeriod.java:291— HlsMediaPeriod.selectTracks has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 5 (9 pts), ternaries 3 (8 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TtmlDecoder.decode (cognitive 38) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:122— TtmlDecoder.decode has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (30 pts), error handling 3 (7 pts), loops 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
MatroskaExtractor.endMasterElement (cognitive 38) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:726— MatroskaExtractor.endMasterElement has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AdTagLoader.handleTimelineOrPositionChanged (cognitive 38) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java:867— AdTagLoader.handleTimelineOrPositionChanged has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 7, loops 1 (4 pts), ternaries 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HlsChunkSource.getNextMediaSequenceAndPartIndex (cognitive 37) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsChunkSource.java:799— HlsChunkSource.getNextMediaSequenceAndPartIndex has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 5 (14 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Cea708Decoder.processCurrentPacket (cognitive 37) library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java:292— Cea708Decoder.processCurrentPacket has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (34 pts), loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TtmlDecoder.parseRegionAttributes (cognitive 37) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:339— TtmlDecoder.parseRegionAttributes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (21 pts), error handling 4 (12 pts), match/switch 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TtmlStyle.inherit (cognitive 37) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlStyle.java:246— TtmlStyle.inherit has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (31 pts), boolean chains 6 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PesReader.consume (cognitive 37) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PesReader.java:95— PesReader.consume has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (20 pts), ternaries 3 (11 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PmtReader.consume (cognitive 37) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java:587— PmtReader.consume has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 3 (6 pts), boolean chains 5, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CacheDataSource.openNextSource (cognitive 37) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/cache/CacheDataSource.java:710— CacheDataSource.openNextSource has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (27 pts), error handling 2 (4 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ElementParser.parse (cognitive 36) library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/manifest/SsManifestParser.java:115— ElementParser.parse has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (32 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mp3Extractor.synchronize (cognitive 36) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp3/Mp3Extractor.java:356— Mp3Extractor.synchronize has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (30 pts), ternaries 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultDashChunkSource.getNextChunk (cognitive 36) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:323— DefaultDashChunkSource.getNextChunk has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 8, loops 2 (3 pts), ternaries 3 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DefaultAudioSink.writeBuffer (cognitive 36) library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:1097— DefaultAudioSink.writeBuffer has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21 (33 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecRenderer.onInputFormatChanged (cognitive 36) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:1487— MediaCodecRenderer.onInputFormatChanged has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (28 pts), boolean chains 7, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
archieve.window.Lazyload.js()::tagSelect (cognitive 36) docs/_includes/scripts/archieve.js:78— archieve.window.Lazyload.js()::tagSelect has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (10 pts), boolean chains 8 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageListener.handleRtspResponse (cognitive 35) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspClient.java:537— MessageListener.handleRtspResponse has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 3 (6 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (3 pts), match/switch 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TtmlRenderUtil.applyStylesToSpan (cognitive 35) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtil.java:91— TtmlRenderUtil.applyStylesToSpan has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (23 pts), ternaries 3 (8 pts), boolean chains 2, match/switch 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SectionReader.consume (cognitive 35) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/SectionReader.java:71— SectionReader.consume has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DefaultHttpDataSource.open (cognitive 35) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java:373— DefaultHttpDataSource.open has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 5 (12 pts), error handling 4 (5 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HlsSampleStreamWrapper.buildTracksFromSampleStreams (cognitive 34) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java:1372— HlsSampleStreamWrapper.buildTracksFromSampleStreams has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 3 (10 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RawResourceDataSource.open (cognitive 34) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/RawResourceDataSource.java:122— RawResourceDataSource.open has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (21 pts), error handling 4 (5 pts), ternaries 3 (5 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Builder.populate (cognitive 34) library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:470— Builder.populate has cognitive complexity 34 (threshold 15). Drivers by points: if/else 34. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
H263Reader.consume (cognitive 33) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:143— H263Reader.consume has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (28 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecVideoRenderer.setOutput (cognitive 33) library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:711— MediaCodecVideoRenderer.setOutput has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 5, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExoPlayerImplInternal.maybeUpdateReadingPeriod (cognitive 33) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:2091— ExoPlayerImplInternal.maybeUpdateReadingPeriod has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 8, ternaries 1 (5 pts), loops 2 (4 pts) (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ExoPlayerImplInternal.resolvePositionForPlaylistChange (cognitive 33) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:2655— ExoPlayerImplInternal.resolvePositionForPlaylistChange has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaMetadata.toBundle (cognitive 33) library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:1198— MediaMetadata.toBundle has cognitive complexity 33 (threshold 15). Drivers by points: if/else 33. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
StyledPlayerView.<init> (cognitive 32) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:304— StyledPlayerView.<init> has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (18 pts), error handling 2 (6 pts), boolean chains 4, match/switch 1 (2 pts), ternaries 2 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DefaultEncoderFactory.createForVideoEncoding (cognitive 32) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultEncoderFactory.java:208— DefaultEncoderFactory.createForVideoEncoding has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RtspHeaders.convertToStandardHeaderName (cognitive 32) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspHeaders.java:232— RtspHeaders.convertToStandardHeaderName has cognitive complexity 32 (threshold 15). Drivers by points: if/else 32. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Id3Decoder.validateFrames (cognitive 32) library/extractor/src/main/java/com/google/android/exoplayer2/metadata/id3/Id3Decoder.java:218— Id3Decoder.validateFrames has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (29 pts), boolean chains 2, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetadataUtil.parseIlstElement (cognitive 32) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/MetadataUtil.java:360— MetadataUtil.parseIlstElement has cognitive complexity 32 (threshold 15). Drivers by points: if/else 28 (29 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MediaCodecUtil.getDecoderInfosInternal (cognitive 32) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:388— MediaCodecUtil.getDecoderInfosInternal has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 11, error handling 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImaUtil.splitAdPlaybackStateForPeriods (cognitive 32) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaUtil.java:414— ImaUtil.splitAdPlaybackStateForPeriods has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
MediaPeriodAsserts.assertGetStreamKeysAndManifestFilterIntegration (cognitive 31) testutils/src/main/java/com/google/android/exoplayer2/testutil/MediaPeriodAsserts.java:93— MediaPeriodAsserts.assertGetStreamKeysAndManifestFilterIntegration has cognitive complexity 31 (threshold 15). Drivers by points: loops 9 (19 pts), if/else 6 (11 pts), boolean chains 1 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PlayerView.<init> (cognitive 31) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:327— PlayerView.<init> has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (18 pts), error handling 2 (6 pts), boolean chains 4, match/switch 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DvbParser.decode (cognitive 31) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:137— DvbParser.decode has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 2 (5 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FragmentedMp4Extractor.readAtomHeader (cognitive 31) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:364— FragmentedMp4Extractor.readAtomHeader has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VorbisUtil.readFloors (cognitive 31) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/VorbisUtil.java:490— VorbisUtil.readFloors has cognitive complexity 31 (threshold 15). Drivers by points: loops 7 (21 pts), if/else 2 (8 pts), match/switch 1 (2 pts) (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MediaCodecVideoRenderer.getCodecMaxSize (cognitive 31) library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:2391— MediaCodecVideoRenderer.getCodecMaxSize has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 6 (16 pts), if/else 5 (10 pts), error handling 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery.jQuery.ajaxTransport() (cognitive 31) docs/doc/reference/jquery/external/jquery/jquery.js:9977— jquery.jQuery.ajaxTransport() has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 9, loops 2 (5 pts), error handling 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 3 of the 31 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 9983, 10109, 10023, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
jquery-3.5.1.jQuery.ajaxTransport() (cognitive 31) docs/doc/reference/jquery/jquery-3.5.1.js:9977— jquery-3.5.1.jQuery.ajaxTransport() has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 9, loops 2 (5 pts), error handling 1 (2 pts) (nesting depth added 11). Most of this is not in the body itself: 3 of the 31 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 9983, 10109, 10023, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
Mp4Extractor.readSample (cognitive 30) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java:608— Mp4Extractor.readSample has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PsExtractor.read (cognitive 30) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsExtractor.java:180— PsExtractor.read has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DashManifestParser.parseAdaptationSet (cognitive 30) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:391— DashManifestParser.parseAdaptationSet has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (25 pts), ternaries 1 (3 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultAudioSink.configure (cognitive 30) library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:637— DefaultAudioSink.configure has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 3 (5 pts), loops 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConcatenatingMediaSource2.maybeCreateConcatenatedTimeline (cognitive 30) library/core/src/main/java/com/google/android/exoplayer2/source/ConcatenatingMediaSource2.java:362— ConcatenatingMediaSource2.maybeCreateConcatenatedTimeline has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 3 (5 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProgressiveMediaPeriod.selectTracks (cognitive 30) library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriod.java:260— ProgressiveMediaPeriod.selectTracks has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (10 pts), boolean chains 4, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExoPlayerImplInternal.resetInternal (cognitive 30) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:1441— ExoPlayerImplInternal.resetInternal has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 2 (6 pts), ternaries 5, loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FileTypes.inferFileTypeFromUri (cognitive 30) library/common/src/main/java/com/google/android/exoplayer2/util/FileTypes.java:199— FileTypes.inferFileTypeFromUri has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19, boolean chains 11. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TsExtractor.read (cognitive 29) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java:307— TsExtractor.read has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MergingMediaPeriod.selectTracks (cognitive 29) library/core/src/main/java/com/google/android/exoplayer2/source/MergingMediaPeriod.java:116— MergingMediaPeriod.selectTracks has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 3 (7 pts), loops 4 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MatroskaExtractor.integerElement (cognitive 28) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:843— MatroskaExtractor.integerElement has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
LatmReader.parseStreamMuxConfig (cognitive 28) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/LatmReader.java:196— LatmReader.parseStreamMuxConfig has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 1 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlaybackStatsTracker.onEvents (cognitive 28) library/core/src/main/java/com/google/android/exoplayer2/analytics/PlaybackStatsListener.java:492— PlaybackStatsTracker.onEvents has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
MediaCodecRenderer.maybeInitCodecOrBypass (cognitive 28) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:506— MediaCodecRenderer.maybeInitCodecOrBypass has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), error handling 2 (5 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
State.<init> (cognitive 28) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:890— State.<init> has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebServerDispatcher.dispatch (cognitive 27) testutils/src/main/java/com/google/android/exoplayer2/testutil/WebServerDispatcher.java:264— WebServerDispatcher.dispatch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, ternaries 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CueBuilder.buildCurrentLine (cognitive 27) library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea608Decoder.java:1054— CueBuilder.buildCurrentLine has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, ternaries 2 (5 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DvbParser.parseSubtitlingSegment (cognitive 27) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:268— DvbParser.parseSubtitlingSegment has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 2, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TtmlDecoder.parseStyleAttributes (cognitive 27) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:497— TtmlDecoder.parseStyleAttributes has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 5 (14 pts), error handling 3 (9 pts), if/else 1 (3 pts), loops 1 (nesting depth added 17). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
MediaCodecUtil.isCodecUsableDecoder (cognitive 27) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:532— MediaCodecUtil.isCodecUsableDecoder has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 18, if/else 9. 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.
ExoPlayerImpl.updatePlaybackInfo (cognitive 27) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:1960— ExoPlayerImpl.updatePlaybackInfo has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20 (22 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
StyledPlayerView.setPlayer (cognitive 26) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:559— StyledPlayerView.setPlayer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AppInfoTableDecoder.parseAit (cognitive 26) library/extractor/src/main/java/com/google/android/exoplayer2/metadata/dvbsi/AppInfoTableDecoder.java:64— AppInfoTableDecoder.parseAit has cognitive complexity 26 (threshold 15). Drivers by points: loops 4 (14 pts), if/else 4 (10 pts), boolean chains 1, ternaries 1 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WebvttCssParser.parseStyleDeclaration (cognitive 26) library/extractor/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCssParser.java:173— WebvttCssParser.parseStyleDeclaration has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DefaultEbmlReader.read (cognitive 26) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/DefaultEbmlReader.java:91— DefaultEbmlReader.read has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DashMediaPeriod.getGroupedAdaptationSetIndices (cognitive 26) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaPeriod.java:560— DashMediaPeriod.getGroupedAdaptationSetIndices has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 4 (7 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DashMediaSource.onManifestLoadCompleted (cognitive 26) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:603— DashMediaSource.onManifestLoadCompleted has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExoPlayerImplInternal.reselectTracksInternal (cognitive 26) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:1740— ExoPlayerImplInternal.reselectTracksInternal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExoPlayerImplInternal.seekToInternal (cognitive 26) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:1180— ExoPlayerImplInternal.seekToInternal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery.ajaxHandleResponses (cognitive 26) docs/doc/reference/jquery/external/jquery/jquery.js:9122— jquery.ajaxHandleResponses has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery-3.5.1.ajaxHandleResponses (cognitive 26) docs/doc/reference/jquery/jquery-3.5.1.js:9122— jquery-3.5.1.ajaxHandleResponses has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ComponentListener.onClick (cognitive 25) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1696— ComponentListener.onClick has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ac4Util.parseAc4SyncframeInfo (cognitive 25) library/extractor/src/main/java/com/google/android/exoplayer2/audio/Ac4Util.java:135— Ac4Util.parseAc4SyncframeInfo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, match/switch 1 (2 pts), ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TtmlNode.cleanUpText (cognitive 25) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlNode.java:439— TtmlNode.cleanUpText has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 5 (7 pts), boolean chains 6 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MatroskaExtractor.commitSampleToOutput (cognitive 25) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:1394— MatroskaExtractor.commitSampleToOutput has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mp4Extractor.getSeekPoints (cognitive 25) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java:304— Mp4Extractor.getSeekPoints has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, loops 1 (2 pts), ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VorbisUtil.skipBook (cognitive 25) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/VorbisUtil.java:545— VorbisUtil.skipBook has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DashManifestParser.parseContentProtection (cognitive 25) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:580— DashManifestParser.parseContentProtection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (5 pts), boolean chains 4, match/switch 1 (2 pts), ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MergingMediaPeriod.readDiscontinuity (cognitive 25) library/core/src/main/java/com/google/android/exoplayer2/source/MergingMediaPeriod.java:227— MergingMediaPeriod.readDiscontinuity has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaMetricsListener.reportTrackChangeEvent (cognitive 25) library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java:526— MediaMetricsListener.reportTrackChangeEvent has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (25 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecRenderer.maybeInitCodecWithFallback (cognitive 25) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:1003— MediaCodecRenderer.maybeInitCodecWithFallback has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), error handling 3 (6 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExoPlayerImplInternal.maybeTriggerPendingMessages (cognitive 25) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:1655— ExoPlayerImplInternal.maybeTriggerPendingMessages has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 9, ternaries 5 (8 pts), if/else 4 (5 pts), loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OkHttpDataSource.open (cognitive 25) extensions/okhttp/src/main/java/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSource.java:293— OkHttpDataSource.open has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 6 (9 pts), error handling 3 (4 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
search.window.Lazyload.js() (cognitive 25) docs/_includes/scripts/components/search.js:4— search.window.Lazyload.js() has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 16, if/else 6 (7 pts), ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (handleModalChange, a function literal at line 45, a function literal at line 71, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
NotificationBroadcastReceiver.onReceive (cognitive 24) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java:1536— NotificationBroadcastReceiver.onReceive has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StyledPlayerControlView.<init> (cognitive 24) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:368— StyledPlayerControlView.<init> has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, ternaries 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DvbParser.paintPixelDataSubBlock (cognitive 24) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:682— DvbParser.paintPixelDataSubBlock has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 3 (12 pts), if/else 5 (9 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SsaDecoder.createCue (cognitive 24) library/extractor/src/main/java/com/google/android/exoplayer2/text/ssa/SsaDecoder.java:335— SsaDecoder.createCue has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AviExtractor.read (cognitive 24) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/avi/AviExtractor.java:178— AviExtractor.read has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 2, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdtsReader.checkSyncPositionValid (cognitive 24) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsReader.java:387— AdtsReader.checkSyncPositionValid has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PmtReader.readEsInfo (cognitive 24) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java:719— PmtReader.readEsInfo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SimpleCache.loadDirectory (cognitive 24) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/cache/SimpleCache.java:586— SimpleCache.loadDirectory has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContentDataSource.open (cognitive 24) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/ContentDataSource.java:82— ContentDataSource.open has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 3 (5 pts), error handling 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UrlTemplate.parseTemplate (cognitive 24) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/UrlTemplate.java:120— UrlTemplate.parseTemplate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 1 (4 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
DashMediaSource.updateLiveConfiguration (cognitive 24) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:944— DashMediaSource.updateLiveConfiguration has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DecoderAudioRenderer.render (cognitive 24) library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:290— DecoderAudioRenderer.render has cognitive complexity 24 (threshold 15). Drivers by points: error handling 6 (13 pts), if/else 6 (7 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Task.run (cognitive 24) library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadManager.java:1336— Task.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (17 pts), error handling 3 (5 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultMediaSourceFactory.createMediaSource (cognitive 24) library/core/src/main/java/com/google/android/exoplayer2/source/DefaultMediaSourceFactory.java:418— DefaultMediaSourceFactory.createMediaSource has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 1 (2 pts), boolean chains 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecVideoRenderer.supportsFormat (cognitive 24) library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:374— MediaCodecVideoRenderer.supportsFormat has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 4, boolean chains 3, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
toc.window.Lazyload.js() (cognitive 24) docs/_includes/scripts/lib/toc.js:3— toc.window.Lazyload.js() has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10, loops 1 (2 pts) (nesting depth added 4). None of this is in the body itself: all 24 points belong to 7 function items inside it that branch (toc::setState, toc::setOptions, toc::render, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
jquery.access (cognitive 24) docs/doc/reference/jquery/external/jquery/jquery.js:4143— jquery.access has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (5 pts), ternaries 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery.showHide (cognitive 24) docs/doc/reference/jquery/external/jquery/jquery.js:4829— jquery.showHide has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery-3.5.1.access (cognitive 24) docs/doc/reference/jquery/jquery-3.5.1.js:4143— jquery-3.5.1.access has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (5 pts), ternaries 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery-3.5.1.showHide (cognitive 24) docs/doc/reference/jquery/jquery-3.5.1.js:4829— jquery-3.5.1.showHide has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StyledPlayerControlView.dispatchMediaKeyEvent (cognitive 23) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1470— StyledPlayerControlView.dispatchMediaKeyEvent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HlsSampleStreamWrapper.onLoadError (cognitive 23) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java:912— HlsSampleStreamWrapper.onLoadError has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TtmlDecoder.parseNode (cognitive 23) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:644— TtmlDecoder.parseNode has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VorbisUtil.readResidues (cognitive 23) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/VorbisUtil.java:457— VorbisUtil.readResidues has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (11 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DashManifestParser.parseRepresentation (cognitive 23) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:665— DashManifestParser.parseRepresentation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerSideAdInsertionMediaSource.setAdPlaybackStates (cognitive 23) library/core/src/main/java/com/google/android/exoplayer2/source/ads/ServerSideAdInsertionMediaSource.java:158— ServerSideAdInsertionMediaSource.setAdPlaybackStates has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtractingLoadable.load (cognitive 23) library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriod.java:1007— ExtractingLoadable.load has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CmcdHeadersFactory.createHttpRequestHeaders (cognitive 23) library/core/src/main/java/com/google/android/exoplayer2/upstream/CmcdHeadersFactory.java:196— CmcdHeadersFactory.createHttpRequestHeaders has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, loops 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
PlaybackStatsTracker.resolveNewPlaybackState (cognitive 23) library/core/src/main/java/com/google/android/exoplayer2/analytics/PlaybackStatsListener.java:697— PlaybackStatsTracker.resolveNewPlaybackState has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecRenderer.render (cognitive 23) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:793— MediaCodecRenderer.render has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 3 (6 pts), boolean chains 4, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Util.getCurrentDisplayModeSize (cognitive 23) library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:2590— Util.getCurrentDisplayModeSize has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, error handling 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ComponentListener.onPositionDiscontinuity (cognitive 23) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.java:836— ComponentListener.onPositionDiscontinuity has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FakeRenderer.render (cognitive 22) testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeRenderer.java:89— FakeRenderer.render has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlayerView.setPlayer (cognitive 22) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:571— PlayerView.setPlayer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HlsChunkSource.getNextChunk (cognitive 22) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsChunkSource.java:384— HlsChunkSource.getNextChunk has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 4 (5 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DvbParser.generateDefault4BitClutEntries (cognitive 22) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:566— DvbParser.generateDefault4BitClutEntries has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 2 (3 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mp4Extractor.readAtomHeader (cognitive 22) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java:367— Mp4Extractor.readAtomHeader has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OggPacket.populate (cognitive 22) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ogg/OggPacket.java:67— OggPacket.populate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FinalShaderProgramWrapper.ensureConfigured (cognitive 22) library/effect/src/main/java/com/google/android/exoplayer2/effect/FinalShaderProgramWrapper.java:396— FinalShaderProgramWrapper.ensureConfigured has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, ternaries 3 (4 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DashMediaPeriod.selectNewStreams (cognitive 22) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaPeriod.java:438— DashMediaPeriod.selectNewStreams has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DownloadHelper.runTrackSelection (cognitive 22) library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java:764— DownloadHelper.runTrackSelection has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 3 (7 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SharedMediaPeriod.selectTracks (cognitive 22) library/core/src/main/java/com/google/android/exoplayer2/source/ads/ServerSideAdInsertionMediaSource.java:808— SharedMediaPeriod.selectTracks has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProgressiveMediaPeriod.maybeFinishPrepare (cognitive 22) library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriod.java:753— ProgressiveMediaPeriod.maybeFinishPrepare has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultTrackSelector.maybeConfigureRenderersForTunneling (cognitive 22) library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:2933— DefaultTrackSelector.maybeConfigureRenderersForTunneling has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
PlaybackStatsListener.onEvents (cognitive 22) library/core/src/main/java/com/google/android/exoplayer2/analytics/PlaybackStatsListener.java:247— PlaybackStatsListener.onEvents has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 9 (18 pts), if/else 2, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExoPlayerImpl.handlePlaybackInfo (cognitive 22) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:1903— ExoPlayerImpl.handlePlaybackInfo has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (4 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExoPlayerImpl.maskTimelineAndPosition (cognitive 22) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:2415— ExoPlayerImpl.maskTimelineAndPosition has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 7 (9 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioProcessingPipeline.processData (cognitive 22) library/common/src/main/java/com/google/android/exoplayer2/audio/AudioProcessingPipeline.java:306— AudioProcessingPipeline.processData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (10 pts), ternaries 2 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdTagLoader.handlePlayerStateChanged (cognitive 22) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java:833— AdTagLoader.handlePlayerStateChanged has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RtpH263Reader.consume (cognitive 21) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpH263Reader.java:100— RtpH263Reader.consume has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Cea708Decoder.decode (cognitive 21) library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java:215— Cea708Decoder.decode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FragmentedMp4Extractor.parseSampleGroups (cognitive 21) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:1164— FragmentedMp4Extractor.parseSampleGroups has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FragmentedMp4Extractor.parseTrun (cognitive 21) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:1016— FragmentedMp4Extractor.parseTrun has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 5 (7 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetadataUtil.setFormatMetadata (cognitive 21) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/MetadataUtil.java:297— MetadataUtil.setFormatMetadata has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AdtsExtractor.calculateAverageFrameSize (cognitive 21) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsExtractor.java:299— AdtsExtractor.calculateAverageFrameSize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecAudioRenderer.supportsFormat (cognitive 21) library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java:288— MediaCodecAudioRenderer.supportsFormat has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 5, boolean chains 4, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FrameworkMediaDrm.getSchemeData (cognitive 21) library/core/src/main/java/com/google/android/exoplayer2/drm/FrameworkMediaDrm.java:365— FrameworkMediaDrm.getSchemeData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlaybackStats.merge (cognitive 21) library/core/src/main/java/com/google/android/exoplayer2/analytics/PlaybackStats.java:247— PlaybackStats.merge has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NalUnitUtil.findNalUnit (cognitive 21) library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:751— NalUnitUtil.findNalUnit has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 3 (4 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MediaMetadata.fromBundle (cognitive 21) library/common/src/main/java/com/google/android/exoplayer2/MediaMetadata.java:1306— MediaMetadata.fromBundle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18 (20 pts), ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
AdTagLoader.setupAdsRendering (cognitive 21) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java:600— AdTagLoader.setupAdsRendering has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 1 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery.adjustCSS (cognitive 21) docs/doc/reference/jquery/external/jquery/jquery.js:4738— jquery.adjustCSS has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (7 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 4). 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.
jquery.boxModelAdjustment (cognitive 21) docs/doc/reference/jquery/external/jquery/jquery.js:6702— jquery.boxModelAdjustment has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery.Animation (cognitive 21) docs/doc/reference/jquery/external/jquery/jquery.js:7533— jquery.Animation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, loops 3, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (tick, a function literal at line 7595, a function literal at line 7589). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
jquery-3.5.1.adjustCSS (cognitive 21) docs/doc/reference/jquery/jquery-3.5.1.js:4738— jquery-3.5.1.adjustCSS has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 4 (7 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 4). 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.
jquery-3.5.1.boxModelAdjustment (cognitive 21) docs/doc/reference/jquery/jquery-3.5.1.js:6702— jquery-3.5.1.boxModelAdjustment has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery-3.5.1.Animation (cognitive 21) docs/doc/reference/jquery/jquery-3.5.1.js:7533— jquery-3.5.1.Animation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, loops 3, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (tick, a function literal at line 7595, a function literal at line 7589). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
SpannedToHtmlConverter.getOpeningTag (cognitive 20) library/ui/src/main/java/com/google/android/exoplayer2/ui/SpannedToHtmlConverter.java:155— SpannedToHtmlConverter.getOpeningTag has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, match/switch 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
StyledPlayerControlViewLayoutManager.onLayoutWidthChanged (cognitive 20) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:645— StyledPlayerControlViewLayoutManager.onLayoutWidthChanged has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StyledPlayerControlViewLayoutManager.updateLayoutForSizeChange (cognitive 20) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlViewLayoutManager.java:602— StyledPlayerControlViewLayoutManager.updateLayoutForSizeChange has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (7 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TrackSelectionView.updateViews (cognitive 20) library/ui/src/main/java/com/google/android/exoplayer2/ui/TrackSelectionView.java:266— TrackSelectionView.updateViews has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (6 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RtpVp8Reader.validateVp8Descriptor (cognitive 20) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpVp8Reader.java:156— RtpVp8Reader.validateVp8Descriptor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SubripDecoder.decode (cognitive 20) library/extractor/src/main/java/com/google/android/exoplayer2/text/subrip/SubripDecoder.java:83— SubripDecoder.decode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ScriptTagPayloadReader.parsePayload (cognitive 20) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/flv/ScriptTagPayloadReader.java:89— ScriptTagPayloadReader.parsePayload has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mp4Extractor.processMoovAtom (cognitive 20) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java:494— Mp4Extractor.processMoovAtom has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ac4Reader.consume (cognitive 20) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Reader.java:129— Ac4Reader.consume has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), ternaries 1 (4 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CeaUtil.consume (cognitive 20) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/CeaUtil.java:51— CeaUtil.consume has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultExtractorsFactory.addExtractorsForFileType (cognitive 20) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/DefaultExtractorsFactory.java:375— DefaultExtractorsFactory.addExtractorsForFileType has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 4 (7 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
VorbisUtil.readMappings (cognitive 20) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/VorbisUtil.java:416— VorbisUtil.readMappings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (9 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MatrixUtils.clipConvexPolygonToNdcRange (cognitive 20) library/effect/src/main/java/com/google/android/exoplayer2/effect/MatrixUtils.java:104— MatrixUtils.clipConvexPolygonToNdcRange has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DashManifestParser.parseSegmentList (cognitive 20) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:933— DashManifestParser.parseSegmentList has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (10 pts), if/else 6 (9 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DashMediaSource.processManifest (cognitive 20) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:848— DashMediaSource.processManifest has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioCapabilities.getEncodingAndChannelConfigForPassthrough (cognitive 20) library/core/src/main/java/com/google/android/exoplayer2/audio/AudioCapabilities.java:212— AudioCapabilities.getEncodingAndChannelConfigForPassthrough has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AudioTimestampPoller.maybePollTimestamp (cognitive 20) library/core/src/main/java/com/google/android/exoplayer2/audio/AudioTimestampPoller.java:130— AudioTimestampPoller.maybePollTimestamp has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DownloadNotificationHelper.buildProgressNotification (cognitive 20) library/core/src/main/java/com/google/android/exoplayer2/ui/DownloadNotificationHelper.java:87— DownloadNotificationHelper.buildProgressNotification has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExoPlayerImplInternal.handleMediaSourceListInfoRefreshed (cognitive 20) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:1890— ExoPlayerImplInternal.handleMediaSourceListInfoRefreshed has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExoPlayerImplInternal.seekToPeriodPosition (cognitive 20) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:1300— ExoPlayerImplInternal.seekToPeriodPosition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaPeriodQueue.getFollowingMediaPeriodInfoOfCurrentPeriod (cognitive 20) library/core/src/main/java/com/google/android/exoplayer2/MediaPeriodQueue.java:804— MediaPeriodQueue.getFollowingMediaPeriodInfoOfCurrentPeriod has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpusDecoder.<init> (cognitive 20) extensions/opus/src/main/java/com/google/android/exoplayer2/ext/opus/OpusDecoder.java:83— OpusDecoder.<init> has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DefaultCodec.<init> (cognitive 19) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DefaultCodec.java:98— DefaultCodec.<init> has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (6 pts), boolean chains 2, error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InternalListener.onPlaybackStarted (cognitive 19) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMediaPeriod.java:612— InternalListener.onPlaybackStarted has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HlsSampleStreamWrapper.readData (cognitive 19) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java:633— HlsSampleStreamWrapper.readData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 2 (5 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MpegAudioUtil.getFrameSize (cognitive 19) library/extractor/src/main/java/com/google/android/exoplayer2/audio/MpegAudioUtil.java:123— MpegAudioUtil.getFrameSize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, ternaries 3 (6 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DvbParser.paint4BitPixelCodeString (cognitive 19) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:804— DvbParser.paint4BitPixelCodeString has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 1 (3 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Mp3Extractor.readSample (cognitive 19) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp3/Mp3Extractor.java:300— Mp3Extractor.readSample has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultDashChunkSource.onChunkLoadError (cognitive 19) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:519— DefaultDashChunkSource.onChunkLoadError has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DownloadService.onStartCommand (cognitive 19) library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadService.java:616— DownloadService.onStartCommand has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 2, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SegmentDownloader.execute (cognitive 19) library/core/src/main/java/com/google/android/exoplayer2/offline/SegmentDownloader.java:359— SegmentDownloader.execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Projection.createEquirectangular (cognitive 19) library/core/src/main/java/com/google/android/exoplayer2/video/spherical/Projection.java:86— Projection.createEquirectangular has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (6 pts), boolean chains 5, if/else 1 (4 pts), ternaries 1 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProjectionDecoder.parseMesh (cognitive 19) library/core/src/main/java/com/google/android/exoplayer2/video/spherical/ProjectionDecoder.java:174— ProjectionDecoder.parseMesh has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (7 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlaybackStatsTracker.build (cognitive 19) library/core/src/main/java/com/google/android/exoplayer2/analytics/PlaybackStatsListener.java:592— PlaybackStatsTracker.build has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 14, if/else 2 (3 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ColorParser.parseColorInternal (cognitive 19) library/common/src/main/java/com/google/android/exoplayer2/util/ColorParser.java:82— ColorParser.parseColorInternal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 2 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VpxDecoder.decode (cognitive 19) extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/VpxDecoder.java:126— VpxDecoder.decode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OpusDecoder.decode (cognitive 19) extensions/opus/src/main/java/com/google/android/exoplayer2/ext/opus/OpusDecoder.java:187— OpusDecoder.decode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaSessionConnector.invalidateMediaSessionPlaybackState (cognitive 19) extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java:772— MediaSessionConnector.invalidateMediaSessionPlaybackState has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 6 (7 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DefaultMediaItemConverter.toMediaItem (cognitive 19) extensions/cast/src/main/java/com/google/android/exoplayer2/ext/cast/DefaultMediaItemConverter.java:57— DefaultMediaItemConverter.toMediaItem has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (19 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery-ui.$.fn.position (cognitive 19) docs/doc/reference/jquery/jquery-ui.js:873— jquery-ui.$.fn.position has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 5. Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 954, 903, 988, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
FakeDataSource.read (cognitive 18) testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeDataSource.java:157— FakeDataSource.read has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlayerControlView.updatePlayPauseButton (cognitive 18) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:827— PlayerControlView.updatePlayPauseButton has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 5, if/else 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlayerControlView.updateProgress (cognitive 18) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1019— PlayerControlView.updateProgress has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7, boolean chains 6, ternaries 3 (5 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
TrackSelectionView.onTrackViewClicked (cognitive 18) library/ui/src/main/java/com/google/android/exoplayer2/ui/TrackSelectionView.java:366— TrackSelectionView.onTrackViewClicked has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Header.setForHeaderData (cognitive 18) library/extractor/src/main/java/com/google/android/exoplayer2/audio/MpegAudioUtil.java:60— Header.setForHeaderData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, ternaries 4 (7 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
TtmlDecoder.parseHeader (cognitive 18) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:281— TtmlDecoder.parseHeader has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AtomParsers.parseTkhd (cognitive 18) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:911— AtomParsers.parseTkhd has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (4 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
AdtsReader.findNextSample (cognitive 18) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsReader.java:287— AdtsReader.findNextSample has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
H263Reader.parseCsdBuffer (cognitive 18) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:236— H263Reader.parseCsdBuffer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 1 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SimpleDecoder.decode (cognitive 18) library/decoder/src/main/java/com/google/android/exoplayer2/decoder/SimpleDecoder.java:217— SimpleDecoder.decode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultDashChunkSource.newMediaChunk (cognitive 18) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:702— DefaultDashChunkSource.newMediaChunk has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 3 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultDrmSessionManager.acquireSession (cognitive 18) library/core/src/main/java/com/google/android/exoplayer2/drm/DefaultDrmSessionManager.java:463— DefaultDrmSessionManager.acquireSession has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MetadataRenderer.readMetadata (cognitive 18) library/core/src/main/java/com/google/android/exoplayer2/metadata/MetadataRenderer.java:229— MetadataRenderer.readMetadata has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ChunkSampleStream.seekToUs (cognitive 18) library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkSampleStream.java:262— ChunkSampleStream.seekToUs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MediaMetricsListener.resolveNewPlaybackState (cognitive 18) library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java:451— MediaMetricsListener.resolveNewPlaybackState has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecUtil.applyWorkarounds (cognitive 18) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:642— MediaCodecUtil.applyWorkarounds has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExoPlayerImpl.evaluateMediaItemTransitionReason (cognitive 18) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:2216— ExoPlayerImpl.evaluateMediaItemTransitionReason has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MediaPeriodQueue.updateQueuedPeriods (cognitive 18) library/core/src/main/java/com/google/android/exoplayer2/MediaPeriodQueue.java:341— MediaPeriodQueue.updateQueuedPeriods has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, ternaries 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NalUnitUtil.skipH265ScalingList (cognitive 18) library/container/src/main/java/com/google/android/exoplayer2/util/NalUnitUtil.java:841— NalUnitUtil.skipH265ScalingList has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (7 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Sonic.findPitchPeriod (cognitive 18) library/common/src/main/java/com/google/android/exoplayer2/audio/Sonic.java:297— Sonic.findPitchPeriod has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaMetadataProvider.sameAs (cognitive 18) extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java:411— MediaMetadataProvider.sameAs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImaServerSideAdInsertionUriBuilder.build (cognitive 18) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionUriBuilder.java:257— ImaServerSideAdInsertionUriBuilder.build has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ImaUtil.getAdGroupAndIndexInVodMultiPeriodTimeline (cognitive 18) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaUtil.java:854— ImaUtil.getAdGroupAndIndexInVodMultiPeriodTimeline has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery.leverageNative (cognitive 18) docs/doc/reference/jquery/external/jquery/jquery.js:5612— jquery.leverageNative has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 5626). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
jquery.jQuery.speed (cognitive 18) docs/doc/reference/jquery/external/jquery/jquery.js:7698— jquery.jQuery.speed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery-3.5.1.leverageNative (cognitive 18) docs/doc/reference/jquery/jquery-3.5.1.js:5612— jquery-3.5.1.leverageNative has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 5626). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
jquery-3.5.1.jQuery.speed (cognitive 18) docs/doc/reference/jquery/jquery-3.5.1.js:7698— jquery-3.5.1.jQuery.speed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExtractorAsserts.consumeTestData (cognitive 17) testutils/src/main/java/com/google/android/exoplayer2/testutil/ExtractorAsserts.java:512— ExtractorAsserts.consumeTestData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 2 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PlayerNotificationManager.createNotification (cognitive 17) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java:1211— PlayerNotificationManager.createNotification has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
StyledPlayerControlView.updateProgress (cognitive 17) library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1264— StyledPlayerControlView.updateProgress has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 3 (5 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
RtspMediaPeriod.selectTracks (cognitive 17) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMediaPeriod.java:193— RtspMediaPeriod.selectTracks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IcyHeaders.parse (cognitive 17) library/extractor/src/main/java/com/google/android/exoplayer2/metadata/icy/IcyHeaders.java:61— IcyHeaders.parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 2 (4 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CueBuilder.build (cognitive 17) library/extractor/src/main/java/com/google/android/exoplayer2/text/pgs/PgsDecoder.java:214— CueBuilder.build has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 2 (8 pts), if/else 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ac4Extractor.sniff (cognitive 17) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Extractor.java:79— Ac4Extractor.sniff has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PsScrSeeker.searchForScrValueInBuffer (cognitive 17) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsBinarySearchSeeker.java:96— PsScrSeeker.searchForScrValueInBuffer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DashManifestParser.parsePeriod (cognitive 17) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:298— DashManifestParser.parsePeriod has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 2 (4 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiSegmentBase.getSegmentNum (cognitive 17) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/SegmentBase.java:178— MultiSegmentBase.getSegmentNum has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 3 (7 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AdsMediaSource.maybeUpdateAdMediaSources (cognitive 17) library/core/src/main/java/com/google/android/exoplayer2/source/ads/AdsMediaSource.java:307— AdsMediaSource.maybeUpdateAdMediaSources has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChunkSampleStream.continueLoading (cognitive 17) library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkSampleStream.java:568— ChunkSampleStream.continueLoading has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ClippingSampleStream.readData (cognitive 17) library/core/src/main/java/com/google/android/exoplayer2/source/ClippingMediaPeriod.java:325— ClippingSampleStream.readData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), ternaries 2 (6 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MaskingMediaSource.onChildSourceInfoRefreshed (cognitive 17) library/core/src/main/java/com/google/android/exoplayer2/source/MaskingMediaSource.java:136— MaskingMediaSource.onChildSourceInfoRefreshed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VideoTrackInfo.<init> (cognitive 17) library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:3249— VideoTrackInfo.<init> has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 13, if/else 1 (2 pts), loops 1, ternaries 1 (nesting depth added 1). 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.
TrackSelectionUtil.buildTracks (cognitive 17) library/core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelectionUtil.java:173— TrackSelectionUtil.buildTracks has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (11 pts), if/else 1 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
MediaMetricsListener.maybeReportTrackChanges (cognitive 17) library/core/src/main/java/com/google/android/exoplayer2/analytics/MediaMetricsListener.java:375— MediaMetricsListener.maybeReportTrackChanges has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecInfo.isFormatSupported (cognitive 17) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecInfo.java:261— MediaCodecInfo.isFormatSupported has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaPeriodQueue.getMediaPeriodInfoForContent (cognitive 17) library/core/src/main/java/com/google/android/exoplayer2/MediaPeriodQueue.java:955— MediaPeriodQueue.getMediaPeriodInfoForContent has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, ternaries 4 (6 pts), if/else 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Cue.fromBundle (cognitive 17) library/common/src/main/java/com/google/android/exoplayer2/text/Cue.java:873— Cue.fromBundle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AdTagLoader.playAdInternal (cognitive 17) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java:981— AdTagLoader.playAdInternal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ImaServerSideAdInsertionUriBuilder.createStreamRequest (cognitive 17) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionUriBuilder.java:334— ImaServerSideAdInsertionUriBuilder.createStreamRequest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
affix.window.Lazyload.js() (cognitive 17) docs/_includes/scripts/lib/affix.js:3— affix.window.Lazyload.js() has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 8. None of this is in the body itself: all 17 points belong to 11 function items inside it that branch (affix::setOptions, affix::setState, affix::calc, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
DefaultRenderersFactoryAsserts.assertExtensionRendererCreated (cognitive 16) testutils/src/main/java/com/google/android/exoplayer2/testutil/DefaultRenderersFactoryAsserts.java:48— DefaultRenderersFactoryAsserts.assertExtensionRendererCreated has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FakeSampleStream.writeData (cognitive 16) testutils/src/main/java/com/google/android/exoplayer2/testutil/FakeSampleStream.java:163— FakeSampleStream.writeData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TestUtil.extractSeekMap (cognitive 16) testutils/src/main/java/com/google/android/exoplayer2/testutil/TestUtil.java:363— TestUtil.extractSeekMap has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 3 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SsMediaSource.processManifest (cognitive 16) library/smoothstreaming/src/main/java/com/google/android/exoplayer2/source/smoothstreaming/SsMediaSource.java:544— SsMediaSource.processManifest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RtpVp9Reader.consume (cognitive 16) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/reader/RtpVp9Reader.java:106— RtpVp9Reader.consume has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RtpExtractor.read (cognitive 16) library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtpExtractor.java:131— RtpExtractor.read has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
HlsMediaChunk.createInstance (cognitive 16) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaChunk.java:95— HlsMediaChunk.createInstance has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 4, if/else 3 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TtmlNode.traverseForText (cognitive 16) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlNode.java:324— TtmlNode.traverseForText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), loops 3 (6 pts), boolean chains 3, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FlacExtractor.findFrame (cognitive 16) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/flac/FlacExtractor.java:350— FlacExtractor.findFrame has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Sniffer.sniff (cognitive 16) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/Sniffer.java:49— Sniffer.sniff has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ac3Extractor.sniff (cognitive 16) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Extractor.java:71— Ac3Extractor.sniff has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Ac3Reader.consume (cognitive 16) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Reader.java:127— Ac3Reader.consume has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultTsPayloadReaderFactory.getClosedCaptionFormats (cognitive 16) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/DefaultTsPayloadReaderFactory.java:240— DefaultTsPayloadReaderFactory.getClosedCaptionFormats has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DtsReader.consume (cognitive 16) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/DtsReader.java:104— DtsReader.consume has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LatmReader.consume (cognitive 16) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/LatmReader.java:116— LatmReader.consume has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TsPcrSeeker.searchForPcrValueInBuffer (cognitive 16) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsBinarySearchSeeker.java:101— TsPcrSeeker.searchForPcrValueInBuffer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DefaultHttpDataSource.makeConnection (cognitive 16) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java:529— DefaultHttpDataSource.makeConnection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DashManifestParser.parseSegmentTemplate (cognitive 16) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:1016— DashManifestParser.parseSegmentTemplate has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (10 pts), if/else 4 (5 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
DashDownloader.addSegmentsForAdaptationSet (cognitive 16) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/offline/DashDownloader.java:181— DashDownloader.addSegmentsForAdaptationSet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DashMediaPeriod.releaseOrphanEmbeddedStreams (cognitive 16) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaPeriod.java:410— DashMediaPeriod.releaseOrphanEmbeddedStreams has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DecoderAudioRenderer.drainOutputBuffer (cognitive 16) library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:402— DecoderAudioRenderer.drainOutputBuffer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), error handling 1 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecAudioRenderer.onOutputFormatChanged (cognitive 16) library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java:505— MediaCodecAudioRenderer.onOutputFormatChanged has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
MediaPreparer.handleMessage (cognitive 16) library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java:875— MediaPreparer.handleMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 2 (6 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ChunkSampleStream.onLoadError (cognitive 16) library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ChunkSampleStream.java:487— ChunkSampleStream.onLoadError has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SampleQueue.sampleMetadata (cognitive 16) library/core/src/main/java/com/google/android/exoplayer2/source/SampleQueue.java:608— SampleQueue.sampleMetadata has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LoadTask.handleMessage (cognitive 16) library/core/src/main/java/com/google/android/exoplayer2/upstream/Loader.java:464— LoadTask.handleMessage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 1 (3 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EventLogger.onTracksChanged (cognitive 16) library/core/src/main/java/com/google/android/exoplayer2/util/EventLogger.java:269— EventLogger.onTracksChanged has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DecoderVideoRenderer.processOutputBuffer (cognitive 16) library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:830— DecoderVideoRenderer.processOutputBuffer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MediaCodecVideoRenderer.getCodecMaxInputSize (cognitive 16) library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:882— MediaCodecVideoRenderer.getCodecMaxInputSize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecVideoRenderer.getCodecMaxValues (cognitive 16) library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:1807— MediaCodecVideoRenderer.getCodecMaxValues has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaCodecRenderer.bypassRead (cognitive 16) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:2312— MediaCodecRenderer.bypassRead has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MediaPeriodQueue.resolvePeriodIndexToWindowSequenceNumber (cognitive 16) library/core/src/main/java/com/google/android/exoplayer2/MediaPeriodQueue.java:577— MediaPeriodQueue.resolvePeriodIndexToWindowSequenceNumber has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChannelMixingMatrix.<init> (cognitive 16) library/common/src/main/java/com/google/android/exoplayer2/audio/ChannelMixingMatrix.java:84— ChannelMixingMatrix.<init> has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DrmInitData.createSessionCreationData (cognitive 16) library/common/src/main/java/com/google/android/exoplayer2/drm/DrmInitData.java:64— DrmInitData.createSessionCreationData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
UriUtil.removeDotSegments (cognitive 16) library/common/src/main/java/com/google/android/exoplayer2/util/UriUtil.java:183— UriUtil.removeDotSegments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Util.parseXsDuration (cognitive 16) library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:1414— Util.parseXsDuration has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SimpleBasePlayer.getPositionDiscontinuityReason (cognitive 16) library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:3650— SimpleBasePlayer.getPositionDiscontinuityReason has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DefaultMediaItemConverter.convertToExoPlayerMediaItem (cognitive 16) extensions/media2/src/main/java/com/google/android/exoplayer2/ext/media2/DefaultMediaItemConverter.java:48— DefaultMediaItemConverter.convertToExoPlayerMediaItem has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImaUtil.maybeCorrectPreviouslyUnknownAdDurations (cognitive 16) extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaUtil.java:575— ImaUtil.maybeCorrectPreviouslyUnknownAdDurations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gallery.window.Lazyload.js() (cognitive 16) docs/_includes/scripts/lib/gallery.js:4— gallery.window.Lazyload.js() has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 16. 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.
jquery.on (cognitive 16) docs/doc/reference/jquery/external/jquery/jquery.js:5124— jquery.on has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
jquery.propFilter (cognitive 16) docs/doc/reference/jquery/external/jquery/jquery.js:7496— jquery.propFilter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery.jQuery.ajaxPrefilter("json jsonp") (cognitive 16) docs/doc/reference/jquery/external/jquery/jquery.js:10203— jquery.jQuery.ajaxPrefilter("json jsonp") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5 (nesting depth added 4). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery-3.5.1.on (cognitive 16) docs/doc/reference/jquery/jquery-3.5.1.js:5124— jquery-3.5.1.on has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
jquery-3.5.1.propFilter (cognitive 16) docs/doc/reference/jquery/jquery-3.5.1.js:7496— jquery-3.5.1.propFilter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
jquery-3.5.1.jQuery.ajaxPrefilter("json jsonp") (cognitive 16) docs/doc/reference/jquery/jquery-3.5.1.js:10203— jquery-3.5.1.jQuery.ajaxPrefilter("json jsonp") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5 (nesting depth added 4). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Change-coupling hub: ForwardingAudioSink.java → DecoderAudioRenderer.java, DefaultAudioSink.java, MediaCodecAudioRenderer.java library/core/src/main/java/com/google/android/exoplayer2/audio/ForwardingAudioSink.java— `library/core/src/main/java/com/google/android/exoplayer2/audio/ForwardingAudioSink.java` changes together with 3 other files — `library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java`, `library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java`, `library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Near-duplicate member pair (323 shared lines) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:472— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:472-881 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:428-837 — These two members are variants of one another: 323 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Near-duplicate member pair (142 shared lines) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:327— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:327-526 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:304-512 — These two members are variants of one another: 142 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
Duplicated block (76 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:394— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:394-469 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:378-453 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:394` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (30–44 lines × 3) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:966— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:966-995 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1199-1242 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1503-1532 — 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/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:966` it begins part-way through the construct above it, so those 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 (41–42 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:958— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:958-999 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1198-1238 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1198` 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 (40–41 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:351— library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:351-390 | library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlDecoder.java:396-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. 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 (36 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-521 | library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:724-759 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java` and `library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `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. 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 (32–35 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtil.java:102— library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlRenderUtil.java:102-133 | library/extractor/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCueParser.java:672-706 — 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:102` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `style` to `TtmlStyle` in one and `WebvttCssStyle` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (34 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:572— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:572-605 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:560-593 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:572` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:594` calls `isCommandAvailable`, `getCurrentTracks`, `isTypeSupported` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:606` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (26–31 lines × 4) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:731— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:731-756 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1098-1123 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1202-1232 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1259-1284 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:731` it begins part-way through the construct above it, so those 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 (29–31 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java:339— library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java:339-369 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMediaSource.java:306-334 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (29–30 lines × 5) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:490— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:490-518 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:729-758 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1096-1125 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1202-1230 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1252-1280 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.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. 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 (24–30 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/FlacStreamMetadata.java:331— library/extractor/src/main/java/com/google/android/exoplayer2/extractor/FlacStreamMetadata.java:331-354 | library/rtsp/src/main/java/com/google/android/exoplayer2/source/rtsp/RtspMessageUtil.java:484-513 — 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/extractor/FlacStreamMetadata.java:331` 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 (26 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1046— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1046-1071 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1283-1308 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1046` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (25 lines × 3) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:791— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:791-815 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:819-843 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1271-1295 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:791` it begins part-way through the construct above it, so those 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 (24 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:385— library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:385-408 | library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:410-433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (23–24 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1234— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1234-1256 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1325-1348 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 370 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1234` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (20–23 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:800— library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:800-822 | library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:1760-1779 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (22 lines × 4) 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-985 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1017-1038 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1197-1218 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1501-1522 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `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 × 7) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:494— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:494-514 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:728-748 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:790-810 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:818-838 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1095-1115 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1206-1226 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1256-1276 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:494` it begins part-way through the construct above it, so those 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 × 3) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:927— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:927-947 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1024-1044 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1068-1088 — 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/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:927` it begins part-way through the construct above it, so those 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 × 3) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:210— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:210-229 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:784-803 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:1520-1539 — 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/transformer/src/main/java/com/google/android/exoplayer2/transformer/DeviceMappedEncoderBitrateProvider.java:210` it begins part-way through the construct above it, so those 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 (19–20 lines × 2) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1195— library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1195-1213 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1560-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:1195` it begins part-way through the construct above it, so those 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–19 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-755 | library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EncoderUtil.java:397-415 — 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/mediacodec/MediaCodecUtil.java:739` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (18–19 lines × 2) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:719— library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:719-737 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DefaultDashChunkSource.java:770-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 (16–17 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-250 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsExtractor.java:108-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, 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/PsExtractor.java:108` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16 lines × 3) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Reader.java:144— library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Reader.java:144-159 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Reader.java:146-161 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/DtsReader.java:118-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Reader.java:144` it begins part-way through the construct above it, so those 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–15 lines × 5) library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:401— library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:401-414 | library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:482-495 | library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:501-514 | library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:520-534 | library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:535-547 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:401` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–15 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:375— library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:375-389 | library/core/src/main/java/com/google/android/exoplayer2/DefaultRenderersFactory.java:468-479 — both copies are in the same file, so extract the 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:375` 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–15 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-312 | library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:191-204 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java` and `library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 101 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `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–15 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-209 | library/effect/src/main/java/com/google/android/exoplayer2/effect/OverlayShaderProgram.java:256-266 — both copies are in the same file, so extract the 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 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-2581 | library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2587-2599 | library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:2605-2619 — 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:2569` 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–13 lines × 3) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:134— library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:134-145 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:147-158 | REDACTED:132-144 — before extracting anything, compare `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H263Reader.java:145` calls `checkStateNotNull` and `library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/H262Reader.java:132` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (12–13 lines × 2) library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1105— library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:1105-1117 | library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1381-1392 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (12 lines × 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-139 | library/datasource/src/main/java/com/google/android/exoplayer2/upstream/ContentDataSource.java:177-188 | library/datasource/src/main/java/com/google/android/exoplayer2/upstream/RawResourceDataSource.java:256-267 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `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.
Duplicated block (10–12 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-711 | library/extractor/src/main/java/com/google/android/exoplayer2/text/cea/Cea708Decoder.java:738-747 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 4) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:547— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:547-557 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:833-843 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:503-513 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:789-799 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:547` it begins part-way through the construct above it, so those 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–11 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-585 — both copies are in the same file, so extract the 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 runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (10–11 lines × 2) library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:722— library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:722-732 | library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:930-939 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 4) library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:158— library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:158-167 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:319-328 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:425-434 | library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:707-716 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:158` 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–10 lines × 3) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:792— library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:792-801 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:850-859 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:893-901 — 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:792` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8–9 lines × 2) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:570— library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:570-578 | library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:596-603 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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:570` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 40) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:474— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:474-481 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:513-520 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:540-547 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:553-560 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:564-571 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:577-584 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:590-597 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:605-612 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:621-628 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:633-640 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:643-650 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:672-679 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:709-716 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:725-732 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:743-750 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:772-779 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:781-788 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:802-809 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:839-846 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:865-872 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:430-437 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:469-476 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:496-503 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:509-516 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:520-527 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:533-540 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:546-553 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:561-568 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:577-584 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:589-596 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:599-606 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:628-635 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:665-672 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:681-688 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:699-706 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:728-735 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:737-744 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:758-765 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:795-802 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:821-828 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:474` it begins part-way through the construct above it, so those 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 × 16) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:530— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:530-537 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:638-645 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:720-727 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:750-757 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:764-771 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:789-796 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:846-853 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:870-877 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:486-493 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:594-601 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:676-683 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:706-713 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:720-727 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:745-752 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:802-809 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:826-833 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:530` it begins part-way through the construct above it, so those 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 × 8) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:664— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:664-671 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:763-770 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:788-795 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:821-828 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:620-627 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:719-726 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:744-751 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:777-784 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:664` it begins part-way through the construct above it, so those 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–8 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-1478 — before extracting anything, compare `library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java` and `library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 223 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `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. 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 × 14) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:530— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:530-536 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:545-551 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:638-644 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:720-726 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:750-756 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:846-852 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:870-876 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:486-492 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:501-507 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:594-600 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:676-682 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:706-712 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:802-808 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:826-832 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:530` it begins part-way through the construct above it, so those 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 × 12) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:628— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:628-634 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:664-670 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:763-769 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:788-794 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:797-803 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:811-817 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:584-590 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:620-626 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:719-725 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:744-750 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:753-759 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:767-773 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:628` it begins part-way through the construct above it, so those 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 × 10) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:618— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:618-624 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:740-746 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:760-766 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:769-775 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:794-800 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:574-580 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:696-702 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:716-722 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:725-731 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:750-756 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:618` it begins part-way through the construct above it, so those 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 × 8) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:535— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:535-541 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:628-634 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:797-803 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:811-817 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:491-497 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:584-590 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:753-759 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:767-773 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:535` it begins part-way through the construct above it, so those 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 (6–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-236 | 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 (6 lines × 40) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:509— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:509-514 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:530-535 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:545-550 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:560-565 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:573-578 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:586-591 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:601-606 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:614-619 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:624-629 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:638-643 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:660-665 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:705-710 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:720-725 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:736-741 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:750-755 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:777-782 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:784-789 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:807-812 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:846-851 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:870-875 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:465-470 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:486-491 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:501-506 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:516-521 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:529-534 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:542-547 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:557-562 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:570-575 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:580-585 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:594-599 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:616-621 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:661-666 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:676-681 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:692-697 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:706-711 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:733-738 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:740-745 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:763-768 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:802-807 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:826-831 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:509` it begins part-way through the construct above it, so those 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 (6 lines × 34) library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:511— library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:511-516 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:538-543 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:562-567 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:575-580 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:588-593 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:603-608 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:619-624 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:626-631 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:662-667 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:707-712 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:741-746 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:761-766 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:770-775 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:779-784 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:786-791 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:795-800 | library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:809-814 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:467-472 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:494-499 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:518-523 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:531-536 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:544-549 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:559-564 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:575-580 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:582-587 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:618-623 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:663-668 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:697-702 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:717-722 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:726-731 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:735-740 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:742-747 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:751-756 | library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java:765-770 — before extracting anything, compare `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java` and `library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeter.java` as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 265 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/core/src/main/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeter.java:511` it begins part-way through the construct above it, so those 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 (2–5 lines × 3) library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:608— library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:608-612 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:616-620 | library/extractor/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java:632-633 — 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:608` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (58 lines × 3) library/effect/src/main/java/com/google/android/exoplayer2/effect/TextureManager.java:44— library/effect/src/main/java/com/google/android/exoplayer2/effect/TextureManager.java:44-101 | testutils/src/main/java/com/google/android/exoplayer2/testutil/StubExoPlayer.java:1-411 | testutils/src/main/java/com/google/android/exoplayer2/testutil/StubPlayer.java:1-431 — before extracting anything, compare `testutils/src/main/java/com/google/android/exoplayer2/testutil/StubExoPlayer.java` and `testutils/src/main/java/com/google/android/exoplayer2/testutil/StubPlayer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 1293 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/effect/src/main/java/com/google/android/exoplayer2/effect/TextureManager.java:44` it begins part-way through the construct above it, so those 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 (117 lines × 3) library/transformer/src/main/java/com/google/android/exoplayer2/transformer/SampleConsumer.java:53— library/transformer/src/main/java/com/google/android/exoplayer2/transformer/SampleConsumer.java:53-169 | testutils/src/main/java/com/google/android/exoplayer2/testutil/StubExoPlayer.java:1-411 | testutils/src/main/java/com/google/android/exoplayer2/testutil/StubPlayer.java:1-431 — before extracting anything, compare `testutils/src/main/java/com/google/android/exoplayer2/testutil/StubExoPlayer.java` and `testutils/src/main/java/com/google/android/exoplayer2/testutil/StubPlayer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 1293 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `library/transformer/src/main/java/com/google/android/exoplayer2/transformer/SampleConsumer.java:53` it begins part-way through the construct above it, so those 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 (411 lines × 2) testutils/src/main/java/com/google/android/exoplayer2/testutil/StubExoPlayer.java:1— testutils/src/main/java/com/google/android/exoplayer2/testutil/StubExoPlayer.java:1-411 | testutils/src/main/java/com/google/android/exoplayer2/testutil/StubPlayer.java:1-431 — before extracting anything, compare `testutils/src/main/java/com/google/android/exoplayer2/testutil/StubExoPlayer.java` and `testutils/src/main/java/com/google/android/exoplayer2/testutil/StubPlayer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 1293 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `testutils/src/main/java/com/google/android/exoplayer2/testutil/StubExoPlayer.java:1` 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 × 4) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Reader.java:113— library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Reader.java:113-117 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Reader.java:115-119 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/DtsReader.java:90-94 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/MpegAudioReader.java:93-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (6 lines × 4) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Reader.java:179— library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac3Reader.java:179-184 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/Ac4Reader.java:181-186 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/AdtsReader.java:227-232 | library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/DtsReader.java:153-158 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. 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 (36–37 lines × 2) demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/MainActivity.java:153— demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/MainActivity.java:153-189 | demos/surface/src/main/java/com/google/android/exoplayer2/surfacedemo/MainActivity.java:197-232 — 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: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/MainActivity.java:190` calls `setRepeatMode` and `demos/surface/src/main/java/com/google/android/exoplayer2/surfacedemo/MainActivity.java:233` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Orphaned file library/common/src/main/java/com/google/android/exoplayer2/Player.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImpl.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/common/src/main/java/com/google/android/exoplayer2/util/Util.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mkv/MatroskaExtractor.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/core/src/main/java/com/google/android/exoplayer2/audio/DefaultAudioSink.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/common/src/main/java/com/google/android/exoplayer2/MediaItem.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/DashManifestParser.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/common/src/main/java/com/google/android/exoplayer2/Timeline.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/AdTagLoader.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file extensions/ima/src/main/java/com/google/android/exoplayer2/ext/ima/ImaServerSideAdInsertionMediaSource.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/common/src/main/java/com/google/android/exoplayer2/C.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
No direct assertions: createAudioSampleEntryBox_forMp4a_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:207— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createCo64Box_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:536— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createEmptyDinfBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:142— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createFtypBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:558— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createHdlrBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:150— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createIlstBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:179— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createKeysBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:169— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createMdhdBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:105— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createMvhdBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:93— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createNmhdBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:134— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createSmhdBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:126— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createStscBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:525— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createStssBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:547— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createStszBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:513— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createSttsBox_withAllDifferentSampleDurations_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:486— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createSttsBox_withFewConsecutiveSameSampleDurations_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:499— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createSttsBox_withSingleSampleDuration_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:473— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createTkhdBox_forAudioTrack_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:76— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createTkhdBox_forVideoTrack_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:59— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createUdtaBox_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:159— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createUuidBox_forXmpData_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:189— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createVideoSampleEntryBox_forAv1_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:333— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createVideoSampleEntryBox_forH264_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:308— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createVideoSampleEntryBox_forH265_hdr10_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:273— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: createVideoSampleEntryBox_forH265_matchesExpected library/muxer/src/test/java/com/google/android/exoplayer2/muxer/BoxesTest.java:248— No conventional assertion call was detected, and 38 of 61 tests in `muxer` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
Disabled test extensions/flac/src/androidTest/java/com/google/android/exoplayer2/ext/flac/FlacExtractorSeekTest.java:79— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test extensions/flac/src/androidTest/java/com/google/android/exoplayer2/ext/flac/FlacExtractorSeekTest.java:97— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test extensions/flac/src/androidTest/java/com/google/android/exoplayer2/ext/flac/FlacExtractorSeekTest.java:117— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test extensions/flac/src/androidTest/java/com/google/android/exoplayer2/ext/flac/FlacExtractorSeekTest.java:165— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test extensions/flac/src/androidTest/java/com/google/android/exoplayer2/ext/flac/FlacExtractorSeekTest.java:183— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test extensions/flac/src/androidTest/java/com/google/android/exoplayer2/ext/flac/FlacExtractorSeekTest.java:203— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test extensions/ima/src/androidTest/java/com/google/android/exoplayer2/ext/ima/ImaPlaybackTest.java:125— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test extensions/media2/src/androidTest/java/com/google/android/exoplayer2/ext/media2/SessionPlayerConnectorTest.java:930— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/core/src/test/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeterTest.java:381— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/core/src/test/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeterTest.java:384— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/core/src/test/java/com/google/android/exoplayer2/video/DecoderVideoRendererTest.java:280— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/core/src/test/java/com/google/android/exoplayer2/video/DecoderVideoRendererTest.java:333— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/dash/src/test/java/com/google/android/exoplayer2/source/dash/e2etest/DashPlaybackTest.java:54— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadManagerDashTest.java:112— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadServiceDashTest.java:160— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadServiceDashTest.java:171— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadServiceDashTest.java:185— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/datasource/src/test/java/com/google/android/exoplayer2/upstream/ByteArrayDataSourceContractTest.java:55— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/datasource/src/test/java/com/google/android/exoplayer2/upstream/ByteArrayDataSourceContractTest.java:60— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/datasource/src/test/java/com/google/android/exoplayer2/upstream/ByteArrayDataSourceContractTest.java:65— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/datasource/src/test/java/com/google/android/exoplayer2/upstream/ByteArrayDataSourceContractTest.java:70— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/datasource/src/test/java/com/google/android/exoplayer2/upstream/UdpDataSourceContractTest.java:77— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/datasource/src/test/java/com/google/android/exoplayer2/upstream/UdpDataSourceContractTest.java:82— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/datasource/src/test/java/com/google/android/exoplayer2/upstream/UdpDataSourceContractTest.java:87— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test library/datasource/src/test/java/com/google/android/exoplayer2/upstream/UdpDataSourceContractTest.java:92— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Duplicated predicate library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java:473— `!containerAtoms.isEmpty() && containerAtoms.peek().endPosition == atomEndPosition` appears character-identically in 2 files — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java, library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/Mp4Extractor.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java:866— `!isStarted || positionUs == initialPositionUs` appears character-identically in 2 files — library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java, library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:887— `!isVisible() || !isAttachedToWindow || repeatToggleButton == null` appears character-identically in 2 files — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java, library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java:925— `!isVisible() || !isAttachedToWindow || shuffleButton == null` appears character-identically in 2 files — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerControlView.java, library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerControlView.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ContainerMediaChunk.java:135— `!loadCanceled && chunkExtractor.read(input)` appears character-identically in 2 files — library/core/src/main/java/com/google/android/exoplayer2/source/chunk/ContainerMediaChunk.java, library/core/src/main/java/com/google/android/exoplayer2/source/chunk/InitializationChunk.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriod.java:303— `!sampleQueue.seekTo(positionUs, true) && sampleQueue.getReadIndex() != 0` appears character-identically in 2 files — library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaPeriod.java, library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java:917— `!timeline.isEmpty() && !player.isPlayingAd()` appears character-identically in 2 files — extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/MediaSessionConnector.java, extensions/mediasession/src/main/java/com/google/android/exoplayer2/ext/mediasession/TimelineQueueNavigator.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java:207— `(bandwidthEstimate == ESTIMATE_NOT_AVAILABLE) || (elapsedMs == 0 && bytesTransferred == 0 && bandwidthEstimate == lastReportedBandwidthEstim…` appears character-identically in 2 files — library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/CombinedParallelSampleBandwidthEstimator.java, library/core/src/main/java/com/google/android/exoplayer2/upstream/experimental/SplitParallelSampleBandwidthEstimator.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/SeiReader.java:59— `MimeTypes.APPLICATION_CEA608.equals(channelMimeType) || MimeTypes.APPLICATION_CEA708.equals(channelMimeType)` appears character-identically in 2 files — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/SeiReader.java, library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/UserDataReader.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EncoderUtil.java:322— `Util.SDK_INT == 21 && format.containsKey(MediaFormat.KEY_FRAME_RATE)` appears character-identically in 2 files — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EncoderUtil.java, testutils/src/main/java/com/google/android/exoplayer2/testutil/DecodeOneFrameUtil.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsExtractor.java:158— `adjusterFirstSampleTimestampUs != C.TIME_UNSET && adjusterFirstSampleTimestampUs != 0 && adjusterFirstSampleTimestampUs != timeUs` appears character-identically in 2 files — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsExtractor.java, library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:812— `allowFirstBufferPositionDiscontinuity && !buffer.isDecodeOnly()` appears character-identically in 2 files — library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java, library/core/src/main/java/com/google/android/exoplayer2/audio/MediaCodecAudioRenderer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/datasource/src/main/java/com/google/android/exoplayer2/upstream/ContentDataSource.java:119— `assetFileDescriptorLength != AssetFileDescriptor.UNKNOWN_LENGTH && dataSpec.position > assetFileDescriptorLength` appears character-identically in 2 files — library/datasource/src/main/java/com/google/android/exoplayer2/upstream/ContentDataSource.java, library/datasource/src/main/java/com/google/android/exoplayer2/upstream/RawResourceDataSource.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:107— `averageAudioBitrate > 0 || averageAudioBitrate == C.RATE_UNSET_INT` appears character-identically in 2 files — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java, library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:150— `averageVideoBitrate > 0 || averageVideoBitrate == C.RATE_UNSET_INT` appears character-identically in 2 files — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java, library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacExtractor.java:145— `binarySearchSeeker != null && binarySearchSeeker.isSeeking()` appears character-identically in 2 files — extensions/flac/src/main/java/com/google/android/exoplayer2/ext/flac/FlacExtractor.java, library/extractor/src/main/java/com/google/android/exoplayer2/extractor/flac/FlacExtractor.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlStyle.java:127— `bold == UNSPECIFIED && italic == UNSPECIFIED` appears character-identically in 2 files — library/extractor/src/main/java/com/google/android/exoplayer2/text/ttml/TtmlStyle.java, library/extractor/src/main/java/com/google/android/exoplayer2/text/webvtt/WebvttCssStyle.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/common/src/main/java/com/google/android/exoplayer2/util/ParsableBitArray.java:350— `byteOffset >= 0 && (byteOffset < byteLimit || (byteOffset == byteLimit && bitOffset == 0))` appears character-identically in 3 files — library/common/src/main/java/com/google/android/exoplayer2/util/ParsableBitArray.java, library/container/src/main/java/com/google/android/exoplayer2/util/ParsableNalUnitBitArray.java, library/extractor/src/main/java/com/google/android/exoplayer2/extractor/VorbisBitArray.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsExtractor.java:185— `canReadDuration && !durationReader.isDurationReadFinished()` appears character-identically in 2 files — library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/PsExtractor.java, library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ts/TsExtractor.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java:119— `channelCount > 0 || channelCount == C.LENGTH_UNSET` appears character-identically in 2 files — library/transformer/src/main/java/com/google/android/exoplayer2/transformer/ExportResult.java, library/transformer/src/main/java/com/google/android/exoplayer2/transformer/TransformationResult.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java:748— `codecName.startsWith("omx.google.") || codecName.startsWith("omx.ffmpeg.") || (codecName.startsWith("omx.sec.") && codecName.contains(".sw."…` appears character-identically in 2 files — library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecUtil.java, library/transformer/src/main/java/com/google/android/exoplayer2/transformer/EncoderUtil.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/common/src/main/java/com/google/android/exoplayer2/util/MediaFormatUtil.java:316— `colorSpace != Format.NO_VALUE || colorRange != Format.NO_VALUE || colorTransfer != Format.NO_VALUE || hdrStaticInfo != null` appears character-identically in 2 files — library/common/src/main/java/com/google/android/exoplayer2/util/MediaFormatUtil.java, library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java:416— `contentFrame != null && surfaceType != SURFACE_TYPE_NONE` appears character-identically in 2 files — library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerView.java, library/ui/src/main/java/com/google/android/exoplayer2/ui/StyledPlayerView.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate extensions/okhttp/src/main/java/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSource.java:347— `contentTypePredicate != null && !contentTypePredicate.apply(contentType)` appears character-identically in 2 files — extensions/okhttp/src/main/java/com/google/android/exoplayer2/ext/okhttp/OkHttpDataSource.java, library/datasource/src/main/java/com/google/android/exoplayer2/upstream/DefaultHttpDataSource.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java:486— `decoder == null || decoderReinitializationState == REINITIALIZATION_STATE_WAIT_END_OF_STREAM || inputStreamEnded` appears character-identically in 2 files — library/core/src/main/java/com/google/android/exoplayer2/audio/DecoderAudioRenderer.java, library/core/src/main/java/com/google/android/exoplayer2/video/DecoderVideoRenderer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Fat interface: ExtractorInput (16 abstract methods) library/extractor/src/main/java/com/google/android/exoplayer2/extractor/ExtractorInput.java:73— `ExtractorInput` declares 16 abstract methods under just 12 distinct name(s): `advancePeekPosition`, `advancePeekPosition`, `getLength`, `getPeekPosition`, `getPosition`, `peek`, `peekFully`, `peekFully`, `read`, `readFully`, `readFully`, `resetPeekPosition`, `setRetryPosition`, `skip`, `skipFully`, `skipFully`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 12 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 16 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
Fat interface: Cache (19 abstract methods) library/datasource/src/main/java/com/google/android/exoplayer2/upstream/cache/Cache.java:48— `Cache` declares 19 abstract methods: `addListener`, `applyContentMetadataMutations`, `commitFile`, `getCacheSpace`, `getCachedBytes`, `getCachedLength`, `getCachedSpans`, `getContentMetadata`, `getKeys`, `getUid`, `isCached`, `release`, `releaseHoleSpan`, `removeListener`, `removeResource`, `removeSpan`, `startFile`, `startReadWrite`, `startReadWriteNonBlocking`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: AudioSink (26 abstract methods) library/core/src/main/java/com/google/android/exoplayer2/audio/AudioSink.java:71— `AudioSink` declares 26 abstract methods: `configure`, `disableTunneling`, `enableTunnelingV21`, `experimentalFlushWithoutAudioTrackRelease`, `flush`, `getAudioAttributes`, `getCurrentPositionUs`, `getFormatSupport`, `getPlaybackParameters`, `getSkipSilenceEnabled`, `handleBuffer`, `handleDiscontinuity`, `hasPendingData`, `isEnded`, `pause`, `play`, `playToEndOfStream`, `reset`, `setAudioAttributes`, `setAudioSessionId`, `setAuxEffectInfo`, `setListener`, `setPlaybackParameters`, `setSkipSilenceEnabled`, `setVolume`, `supportsFormat`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ExoMediaDrm (21 abstract methods) library/core/src/main/java/com/google/android/exoplayer2/drm/ExoMediaDrm.java:63— `ExoMediaDrm` declares 21 abstract methods: `acquire`, `closeSession`, `createCryptoConfig`, `getCryptoType`, `getKeyRequest`, `getMetrics`, `getPropertyByteArray`, `getPropertyString`, `getProvisionRequest`, `openSession`, `provideKeyResponse`, `provideProvisionResponse`, `queryKeyStatus`, `release`, `requiresSecureDecoder`, `restoreKeys`, `setOnEventListener`, `setOnExpirationUpdateListener`, `setOnKeyStatusChangeListener`, `setPropertyByteArray`, `setPropertyString`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: AnalyticsCollector (24 abstract methods) library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsCollector.java:49— `AnalyticsCollector` declares 24 abstract methods: `addListener`, `notifySeekStarted`, `onAudioCodecError`, `onAudioDecoderInitialized`, `onAudioDecoderReleased`, `onAudioDisabled`, `onAudioEnabled`, `onAudioInputFormatChanged`, `onAudioPositionAdvancing`, `onAudioSinkError`, `onAudioUnderrun`, `onDroppedFrames`, `onRenderedFirstFrame`, `onVideoCodecError`, `onVideoDecoderInitialized`, `onVideoDecoderReleased`, `onVideoDisabled`, `onVideoEnabled`, `onVideoFrameProcessingOffset`, `onVideoInputFormatChanged`, `release`, `removeListener`, `setPlayer`, `updateMediaPeriodQueueInfo`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: MediaCodecAdapter (17 abstract methods) library/core/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecAdapter.java:45— `MediaCodecAdapter` declares 17 abstract methods: `dequeueInputBufferIndex`, `dequeueOutputBufferIndex`, `flush`, `getInputBuffer`, `getMetrics`, `getOutputBuffer`, `getOutputFormat`, `needsReconfiguration`, `queueInputBuffer`, `queueSecureInputBuffer`, `release`, `releaseOutputBuffer`, `releaseOutputBuffer`, `setOnFrameRenderedListener`, `setOutputSurface`, `setParameters`, `setVideoScalingMode`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 17 declarations carry 16 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 16 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ExoPlayer (64 abstract methods) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java:164— `ExoPlayer` declares 64 abstract methods: `addAnalyticsListener`, `addAudioOffloadListener`, `addMediaSource`, `addMediaSource`, `addMediaSources`, `addMediaSources`, `clearAuxEffectInfo`, `clearCameraMotionListener`, `clearVideoFrameMetadataListener`, `createMessage`, `experimentalIsSleepingForOffload`, `experimentalSetOffloadSchedulingEnabled`, `getAnalyticsCollector`, `getAudioComponent`, `getAudioDecoderCounters`, `getAudioFormat`, `getAudioSessionId`, `getClock`, `getCurrentTrackGroups`, `getCurrentTrackSelections`, `getDeviceComponent`, `getPauseAtEndOfMediaItems`, `getPlaybackLooper`, `getPlayerError`, `getRenderer`, `getRendererCount`, `getRendererType`, `getSeekParameters`, `getSkipSilenceEnabled`, `getTextComponent`, `getTrackSelector`, `getVideoChangeFrameRateStrategy`, `getVideoComponent`, `getVideoDecoderCounters`, `getVideoFormat`, `getVideoScalingMode`, `isTunnelingEnabled`, `prepare`, `prepare`, `removeAnalyticsListener`, and 24 more. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 64 declarations carry 57 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 57 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: VideoComponent (18 abstract methods) library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java:239— `VideoComponent` declares 18 abstract methods: `clearCameraMotionListener`, `clearVideoFrameMetadataListener`, `clearVideoSurface`, `clearVideoSurface`, `clearVideoSurfaceHolder`, `clearVideoSurfaceView`, `clearVideoTextureView`, `getVideoChangeFrameRateStrategy`, `getVideoScalingMode`, `getVideoSize`, `setCameraMotionListener`, `setVideoChangeFrameRateStrategy`, `setVideoFrameMetadataListener`, `setVideoScalingMode`, `setVideoSurface`, `setVideoSurfaceHolder`, `setVideoSurfaceView`, `setVideoTextureView`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 18 declarations carry 17 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 17 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: Renderer (22 abstract methods) library/core/src/main/java/com/google/android/exoplayer2/Renderer.java:62— `Renderer` declares 22 abstract methods: `disable`, `enable`, `getCapabilities`, `getMediaClock`, `getName`, `getReadingPositionUs`, `getState`, `getStream`, `getTrackType`, `hasReadStreamToEnd`, `init`, `isCurrentStreamFinal`, `isEnded`, `isReady`, `maybeThrowStreamError`, `render`, `replaceStream`, `reset`, `resetPosition`, `setCurrentStreamFinal`, `start`, `stop`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: Player (127 abstract methods) library/common/src/main/java/com/google/android/exoplayer2/Player.java:179— `Player` declares 127 abstract methods: `addListener`, `addMediaItem`, `addMediaItem`, `addMediaItems`, `addMediaItems`, `canAdvertiseSession`, `clearMediaItems`, `clearVideoSurface`, `clearVideoSurface`, `clearVideoSurfaceHolder`, `clearVideoSurfaceView`, `clearVideoTextureView`, `decreaseDeviceVolume`, `decreaseDeviceVolume`, `getApplicationLooper`, `getAudioAttributes`, `getAvailableCommands`, `getBufferedPercentage`, `getBufferedPosition`, `getContentBufferedPosition`, `getContentDuration`, `getContentPosition`, `getCurrentAdGroupIndex`, `getCurrentAdIndexInAdGroup`, `getCurrentCues`, `getCurrentLiveOffset`, `getCurrentManifest`, `getCurrentMediaItem`, `getCurrentMediaItemIndex`, `getCurrentPeriodIndex`, `getCurrentPosition`, `getCurrentTimeline`, `getCurrentTracks`, `getCurrentWindowIndex`, `getDeviceInfo`, `getDeviceVolume`, `getDuration`, `getMaxSeekToPreviousPosition`, `getMediaItemAt`, `getMediaItemCount`, and 87 more. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 127 declarations carry 114 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 114 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
README/code drift demos/transformer/README.md:23— demos/transformer/README.md documents the environment variable `MEDIAPIPE_ROOT`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift demos/transformer/README.md:24— demos/transformer/README.md documents the environment variable `MEDIAPIPE_TRANSFORMER_ROOT`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift demos/transformer/README.md:26— demos/transformer/README.md documents the environment variable `TRANSFORMER_DEMO_ROOT`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift docs/_page_fragments/supported-formats-progressive.md:32— docs/_page_fragments/supported-formats-progressive.md links to `customization.html#enabling-constant-bitrate-seeking`, but `docs/_page_fragments/customization.html` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift extensions/av1/README.md:27— extensions/av1/README.md documents the environment variable `AV1_MODULE_PATH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift extensions/ffmpeg/README.md:52— extensions/ffmpeg/README.md documents the environment variable `FFMPEG_PATH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift extensions/flac/README.md:26— extensions/flac/README.md documents the environment variable `FLAC_MODULE_PATH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift extensions/opus/README.md:26— extensions/opus/README.md documents the environment variable `OPUS_MODULE_PATH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift extensions/vp9/README.md:26— extensions/vp9/README.md documents the environment variable `VP9_MODULE_PATH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
README/code drift extensions/vp9/README.md:44— extensions/vp9/README.md documents the environment variable `LIBVPX_PATH`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
D34 · Knowledge Freshness· Most significant orphaned file · ×3
Most significant orphaned file library/common/src/main/java/com/google/android/exoplayer2/SimpleBasePlayer.java:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file library/core/src/main/java/com/google/android/exoplayer2/trackselection/DefaultTrackSelector.java:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file library/core/src/main/java/com/google/android/exoplayer2/ExoPlayerImplInternal.java:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 5 of 32 project(s) overshoot their size bounds, lowering Project Cohesion to 6.9/10. The most over is `library/core` (88852 LoC, 405 module-visible types across 21 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history)· Rotate the exposed credentials · ×1
Dormant codebase — 892 of 892 significant files have no living knowledge — the codebase as a whole is dormant, not 892 separate risks. Counted over 892 of the 1184 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
Thin README — The root README is 96 words, against a bar of 120. Of the three newcomer-critical sections this check looks for by heading, it found no a build/run or getting-started section, no a testing section, no an architecture or project-map section. Sections are matched on HEADING text only, so material written under a heading this check does not recognise — or with no heading at all — is not seen and this row may understate what the document covers.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No SAST — No static application security testing detected. For this repository's stack, add 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 was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
X5 · Nullable reference types· Java packages are not null-marked everywhere · ×1
Java packages are not null-marked everywhere — 85/107 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.
Silent fallback default on parse failure extensions/cronet/src/main/java/com/google/android/exoplayer2/ext/cronet/CronetUtil.java:184— `compareVersionStrings` returns `0` when `NumberFormatException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
Skipped (documented): decode_removesPreSkipFromOutput extensions/opus/src/test/java/com/google/android/exoplayer2/ext/opus/OpusDecoderTest.java:117— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a JUnit assumption
Skipped (documented): decode_whenDiscardPaddingDisabled_returnsDiscardPadding extensions/opus/src/test/java/com/google/android/exoplayer2/ext/opus/OpusDecoderTest.java:136— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a JUnit assumption
Skipped (documented): decode_whenDiscardPaddingEnabled_removesDiscardPadding extensions/opus/src/test/java/com/google/android/exoplayer2/ext/opus/OpusDecoderTest.java:158— Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a JUnit assumption
Skipped (documented): webvttInMp4 library/dash/src/test/java/com/google/android/exoplayer2/source/dash/e2etest/DashPlaybackTest.java:56— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): saveAndLoadActionFile library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadManagerDashTest.java:114— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): multipleDownloadRequest library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadServiceDashTest.java:162— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): removeAction library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadServiceDashTest.java:173— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): removeBeforeDownloadComplete library/dash/src/test/java/com/google/android/exoplayer2/source/dash/offline/DownloadServiceDashTest.java:187— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): defaultInitialBitrateEstimate_for5gSa_forFastCountry_isGreaterThanEstimateForSlowCountry library/core/src/test/java/com/google/android/exoplayer2/upstream/experimental/ExperimentalBandwidthMeterTest.java:388— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): defaultInitialBitrateEstimate_for5gSa_forFastCountry_isGreaterThanEstimateForSlowCountry library/core/src/test/java/com/google/android/exoplayer2/upstream/DefaultBandwidthMeterTest.java:385— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): getResponseHeaders_resourceNotFound_isEmptyWhileNotOpen library/datasource/src/test/java/com/google/android/exoplayer2/upstream/ByteArrayDataSourceContractTest.java:71— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): getUri_resourceNotFound_returnsNullIfNotOpened library/datasource/src/test/java/com/google/android/exoplayer2/upstream/ByteArrayDataSourceContractTest.java:66— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): resourceNotFound library/datasource/src/test/java/com/google/android/exoplayer2/upstream/ByteArrayDataSourceContractTest.java:56— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): resourceNotFound_transferListenerCallbacks library/datasource/src/test/java/com/google/android/exoplayer2/upstream/ByteArrayDataSourceContractTest.java:61— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): dataSpecWithEndPositionOutOfRange_readsToEnd library/datasource/src/test/java/com/google/android/exoplayer2/upstream/UdpDataSourceContractTest.java:109— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): dataSpecWithLength_readExpectedRange library/datasource/src/test/java/com/google/android/exoplayer2/upstream/UdpDataSourceContractTest.java:84— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): dataSpecWithPositionAndLength_readExpectedRange library/datasource/src/test/java/com/google/android/exoplayer2/upstream/UdpDataSourceContractTest.java:89— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): dataSpecWithPositionAtEndAndLength_readsZeroBytes library/datasource/src/test/java/com/google/android/exoplayer2/upstream/UdpDataSourceContractTest.java:99— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): dataSpecWithPositionAtEnd_readsZeroBytes library/datasource/src/test/java/com/google/android/exoplayer2/upstream/UdpDataSourceContractTest.java:94— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): dataSpecWithPositionOutOfRange_throwsPositionOutOfRangeException library/datasource/src/test/java/com/google/android/exoplayer2/upstream/UdpDataSourceContractTest.java:104— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Skipped (documented): dataSpecWithPosition_readUntilEnd library/datasource/src/test/java/com/google/android/exoplayer2/upstream/UdpDataSourceContractTest.java:79— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Ignore
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 7 file(s) — `docs/_includes/scripts/components/lightbox.js`, `docs/_includes/scripts/lib/gallery.js`, `docs/_includes/search-providers/default/search-data.js`, `docs/assets/search.js`, `extensions/media2/src/androidTest/res/raw/video_not_seekable.ts`, … (+2 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
0
—
Run 01a16c5b-f31e-7f39-98a6-335a962aecba · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 20 · Warnings: 1899 · Recommendations: 1021 · Info: 21 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 24-10-2026 @ 05:22 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.