Public report of opensearch-project/index-management, published 17 November 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 17 November 2026, 18:00 UTC · Survey ID cd_632e4a1c703c4068af5fa1024e65b210
opensearch-project/index-management
Measured 17 November 2026, 17:59 UTC, at code version b6eb0be
First survey, so nothing to compare with yet
CAI scoreAdequate
CriticalWeakAdequateStrongExemplary
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A medium codebase: 41,781 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 0.6 person-years · Weakest lens: Production Readiness, 55.5
Findings by how serious they are
15 critical334 serious240 minor
10 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 17:59 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer is the only one that does.
The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
48of 48 dimensions measured by tools.
577of 589 findings point to an exact file and line, so you can open each one in the code. The other 12 concern the repository as a whole, such as missing documentation.
48dimensions across 6 lenses, read from 41,781 lines of product code in 2 projects.
opensearch-project/index-management falls short of our standard for production, held back most by its Production Readiness lens, the way the code is tested, built, released and run. It scores 61.0 out of 100 and is rated Adequate, and all 15 of its critical findings are security problems.
Production Readiness, at 55.5, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 5.3 points. Fixing the password or key in the code would lift Production Readiness itself, worth about 4.4 points. Raising Production Readiness to 70 would lift the score to about 64.5.
Eight pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two passwords or keys in the code's history and one in the code are open to anyone who can read the repository, and two secrets can leak from the build pipeline. Replacing each exposed password or key, pinning each tool to an exact version and limiting each secret to its own step would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once, and giving the pull-request workflow read-only access would deal with the pipeline that outsiders can trigger with write access.
The product code is 41,781 lines, about €94,000 to rebuild. The check for the health of its packages couldn't finish, so that result is missing, not a clean pass.
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 Production Readiness rose from 55.5 to 70, the lowest score rated Strong, the score would rise from 61.0 to about 64.5.
Code composition: what the lines of code are
Product code 48%Tests 52%
Rebuild cost: about €94,000 · Estimate
Cost to rebuild
€31,000 to €160,000, for 523 to 1,659 hours of work, about 0.6 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 61. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Medium: 41,781 lines of product code
What it is not
Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.
How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.
Top priorities
The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.
Raises the score by about 5.3 points · Low effort · ADR Quality
2
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Raises the score by about 4.4 points · Low effort · REDACTED Scanning
3
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.
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 €94,000 to build again, about 0.6 person-years of work. Its weakest lens is Production Readiness, at 55.5 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 No ADRs found finding(s) in ADR Quality. Of all the actions in this report, it raises the score most for the work it takes: about 5.3 points for low effort, because it clears the 1 ADR Quality findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 4,460 lines over the last 90 days, which is about 18,088 lines a year. At that pace, the extra work comes to an estimated 0.9 to 6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
Architecture: which parts of the code depend on which
The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.
403 modules, with 456 dependencies between them. 10 loops run through 40 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 363 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.
controlcenter.notification.model uses common.model.notification, so a change to common.model.notification can break controlcenter.notification.model, while a change to controlcenter.notification.model can't break common.model.notification.
Position
Below the diagonal: controlcenter.notification.model uses a module listed above it, which is the healthy direction.
rollup.model uses common.model.dimension, so a change to common.model.dimension can break rollup.model, while a change to rollup.model can't break common.model.dimension.
Position
Below the diagonal: rollup.model uses a module listed above it, which is the healthy direction.
rollup.model uses rollup.model.metric, so a change to rollup.model.metric can break rollup.model, while a change to rollup.model can't break rollup.model.metric.
Position
Below the diagonal: rollup.model uses a module listed above it, which is the healthy direction.
10→16 snapshotmanagement.model.SMMetadata uses snapshotmanagement.modelpart of a loop✕
Connections
2 pairs of types, where a type in snapshotmanagement.model.SMMetadata uses a type in snapshotmanagement.model.
snapshotmanagement.model.SMMetadata uses snapshotmanagement.model, so a change to snapshotmanagement.model can break snapshotmanagement.model.SMMetadata, while a change to snapshotmanagement.model.SMMetadata can't break snapshotmanagement.model.
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.
10→39 snapshotmanagement.model.SMMetadata uses snapshotmanagement.engine.statespart of a loop✕
Connections
3 pairs of types, where a type in snapshotmanagement.model.SMMetadata uses a type in snapshotmanagement.engine.states.
snapshotmanagement.model.SMMetadata uses snapshotmanagement.engine.states, so a change to snapshotmanagement.engine.states can break snapshotmanagement.model.SMMetadata, while a change to snapshotmanagement.model.SMMetadata can't break snapshotmanagement.engine.states.
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.
11→16 snapshotmanagement.model.SMPolicy uses snapshotmanagement.modelpart of a loop✕
Connections
1 pair of types, where a type in snapshotmanagement.model.SMPolicy uses a type in snapshotmanagement.model.
snapshotmanagement.model.SMPolicy uses snapshotmanagement.model, so a change to snapshotmanagement.model can break snapshotmanagement.model.SMPolicy, while a change to snapshotmanagement.model.SMPolicy can't break snapshotmanagement.model.
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.
spi.indexstatemanagement.model uses spi.indexstatemanagement.Step, so a change to spi.indexstatemanagement.Step can break spi.indexstatemanagement.model, while a change to spi.indexstatemanagement.model can't break spi.indexstatemanagement.Step.
Position
Below the diagonal: spi.indexstatemanagement.model uses a module listed above it, which is the healthy direction.
transform.model uses common.model.dimension, so a change to common.model.dimension can break transform.model, while a change to transform.model can't break common.model.dimension.
Position
Below the diagonal: transform.model uses a module listed above it, which is the healthy direction.
controlcenter.notification uses controlcenter.notification.model, so a change to controlcenter.notification.model can break controlcenter.notification, while a change to controlcenter.notification can't break controlcenter.notification.model.
Position
Below the diagonal: controlcenter.notification uses a module listed above it, which is the healthy direction.
indexstatemanagement.fielddomain uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.fielddomain, while a change to indexstatemanagement.fielddomain can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.fielddomain uses a module listed above it, which is the healthy direction.
snapshotmanagement.model uses common.model.notification, so a change to common.model.notification can break snapshotmanagement.model, while a change to snapshotmanagement.model can't break common.model.notification.
Position
Below the diagonal: snapshotmanagement.model uses a module listed above it, which is the healthy direction.
snapshotmanagement.model uses snapshotmanagement.model.SMMetadata, so a change to snapshotmanagement.model.SMMetadata can break snapshotmanagement.model, while a change to snapshotmanagement.model can't break snapshotmanagement.model.SMMetadata.
Position
Below the diagonal: snapshotmanagement.model uses a module listed above it, which is the healthy direction.
snapshotmanagement.model uses snapshotmanagement.model.SMPolicy, so a change to snapshotmanagement.model.SMPolicy can break snapshotmanagement.model, while a change to snapshotmanagement.model can't break snapshotmanagement.model.SMPolicy.
Position
Below the diagonal: snapshotmanagement.model uses a module listed above it, which is the healthy direction.
spi.indexstatemanagement.metrics uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break spi.indexstatemanagement.metrics, while a change to spi.indexstatemanagement.metrics can't break spi.indexstatemanagement.model.
Position
Below the diagonal: spi.indexstatemanagement.metrics uses a module listed above it, which is the healthy direction.
controlcenter.notification.action.get uses common.model.rest, so a change to common.model.rest can break controlcenter.notification.action.get, while a change to controlcenter.notification.action.get can't break common.model.rest.
Position
Below the diagonal: controlcenter.notification.action.get uses a module listed above it, which is the healthy direction.
controlcenter.notification.action.get uses controlcenter.notification, so a change to controlcenter.notification can break controlcenter.notification.action.get, while a change to controlcenter.notification.action.get can't break controlcenter.notification.
Position
Below the diagonal: controlcenter.notification.action.get uses a module listed above it, which is the healthy direction.
spi.indexstatemanagement uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break spi.indexstatemanagement, while a change to spi.indexstatemanagement can't break spi.indexstatemanagement.model.
Position
Below the diagonal: spi.indexstatemanagement uses a module listed above it, which is the healthy direction.
spi.indexstatemanagement uses spi.indexstatemanagement.metrics, so a change to spi.indexstatemanagement.metrics can break spi.indexstatemanagement, while a change to spi.indexstatemanagement can't break spi.indexstatemanagement.metrics.
Position
Below the diagonal: spi.indexstatemanagement uses a module listed above it, which is the healthy direction.
30 pairs of types, where a type in spi.indexstatemanagement.metrics.actionmetrics uses a type in spi.indexstatemanagement.model. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
spi.indexstatemanagement.metrics.actionmetrics uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break spi.indexstatemanagement.metrics.actionmetrics, while a change to spi.indexstatemanagement.metrics.actionmetrics can't break spi.indexstatemanagement.model.
Position
Below the diagonal: spi.indexstatemanagement.metrics.actionmetrics uses a module listed above it, which is the healthy direction.
30 pairs of types, where a type in spi.indexstatemanagement.metrics.actionmetrics uses a type in spi.indexstatemanagement.metrics. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
spi.indexstatemanagement.metrics.actionmetrics uses spi.indexstatemanagement.metrics, so a change to spi.indexstatemanagement.metrics can break spi.indexstatemanagement.metrics.actionmetrics, while a change to spi.indexstatemanagement.metrics.actionmetrics can't break spi.indexstatemanagement.metrics.
Position
Below the diagonal: spi.indexstatemanagement.metrics.actionmetrics uses a module listed above it, which is the healthy direction.
controlcenter.notification.filter uses controlcenter.notification.model, so a change to controlcenter.notification.model can break controlcenter.notification.filter, while a change to controlcenter.notification.filter can't break controlcenter.notification.model.
Position
Below the diagonal: controlcenter.notification.filter uses a module listed above it, which is the healthy direction.
controlcenter.notification.filter uses controlcenter.notification, so a change to controlcenter.notification can break controlcenter.notification.filter, while a change to controlcenter.notification.filter can't break controlcenter.notification.
Position
Below the diagonal: controlcenter.notification.filter uses a module listed above it, which is the healthy direction.
controlcenter.notification.filter uses controlcenter.notification.action.get, so a change to controlcenter.notification.action.get can break controlcenter.notification.filter, while a change to controlcenter.notification.filter can't break controlcenter.notification.action.get.
Position
Below the diagonal: controlcenter.notification.filter uses a module listed above it, which is the healthy direction.
indexstatemanagement.model uses common.model.notification, so a change to common.model.notification can break indexstatemanagement.model, while a change to indexstatemanagement.model can't break common.model.notification.
Position
Below the diagonal: indexstatemanagement.model uses a module listed above it, which is the healthy direction.
indexstatemanagement.model uses indexstatemanagement.model.destination, so a change to indexstatemanagement.model.destination can break indexstatemanagement.model, while a change to indexstatemanagement.model can't break indexstatemanagement.model.destination.
Position
Below the diagonal: indexstatemanagement.model uses a module listed above it, which is the healthy direction.
indexstatemanagement.model uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.model, while a change to indexstatemanagement.model can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.model uses a module listed above it, which is the healthy direction.
indexstatemanagement.model uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break indexstatemanagement.model, while a change to indexstatemanagement.model can't break spi.indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.model uses a module listed above it, which is the healthy direction.
22→30 indexstatemanagement.model uses indexstatemanagementpart of a loop✕
Connections
1 pair of types, where a type in indexstatemanagement.model uses a type in indexstatemanagement.
indexstatemanagement.model uses indexstatemanagement, so a change to indexstatemanagement can break indexstatemanagement.model, while a change to indexstatemanagement.model can't break indexstatemanagement.
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.
indexstatemanagement.step.alias uses spi.indexstatemanagement.Step, so a change to spi.indexstatemanagement.Step can break indexstatemanagement.step.alias, while a change to indexstatemanagement.step.alias can't break spi.indexstatemanagement.Step.
Position
Below the diagonal: indexstatemanagement.step.alias uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.alias uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.step.alias, while a change to indexstatemanagement.step.alias can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.step.alias uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.alias uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break indexstatemanagement.step.alias, while a change to indexstatemanagement.step.alias can't break spi.indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.step.alias uses a module listed above it, which is the healthy direction.
23→37 indexstatemanagement.step.alias uses indexstatemanagement.actionpart of a loop✕
Connections
1 pair of types, where a type in indexstatemanagement.step.alias uses a type in indexstatemanagement.action.
indexstatemanagement.step.alias uses indexstatemanagement.action, so a change to indexstatemanagement.action can break indexstatemanagement.step.alias, while a change to indexstatemanagement.step.alias can't break indexstatemanagement.action.
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.
indexstatemanagement.step.allocation uses spi.indexstatemanagement.Step, so a change to spi.indexstatemanagement.Step can break indexstatemanagement.step.allocation, while a change to indexstatemanagement.step.allocation can't break spi.indexstatemanagement.Step.
Position
Below the diagonal: indexstatemanagement.step.allocation uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.allocation uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.step.allocation, while a change to indexstatemanagement.step.allocation can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.step.allocation uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.allocation uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break indexstatemanagement.step.allocation, while a change to indexstatemanagement.step.allocation can't break spi.indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.step.allocation uses a module listed above it, which is the healthy direction.
24→37 indexstatemanagement.step.allocation uses indexstatemanagement.actionpart of a loop✕
Connections
1 pair of types, where a type in indexstatemanagement.step.allocation uses a type in indexstatemanagement.action.
indexstatemanagement.step.allocation uses indexstatemanagement.action, so a change to indexstatemanagement.action can break indexstatemanagement.step.allocation, while a change to indexstatemanagement.step.allocation can't break indexstatemanagement.action.
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.
indexstatemanagement.step.fielddomain uses spi.indexstatemanagement.Step, so a change to spi.indexstatemanagement.Step can break indexstatemanagement.step.fielddomain, while a change to indexstatemanagement.step.fielddomain can't break spi.indexstatemanagement.Step.
Position
Below the diagonal: indexstatemanagement.step.fielddomain uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.fielddomain uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.step.fielddomain, while a change to indexstatemanagement.step.fielddomain can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.step.fielddomain uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.fielddomain uses indexstatemanagement.fielddomain, so a change to indexstatemanagement.fielddomain can break indexstatemanagement.step.fielddomain, while a change to indexstatemanagement.step.fielddomain can't break indexstatemanagement.fielddomain.
Position
Below the diagonal: indexstatemanagement.step.fielddomain uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.fielddomain uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break indexstatemanagement.step.fielddomain, while a change to indexstatemanagement.step.fielddomain can't break spi.indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.step.fielddomain uses a module listed above it, which is the healthy direction.
25→37 indexstatemanagement.step.fielddomain uses indexstatemanagement.actionpart of a loop✕
Connections
1 pair of types, where a type in indexstatemanagement.step.fielddomain uses a type in indexstatemanagement.action.
indexstatemanagement.step.fielddomain uses indexstatemanagement.action, so a change to indexstatemanagement.action can break indexstatemanagement.step.fielddomain, while a change to indexstatemanagement.step.fielddomain can't break indexstatemanagement.action.
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.
indexstatemanagement.step.forcemerge uses spi.indexstatemanagement.Step, so a change to spi.indexstatemanagement.Step can break indexstatemanagement.step.forcemerge, while a change to indexstatemanagement.step.forcemerge can't break spi.indexstatemanagement.Step.
Position
Below the diagonal: indexstatemanagement.step.forcemerge uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.forcemerge uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.step.forcemerge, while a change to indexstatemanagement.step.forcemerge can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.step.forcemerge uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.forcemerge uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break indexstatemanagement.step.forcemerge, while a change to indexstatemanagement.step.forcemerge can't break spi.indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.step.forcemerge uses a module listed above it, which is the healthy direction.
26→37 indexstatemanagement.step.forcemerge uses indexstatemanagement.actionpart of a loop✕
Connections
3 pairs of types, where a type in indexstatemanagement.step.forcemerge uses a type in indexstatemanagement.action.
indexstatemanagement.step.forcemerge uses indexstatemanagement.action, so a change to indexstatemanagement.action can break indexstatemanagement.step.forcemerge, while a change to indexstatemanagement.step.forcemerge can't break indexstatemanagement.action.
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.
indexstatemanagement.step.rollover uses spi.indexstatemanagement.Step, so a change to spi.indexstatemanagement.Step can break indexstatemanagement.step.rollover, while a change to indexstatemanagement.step.rollover can't break spi.indexstatemanagement.Step.
Position
Below the diagonal: indexstatemanagement.step.rollover uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.rollover uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.step.rollover, while a change to indexstatemanagement.step.rollover can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.step.rollover uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.rollover uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break indexstatemanagement.step.rollover, while a change to indexstatemanagement.step.rollover can't break spi.indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.step.rollover uses a module listed above it, which is the healthy direction.
27→37 indexstatemanagement.step.rollover uses indexstatemanagement.actionpart of a loop✕
Connections
1 pair of types, where a type in indexstatemanagement.step.rollover uses a type in indexstatemanagement.action.
indexstatemanagement.step.rollover uses indexstatemanagement.action, so a change to indexstatemanagement.action can break indexstatemanagement.step.rollover, while a change to indexstatemanagement.step.rollover can't break indexstatemanagement.action.
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.
indexstatemanagement.step.rollup uses spi.indexstatemanagement.Step, so a change to spi.indexstatemanagement.Step can break indexstatemanagement.step.rollup, while a change to indexstatemanagement.step.rollup can't break spi.indexstatemanagement.Step.
Position
Below the diagonal: indexstatemanagement.step.rollup uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.rollup uses rollup.model, so a change to rollup.model can break indexstatemanagement.step.rollup, while a change to indexstatemanagement.step.rollup can't break rollup.model.
Position
Below the diagonal: indexstatemanagement.step.rollup uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.rollup uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.step.rollup, while a change to indexstatemanagement.step.rollup can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.step.rollup uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.rollup uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break indexstatemanagement.step.rollup, while a change to indexstatemanagement.step.rollup can't break spi.indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.step.rollup uses a module listed above it, which is the healthy direction.
28→37 indexstatemanagement.step.rollup uses indexstatemanagement.actionpart of a loop✕
Connections
1 pair of types, where a type in indexstatemanagement.step.rollup uses a type in indexstatemanagement.action.
indexstatemanagement.step.rollup uses indexstatemanagement.action, so a change to indexstatemanagement.action can break indexstatemanagement.step.rollup, while a change to indexstatemanagement.step.rollup can't break indexstatemanagement.action.
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.
indexstatemanagement.step.transform uses spi.indexstatemanagement.Step, so a change to spi.indexstatemanagement.Step can break indexstatemanagement.step.transform, while a change to indexstatemanagement.step.transform can't break spi.indexstatemanagement.Step.
Position
Below the diagonal: indexstatemanagement.step.transform uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.transform uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.step.transform, while a change to indexstatemanagement.step.transform can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.step.transform uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.transform uses transform.model, so a change to transform.model can break indexstatemanagement.step.transform, while a change to indexstatemanagement.step.transform can't break transform.model.
Position
Below the diagonal: indexstatemanagement.step.transform uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.transform uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break indexstatemanagement.step.transform, while a change to indexstatemanagement.step.transform can't break spi.indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.step.transform uses a module listed above it, which is the healthy direction.
29→37 indexstatemanagement.step.transform uses indexstatemanagement.actionpart of a loop✕
Connections
1 pair of types, where a type in indexstatemanagement.step.transform uses a type in indexstatemanagement.action.
indexstatemanagement.step.transform uses indexstatemanagement.action, so a change to indexstatemanagement.action can break indexstatemanagement.step.transform, while a change to indexstatemanagement.step.transform can't break indexstatemanagement.action.
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.
indexstatemanagement uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement, while a change to indexstatemanagement can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement uses a module listed above it, which is the healthy direction.
indexstatemanagement uses spi.indexstatemanagement.metrics, so a change to spi.indexstatemanagement.metrics can break indexstatemanagement, while a change to indexstatemanagement can't break spi.indexstatemanagement.metrics.
Position
Below the diagonal: indexstatemanagement uses a module listed above it, which is the healthy direction.
indexstatemanagement uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break indexstatemanagement, while a change to indexstatemanagement can't break spi.indexstatemanagement.
Position
Below the diagonal: indexstatemanagement uses a module listed above it, which is the healthy direction.
indexstatemanagement uses indexstatemanagement.model, so a change to indexstatemanagement.model can break indexstatemanagement, while a change to indexstatemanagement can't break indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement uses a module listed above it, which is the healthy direction.
30→32 indexstatemanagement uses org.opensearch.indexmanagementpart of a loop✕
Connections
4 pairs of types, where a type in indexstatemanagement uses a type in org.opensearch.indexmanagement.
indexstatemanagement uses org.opensearch.indexmanagement, so a change to org.opensearch.indexmanagement can break indexstatemanagement, while a change to indexstatemanagement can't break org.opensearch.indexmanagement.
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.
indexstatemanagement.util uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.util, while a change to indexstatemanagement.util can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.util uses a module listed above it, which is the healthy direction.
indexstatemanagement.util uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break indexstatemanagement.util, while a change to indexstatemanagement.util can't break spi.indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.util uses a module listed above it, which is the healthy direction.
indexstatemanagement.util uses indexstatemanagement.model, so a change to indexstatemanagement.model can break indexstatemanagement.util, while a change to indexstatemanagement.util can't break indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.util uses a module listed above it, which is the healthy direction.
org.opensearch.indexmanagement uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break org.opensearch.indexmanagement, while a change to org.opensearch.indexmanagement can't break spi.indexstatemanagement.
Position
Below the diagonal: org.opensearch.indexmanagement uses a module listed above it, which is the healthy direction.
org.opensearch.indexmanagement uses controlcenter.notification.filter, so a change to controlcenter.notification.filter can break org.opensearch.indexmanagement, while a change to org.opensearch.indexmanagement can't break controlcenter.notification.filter.
Position
Below the diagonal: org.opensearch.indexmanagement uses a module listed above it, which is the healthy direction.
org.opensearch.indexmanagement uses indexstatemanagement, so a change to indexstatemanagement can break org.opensearch.indexmanagement, while a change to org.opensearch.indexmanagement can't break indexstatemanagement.
Position
Below the diagonal: org.opensearch.indexmanagement uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.transition uses spi.indexstatemanagement.Step, so a change to spi.indexstatemanagement.Step can break indexstatemanagement.step.transition, while a change to indexstatemanagement.step.transition can't break spi.indexstatemanagement.Step.
Position
Below the diagonal: indexstatemanagement.step.transition uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.transition uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.step.transition, while a change to indexstatemanagement.step.transition can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.step.transition uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.transition uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break indexstatemanagement.step.transition, while a change to indexstatemanagement.step.transition can't break spi.indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.step.transition uses a module listed above it, which is the healthy direction.
indexstatemanagement.step.transition uses indexstatemanagement, so a change to indexstatemanagement can break indexstatemanagement.step.transition, while a change to indexstatemanagement.step.transition can't break indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.step.transition uses a module listed above it, which is the healthy direction.
33→37 indexstatemanagement.step.transition uses indexstatemanagement.actionpart of a loop✕
Connections
1 pair of types, where a type in indexstatemanagement.step.transition uses a type in indexstatemanagement.action.
indexstatemanagement.step.transition uses indexstatemanagement.action, so a change to indexstatemanagement.action can break indexstatemanagement.step.transition, while a change to indexstatemanagement.step.transition can't break indexstatemanagement.action.
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.
indexstatemanagement.transport.action uses indexstatemanagement.util, so a change to indexstatemanagement.util can break indexstatemanagement.transport.action, while a change to indexstatemanagement.transport.action can't break indexstatemanagement.util.
Position
Below the diagonal: indexstatemanagement.transport.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.transport.action.explain uses common.model.rest, so a change to common.model.rest can break indexstatemanagement.transport.action.explain, while a change to indexstatemanagement.transport.action.explain can't break common.model.rest.
Position
Below the diagonal: indexstatemanagement.transport.action.explain uses a module listed above it, which is the healthy direction.
indexstatemanagement.transport.action.explain uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.transport.action.explain, while a change to indexstatemanagement.transport.action.explain can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.transport.action.explain uses a module listed above it, which is the healthy direction.
indexstatemanagement.transport.action.explain uses indexstatemanagement.model, so a change to indexstatemanagement.model can break indexstatemanagement.transport.action.explain, while a change to indexstatemanagement.transport.action.explain can't break indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.transport.action.explain uses a module listed above it, which is the healthy direction.
indexstatemanagement.transport.action.explain uses indexstatemanagement, so a change to indexstatemanagement can break indexstatemanagement.transport.action.explain, while a change to indexstatemanagement.transport.action.explain can't break indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.transport.action.explain uses a module listed above it, which is the healthy direction.
rollup uses common.model.dimension, so a change to common.model.dimension can break rollup, while a change to rollup can't break common.model.dimension.
Position
Below the diagonal: rollup uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses common.model.notification, so a change to common.model.notification can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break common.model.notification.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses indexstatemanagement.model.destination, so a change to indexstatemanagement.model.destination can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break indexstatemanagement.model.destination.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses rollup.model, so a change to rollup.model can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break rollup.model.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses spi.indexstatemanagement.model, so a change to spi.indexstatemanagement.model can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break spi.indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses transform.model, so a change to transform.model can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break transform.model.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses indexstatemanagement.fielddomain, so a change to indexstatemanagement.fielddomain can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break indexstatemanagement.fielddomain.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
82 pairs of types, where a type in indexstatemanagement.action uses a type in spi.indexstatemanagement. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
indexstatemanagement.action uses spi.indexstatemanagement, so a change to spi.indexstatemanagement can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break spi.indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses indexstatemanagement.model, so a change to indexstatemanagement.model can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break indexstatemanagement.model.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses indexstatemanagement.step.alias, so a change to indexstatemanagement.step.alias can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break indexstatemanagement.step.alias.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses indexstatemanagement.step.allocation, so a change to indexstatemanagement.step.allocation can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break indexstatemanagement.step.allocation.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses indexstatemanagement.step.fielddomain, so a change to indexstatemanagement.step.fielddomain can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break indexstatemanagement.step.fielddomain.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses indexstatemanagement.step.forcemerge, so a change to indexstatemanagement.step.forcemerge can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break indexstatemanagement.step.forcemerge.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses indexstatemanagement.step.rollover, so a change to indexstatemanagement.step.rollover can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break indexstatemanagement.step.rollover.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses indexstatemanagement.step.rollup, so a change to indexstatemanagement.step.rollup can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break indexstatemanagement.step.rollup.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses indexstatemanagement.step.transform, so a change to indexstatemanagement.step.transform can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break indexstatemanagement.step.transform.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses indexstatemanagement, so a change to indexstatemanagement can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break indexstatemanagement.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
indexstatemanagement.action uses indexstatemanagement.step.transition, so a change to indexstatemanagement.step.transition can break indexstatemanagement.action, while a change to indexstatemanagement.action can't break indexstatemanagement.step.transition.
Position
Below the diagonal: indexstatemanagement.action uses a module listed above it, which is the healthy direction.
snapshotmanagement.engine uses snapshotmanagement.model.SMMetadata, so a change to snapshotmanagement.model.SMMetadata can break snapshotmanagement.engine, while a change to snapshotmanagement.engine can't break snapshotmanagement.model.SMMetadata.
Position
Below the diagonal: snapshotmanagement.engine uses a module listed above it, which is the healthy direction.
snapshotmanagement.engine uses snapshotmanagement.model, so a change to snapshotmanagement.model can break snapshotmanagement.engine, while a change to snapshotmanagement.engine can't break snapshotmanagement.model.
Position
Below the diagonal: snapshotmanagement.engine uses a module listed above it, which is the healthy direction.
snapshotmanagement.engine uses org.opensearch.indexmanagement, so a change to org.opensearch.indexmanagement can break snapshotmanagement.engine, while a change to snapshotmanagement.engine can't break org.opensearch.indexmanagement.
Position
Below the diagonal: snapshotmanagement.engine uses a module listed above it, which is the healthy direction.
38→39 snapshotmanagement.engine uses snapshotmanagement.engine.statespart of a loop✕
Connections
1 pair of types, where a type in snapshotmanagement.engine uses a type in snapshotmanagement.engine.states.
snapshotmanagement.engine uses snapshotmanagement.engine.states, so a change to snapshotmanagement.engine.states can break snapshotmanagement.engine, while a change to snapshotmanagement.engine can't break snapshotmanagement.engine.states.
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.
snapshotmanagement.engine.states uses snapshotmanagement.engine, so a change to snapshotmanagement.engine can break snapshotmanagement.engine.states, while a change to snapshotmanagement.engine.states can't break snapshotmanagement.engine.
Position
Below the diagonal: snapshotmanagement.engine.states uses a module listed above it, which is the healthy direction.
snapshotmanagement uses snapshotmanagement.model.SMMetadata, so a change to snapshotmanagement.model.SMMetadata can break snapshotmanagement, while a change to snapshotmanagement can't break snapshotmanagement.model.SMMetadata.
Position
Below the diagonal: snapshotmanagement uses a module listed above it, which is the healthy direction.
snapshotmanagement uses snapshotmanagement.model, so a change to snapshotmanagement.model can break snapshotmanagement, while a change to snapshotmanagement can't break snapshotmanagement.model.
Position
Below the diagonal: snapshotmanagement uses a module listed above it, which is the healthy direction.
snapshotmanagement uses org.opensearch.indexmanagement, so a change to org.opensearch.indexmanagement can break snapshotmanagement, while a change to snapshotmanagement can't break org.opensearch.indexmanagement.
Position
Below the diagonal: snapshotmanagement uses a module listed above it, which is the healthy direction.
snapshotmanagement uses snapshotmanagement.engine.states, so a change to snapshotmanagement.engine.states can break snapshotmanagement, while a change to snapshotmanagement can't break snapshotmanagement.engine.states.
Position
Below the diagonal: snapshotmanagement uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 72.5 · Adequate · gated by X4 ·
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A05:2025 — Injection
13
High / Critical
A03:2025 — Software Supply Chain Failures
13
High / Critical
A07:2025 — Authentication Failures
4
High / Critical
Roadmap
Top priorities: Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle; 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; Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.
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.
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Resolve the 168 Orphaned file finding(s) in Knowledge Freshness — start with AttemptMoveShardsStep.kt, RollupMapperService.kt, TransformSearchService.kt.
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
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 — 15
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 — 334
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 — 240
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 10
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 48 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.
What we checked — 48 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, 577 of 589 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a coverage step in CI (`jacocoTestReport`), uploaded by `codecov/codecov-action` and a Codecov configuration (.codecov.yml, target 70%) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.kt), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored.
D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.kt) and this repository declares a JVM test suite (repository root, Gradle), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's dependency manifests WERE read and their pinning discipline assessed; what went unanswered is the currency half, because ci.opensearch.org — the registry that answers it — was asked and did not reply (the build stopped because ci.opensearch.org, a repository this project declares, refused it with HTTP 403 — what this scan's egress allowlist returns for a host that is not on it, so the dependency graph was not resolved). This is OUR side and it is an ENVIRONMENT fault, not a missing collector: the collector exists and ran. An HTTP 403 here is what this scan's egress allowlist returns for a host that is not on it, so the remedy is to add ci.opensearch.org to the allowlist and re-run — not to build anything.
D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (spi/build.gradle), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/open/AttemptOpenStep.kt`, `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt`, `src/main/kotlin/org/opensearch/indexmanagement/refreshanalyzer/TransportRefreshSearchAnalyzerAction.kt`, `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/explain/TransportExplainRollupAction.kt` 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.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Kotlin, Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Kotlin, Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 234 further occurrence(s) are not listed individually; the score already reflects all 274.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
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.
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 publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
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").
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
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.
11 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ManagedIndexRunner.runManagedIndexConfig at 39. A further 2 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 ActionValidation.validate at 20 — they are counted neither in the figure above nor in this dimension's score. 2 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: src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ActionValidation.kt (ActionValidation.validate at 20), spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/Step.kt (Step.emitTelemetry at 16). 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.
+ 6 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 11 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with ManagedIndexRunner.runManagedIndexConfig (cyclomatic 39), Rollup.parse (cyclomatic 32), Transform.parse (cyclomatic 28). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 11 together lifts Cyclomatic Complexity from 8.1 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
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.
+ 20 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 4 bodies over 30 down to 30 or less in Cognitive Complexity — start with ManagedIndexRunner.runManagedIndexConfig (cognitive 59), ManagedIndexMetaData.parse (cognitive 43), QueryStringQueryUtil.extractFieldsFromQueryString (cognitive 40). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cognitive Complexity from 6.6 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes9.5 / 10Stronggated by 7 serious findings✓ 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 3 MethodTooLong finding(s) in God Classes — start with ManagedIndexRunner.kt, IndexManagementPlugin.kt, RollupRunner.kt. — One of this dimension's main actionable groups (3 warning-level).
Resolve the 2 FileTooLong finding(s) in God Classes — start with ManagedIndexRunner.kt, IndexManagementPlugin.kt. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 TooManyMethods finding(s) in God Classes — start with ManagedIndexRunner.kt. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
85 duplicated block group(s) detected. 12.3 % of the production lines (5,123 of 41,781) are in a reported copy. A further 80 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
+ 85 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 12 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with ValidateReadOnly.kt (2), RollupMetadataService.kt (2), NotificationActionParser.kt. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 12 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with StateMetaData.kt, DateHistogram.kt, ConvertIndexToRemoteActionParser.kt. — One of this dimension's main actionable groups (12 warning-level).
Resolve the 7 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with RestAddPolicyAction.kt, RollupMapperService.kt, TransportStartRollupAction.kt. — One of this dimension's main actionable groups (7 warning-level).
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.
2 production modules (Gradle), 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.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
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 5 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 2 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. 19 further coordinate(s) are declared with no version at the declaration site — inherited from a parent POM, a BOM or an unresolved Gradle version reference — and are NOT graded: this verdict covers what the checkout pins, not the full transitive graph.
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.
Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with ManagedIndexRunner.kt. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.9 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
2 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/opensearchapi/OpenSearchExtensions.kt. Counted over 245 of the 442 production source files in this repository: 196 are under the ~2,400-byte size floor this dimension measures over, and the remaining 1 have no attributable history left to measure.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
111 deducted task-comment markers across 41781 LoC (0.3/KLoC) → score 9.5. 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 111 TodoComment finding(s) in Explicit Debt — start with RollupMapperService.kt (12), RollupMetadataService.kt (11), RollupMetadataServiceTests.kt (7). — One of this dimension's main actionable groups (111 warning-level).
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: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.
1 of 1 documentation facets pass in full. 5 document(s) read across 2 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
1 of 2 build units (Gradle) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionbuild.gradle:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with build.gradle. — 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.
2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
13 finding(s): 0 critical, 11 high, 2 medium, 0 low. 8 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 1 file(s) — `gradlew` (line 74, line 178) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 4 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 8 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (8 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
171 of 246 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/main/kotlin/org/opensearch/indexmanagement/rollup/util/RollupUtils.kt. Counted over 246 of the 442 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Most significant orphaned file · ×3src/main/kotlin/org/opensearch/indexmanagement/rollup/util/RollupUtils.kt:1
Concentrated knowledge decay
What to do
Resolve the 168 Orphaned file finding(s) in Knowledge Freshness — start with AttemptMoveShardsStep.kt, RollupMapperService.kt, TransformSearchService.kt. — One of this dimension's main actionable groups (168 recommendation-level).
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with RollupUtils.kt, RollupRunner.kt, RollupMetadataService.kt. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Concentrated knowledge decay 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 2 Change coupling finding(s) in Change Coupling — start with ManagedIndexRunner.kt, RollupInterceptor.kt. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 6 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 2 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d36_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 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 2 platform declaration(s) and 8 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.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
Other · Architecture — Whether 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.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
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.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
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.
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
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.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
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) as a CI step. What was searched, so you can tell an absence from a miss: the 14 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:4
What to do
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
What to do
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
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.
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.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document3.5 / 10Weak✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`TargetIndexMappingService.createTargetIndexMapping` is public, takes a document from its caller (line 113) and hands it to `TargetIndexMappingService.mapCompositeAggregation`, which calls itself at line 178 with a piece of `compositeAggregation` — the function is not `tailrec`, so every call is a real frame — and nowhere in `TargetIndexMappingService.mapCompositeAggregation` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25; Android's threads are smaller). kotlinx.serialization's `parseToJsonElement` accepts nested arrays to any depth and Android's built-in `org.json` sets no limit, while Jackson 2.15+ stops at 1,000 — on a cold JVM past the point the walk fails; Gson 2.12+ and Moshi stop at 255. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (e: Exception)` around the call does not stop it, and on Android an uncaught one ends the process. Thread a depth argument through `TargetIndexMappingService.mapCompositeAggregation` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`. — src/main/kotlin/org/opensearch/indexmanagement/transform/TargetIndexMappingService.kt:178
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
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 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.
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.
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. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `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.
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.
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 log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
`error` at line 189 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/IndexManagementIndices.kt:189
`error` at line 195 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/IndexManagementIndices.kt:195
`warn` at line 314 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/IndexManagementPlugin.kt:314
`error` at line 146 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/util/IndexUtils.kt:146
`error` at line 163 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/util/IndexUtils.kt:163
`error` at line 168 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/util/IndexUtils.kt:168
`error` at line 31 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/util/JobSchedulerUtils.kt:31
`warn` at line 45 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/util/JobSchedulerUtils.kt:45
`error` at line 48 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/util/JobSchedulerUtils.kt:48
`warn` at line 64 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/util/JobSchedulerUtils.kt:64
`error` at line 80 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/TargetIndexMappingService.kt:80
`error` at line 62 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/TransformIndexer.kt:62
`debug` at line 76 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/TransformIndexer.kt:76
`error` at line 101 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/TransformIndexer.kt:101
`debug` at line 58 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/TransformMetadataService.kt:58
`error` at line 95 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:95
`warn` at line 123 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:123
`warn` at line 128 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:128
`error` at line 186 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:186
`info` at line 205 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:205
`debug` at line 144 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/TransformSearchService.kt:144
`debug` at line 209 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/TransformSearchService.kt:209
`error` at line 54 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/util/TransformLockManager.kt:54
`warn` at line 69 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/util/TransformLockManager.kt:69
`warn` at line 88 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/util/TransformLockManager.kt:88
`error` at line 91 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/util/TransformLockManager.kt:91
`warn` at line 54 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/opensearchapi/OpenSearchExtensions.kt:54
`debug` at line 79 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:79
`debug` at line 80 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:80
`debug` at line 66 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:66
`debug` at line 57 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/action/preview/TransportPreviewTransformAction.kt:57
`debug` at line 84 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/TransportIndexTransformAction.kt:84
`debug` at line 55 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/TransportGetTransformAction.kt:55
`debug` at line 59 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/TransportGetTransformsAction.kt:59
`debug` at line 70 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/action/explain/TransportExplainTransformAction.kt:70
`error` at line 136 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/action/explain/TransportExplainTransformAction.kt:136
`error` at line 159 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/action/explain/TransportExplainTransformAction.kt:159
`debug` at line 72 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/transform/action/delete/TransportDeleteTransformsAction.kt:72
`warn` at line 82 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/SMRunner.kt:82
`warn` at line 87 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text. — src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/SMRunner.kt:87
Other · Code Health — Whether Kotlin's null safety is not undermined by not-null assertions — `String` cannot hold null and `String?` must be checked before use in every Kotlin module, and each `!!` is a run-time `NullPointerException` the author has told the compiler cannot happen.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 1 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 15 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 67 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's 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; this repository's Kotlin 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; this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D10 Test Quality — ~44525 lines of test source are present (.kt) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .kt suite was found but not re-run
D12 Dependency Hygiene — Dependency currency not established — ci.opensearch.org did not answer
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 4 candidate(s) found and not reported.
D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .java, .kt, .py, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D27 Navigability — symbol resolution incomplete — navigability not assessed
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) — not scanned yet).
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 4 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) — not scanned yet).
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (173 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P2 Observability — This repository's JVM, Python source (3 module(s), 437 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, Python source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@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.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
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.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — no C# was loaded; this repository's Java, Python and Kotlin were read, and no request in it can be cancelled by a caller (Ktor, OkHttp's newCall or a URL stream, from a suspend function) — a Java request off Android takes no token: it is cancelled through the handle it returns (Future.cancel, Call.cancel, a Disposable), ambiently (io.grpc.Context) or by interrupting its thread, not through a parameter; a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Kotlin request outside a suspend function has no caller's cancellation to honour
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
TodoComment src/test/kotlin/org/opensearch/indexmanagement/IndexManagementRestTestCase.kt:213— // TODO flaky: Add this log to confirm this update is missed by job scheduler — 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 src/test/kotlin/org/opensearch/indexmanagement/IndexManagementRestTestCase.kt:319— // TODO: remove PERMISSIVE option after moving system index access to REST API call — 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 src/test/kotlin/org/opensearch/indexmanagement/transform/resthandler/RestIndexTransformActionIT.kt:22— // TODO: Once GET API written, add update transform tests (required for createTransform helper) — 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 src/test/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/XContentTests.kt:39— // TODO SM test object to json string matches expected — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/RollupMapperServiceTests.kt:427— // TODO: Test scenarios: — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/runner/RollupRunnerIT.kt:1546— // TODO: Test scenarios: — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataServiceTests.kt:40— // TODO: Given the way these tests are mocking data, only entries that work with ZonedDateTime.parse — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataServiceTests.kt:684— // TODO: This test is failing with a thread leak error: "There are still zombie threads that couldn't be terminated" — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataServiceTests.kt:751— // TODO: This can be split into multiple tests if the exceptions being caught are handled — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataServiceTests.kt:779— // TODO: Test for a document timestamp before epoch — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataServiceTests.kt:780— // TODO: Test non-continuous metadata — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataServiceTests.kt:787— // TODO: Mockito 2 supposedly should be able to mock final classes but there were errors when trying to do so — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataServiceTests.kt:803— // TODO: Should change the following mock values if the result is a failed one — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment src/test/kotlin/org/opensearch/indexmanagement/rollup/RollupRestTestCase.kt:175— // TODO: can be replaced with createRandomRollup if implement assertEqual for mappings with "dynamic"=true fields — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/RollupRestTestCase.kt:182— // TODO: Maybe clean-up and use XContentFactory.jsonBuilder() to create mappings json — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/runner/RollupRunnerIT.kt:338— // TODO: Call _start to retry and test recovery behavior — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/runner/RollupRunnerIT.kt:438— // TODO: Call _start to retry and test recovery behavior? — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/runner/RollupRunnerIT.kt:442— // TODO: we are setting these jobs serially since we know concurrently running jobs can cause failures to update metadata sometimes. — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/resthandler/RestStartRollupActionIT.kt:46— // TODO: With and without metadata — 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 src/test/kotlin/org/opensearch/indexmanagement/rollup/actionfilter/FieldCapsFilterIT.kt:15— // TODO: Add assertions on fields — 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 src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/TestHelpers.kt:122— // Conditions.CRON_FIELD -> Conditions(cron = value as CronSchedule) // TODO: Uncomment after issues are fixed — 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 src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/ISMTemplateRestAPIIT.kt:114— // TODO uncomment in remove policy id — 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 src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestChangePolicyActionIT.kt:227— // TODO: get by docID could get older version of the doc which could cause flaky failure — 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 src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestChangePolicyActionIT.kt:239— // TODO: figure out why the newPolicy.lastUpdatedTime and cached policy lastUpdatedTime is off by a few milliseconds — 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 src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestChangePolicyActionIT.kt:572— // TODO: figure out why the newPolicy.lastUpdatedTime and cached policy lastUpdatedTime is off by a few milliseconds — 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.
Duplicated block (10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/NotificationActionParser.kt:32— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/NotificationActionParser.kt:32-41 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/ErrorNotification.kt:67-76 — 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 `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/NotificationActionParser.kt:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/destination/Chime.kt:50— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/destination/Chime.kt:50-59 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/destination/Slack.kt:50-59 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/destination/Chime.kt:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/forcemerge/AttemptSetReadOnlyStep.kt:45— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/forcemerge/AttemptSetReadOnlyStep.kt:45-54 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readonly/SetReadOnlyStep.kt:28-37 — 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 `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/forcemerge/AttemptSetReadOnlyStep.kt:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReadOnly.kt:46— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReadOnly.kt:46-55 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReplicaCount.kt:36-45 — 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 (10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/model/ISMRollup.kt:184— src/main/kotlin/org/opensearch/indexmanagement/rollup/model/ISMRollup.kt:184-193 | src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt:246-255 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt:403— src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt:403-412 | src/main/kotlin/org/opensearch/indexmanagement/transform/model/Transform.kt:407-416 — 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 `src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt:403` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/transform/model/ISMTransform.kt:143— src/main/kotlin/org/opensearch/indexmanagement/transform/model/ISMTransform.kt:143-152 | src/main/kotlin/org/opensearch/indexmanagement/transform/model/Transform.kt:158-167 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataService.kt:227— src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataService.kt:227-236 | src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataService.kt:281-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataService.kt:227` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupsRequest.kt:28— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupsRequest.kt:28-54 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/GetTransformsRequest.kt:31-40 — 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 `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupsRequest.kt:28` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReadOnly.kt:34— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReadOnly.kt:34-43 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReadWrite.kt:33-42 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReadOnly.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReadWrite.kt` 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. If that is what happened, the fix is to keep one copy and have the 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 (10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataService.kt:121— src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataService.kt:121-130 | src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataService.kt:167-177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/deletepolicy/TransportDeletePolicyAction.kt:89— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/deletepolicy/TransportDeletePolicyAction.kt:89-98 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/getpolicy/TransportGetPolicyAction.kt:95-104 — 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 `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/deletepolicy/TransportDeletePolicyAction.kt:89` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StateMetaData.kt:68— spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StateMetaData.kt:68-75 | src/main/kotlin/org/opensearch/indexmanagement/transform/model/TransformStats.kt:66-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 `spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StateMetaData.kt:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/DateHistogram.kt:117— src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/DateHistogram.kt:117-124 | src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Histogram.kt: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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/DateHistogram.kt:117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/DateHistogram.kt:127` calls `timeZone` and `src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Histogram.kt:105` 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) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/ConvertIndexToRemoteActionParser.kt:77— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/ConvertIndexToRemoteActionParser.kt:77-84 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/SnapshotActionParser.kt:30-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/ConvertIndexToRemoteActionParser.kt:77` 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 first that the copies are not typed on the same thing: `REPOSITORY_FIELD` names `org.opensearch.indexmanagement.indexstatemanagement.action.ConvertIndexToRemoteAction.Companion.REPOSITORY_FIELD` in one and `org.opensearch.indexmanagement.indexstatemanagement.action.SnapshotAction.Companion.REPOSITORY_FIELD` 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 (8 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateDelete.kt:41— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateDelete.kt:41-48 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateRollover.kt:96-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.
Duplicated block (8 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/IndexRollupRequest.kt:33— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/IndexRollupRequest.kt:33-40 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/IndexTransformRequest.kt:33-40 — 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 `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/IndexRollupRequest.kt:33` 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 (8 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/resthandler/RestGetRollupAction.kt:51— src/main/kotlin/org/opensearch/indexmanagement/rollup/resthandler/RestGetRollupAction.kt:51-58 | src/main/kotlin/org/opensearch/indexmanagement/transform/resthandler/RestGetTransformAction.kt:39-46 — 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 `src/main/kotlin/org/opensearch/indexmanagement/rollup/resthandler/RestGetRollupAction.kt:51` 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 first that the copies are not typed on the same thing: `DEFAULT_FROM` names `org.opensearch.indexmanagement.rollup.action.get.GetRollupsRequest.Companion.DEFAULT_FROM` in one and `org.opensearch.indexmanagement.transform.action.get.GetTransformsRequest.Companion.DEFAULT_FROM` 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 (8 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt:286— src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt:286-293 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt:342-349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt:286` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt:350` calls `parse`, `text` and `src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt:294` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupResponse.kt:41— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupResponse.kt:41-48 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/IndexRollupResponse.kt:41-48 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupResponse.kt` and `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/IndexRollupResponse.kt` as WHOLE FILES: 83% 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupResponse.kt:41` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/TransportIndexTransformAction.kt:229— src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/TransportIndexTransformAction.kt:229-236 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/preview/TransportPreviewTransformAction.kt:101-108 — 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) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/explain/ExplainRollupResponse.kt:42— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/explain/ExplainRollupResponse.kt:42-49 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/explain/ExplainSMPolicyResponse.kt:44-51 — 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) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/creation/CreationStartState.kt:18— src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/creation/CreationStartState.kt:18-25 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/deletion/DeletionStartState.kt:18-25 — 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) src/main/kotlin/org/opensearch/indexmanagement/rollup/resthandler/RestIndexRollupAction.kt:56— src/main/kotlin/org/opensearch/indexmanagement/rollup/resthandler/RestIndexRollupAction.kt:56-63 | src/main/kotlin/org/opensearch/indexmanagement/transform/resthandler/RestIndexTransformAction.kt:46-53 — 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) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestAddPolicyAction.kt:48— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestAddPolicyAction.kt:48-58 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestRetryFailedManagedIndexAction.kt:47-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestAddPolicyAction.kt:48` it begins part-way through the construct above it, so those 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) src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMapperService.kt:167— src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMapperService.kt:167-177 | src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMapperService.kt:218-228 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMapperService.kt:167` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:162— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:162-172 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:132-142 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt` and `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 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 `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:162` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:161— src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:161-171 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:137-147 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt` and `src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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 `src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/deletepolicy/DeletePolicyRequest.kt:23— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/deletepolicy/DeletePolicyRequest.kt:23-33 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/getpolicy/GetPolicyRequest.kt:38-48 — 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 (11 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateDelete.kt:72— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateDelete.kt:72-82 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateTransition.kt:35-45 — 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 (11 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/start/TransportStartSMAction.kt:82— src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/start/TransportStartSMAction.kt:82-92 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/stop/TransportStopSMAction.kt:82-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/start/TransportStartSMAction.kt:82` 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.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×6
Edited copy of a member (24 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/resthandler/RestGetRollupAction.kt:49— src/main/kotlin/org/opensearch/indexmanagement/rollup/resthandler/RestGetRollupAction.kt:49-72 | src/main/kotlin/org/opensearch/indexmanagement/transform/resthandler/RestGetTransformAction.kt:37-60 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/NotificationActionParser.kt:31— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/NotificationActionParser.kt:31-55 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/ErrorNotification.kt:66-89 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestAddPolicyAction.kt:44— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestAddPolicyAction.kt:44-67 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestRetryFailedManagedIndexAction.kt:44-73 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Histogram.kt:117— src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Histogram.kt:117-140 | src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Terms.kt:105-129 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/model/ISMRollup.kt:90— src/main/kotlin/org/opensearch/indexmanagement/rollup/model/ISMRollup.kt:90-116 | src/main/kotlin/org/opensearch/indexmanagement/transform/model/ISMTransform.kt:74-97 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (24 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMMetadata.kt:439— src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMMetadata.kt:439-462 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMMetadata.kt:607-630 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (9 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/AttemptCreateRollupJobStep.kt:160— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/AttemptCreateRollupJobStep.kt:160-168 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/transform/AttemptCreateTransformJobStep.kt:104-112 — 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 `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/AttemptCreateRollupJobStep.kt:160` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/transform/AttemptCreateTransformJobStep.kt:116` calls `TransformActionProperties` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/AttemptCreateRollupJobStep.kt:172` 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) src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/TransportGetTransformAction.kt:62— src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/TransportGetTransformAction.kt:62-70 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:73-81 — 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 `src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/TransportGetTransformAction.kt:62` 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 (9 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/alias/AttemptAliasActionsStep.kt:40— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/alias/AttemptAliasActionsStep.kt:40-48 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/replicacount/AttemptReplicaCountStep.kt:57-65 — 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 (9 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt:266— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt:266-274 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/snapshot/AttemptSnapshotStep.kt:153-161 — 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 (9 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/WaitForRollupCompletionStep.kt:95— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/WaitForRollupCompletionStep.kt:95-103 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/transform/WaitForTransformCompletionStep.kt:104-112 — 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 (9 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupResponse.kt:76— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupResponse.kt:76-84 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/GetTransformResponse.kt:57-65 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupResponse.kt:75` calls `Throws` and `src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/GetTransformResponse.kt:55` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×5
Edited copy of a member (10 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/model/RollupMetadata.kt:300— src/main/kotlin/org/opensearch/indexmanagement/rollup/model/RollupMetadata.kt:300-309 | src/main/kotlin/org/opensearch/indexmanagement/transform/model/TransformMetadata.kt:100-109 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/IndexRollupRequest.kt:31— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/IndexRollupRequest.kt:31-40 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/IndexTransformRequest.kt:31-40 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/actionfilter/FieldCapsFilter.kt:287— src/main/kotlin/org/opensearch/indexmanagement/rollup/actionfilter/FieldCapsFilter.kt:287-296 | src/main/kotlin/org/opensearch/indexmanagement/rollup/actionfilter/FieldCapsFilter.kt:299-310 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/TransportAddPolicyAction.kt:221— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/TransportAddPolicyAction.kt:221-230 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/TransportChangePolicyAction.kt:157-166 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateIndexPriority.kt:34— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateIndexPriority.kt:34-43 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateOpen.kt:33-42 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (7 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/ChangePolicy.kt:91— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/ChangePolicy.kt:91-97 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/ExplainFilter.kt:104-110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/ChangePolicy.kt:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/TransportIndexRollupAction.kt:178— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/TransportIndexRollupAction.kt:178-184 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/TransportIndexTransformAction.kt:158-164 — 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 `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/TransportIndexRollupAction.kt:178` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:87— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:87-93 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:72-78 — 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 `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMMetadata.kt:79— src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMMetadata.kt:79-85 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt:152-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 both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMMetadata.kt:79` 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, `src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt:151` calls `currentToken`, `nextToken` and `src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMMetadata.kt:77` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/model/RollupMetadata.kt:97— src/main/kotlin/org/opensearch/indexmanagement/rollup/model/RollupMetadata.kt:97-103 | src/main/kotlin/org/opensearch/indexmanagement/transform/model/TransformStats.kt:35-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionMetaData.kt:107— spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionMetaData.kt:107-148 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StateMetaData.kt:66-85 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StepMetaData.kt:78-100 | src/main/kotlin/org/opensearch/indexmanagement/transform/model/TransformStats.kt:61-89 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/TransportAddPolicyAction.kt:135— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/TransportAddPolicyAction.kt:135-160 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/TransportChangePolicyAction.kt:205-223 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/TransportRemovePolicyAction.kt:129-147 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/retryfailedmanagedindex/TransportRetryFailedManagedIndexAction.kt:134-152 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt:47— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt:47-60 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateConvertIndexToRemote.kt:54-67 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateSnapshot.kt:48-59 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateStopReplication.kt:47-60 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:189— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:189-224 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:215-241 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:190-225 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:213-238 — 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 (12 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt:198— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt:198-209 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateRollover.kt:97-108 — 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 `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt:198` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateOpen.kt:46— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateOpen.kt:46-57 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReplicaCount.kt:48-59 — 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) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/TransportGetRollupsAction.kt:84— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/TransportGetRollupsAction.kt:84-95 | src/main/kotlin/org/opensearch/indexmanagement/util/ScheduledJobUtils.kt:39-50 — 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 `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/TransportGetRollupsAction.kt:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/deletion/DeletingState.kt:37— src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/deletion/DeletingState.kt:37-48 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/deletion/DeletionConditionMetState.kt:24-35 — 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.
MethodTooLong: ManagedIndexRunner.runManagedIndexConfig src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt:306— MethodTooLong — runManagedIndexConfig runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× 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: IndexManagementPlugin.createComponents src/main/kotlin/org/opensearch/indexmanagement/IndexManagementPlugin.kt:392— MethodTooLong — createComponents runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× 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: RollupRunner.runRollupJob src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupRunner.kt:204— MethodTooLong — runRollupJob runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× 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.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/TransportChangePolicyAction.kt:387— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/TransportChangePolicyAction.kt:387-398 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/retryfailedmanagedindex/TransportRetryFailedManagedIndexAction.kt:308-319 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/start/TransportStartSMAction.kt:60— src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/start/TransportStartSMAction.kt:60-71 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/stop/TransportStopSMAction.kt:60-71 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/transform/util/TransformLockManager.kt:62— src/main/kotlin/org/opensearch/indexmanagement/transform/util/TransformLockManager.kt:62-77 | src/main/kotlin/org/opensearch/indexmanagement/util/JobSchedulerUtils.kt:57-68 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×3
Edited copy of a member (13 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/WaitForMoveShardsStep.kt:117— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/WaitForMoveShardsStep.kt:117-133 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/WaitForShrinkStep.kt:89-101 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt:792— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt:792-807 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt:992-1004 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupResponse.kt:61— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupResponse.kt:61-73 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/GetTransformResponse.kt:43-55 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (7 lines × 3) spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionMetaData.kt:116— spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionMetaData.kt:116-122 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StateMetaData.kt:70-76 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StepMetaData.kt:83-89 — 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 `spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionMetaData.kt:116` 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, `spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StepMetaData.kt:91` calls `valueOf`, `text`, `uppercase` and `spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StateMetaData.kt:78` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 3) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/destination/Chime.kt:50— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/destination/Chime.kt:50-56 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/destination/CustomWebhook.kt:104-110 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/destination/Slack.kt:50-56 — 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 `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/destination/Chime.kt:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 3) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/IndexRollupResponse.kt:71— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/IndexRollupResponse.kt:71-77 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/index/IndexSMPolicyResponse.kt:50-56 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/IndexTransformResponse.kt:54-60 — 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 (6 lines × 3) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateForceMerge.kt:34— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateForceMerge.kt:34-39 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReadOnly.kt:46-51 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReplicaCount.kt:36-41 — 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 `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateForceMerge.kt:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:76— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:76-81 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:88-93 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:73-78 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt` and `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 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 `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt:61— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt:61-66 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/delete/AttemptDeleteStep.kt:57-62 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/searchonly/AttemptSearchOnlyStep.kt:80-85 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/delete/AttemptDeleteStep.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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.
FileTooLong: indexstatemanagement/ManagedIndexRunner.kt src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt— FileTooLong — 742 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 242 over it, 1.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: indexmanagement/IndexManagementPlugin.kt src/main/kotlin/org/opensearch/indexmanagement/IndexManagementPlugin.kt— FileTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: IndexManagementPlugin (210-664). The bar is 500 significant lines; this is 94 over it, 1.19× 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.
Change coupling: ManagedIndexRunner.kt ↔ OpenSearchExtensions.kt src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt:1— `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/opensearchapi/OpenSearchExtensions.kt` change together 58% of the time (14 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 14 shared commits counted here, the most recent 3 are `16a6d051` fix(ism): Reconcile policy version mismatches instead of failing the …; `8420090a` fix(ism): Skip initialization of jobs whose document was deleted (#1743); `b7dcd7a9` Refactor change policy API and the policy in managed index to be non-… — run `git show` on any of them.
Change coupling: RollupInterceptor.kt ↔ RollupUtils.kt src/main/kotlin/org/opensearch/indexmanagement/rollup/interceptor/RollupInterceptor.kt:1— `src/main/kotlin/org/opensearch/indexmanagement/rollup/interceptor/RollupInterceptor.kt` and `src/main/kotlin/org/opensearch/indexmanagement/rollup/util/RollupUtils.kt` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — 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 7 shared commits counted here, the most recent 3 are `7c85c9c0` Adding Cardinality as supported metric for Rollups (#1567); `db0425d1` Adding support for multi-tier rollups in ISM (#1533); `3de566e3` added support for QueryStringQuery in rollups (#616) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (37 corresponding lines) · ×2
Edited copy of a member (37 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:171— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:171-213 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:175-211 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (37 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/creation/CreationConditionMetState.kt:20— src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/creation/CreationConditionMetState.kt:20-60 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/deletion/DeletionConditionMetState.kt:21-57 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×2
Edited copy of a member (34 corresponding lines) spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionProperties.kt:63— spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionProperties.kt:63-96 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/coordinator/SweptManagedIndexConfig.kt:36-74 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (34 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:117— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:117-150 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:118-151 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (33 corresponding lines) · ×2
Edited copy of a member (33 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/ChangePolicy.kt:84— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/ChangePolicy.kt:84-125 | src/main/kotlin/org/opensearch/indexmanagement/rollup/model/RollupMetrics.kt:105-137 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (33 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/TransportChangePolicyAction.kt:226— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/TransportChangePolicyAction.kt:226-258 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/retryfailedmanagedindex/TransportRetryFailedManagedIndexAction.kt:154-186 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (23 corresponding lines) · ×2
Edited copy of a member (23 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/resthandler/RestIndexRollupAction.kt:54— src/main/kotlin/org/opensearch/indexmanagement/rollup/resthandler/RestIndexRollupAction.kt:54-76 | src/main/kotlin/org/opensearch/indexmanagement/transform/resthandler/RestIndexTransformAction.kt:44-66 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (23 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/AliasActionParser.kt:27— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/AliasActionParser.kt:27-49 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/PublishFieldDomainsActionParser.kt:30-52 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (31 corresponding lines) · ×2
Edited copy of a member (31 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/deletepolicy/TransportDeletePolicyAction.kt:81— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/deletepolicy/TransportDeletePolicyAction.kt:81-111 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/delete/TransportDeleteRollupAction.kt:79-109 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (31 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/opensearchapi/OpenSearchExtensions.kt:90— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/opensearchapi/OpenSearchExtensions.kt:90-122 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/opensearchapi/OpenSearchExtensions.kt:168-198 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/TransportAddPolicyAction.kt:232— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/TransportAddPolicyAction.kt:232-252 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/TransportChangePolicyAction.kt:169-189 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/Transition.kt:54— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/Transition.kt:54-74 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/NotificationConfig.kt:113-133 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×2
Edited copy of a member (20 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/SMUtils.kt:69— src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/SMUtils.kt:69-88 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/SMUtils.kt:91-112 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (20 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt:195— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt:195-215 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateRollover.kt:95-114 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×2
Edited copy of a member (27 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:287— src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:287-314 | src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:321-347 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (27 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/forcemerge/AttemptSetReadOnlyStep.kt:44— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/forcemerge/AttemptSetReadOnlyStep.kt:44-70 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt:248-275 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×2
Edited copy of a member (18 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateDelete.kt:52— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateDelete.kt:52-69 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateRollover.kt:76-93 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/common/model/notification/Channel.kt:53— src/main/kotlin/org/opensearch/indexmanagement/common/model/notification/Channel.kt:53-70 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/fielddomain/FieldDomainConfig.kt:50-70 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×2
Edited copy of a member (17 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/creation/CreatingState.kt:97— src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/creation/CreatingState.kt:97-113 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/deletion/DeletingState.kt:99-115 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/model/RollupMetadata.kt:57— src/main/kotlin/org/opensearch/indexmanagement/rollup/model/RollupMetadata.kt:57-76 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMMetadata.kt:354-370 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×2
Edited copy of a member (14 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/resthandler/RestIndexRollupAction.kt:78— src/main/kotlin/org/opensearch/indexmanagement/rollup/resthandler/RestIndexRollupAction.kt:78-91 | src/main/kotlin/org/opensearch/indexmanagement/transform/resthandler/RestIndexTransformAction.kt:68-81 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateDelete.kt:85— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateDelete.kt:85-98 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateTransition.kt:47-61 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×2
Edited copies of one member (4 members, 9+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/fielddomain/AttemptPublishFieldDomainsStep.kt:154— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/fielddomain/AttemptPublishFieldDomainsStep.kt:154-162 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/indexpriority/AttemptSetIndexPriorityStep.kt:58-66 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt:246-254 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt:256-264 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 9+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/forcemerge/AttemptCallForceMergeStep.kt:95— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/forcemerge/AttemptCallForceMergeStep.kt:95-105 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/AttemptCreateRollupJobStep.kt:170-178 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/WaitForRollupCompletionStep.kt:105-120 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/transform/AttemptCreateTransformJobStep.kt:114-123 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×2
Edited copy of a member (9 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/util/ManagedIndexUtils.kt:126— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/util/ManagedIndexUtils.kt:126-137 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/util/RestHandlerUtils.kt:110-118 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/alias/AttemptAliasActionsStep.kt:54— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/alias/AttemptAliasActionsStep.kt:54-62 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/allocation/AttemptAllocationStep.kt:57-65 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×2
Edited copy of a member (6 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Histogram.kt:43— src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Histogram.kt:43-49 | src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Terms.kt:38-43 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (6 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/AttemptCreateRollupJobStep.kt:146— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/AttemptCreateRollupJobStep.kt:146-151 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/stopreplication/AttemptStopReplicationStep.kt:61-66 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/TransportIndexRollupAction.kt:191— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/TransportIndexRollupAction.kt:191-203 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/TransportIndexTransformAction.kt:171-183 — 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 `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/TransportIndexRollupAction.kt:191` 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 (13 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/TransportRemovePolicyAction.kt:350— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/TransportRemovePolicyAction.kt:350-363 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/TransportRemovePolicyAction.kt:398-410 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/TransportRemovePolicyAction.kt:350` 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.
ManagedIndexRunner.runManagedIndexConfig (cyclomatic 39) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt:306— ManagedIndexRunner.runManagedIndexConfig has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Rollup.parse (cyclomatic 32) src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt:307— Rollup.parse has cyclomatic complexity 32 (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.
Transform.parse (cyclomatic 28) src/main/kotlin/org/opensearch/indexmanagement/transform/model/Transform.kt:312— Transform.parse has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
RollupRunner.runRollupJob (cyclomatic 27) src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupRunner.kt:204— RollupRunner.runRollupJob has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ManagedIndexMetaData.parse (cyclomatic 27) spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ManagedIndexMetaData.kt:232— ManagedIndexMetaData.parse 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.
SMPolicy.parse (cyclomatic 26) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt:133— SMPolicy.parse 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.
ManagedIndexConfig.parse (cyclomatic 23) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/ManagedIndexConfig.kt:105— ManagedIndexConfig.parse 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.
QueryStringQueryUtil.extractFieldsFromQueryString (cyclomatic 19) src/main/kotlin/org/opensearch/indexmanagement/rollup/query/QueryStringQueryUtil.kt:96— QueryStringQueryUtil.extractFieldsFromQueryString 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.
Policy.parse (cyclomatic 18) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/Policy.kt:167— Policy.parse has cyclomatic complexity 18 (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.
RollupInterceptor.getQueryMetadata (cyclomatic 17) src/main/kotlin/org/opensearch/indexmanagement/rollup/interceptor/RollupInterceptor.kt:325— RollupInterceptor.getQueryMetadata 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.
RollupUtilsKt.rewriteSearchSourceBuilder (cyclomatic 17) src/main/kotlin/org/opensearch/indexmanagement/rollup/util/RollupUtils.kt:642— RollupUtilsKt.rewriteSearchSourceBuilder 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.
Hotspot: src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt:306— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in ManagedIndexRunner.runManagedIndexConfig at line 306. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 19:23:50 -08:00' --until='2026-11-10 19:23:50 -08:00' --full-history --no-merges -- src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
ManagedIndexRunner.runManagedIndexConfig (cognitive 59) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt:306— ManagedIndexRunner.runManagedIndexConfig has cognitive complexity 59 (threshold 15). Drivers by points: if/else 32 (52 pts), boolean chains 7 (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.
ManagedIndexMetaData.parse (cognitive 43) spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ManagedIndexMetaData.kt:232— ManagedIndexMetaData.parse has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (40 pts), match/switch 1 (2 pts), 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.
QueryStringQueryUtil.extractFieldsFromQueryString (cognitive 40) src/main/kotlin/org/opensearch/indexmanagement/rollup/query/QueryStringQueryUtil.kt:96— QueryStringQueryUtil.extractFieldsFromQueryString has cognitive complexity 40 (threshold 15). Drivers by points: if/else 30 (39 pts), error handling 1 (nesting depth added 9). 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.
RollupRunner.runRollupJob (cognitive 37) src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupRunner.kt:204— RollupRunner.runRollupJob has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 7 (15 pts), if/else 8 (11 pts), error handling 3 (7 pts), loops 2 (3 pts), boolean chains 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.
Policy.parse (cognitive 28) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/Policy.kt:167— Policy.parse has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (9 pts), match/switch 2 (6 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.
Rollup.parse (cognitive 28) src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt:307— Rollup.parse has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 4 (10 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.
LRONConfig.parse (cognitive 27) src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/model/LRONConfig.kt:127— LRONConfig.parse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 2 (5 pts), match/switch 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.
ManagedIndexConfig.parse (cognitive 27) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/ManagedIndexConfig.kt:105— ManagedIndexConfig.parse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 1 (2 pts), boolean chains 1, 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.
ExplainHandler.buildResponse (cognitive 26) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/explain/TransportExplainAction.kt:344— ExplainHandler.buildResponse has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 2, 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.
AttemptRolloverStep.copyAlias (cognitive 25) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt:344— AttemptRolloverStep.copyAlias has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (22 pts), error handling 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.
AttemptSearchOnlyStep.execute (cognitive 25) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/searchonly/AttemptSearchOnlyStep.kt:24— AttemptSearchOnlyStep.execute has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 4 (8 pts), match/switch 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.
TransformRunner.executeJob (cognitive 25) src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:103— TransformRunner.executeJob has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, match/switch 1 (2 pts), error handling 1, 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.
Transform.parse (cognitive 21) src/main/kotlin/org/opensearch/indexmanagement/transform/model/Transform.kt:312— Transform.parse has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (7 pts), boolean chains 2, match/switch 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.
SMPolicy.parse (cognitive 20) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMPolicy.kt:133— SMPolicy.parse 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.
ISMTemplateServiceKt.validateFormat (cognitive 19) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ISMTemplateService.kt:23— ISMTemplateServiceKt.validateFormat has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 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.
AttemptRestoreStep.execute (cognitive 19) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt:43— AttemptRestoreStep.execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 3, boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AttemptTransitionStep.execute (cognitive 19) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/transition/AttemptTransitionStep.kt:39— AttemptTransitionStep.execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), error handling 2, 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.
RollupUtilsKt.getRollupJobs (cognitive 19) src/main/kotlin/org/opensearch/indexmanagement/rollup/util/RollupUtils.kt:365— RollupUtilsKt.getRollupJobs has cognitive complexity 19 (threshold 15). Drivers by points: loops 3 (9 pts), match/switch 2 (6 pts), if/else 4 (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.
SMStateMachine.next (cognitive 18) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/SMStateMachine.kt:53— SMStateMachine.next has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 2, error handling 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.
IndexUtils.getSchemaVersion (cognitive 18) src/main/kotlin/org/opensearch/indexmanagement/util/IndexUtils.kt:53— IndexUtils.getSchemaVersion has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 2 (5 pts), match/switch 1 (5 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.
RollupMetadataService.init (cognitive 17) src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataService.kt:64— RollupMetadataService.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (7 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.
AttemptRolloverStep.executeRollover (cognitive 16) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt:278— AttemptRolloverStep.executeRollover has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 2 (4 pts), error handling 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.
RollupRunner.runJob (cognitive 16) src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupRunner.kt:139— RollupRunner.runJob has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (4 pts), error handling 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.
RollupInterceptor.interceptHandler (cognitive 16) src/main/kotlin/org/opensearch/indexmanagement/rollup/interceptor/RollupInterceptor.kt:146— RollupInterceptor.interceptHandler has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 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.
RollupUtilsKt.rewriteSearchSourceBuilder (cognitive 16) src/main/kotlin/org/opensearch/indexmanagement/rollup/util/RollupUtils.kt:642— RollupUtilsKt.rewriteSearchSourceBuilder has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. 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.
TooManyMethods: ManagedIndexRunner src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt:122— TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.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.
ClassTooLong: SMMetadata src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMMetadata.kt:39— ClassTooLong — 464 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 64 over it, 1.16× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication· Members sharing a duplicated core (15 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (15 members, 50+ identical tokens) spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/AliasActionMetrics.kt:40— spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/AliasActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/AllocationActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/CloseActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/DeleteActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/ForceMergeActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/MoveShardActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/NotificationActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/OpenActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/ReplicaCountActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/RolloverActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/SetIndexPriorityActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/SetReadOnlyActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/ShrinkActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/SnapshotActionMetrics.kt:40-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/TransitionActionMetrics.kt:40-52 — These 15 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 15 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 15 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionMetaData.kt:94— spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionMetaData.kt:94-104 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/PolicyRetryInfoMetaData.kt:54-64 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StateMetaData.kt:54-64 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StepMetaData.kt:66-76 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ValidationResult.kt:59-69 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (128 corresponding lines) · ×1
Edited copy of a member (128 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt:312— src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt:312-439 | src/main/kotlin/org/opensearch/indexmanagement/transform/model/Transform.kt:317-444 — These two members are one piece of code written twice and then edited apart: 128 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataService.kt:194— src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataService.kt:194-241 | src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataService.kt:250-295 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (68 corresponding lines) · ×1
Edited copy of a member (68 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/filter/parser/OpenIndexRespParser.kt:35— src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/filter/parser/OpenIndexRespParser.kt:35-103 | src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/filter/parser/ResizeIndexRespParser.kt:37-104 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×1
Edited copy of a member (38 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/model/RollupMetadata.kt:244— src/main/kotlin/org/opensearch/indexmanagement/rollup/model/RollupMetadata.kt:244-281 | src/main/kotlin/org/opensearch/indexmanagement/transform/model/TransformMetadata.kt:130-180 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (63 corresponding lines) · ×1
Edited copy of a member (63 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/util/RollupUtils.kt:188— src/main/kotlin/org/opensearch/indexmanagement/rollup/util/RollupUtils.kt:188-252 | src/main/kotlin/org/opensearch/indexmanagement/rollup/util/RollupUtils.kt:274-336 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/TransportIndexRollupAction.kt:174— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/TransportIndexRollupAction.kt:174-203 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/TransportIndexTransformAction.kt:154-183 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/transform/TransformSearchService.kt:130— src/main/kotlin/org/opensearch/indexmanagement/transform/TransformSearchService.kt:130-170 | src/main/kotlin/org/opensearch/indexmanagement/transform/TransformSearchService.kt:184-237 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 43+ corresponding lines) · ×1
Edited copies of one member (5 members, 43+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/TransportGetRollupAction.kt:54— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/TransportGetRollupAction.kt:54-98 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:68-114 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:79-121 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:65-112 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:78-122 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 43 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 32+ corresponding lines) · ×1
Edited copies of one member (3 members, 32+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt:24— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt:24-59 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/delete/AttemptDeleteStep.kt:24-55 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/stopreplication/AttemptStopReplicationStep.kt:25-59 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 32 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 34+ corresponding lines) · ×1
Edited copies of one member (4 members, 34+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:152— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:152-187 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:123-156 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:153-188 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:128-161 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 34 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 26+ corresponding lines) · ×1
Edited copies of one member (5 members, 26+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/indexpriority/AttemptSetIndexPriorityStep.kt:27— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/indexpriority/AttemptSetIndexPriorityStep.kt:27-56 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/open/AttemptOpenStep.kt:23-48 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readonly/SetReadOnlyStep.kt:25-53 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readwrite/SetReadWriteStep.kt:25-55 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/replicacount/AttemptReplicaCountStep.kt:27-55 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×1
Edited copy of a member (25 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/start/TransportStartSMAction.kt:73— src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/start/TransportStartSMAction.kt:73-97 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/stop/TransportStopSMAction.kt:73-98 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/TransportIndexRollupAction.kt:132— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/TransportIndexRollupAction.kt:132-161 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/TransportIndexTransformAction.kt:120-141 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×1
Edited copy of a member (11 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/actionfilter/FieldCapsFilter.kt:340— src/main/kotlin/org/opensearch/indexmanagement/rollup/actionfilter/FieldCapsFilter.kt:340-350 | src/main/kotlin/org/opensearch/indexmanagement/rollup/actionfilter/FieldCapsFilter.kt:352-362 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/AttemptCreateRollupJobStep.kt:153— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/AttemptCreateRollupJobStep.kt:153-168 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/transform/AttemptCreateTransformJobStep.kt:97-112 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 28+ corresponding lines) · ×1
Edited copies of one member (3 members, 28+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/TransportChangePolicyAction.kt:128— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/TransportChangePolicyAction.kt:128-155 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/TransportRemovePolicyAction.kt:100-127 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/retryfailedmanagedindex/TransportRetryFailedManagedIndexAction.kt:105-132 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/ForceMergeActionParser.kt:22— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/ForceMergeActionParser.kt:22-40 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/IndexPriorityActionParser.kt:22-40 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/ReplicaCountActionParser.kt:21-39 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/IndexStateManagementHistory.kt:225— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/IndexStateManagementHistory.kt:225-245 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/IndexStateManagementHistory.kt:248-266 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestRemovePolicyAction.kt:42— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/resthandler/RestRemovePolicyAction.kt:42-56 | src/main/kotlin/org/opensearch/indexmanagement/refreshanalyzer/RestRefreshSearchAnalyzerAction.kt:40-55 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×1
Edited copies of one member (3 members, 15+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupsResponse.kt:55— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupsResponse.kt:55-69 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/get/GetSMPoliciesResponse.kt:36-50 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/GetTransformsResponse.kt:42-56 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 15+ corresponding lines) · ×1
Edited copies of one member (4 members, 15+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/StateFilter.kt:32— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/StateFilter.kt:32-46 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/destination/Chime.kt:49-65 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/destination/Slack.kt:49-65 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMMetadata.kt:304-323 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/RollupAction.kt:32— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/RollupAction.kt:32-48 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/SnapshotAction.kt:33-49 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/TransformAction.kt:32-48 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt:234— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt:234-244 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/AttemptMoveShardsStep.kt:181-192 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/snapshot/AttemptSnapshotStep.kt:141-151 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×1
Edited copy of a member (7 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/NotificationAction.kt:38— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/NotificationAction.kt:38-44 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/ErrorNotification.kt:34-41 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×1
Edited copy of a member (8 corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/deletepolicy/TransportDeletePolicyAction.kt:113— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/deletepolicy/TransportDeletePolicyAction.kt:113-121 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/delete/TransportDeleteRollupAction.kt:111-118 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 4+ corresponding lines) · ×1
Edited copies of one member (3 members, 4+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/opensearchapi/OpenSearchExtensions.kt:145— src/main/kotlin/org/opensearch/indexmanagement/opensearchapi/OpenSearchExtensions.kt:145-154 | src/main/kotlin/org/opensearch/indexmanagement/rollup/util/RollupUtils.kt:693-701 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/SMUtils.kt:114-117 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 5+ corresponding lines) · ×1
Edited copies of one member (5 members, 5+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/rollup/model/metric/Average.kt:36— src/main/kotlin/org/opensearch/indexmanagement/rollup/model/metric/Average.kt:36-40 | src/main/kotlin/org/opensearch/indexmanagement/rollup/model/metric/Max.kt:36-40 | src/main/kotlin/org/opensearch/indexmanagement/rollup/model/metric/Min.kt:36-40 | src/main/kotlin/org/opensearch/indexmanagement/rollup/model/metric/Sum.kt:36-40 | src/main/kotlin/org/opensearch/indexmanagement/rollup/model/metric/ValueCount.kt:36-40 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×1
Edited copy of a member (4 corresponding lines) spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/Utils.kt:15— spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/Utils.kt:15-18 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/opensearchapi/OpenSearchExtensions.kt:263-266 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 7+ corresponding lines) · ×1
Edited copies of one member (4 members, 7+ corresponding lines) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/getpolicy/GetPolicyResponse.kt:56— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/getpolicy/GetPolicyResponse.kt:56-62 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/index/IndexRollupResponse.kt:61-68 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/get/GetSMPolicyResponse.kt:38-44 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/IndexTransformResponse.kt:44-51 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (31 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/filter/parser/OpenIndexRespParser.kt:73— src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/filter/parser/OpenIndexRespParser.kt:73-103 | src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/filter/parser/ResizeIndexRespParser.kt:74-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/filter/parser/OpenIndexRespParser.kt:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `response` to `OpenIndexResponse?` in one and `ResizeResponse?` 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 (21–22 lines × 3) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt:38— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt:38-59 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/delete/AttemptDeleteStep.kt:34-55 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/stopreplication/AttemptStopReplicationStep.kt:39-59 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/delete/AttemptDeleteStep.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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 `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt:38` 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 (20 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:76— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:76-95 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:88-107 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt` and `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 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 `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:76` 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 (17 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:77— src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:77-93 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:92-108 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt` and `src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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 `src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:77` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:91` calls `Suppress` and `src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:76` 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) spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ManagedIndexMetaData.kt:209— spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ManagedIndexMetaData.kt:209-224 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ManagedIndexMetaData.kt:303-318 — both copies are in the same file, so extract the 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 `spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ManagedIndexMetaData.kt:209` 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–15 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/RolloverActionParser.kt:50— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/RolloverActionParser.kt:50-64 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/RolloverConditionGroup.kt:75-88 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/RolloverActionParser.kt:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–14 lines × 4) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:212— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:212-224 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:229-241 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:213-225 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:225-238 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt` and `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 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 `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:212` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt:211` calls `routing`, `update` and `src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:225` 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–14 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readonly/SetReadOnlyStep.kt:33— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readonly/SetReadOnlyStep.kt:33-45 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readwrite/SetReadWriteStep.kt:34-47 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readonly/SetReadOnlyStep.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readwrite/SetReadWriteStep.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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 `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readwrite/SetReadWriteStep.kt:34` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/creation/CreatingState.kt:33— src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/creation/CreatingState.kt:33-46 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/creation/CreationConditionMetState.kt:21-34 — 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 (11–13 lines × 4) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt:48— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt:48-60 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateConvertIndexToRemote.kt:55-67 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateSnapshot.kt:49-59 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateStopReplication.kt:48-60 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateSnapshot.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 × 3) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/open/AttemptOpenStep.kt:33— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/open/AttemptOpenStep.kt:33-45 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readonly/SetReadOnlyStep.kt:38-50 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readwrite/SetReadWriteStep.kt:40-52 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/open/AttemptOpenStep.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readonly/SetReadOnlyStep.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 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 `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/open/AttemptOpenStep.kt:33` it begins part-way through the construct above it, so those exact lines 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 × 7) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt:36— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt:36-45 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/delete/AttemptDeleteStep.kt:32-41 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/open/AttemptOpenStep.kt:32-41 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readonly/SetReadOnlyStep.kt:37-46 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readwrite/SetReadWriteStep.kt:39-48 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/searchonly/AttemptSearchOnlyStep.kt:48-57 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/stopreplication/AttemptStopReplicationStep.kt:35-46 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/delete/AttemptDeleteStep.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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 `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt:36` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 5) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/indexpriority/AttemptSetIndexPriorityStep.kt:45— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/indexpriority/AttemptSetIndexPriorityStep.kt:45-56 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/open/AttemptOpenStep.kt:37-48 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readonly/SetReadOnlyStep.kt:42-53 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readwrite/SetReadWriteStep.kt:44-55 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/snapshot/WaitForSnapshotStep.kt:67-78 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/open/AttemptOpenStep.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readonly/SetReadOnlyStep.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 51 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 `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/indexpriority/AttemptSetIndexPriorityStep.kt:45` 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–12 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/transform/model/ISMTransform.kt:181— src/main/kotlin/org/opensearch/indexmanagement/transform/model/ISMTransform.kt:181-191 | src/main/kotlin/org/opensearch/indexmanagement/transform/model/Transform.kt:359-370 — 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–11 lines × 3) src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/TransportGetTransformAction.kt:73— src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/TransportGetTransformAction.kt:73-82 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:83-93 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:98-108 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt` and `src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 53 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 (8–10 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupIndexer.kt:76— src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupIndexer.kt:76-83 | src/main/kotlin/org/opensearch/indexmanagement/transform/TransformIndexer.kt:83-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/transform/TransformIndexer.kt:83` 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 × 15) spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/AliasActionMetrics.kt:42— spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/AliasActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/AllocationActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/CloseActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/DeleteActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/ForceMergeActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/MoveShardActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/NotificationActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/OpenActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/ReplicaCountActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/RolloverActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/SetIndexPriorityActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/SetReadOnlyActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/ShrinkActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/SnapshotActionMetrics.kt:42-52 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/TransitionActionMetrics.kt:42-52 — 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 15 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/metrics/actionmetrics/AliasActionMetrics.kt:42` 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 (9 lines × 5) spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionMetaData.kt:96— spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionMetaData.kt:96-104 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/PolicyRetryInfoMetaData.kt:56-64 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StateMetaData.kt:56-64 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/StepMetaData.kt:68-76 | spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ValidationResult.kt:61-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionMetaData.kt:96` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/ActionMetaData.kt:106` calls `Suppress` and `spi/src/main/kotlin/org.opensearch.indexmanagement.spi/indexstatemanagement/model/PolicyRetryInfoMetaData.kt:66` 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 (9 lines × 4) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/TransportAddPolicyAction.kt:137— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/TransportAddPolicyAction.kt:137-145 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/TransportChangePolicyAction.kt:206-214 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/TransportRemovePolicyAction.kt:130-138 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/retryfailedmanagedindex/TransportRetryFailedManagedIndexAction.kt:135-143 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/TransportAddPolicyAction.kt:137` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8–9 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Histogram.kt:89— src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Histogram.kt:89-97 | src/main/kotlin/org/opensearch/indexmanagement/rollup/interceptor/RollupInterceptor.kt:514-521 — 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 `src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Histogram.kt:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 3) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/SnapshotActionParser.kt:27— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/SnapshotActionParser.kt:27-35 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/model/destination/CustomWebhook.kt:103-110 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMMetadata.kt:305-313 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/SnapshotActionParser.kt:27` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/SnapshotActionParser.kt:38` calls `IllegalArgumentException` and `src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/model/SMMetadata.kt:316` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/action/index/TransportIndexLRONConfigAction.kt:124— src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/action/index/TransportIndexLRONConfigAction.kt:124-129 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/TransportIndexTransformAction.kt:162-167 — 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 `src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/action/index/TransportIndexLRONConfigAction.kt:124` 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 (21 lines × 6) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/StartRollupRequest.kt:21— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/StartRollupRequest.kt:21-41 | src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/StopRollupRequest.kt:21-41 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/start/StartSMRequest.kt:21-41 | src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/api/transport/stop/StopSMRequest.kt:21-41 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/StartTransformRequest.kt:21-41 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/StopTransformRequest.kt:21-41 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/StartRollupRequest.kt` and `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/StopRollupRequest.kt` as WHOLE FILES: 92% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. 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 (19 lines × 2) src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupRequest.kt:25— src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupRequest.kt:25-56 | src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/GetTransformRequest.kt:28-46 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupRequest.kt` and `src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/GetTransformRequest.kt` as WHOLE FILES: 83% 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. Read the line range as the matched WINDOW rather than a finished unit: at `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/GetRollupRequest.kt:25` it begins part-way through the construct above it, so those exact lines 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 × 15) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/alias/AttemptAliasActionsStep.kt:64— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/alias/AttemptAliasActionsStep.kt:64-68 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/allocation/AttemptAllocationStep.kt:67-71 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt:78-82 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/delete/AttemptDeleteStep.kt:74-78 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/fielddomain/AttemptPublishFieldDomainsStep.kt:164-168 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/forcemerge/AttemptSetReadOnlyStep.kt:83-87 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/indexpriority/AttemptSetIndexPriorityStep.kt:68-72 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/notification/AttemptNotificationStep.kt:53-57 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/open/AttemptOpenStep.kt:60-64 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readonly/SetReadOnlyStep.kt:65-69 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readwrite/SetReadWriteStep.kt:67-71 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/replicacount/AttemptReplicaCountStep.kt:67-71 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/searchonly/AttemptSearchOnlyStep.kt:112-116 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/snapshot/WaitForSnapshotStep.kt:102-106 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/stopreplication/AttemptStopReplicationStep.kt:78-82 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/delete/AttemptDeleteStep.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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 × 14) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/allocation/AttemptAllocationStep.kt:47— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/allocation/AttemptAllocationStep.kt:47-55 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt:68-76 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/delete/AttemptDeleteStep.kt:64-72 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/forcemerge/AttemptCallForceMergeStep.kt:85-93 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/forcemerge/AttemptSetReadOnlyStep.kt:72-80 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/notification/AttemptNotificationStep.kt:43-51 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/open/AttemptOpenStep.kt:50-58 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readonly/SetReadOnlyStep.kt:55-63 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/readwrite/SetReadWriteStep.kt:57-65 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/searchonly/AttemptSearchOnlyStep.kt:102-110 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/snapshot/AttemptSnapshotStep.kt:126-134 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/snapshot/WaitForSnapshotStep.kt:80-88 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/stopreplication/AttemptStopReplicationStep.kt:68-76 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/transition/AttemptTransitionStep.kt:153-161 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/close/AttemptCloseStep.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/delete/AttemptDeleteStep.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 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 (12 lines × 3) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/AttemptShrinkStep.kt:125— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/AttemptShrinkStep.kt:125-136 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/WaitForMoveShardsStep.kt:99-110 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/WaitForShrinkStep.kt:162-173 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/WaitForMoveShardsStep.kt:97` calls `getGenericFailureMessage` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/AttemptShrinkStep.kt:123` 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 (13 lines × 4) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/AddPolicyRequest.kt:28— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/AddPolicyRequest.kt:28-40 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/ChangePolicyRequest.kt:29-41 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/RemovePolicyRequest.kt:26-38 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/retryfailedmanagedindex/RetryFailedManagedIndexRequest.kt:31-43 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/AddPolicyRequest.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/RemovePolicyRequest.kt` as WHOLE FILES: 89% 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/AddPolicyRequest.kt:24` calls `readString` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/RemovePolicyRequest.kt:22` 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 × 3) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt:26— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt:26-34 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateSnapshot.kt:26-34 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateStopReplication.kt:26-34 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateSnapshot.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (10 lines × 3) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt:36— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt:36-45 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateSnapshot.kt:36-45 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateStopReplication.kt:36-45 — before extracting anything, compare `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt` and `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateSnapshot.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 × 7) src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/CloseActionParser.kt:20— src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/CloseActionParser.kt:20-25 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/DeleteActionParser.kt:20-25 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/OpenActionParser.kt:20-25 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/ReadOnlyActionParser.kt:20-25 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/ReadWriteActionParser.kt:20-25 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/SearchOnlyActionParser.kt:20-25 | src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/StopReplicationActionParser.kt:20-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 7 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×1
Recursive walk over a caller-supplied document has no depth cap src/main/kotlin/org/opensearch/indexmanagement/transform/TargetIndexMappingService.kt:178— `TargetIndexMappingService.createTargetIndexMapping` is public, takes a document from its caller (line 113) and hands it to `TargetIndexMappingService.mapCompositeAggregation`, which calls itself at line 178 with a piece of `compositeAggregation` — the function is not `tailrec`, so every call is a real frame — and nowhere in `TargetIndexMappingService.mapCompositeAggregation` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. On the JVM's default 1 MB thread stack a recursive walk throws `StackOverflowError` from about 500–2,000 levels on a cold first call and 6,000–17,000 once warmed up (OpenJDK 21 and 25; Android's threads are smaller). kotlinx.serialization's `parseToJsonElement` accepts nested arrays to any depth and Android's built-in `org.json` sets no limit, while Jackson 2.15+ stops at 1,000 — on a cold JVM past the point the walk fails; Gson 2.12+ and Moshi stop at 255. `StackOverflowError` is an `Error`, not an `Exception`: a `catch (e: Exception)` around the call does not stop it, and on Android an uncaught one ends the process. Thread a depth argument through `TargetIndexMappingService.mapCompositeAggregation` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack or a `DeepRecursiveFunction`.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/AttemptMoveShardsStep.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMapperService.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/transform/TransformSearchService.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/util/ManagedIndexUtils.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/transform/model/Transform.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/simulate/TransportSimulatePolicyAction.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/rollup/actionfilter/FieldCapsFilter.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/IndexStateManagementHistory.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/filter/NotificationActionListener.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/rollup/model/RollupMetadata.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/rollup/query/QueryStringQueryUtil.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/transform/action/index/TransportIndexTransformAction.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/transform/action/explain/TransportExplainTransformAction.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/transform/action/stop/TransportStopTransformAction.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/transform/TargetIndexMappingService.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupIndexer.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/transform/action/start/TransportStartTransformAction.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/util/IndexUtils.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/util/StepUtils.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollup/AttemptCreateRollupJobStep.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/IndexManagementIndices.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupSearchService.kt: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.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/IndexManagementIndices.kt:189— `error` at line 189 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/IndexManagementIndices.kt:195— `error` at line 195 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/IndexManagementPlugin.kt:314— `warn` at line 314 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/util/IndexUtils.kt:146— `error` at line 146 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/util/IndexUtils.kt:163— `error` at line 163 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/util/IndexUtils.kt:168— `error` at line 168 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/util/JobSchedulerUtils.kt:31— `error` at line 31 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/util/JobSchedulerUtils.kt:45— `warn` at line 45 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/util/JobSchedulerUtils.kt:48— `error` at line 48 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/util/JobSchedulerUtils.kt:64— `warn` at line 64 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/TargetIndexMappingService.kt:80— `error` at line 80 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/TransformIndexer.kt:62— `error` at line 62 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/TransformIndexer.kt:76— `debug` at line 76 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/TransformIndexer.kt:101— `error` at line 101 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/TransformMetadataService.kt:58— `debug` at line 58 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:95— `error` at line 95 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:123— `warn` at line 123 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:128— `warn` at line 128 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:186— `error` at line 186 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/TransformRunner.kt:205— `info` at line 205 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.info("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/TransformSearchService.kt:144— `debug` at line 144 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/TransformSearchService.kt:209— `debug` at line 209 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.debug("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/util/TransformLockManager.kt:54— `error` at line 54 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.error("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/util/TransformLockManager.kt:69— `warn` at line 69 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Interpolated log message defeats structured logging src/main/kotlin/org/opensearch/indexmanagement/transform/util/TransformLockManager.kt:88— `warn` at line 88 is handed a message assembled at the call — a string template with `$…` values in it, a concatenation or `String.format` — through SLF4J, log4j 2 or kotlin-logging, so the logger receives one finished string: the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the level is filtered out. Pass a constant pattern and the values beside it instead: `log.warn("Order {} moved to {}", orderId, status)`, which keeps the pattern and its arguments apart on the event for a structured encoder (logstash-logback-encoder, log4j 2's JsonTemplateLayout, OpenTelemetry), or with kotlin-logging `logger.atInfo { message = "Order moved"; payload = mapOf("order_id" to orderId, "status" to status) }`. An exception goes last, as the throwable argument, not into the text.
Duplicated predicate src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt:735— `!getResponse.isExists || getResponse.isSourceEmpty` appears character-identically in 3 files — src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ManagedIndexRunner.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/opensearchapi/OpenSearchExtensions.kt, src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/SMUtils.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt:28— `!indexExists(indexName) || !validIndex(indexName)` appears character-identically in 4 files — src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateClose.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateSnapshot.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateStopReplication.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateTransition.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/TransportAddPolicyAction.kt:233— `!response.isExists || response.isSourceEmpty` appears character-identically in 6 files — src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/TransportAddPolicyAction.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/TransportChangePolicyAction.kt, src/main/kotlin/org/opensearch/indexmanagement/rollup/action/start/TransportStartRollupAction.kt, src/main/kotlin/org/opensearch/indexmanagement/rollup/action/stop/TransportStopRollupAction.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Histogram.kt:92— `aggregationBuilder.minBound().isFinite() && aggregationBuilder.maxBound().isFinite()` appears character-identically in 2 files — src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Histogram.kt, src/main/kotlin/org/opensearch/indexmanagement/rollup/interceptor/RollupInterceptor.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt:240— `aliasIndices != null && aliasIndices.size > 1` appears character-identically in 2 files — src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateRollover.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateForceMerge.kt:36— `circuitBreakerEnabled && jvmService.stats().mem.heapUsedPercent > circuitBreakerJvmThreshold` appears character-identically in 4 files — src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateForceMerge.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReadOnly.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/validation/ValidateReplicaCount.kt, src/main/kotlin/org/opensearch/indexmanagement/transform/TransformValidator.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/TransportRemovePolicyAction.kt:212— `f.isFailed && f.failure.failure is IndexNotFoundException` appears character-identically in 2 files — src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/TransportRemovePolicyAction.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/retryfailedmanagedindex/TransportRetryFailedManagedIndexAction.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/AddPolicyRequest.kt:32— `indexType != DEFAULT_INDEX_TYPE && indices.size > 1` appears character-identically in 5 files — src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/addpolicy/AddPolicyRequest.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/changepolicy/ChangePolicyRequest.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/explain/ExplainRequest.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/transport/action/removepolicy/RemovePolicyRequest.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/filter/parser/OpenIndexRespParser.kt:56— `isAsync == false && leftTimeInMillis > 0` appears character-identically in 2 files — src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/filter/parser/OpenIndexRespParser.kt, src/main/kotlin/org/opensearch/indexmanagement/controlcenter/notification/filter/parser/ResizeIndexRespParser.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/rollup/model/ISMRollup.kt:55— `it is Terms && it.sourceField == routingField` appears character-identically in 2 files — src/main/kotlin/org/opensearch/indexmanagement/rollup/model/ISMRollup.kt, src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/RolloverAction.kt:39— `minSize != null || minDocs != null || minAge != null || minPrimaryShardSize != null` appears character-identically in 2 files — src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/RolloverAction.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/RolloverConditionGroup.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/TransportGetRollupAction.kt:83— `request.srcContext != null && !request.srcContext.fetchSource()` appears character-identically in 2 files — src/main/kotlin/org/opensearch/indexmanagement/rollup/action/get/TransportGetRollupAction.kt, src/main/kotlin/org/opensearch/indexmanagement/transform/action/get/TransportGetTransformAction.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/AttemptMoveShardsStep.kt:266— `response != null && response.isAcknowledged` appears character-identically in 2 files — src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/AttemptMoveShardsStep.kt, src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/shrink/AttemptShrinkStep.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt:411— `seqNo == SequenceNumbers.UNASSIGNED_SEQ_NO || primaryTerm == SequenceNumbers.UNASSIGNED_PRIMARY_TERM` appears character-identically in 2 files — src/main/kotlin/org/opensearch/indexmanagement/rollup/model/Rollup.kt, src/main/kotlin/org/opensearch/indexmanagement/transform/model/Transform.kt. 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 src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/DateHistogram.kt:35— `sourceField.isNotEmpty() && targetField.isNotEmpty()` appears character-identically in 4 files — src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/DateHistogram.kt, src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Histogram.kt, src/main/kotlin/org/opensearch/indexmanagement/common/model/dimension/Terms.kt, src/main/kotlin/org/opensearch/indexmanagement/rollup/model/RollupMetrics.kt. 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.
D34 · Knowledge Freshness· Most significant orphaned file · ×3
Most significant orphaned file src/main/kotlin/org/opensearch/indexmanagement/rollup/util/RollupUtils.kt: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 src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupRunner.kt: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 src/main/kotlin/org/opensearch/indexmanagement/rollup/RollupMetadataService.kt: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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/opensearchapi/OpenSearchExtensions.kt. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (2 single-owned of 245 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 245 of the 442 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/main/kotlin/org/opensearch/indexmanagement/snapshotmanagement/engine/states/creation/CreationFinishedState.kt.
No ADRs found build.gradle:163— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `build.gradle` makes this repository a deployable product (line 163).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion build.gradle:1— `(repository root)` (39353 LoC, 773 module-visible types across 106 directories) overshoots its size bounds. 1 of 2 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 0.0/10. 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
Concentrated knowledge decay — 171 of 246 significant files have no living knowledge, while the repository is still being changed at a low rate (18 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 171 separate risks. Counted over 246 of the 442 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them.
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.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
No SAST REDACTED:4— 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) as a CI step. What was searched, so you can tell an absence from a miss: the 14 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.
No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) — not scanned yet).
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 4 file(s) — `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/open/AttemptOpenStep.kt`, `src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/step/restore/AttemptRestoreStep.kt`, `src/main/kotlin/org/opensearch/indexmanagement/refreshanalyzer/TransportRefreshSearchAnalyzerAction.kt`, `src/main/kotlin/org/opensearch/indexmanagement/rollup/action/explain/TransportExplainRollupAction.kt` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) — not scanned yet).
0
—
Run 01a1eaaa-4901-7685-876f-76605f5d2f43 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 15 · Warnings: 334 · Recommendations: 240 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 17-11-2026 @ 17:59 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.