Public report of tensorflow/java, published 16 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, 16 November 2026, 18:11 UTC · Survey ID cd_4fcfffeb9a5a4d21806925807b97f7b4
tensorflow/java
Measured 16 November 2026, 18:10 UTC, at code version 58a1943
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 large codebase: 281,165 lines of product code in 6 projects, tests not counted · Estimated rebuild effort: about 2.2 person-years · Weakest lens: Production Readiness, 47.6
Findings by how serious they are
19 critical541 serious578 minor
16 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
16 November 2026, 18:10 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.
1125of 1138 findings point to an exact file and line, so you can open each one in the code. The other 13 concern the repository as a whole, such as missing documentation.
48dimensions across 6 lenses, read from 281,165 lines of product code in 6 projects.
tensorflow/java 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 58.0 out of 100 and is rated Adequate, and all 19 of its critical findings are security problems in the build pipeline and in the packages it uses.
Production Readiness, at 47.6, is the weakest lens and counts most in the score. The best first step is recording design decisions, worth about 6.4 points. Adding tests for untested code would lift Production Readiness itself, worth about 5.8 points. Raising Production Readiness to 70 would lift the score to about 65.2.
Seventeen pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two known security holes in the packages the code depends on can be used by attackers. Pinning each tool to an exact version and updating the vulnerable packages would close both risks.
The product code is 281,165 lines, about €320,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 47.6 to 70, the lowest score rated Strong, the score would rise from 58.0 to about 65.2.
Code composition: what the lines of code are
Product code 90%Tests 10%
Rebuild cost: about €320,000 · Estimate
Cost to rebuild
€110,000 to €540,000, for 1,797 to 5,700 hours of work, about 2.2 person-years for 1 to 5 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.8 at a score of 58. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 281,165 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 REDACTED.
Raises the score by about 6.4 points · Low effort · ADR Quality
2
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 273 Low coverage finding(s) in Code Coverage — start with SparseTensor.java (2), Constant.java (2), Ones.java (2).
Raises the score by about 5.8 points · High effort · Code Coverage
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €320,000 to build again, about 2.2 person-years of work. Its weakest lens is Production Readiness, at 47.6 (Weak). 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 6.4 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
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.
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.
52 modules, with 145 dependencies between them. 4 loops run through 14 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 12 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.
ndarray.buffer.layout uses ndarray.buffer, so a change to ndarray.buffer can break ndarray.buffer.layout, while a change to ndarray.buffer.layout can't break ndarray.buffer.
Position
Below the diagonal: ndarray.buffer.layout uses a module listed above it, which is the healthy direction.
ndarray.impl.buffer uses ndarray.buffer, so a change to ndarray.buffer can break ndarray.impl.buffer, while a change to ndarray.impl.buffer can't break ndarray.buffer.
Position
Below the diagonal: ndarray.impl.buffer uses a module listed above it, which is the healthy direction.
4→13 ndarray.index uses ndarray.impl.dimensionpart of a loop✕
Connections
11 pairs of types, where a type in ndarray.index uses a type in ndarray.impl.dimension.
ndarray.index uses ndarray.impl.dimension, so a change to ndarray.impl.dimension can break ndarray.index, while a change to ndarray.index can't break ndarray.impl.dimension.
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.
internal.types.registry uses types.family, so a change to types.family can break internal.types.registry, while a change to internal.types.registry can't break types.family.
Position
Below the diagonal: internal.types.registry uses a module listed above it, which is the healthy direction.
7→21 internal.types.registry uses org.tensorflowpart of a loop✕
Connections
1 pair of types, where a type in internal.types.registry uses a type in org.tensorflow.
internal.types.registry uses org.tensorflow, so a change to org.tensorflow can break internal.types.registry, while a change to internal.types.registry can't break org.tensorflow.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
29 pairs of types, where a type in ndarray.impl.buffer.adapter uses a type in ndarray.buffer. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ndarray.impl.buffer.adapter uses ndarray.buffer, so a change to ndarray.buffer can break ndarray.impl.buffer.adapter, while a change to ndarray.impl.buffer.adapter can't break ndarray.buffer.
Position
Below the diagonal: ndarray.impl.buffer.adapter uses a module listed above it, which is the healthy direction.
ndarray.impl.buffer.adapter uses ndarray.buffer.layout, so a change to ndarray.buffer.layout can break ndarray.impl.buffer.adapter, while a change to ndarray.impl.buffer.adapter can't break ndarray.buffer.layout.
Position
Below the diagonal: ndarray.impl.buffer.adapter uses a module listed above it, which is the healthy direction.
ndarray.impl.buffer.adapter uses ndarray.impl.buffer, so a change to ndarray.impl.buffer can break ndarray.impl.buffer.adapter, while a change to ndarray.impl.buffer.adapter can't break ndarray.impl.buffer.
Position
Below the diagonal: ndarray.impl.buffer.adapter uses a module listed above it, which is the healthy direction.
ndarray.impl.buffer.layout uses ndarray.buffer, so a change to ndarray.buffer can break ndarray.impl.buffer.layout, while a change to ndarray.impl.buffer.layout can't break ndarray.buffer.
Position
Below the diagonal: ndarray.impl.buffer.layout uses a module listed above it, which is the healthy direction.
ndarray.impl.buffer.layout uses ndarray.buffer.layout, so a change to ndarray.buffer.layout can break ndarray.impl.buffer.layout, while a change to ndarray.impl.buffer.layout can't break ndarray.buffer.layout.
Position
Below the diagonal: ndarray.impl.buffer.layout uses a module listed above it, which is the healthy direction.
ndarray.impl.buffer.misc uses ndarray.buffer, so a change to ndarray.buffer can break ndarray.impl.buffer.misc, while a change to ndarray.impl.buffer.misc can't break ndarray.buffer.
Position
Below the diagonal: ndarray.impl.buffer.misc uses a module listed above it, which is the healthy direction.
ndarray.impl.buffer.misc uses ndarray.impl.buffer, so a change to ndarray.impl.buffer can break ndarray.impl.buffer.misc, while a change to ndarray.impl.buffer.misc can't break ndarray.impl.buffer.
Position
Below the diagonal: ndarray.impl.buffer.misc uses a module listed above it, which is the healthy direction.
33 pairs of types, where a type in ndarray.impl.buffer.nio uses a type in ndarray.buffer. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ndarray.impl.buffer.nio uses ndarray.buffer, so a change to ndarray.buffer can break ndarray.impl.buffer.nio, while a change to ndarray.impl.buffer.nio can't break ndarray.buffer.
Position
Below the diagonal: ndarray.impl.buffer.nio uses a module listed above it, which is the healthy direction.
ndarray.impl.buffer.nio uses ndarray.impl.buffer, so a change to ndarray.impl.buffer can break ndarray.impl.buffer.nio, while a change to ndarray.impl.buffer.nio can't break ndarray.impl.buffer.
Position
Below the diagonal: ndarray.impl.buffer.nio uses a module listed above it, which is the healthy direction.
39 pairs of types, where a type in ndarray.impl.buffer.raw uses a type in ndarray.buffer. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ndarray.impl.buffer.raw uses ndarray.buffer, so a change to ndarray.buffer can break ndarray.impl.buffer.raw, while a change to ndarray.impl.buffer.raw can't break ndarray.buffer.
Position
Below the diagonal: ndarray.impl.buffer.raw uses a module listed above it, which is the healthy direction.
ndarray.impl.buffer.raw uses ndarray.impl.buffer, so a change to ndarray.impl.buffer can break ndarray.impl.buffer.raw, while a change to ndarray.impl.buffer.raw can't break ndarray.impl.buffer.
Position
Below the diagonal: ndarray.impl.buffer.raw uses a module listed above it, which is the healthy direction.
ndarray.impl.dimension uses ndarray.index, so a change to ndarray.index can break ndarray.impl.dimension, while a change to ndarray.impl.dimension can't break ndarray.index.
Position
Below the diagonal: ndarray.impl.dimension uses a module listed above it, which is the healthy direction.
13→16 ndarray.impl.dimension uses ndarraypart of a loop✕
Connections
1 pair of types, where a type in ndarray.impl.dimension uses a type in ndarray.
ndarray.impl.dimension uses ndarray, so a change to ndarray can break ndarray.impl.dimension, while a change to ndarray.impl.dimension can't break ndarray.
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.
ndarray.impl uses ndarray.impl.dimension, so a change to ndarray.impl.dimension can break ndarray.impl, while a change to ndarray.impl can't break ndarray.impl.dimension.
Position
Below the diagonal: ndarray.impl uses a module listed above it, which is the healthy direction.
ndarray.impl.sparse uses ndarray.buffer, so a change to ndarray.buffer can break ndarray.impl.sparse, while a change to ndarray.impl.sparse can't break ndarray.buffer.
Position
Below the diagonal: ndarray.impl.sparse uses a module listed above it, which is the healthy direction.
ndarray.impl.sparse uses ndarray.index, so a change to ndarray.index can break ndarray.impl.sparse, while a change to ndarray.impl.sparse can't break ndarray.index.
Position
Below the diagonal: ndarray.impl.sparse uses a module listed above it, which is the healthy direction.
ndarray.impl.sparse uses ndarray.impl.dimension, so a change to ndarray.impl.dimension can break ndarray.impl.sparse, while a change to ndarray.impl.sparse can't break ndarray.impl.dimension.
Position
Below the diagonal: ndarray.impl.sparse uses a module listed above it, which is the healthy direction.
ndarray.impl.sparse uses ndarray.impl, so a change to ndarray.impl can break ndarray.impl.sparse, while a change to ndarray.impl.sparse can't break ndarray.impl.
Position
Below the diagonal: ndarray.impl.sparse uses a module listed above it, which is the healthy direction.
15→16 ndarray.impl.sparse uses ndarraypart of a loop✕
Connections
37 pairs of types, where a type in ndarray.impl.sparse uses a type in ndarray. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
internal.buffer uses ndarray.buffer, so a change to ndarray.buffer can break internal.buffer, while a change to internal.buffer can't break ndarray.buffer.
Position
Below the diagonal: internal.buffer uses a module listed above it, which is the healthy direction.
internal.buffer uses ndarray.impl.buffer, so a change to ndarray.impl.buffer can break internal.buffer, while a change to internal.buffer can't break ndarray.impl.buffer.
Position
Below the diagonal: internal.buffer uses a module listed above it, which is the healthy direction.
internal.buffer uses ndarray.impl.buffer.raw, so a change to ndarray.impl.buffer.raw can break internal.buffer, while a change to internal.buffer can't break ndarray.impl.buffer.raw.
Position
Below the diagonal: internal.buffer uses a module listed above it, which is the healthy direction.
ndarray.impl.sequence uses ndarray.buffer, so a change to ndarray.buffer can break ndarray.impl.sequence, while a change to ndarray.impl.sequence can't break ndarray.buffer.
Position
Below the diagonal: ndarray.impl.sequence uses a module listed above it, which is the healthy direction.
ndarray.impl.sequence uses ndarray.impl.dimension, so a change to ndarray.impl.dimension can break ndarray.impl.sequence, while a change to ndarray.impl.sequence can't break ndarray.impl.dimension.
Position
Below the diagonal: ndarray.impl.sequence uses a module listed above it, which is the healthy direction.
ndarray.impl.sequence uses ndarray.impl, so a change to ndarray.impl can break ndarray.impl.sequence, while a change to ndarray.impl.sequence can't break ndarray.impl.
Position
Below the diagonal: ndarray.impl.sequence uses a module listed above it, which is the healthy direction.
ndarray.impl.sequence uses ndarray, so a change to ndarray can break ndarray.impl.sequence, while a change to ndarray.impl.sequence can't break ndarray.
Position
Below the diagonal: ndarray.impl.sequence uses a module listed above it, which is the healthy direction.
ndarray.impl.sparse.slice uses ndarray.buffer, so a change to ndarray.buffer can break ndarray.impl.sparse.slice, while a change to ndarray.impl.sparse.slice can't break ndarray.buffer.
Position
Below the diagonal: ndarray.impl.sparse.slice uses a module listed above it, which is the healthy direction.
ndarray.impl.sparse.slice uses ndarray.index, so a change to ndarray.index can break ndarray.impl.sparse.slice, while a change to ndarray.impl.sparse.slice can't break ndarray.index.
Position
Below the diagonal: ndarray.impl.sparse.slice uses a module listed above it, which is the healthy direction.
ndarray.impl.sparse.slice uses ndarray.impl.dimension, so a change to ndarray.impl.dimension can break ndarray.impl.sparse.slice, while a change to ndarray.impl.sparse.slice can't break ndarray.impl.dimension.
Position
Below the diagonal: ndarray.impl.sparse.slice uses a module listed above it, which is the healthy direction.
ndarray.impl.sparse.slice uses ndarray.impl.sparse, so a change to ndarray.impl.sparse can break ndarray.impl.sparse.slice, while a change to ndarray.impl.sparse.slice can't break ndarray.impl.sparse.
Position
Below the diagonal: ndarray.impl.sparse.slice uses a module listed above it, which is the healthy direction.
ndarray.impl.sparse.slice uses ndarray, so a change to ndarray can break ndarray.impl.sparse.slice, while a change to ndarray.impl.sparse.slice can't break ndarray.
Position
Below the diagonal: ndarray.impl.sparse.slice uses a module listed above it, which is the healthy direction.
org.tensorflow uses ndarray.buffer, so a change to ndarray.buffer can break org.tensorflow, while a change to org.tensorflow can't break ndarray.buffer.
Position
Below the diagonal: org.tensorflow uses a module listed above it, which is the healthy direction.
org.tensorflow uses internal.types.registry, so a change to internal.types.registry can break org.tensorflow, while a change to org.tensorflow can't break internal.types.registry.
Position
Below the diagonal: org.tensorflow uses a module listed above it, which is the healthy direction.
ndarray.impl.dense uses ndarray.buffer, so a change to ndarray.buffer can break ndarray.impl.dense, while a change to ndarray.impl.dense can't break ndarray.buffer.
Position
Below the diagonal: ndarray.impl.dense uses a module listed above it, which is the healthy direction.
ndarray.impl.dense uses ndarray.index, so a change to ndarray.index can break ndarray.impl.dense, while a change to ndarray.impl.dense can't break ndarray.index.
Position
Below the diagonal: ndarray.impl.dense uses a module listed above it, which is the healthy direction.
ndarray.impl.dense uses ndarray.impl.dimension, so a change to ndarray.impl.dimension can break ndarray.impl.dense, while a change to ndarray.impl.dense can't break ndarray.impl.dimension.
Position
Below the diagonal: ndarray.impl.dense uses a module listed above it, which is the healthy direction.
ndarray.impl.dense uses ndarray.impl, so a change to ndarray.impl can break ndarray.impl.dense, while a change to ndarray.impl.dense can't break ndarray.impl.
Position
Below the diagonal: ndarray.impl.dense uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in ndarray.impl.dense uses a type in ndarray. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
ndarray.impl.dense uses ndarray.impl.sequence, so a change to ndarray.impl.sequence can break ndarray.impl.dense, while a change to ndarray.impl.dense can't break ndarray.impl.sequence.
Position
Below the diagonal: ndarray.impl.dense uses a module listed above it, which is the healthy direction.
framework.activations uses org.tensorflow, so a change to org.tensorflow can break framework.activations, while a change to framework.activations can't break org.tensorflow.
Position
Below the diagonal: framework.activations uses a module listed above it, which is the healthy direction.
framework.data uses org.tensorflow, so a change to org.tensorflow can break framework.data, while a change to framework.data can't break org.tensorflow.
Position
Below the diagonal: framework.data uses a module listed above it, which is the healthy direction.
framework.initializers uses ndarray, so a change to ndarray can break framework.initializers, while a change to framework.initializers can't break ndarray.
Position
Below the diagonal: framework.initializers uses a module listed above it, which is the healthy direction.
framework.initializers uses org.tensorflow, so a change to org.tensorflow can break framework.initializers, while a change to framework.initializers can't break org.tensorflow.
Position
Below the diagonal: framework.initializers uses a module listed above it, which is the healthy direction.
framework.losses.impl uses types.family, so a change to types.family can break framework.losses.impl, while a change to framework.losses.impl can't break types.family.
Position
Below the diagonal: framework.losses.impl uses a module listed above it, which is the healthy direction.
framework.losses.impl uses org.tensorflow, so a change to org.tensorflow can break framework.losses.impl, while a change to framework.losses.impl can't break org.tensorflow.
Position
Below the diagonal: framework.losses.impl uses a module listed above it, which is the healthy direction.
26→35 framework.losses.impl uses framework.lossespart of a loop✕
Connections
3 pairs of types, where a type in framework.losses.impl uses a type in framework.losses.
framework.losses.impl uses framework.losses, so a change to framework.losses can break framework.losses.impl, while a change to framework.losses.impl can't break framework.losses.
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.
framework.op.linalg uses org.tensorflow, so a change to org.tensorflow can break framework.op.linalg, while a change to framework.op.linalg can't break org.tensorflow.
Position
Below the diagonal: framework.op.linalg uses a module listed above it, which is the healthy direction.
framework.op.nn uses org.tensorflow, so a change to org.tensorflow can break framework.op.nn, while a change to framework.op.nn can't break org.tensorflow.
Position
Below the diagonal: framework.op.nn uses a module listed above it, which is the healthy direction.
framework.op.sets uses org.tensorflow, so a change to org.tensorflow can break framework.op.sets, while a change to framework.op.sets can't break org.tensorflow.
Position
Below the diagonal: framework.op.sets uses a module listed above it, which is the healthy direction.
framework.utils uses org.tensorflow, so a change to org.tensorflow can break framework.utils, while a change to framework.utils can't break org.tensorflow.
Position
Below the diagonal: framework.utils uses a module listed above it, which is the healthy direction.
internal.types uses ndarray.buffer, so a change to ndarray.buffer can break internal.types, while a change to internal.types can't break ndarray.buffer.
Position
Below the diagonal: internal.types uses a module listed above it, which is the healthy direction.
internal.types uses ndarray.buffer.layout, so a change to ndarray.buffer.layout can break internal.types, while a change to internal.types can't break ndarray.buffer.layout.
Position
Below the diagonal: internal.types uses a module listed above it, which is the healthy direction.
internal.types uses ndarray.impl.dimension, so a change to ndarray.impl.dimension can break internal.types, while a change to internal.types can't break ndarray.impl.dimension.
Position
Below the diagonal: internal.types uses a module listed above it, which is the healthy direction.
internal.types uses ndarray.impl.sparse, so a change to ndarray.impl.sparse can break internal.types, while a change to internal.types can't break ndarray.impl.sparse.
Position
Below the diagonal: internal.types uses a module listed above it, which is the healthy direction.
internal.types uses internal.buffer, so a change to internal.buffer can break internal.types, while a change to internal.types can't break internal.buffer.
Position
Below the diagonal: internal.types uses a module listed above it, which is the healthy direction.
51 pairs of types, where a type in internal.types uses a type in types. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
51 pairs of types, where a type in internal.types uses a type in org.tensorflow. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
internal.types uses org.tensorflow, so a change to org.tensorflow can break internal.types, while a change to internal.types can't break org.tensorflow.
Position
Below the diagonal: internal.types uses a module listed above it, which is the healthy direction.
internal.types uses ndarray.impl.dense, so a change to ndarray.impl.dense can break internal.types, while a change to internal.types can't break ndarray.impl.dense.
Position
Below the diagonal: internal.types uses a module listed above it, which is the healthy direction.
framework.data.impl uses types.family, so a change to types.family can break framework.data.impl, while a change to framework.data.impl can't break types.family.
Position
Below the diagonal: framework.data.impl uses a module listed above it, which is the healthy direction.
framework.data.impl uses org.tensorflow, so a change to org.tensorflow can break framework.data.impl, while a change to framework.data.impl can't break org.tensorflow.
Position
Below the diagonal: framework.data.impl uses a module listed above it, which is the healthy direction.
framework.data.impl uses framework.data, so a change to framework.data can break framework.data.impl, while a change to framework.data.impl can't break framework.data.
Position
Below the diagonal: framework.data.impl uses a module listed above it, which is the healthy direction.
framework.losses uses types.family, so a change to types.family can break framework.losses, while a change to framework.losses can't break types.family.
Position
Below the diagonal: framework.losses uses a module listed above it, which is the healthy direction.
framework.losses uses org.tensorflow, so a change to org.tensorflow can break framework.losses, while a change to framework.losses can't break org.tensorflow.
Position
Below the diagonal: framework.losses uses a module listed above it, which is the healthy direction.
framework.losses uses framework.losses.impl, so a change to framework.losses.impl can break framework.losses, while a change to framework.losses can't break framework.losses.impl.
Position
Below the diagonal: framework.losses uses a module listed above it, which is the healthy direction.
framework.metrics.impl uses types.family, so a change to types.family can break framework.metrics.impl, while a change to framework.metrics.impl can't break types.family.
Position
Below the diagonal: framework.metrics.impl uses a module listed above it, which is the healthy direction.
framework.metrics.impl uses org.tensorflow, so a change to org.tensorflow can break framework.metrics.impl, while a change to framework.metrics.impl can't break org.tensorflow.
Position
Below the diagonal: framework.metrics.impl uses a module listed above it, which is the healthy direction.
framework.metrics.impl uses framework.initializers, so a change to framework.initializers can break framework.metrics.impl, while a change to framework.metrics.impl can't break framework.initializers.
Position
Below the diagonal: framework.metrics.impl uses a module listed above it, which is the healthy direction.
framework.metrics.impl uses framework.losses.impl, so a change to framework.losses.impl can break framework.metrics.impl, while a change to framework.metrics.impl can't break framework.losses.impl.
Position
Below the diagonal: framework.metrics.impl uses a module listed above it, which is the healthy direction.
36→40 framework.metrics.impl uses framework.metricspart of a loop✕
Connections
5 pairs of types, where a type in framework.metrics.impl uses a type in framework.metrics.
framework.metrics.impl uses framework.metrics, so a change to framework.metrics can break framework.metrics.impl, while a change to framework.metrics.impl can't break framework.metrics.
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.
framework.op.math uses types.family, so a change to types.family can break framework.op.math, while a change to framework.op.math can't break types.family.
Position
Below the diagonal: framework.op.math uses a module listed above it, which is the healthy direction.
framework.op.math uses org.tensorflow, so a change to org.tensorflow can break framework.op.math, while a change to framework.op.math can't break org.tensorflow.
Position
Below the diagonal: framework.op.math uses a module listed above it, which is the healthy direction.
framework.op.math uses framework.losses.impl, so a change to framework.losses.impl can break framework.op.math, while a change to framework.op.math can't break framework.losses.impl.
Position
Below the diagonal: framework.op.math uses a module listed above it, which is the healthy direction.
framework.optimizers uses types.family, so a change to types.family can break framework.optimizers, while a change to framework.optimizers can't break types.family.
Position
Below the diagonal: framework.optimizers uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in framework.optimizers uses a type in org.tensorflow. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
framework.optimizers uses org.tensorflow, so a change to org.tensorflow can break framework.optimizers, while a change to framework.optimizers can't break org.tensorflow.
Position
Below the diagonal: framework.optimizers uses a module listed above it, which is the healthy direction.
framework.regularizers uses types.family, so a change to types.family can break framework.regularizers, while a change to framework.regularizers can't break types.family.
Position
Below the diagonal: framework.regularizers uses a module listed above it, which is the healthy direction.
framework.regularizers uses org.tensorflow, so a change to org.tensorflow can break framework.regularizers, while a change to framework.regularizers can't break org.tensorflow.
Position
Below the diagonal: framework.regularizers uses a module listed above it, which is the healthy direction.
framework.regularizers uses framework.losses.impl, so a change to framework.losses.impl can break framework.regularizers, while a change to framework.regularizers can't break framework.losses.impl.
Position
Below the diagonal: framework.regularizers uses a module listed above it, which is the healthy direction.
30 pairs of types, where a type in framework.metrics uses a type in types.family. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
framework.metrics uses types.family, so a change to types.family can break framework.metrics, while a change to framework.metrics can't break types.family.
Position
Below the diagonal: framework.metrics uses a module listed above it, which is the healthy direction.
34 pairs of types, where a type in framework.metrics uses a type in org.tensorflow. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
framework.metrics uses org.tensorflow, so a change to org.tensorflow can break framework.metrics, while a change to framework.metrics can't break org.tensorflow.
Position
Below the diagonal: framework.metrics uses a module listed above it, which is the healthy direction.
framework.metrics uses framework.initializers, so a change to framework.initializers can break framework.metrics, while a change to framework.metrics can't break framework.initializers.
Position
Below the diagonal: framework.metrics uses a module listed above it, which is the healthy direction.
50 pairs of types, where a type in framework.metrics uses a type in framework.metrics.impl. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
framework.metrics uses framework.metrics.impl, so a change to framework.metrics.impl can break framework.metrics, while a change to framework.metrics can't break framework.metrics.impl.
Position
Below the diagonal: framework.metrics uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 71.8 · Adequate · gated by X5 ·
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
17
High / Critical
A03:2025 — Software Supply Chain Failures
8
High / Critical
Roadmap
Top priorities: Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED; 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 273 Low coverage finding(s) in Code Coverage — start with SparseTensor.java (2), Constant.java (2), Ones.java (2).
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 REDACTED.
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.
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.
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
Code Duplication: Edited copy of a member (11 corresponding lines)
How the grades work
Every finding carries one of four grades. Three say how serious it is. The fourth says this
survey could not settle it — and it is a grade, not a gap.
Critical — 19
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 — 541
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 — 578
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 16
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
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, 1125 of 1138 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.
D1 Cyclomatic Complexity — 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. Most of this repository's production source (.cc, .java) had no cyclomatic complexity computed for it: no method bodies were exposed for those file kinds by any language model this pass could load.
D2 Cognitive Complexity — 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. Most of this repository's production source (.cc, .java) had no cognitive complexity computed for it: no method bodies were exposed for those file kinds by any language model this pass could load.
D4 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 96 duplicated block group(s) on this row were found in the languages this pass could tokenize, and they do NOT cover all of this repository's production source: .java (281,057 lines, 100% of production source) went unread, because no language model this pass could load exposed a clone-unit token stream for those file kinds. Duplication in that source is UNMEASURED — its absence from the count above is a gap in this analyzer's language coverage, not a finding that the code is free of duplication.
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 central.sonatype.com — the registry that answers it — was asked and did not reply (the build stopped because central.sonatype.com, 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; 13 dependencies were resolved and graded first, but the graph is partial so the result is reported and not scored). 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 central.sonatype.com to the allowlist and re-run — not to build anything.
D15 Churn × Complexity Hotspots — 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. A hotspot is churn × complexity. Churn was measured (1095 line(s) across the 90-day window), but no complexity could be computed for .cc, .java, which is most of this repository's production code — so every churned file would score as complexity 0 and the hotspot list would be empty no matter how tangled the code is. Not scored — this is a gap in the analysis run, not a finding about this repository.
D19 Documentation Quality — 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. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
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's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
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.
AX1 Captive dependencies — 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 Microsoft.Extensions.DependencyInjection registrations in C# and annotated Spring beans in Java/Kotlin only, and this repository uses Spring but declares no bean through a stereotype annotation (@Component, @Service, …) this check reads — its beans are defined elsewhere, such as XML, 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.
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
M4 Documentation accuracy — 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. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P1 CI/CD gates — 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. A CI pipeline exists and the word "test" appears, but no explicit test-runner invocation (your stack's test command, or a test job) was matched — so either the gate runs tests through a step this pass could not recognise, or "test" is incidental here (a path, "latest", a reporter). Which of the two it is cannot be settled from this dimension's evidence; the coverage dimensions report whether a suite exists at all. You can widen what we reach: name the test runner explicitly in the pipeline step (your stack's test command, or a job named for the suite) so the gate is unambiguous to a reader and to this pass.
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.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X17 Uncapped recursion over a caller-supplied document — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Python, Dart, Ruby, Scala, Kotlin and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Python, Dart, Ruby, Scala, Kotlin or Rust was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
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.
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.
D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
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.
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.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
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 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.
96 duplicated block group(s) detected. 1.9 % of the production lines (5,414 of 281,165) are in a reported copy. A further 107 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 1 of the 203 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .java (100% of production source) was not exposed to the token comparison, so duplication there is unmeasured and is not in this count.
Edited copy of a member (8 corresponding lines) · ×9tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Ones.java:56
Edited copies of one member (3 members, 6+ corresponding lines) · ×9tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:650
Edited copy of a member (11 corresponding lines) · ×7tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/PrecisionAtRecall.java:110
+ 90 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 14 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with BooleanDenseNdArray.java (2), Graph.java, Precision.java. — One of this dimension's main actionable groups (14 warning-level).
Resolve the 10 Duplicated block (15 lines × 2) finding(s) in Code Duplication — start with ByteNioDataBuffer.java, DoubleNioDataBuffer.java, FloatNioDataBuffer.java. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 9 Edited copy of a member (8 corresponding lines) finding(s) in Code Duplication — start with Ones.java, StdArrays.java, AdaGradDA.java. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.7 / 10Strong✓ 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.
6 production modules (Maven), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence, with abstractness counted on 5 of the 6 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: tensorflow-ndarray
What to do
Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with Graph.java. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D8 · Code Coverage5.0 / 10Weak✓ Tool-verified
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
Line coverage 21.3% — 273 file(s) below 50%. Measured from the Java/Kotlin suite (repository root, Maven: the JaCoCo agent on the 3 run(s) test reliability made). Taken over 3 runs of the suite: a line counts as covered only when every run executed it.
Resolve the 273 Low coverage finding(s) in Code Coverage — start with SparseTensor.java (2), Constant.java (2), Ones.java (2). — One of this dimension's main actionable groups (273 warning-level).
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality9.8 / 10Stronggated by 14 serious findings✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
2 skipped (2 with a documented reason), 386 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 1013 tests (1 harness-style project(s) excluded from the assertion penalty).
No assertions: operationsComposingZerosAreCorrectlyNamed · ×14tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/op/core/ZerosTest.java:130
No direct assertions: testAlpha · ×372tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ELUTest.java:65
Resolve the 372 No direct assertions finding(s) in Test Quality — start with PrecisionTest.java (13), RecallTest.java (13), CategoricalCrossentropyTest.java (12). — One of this dimension's main actionable groups (372 recommendation-level).
Resolve the 14 No assertions finding(s) in Test Quality — start with EagerOperationBuilderTest.java (3), GraphOperationBuilderTest.java (2), GraphTest.java (2). — One of this dimension's main actionable groups (14 warning-level).
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
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 6 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 8 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. 32 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.
✓ On the Gold path — maintain.
Detailed fixes: d14_recommendation.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.
3 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java. Counted over 212 of the 1734 production source files in this repository: 1440 are under the ~2,400-byte size floor this dimension measures over, and the remaining 82 have no attributable history left to measure.
Off-boarding risk: anonymized user #1
✓ 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.
47 deducted task-comment markers across 281165 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
Resolve the 42 TodoComment finding(s) in Explicit Debt — start with Losses.java (13), ND.java (3), MetricsHelper.java (3). — One of this dimension's main actionable groups (42 warning-level).
Resolve the 4 FixmeComment finding(s) in Explicit Debt — start with CustomGradientTest.java, TStringTest.java, ConcreteFunction.java. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 HackComment finding(s) in Explicit Debt — start with MetricsHelper.java. — One of this dimension's main actionable groups (1 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. 6 document(s) read across 1 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.
No ADRs foundtensorflow-core/tensorflow-core-api/pom.xml:104
What to do
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — 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.
Do you agree with this assessment?
D26 · Project Cohesion3.3 / 10Weak✓ Tool-verified
What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.
2 of 6 build units (Maven, Python) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×2tensorflow-framework/pom.xml:1
What to do
Resolve the 2 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
73 % of calls cross a namespace and 15 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret 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.
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).
17 finding(s): 0 critical, 17 high, 0 medium, 0 low. 17 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) — `tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api/tfj_scope.h` (line 31, line 37, line 42, …) — 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 1 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
What to do
No action in Static Analysis (SAST) — all 17 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 (17 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 any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.
Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
Resolve the 2 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
Detailed fixes: d30_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.
155 of 294 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java. Counted over 294 of the 1734 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Most significant orphaned file · ×3tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java:1
Dormant codebase
What to do
Resolve the 152 Orphaned file finding(s) in Knowledge Freshness — start with CategoricalCrossentropy.java (2), BinaryCrossentropy.java (2), SparseCategoricalCrossentropy.java (2). — One of this dimension's main actionable groups (152 recommendation-level).
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with MetricsHelper.java, AUC.java, ClassGenerator.java. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.
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.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 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 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.
Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
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 1 platform declaration(s) and 13 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.
`OperationAttributeInspector` declares 18 abstract methods: `getAttrBool`, `getAttrBoolList`, `getAttrFloat`, `getAttrFloatList`, `getAttrFunction`, `getAttrFunctionList`, `getAttrInt`, `getAttrIntList`, `getAttrMetadata`, `getAttrShape`, `getAttrShapeList`, `getAttrString`, `getAttrStringList`, `getAttrTensor`, `getAttrTensorList`, `getAttrType`, `getAttrTypeList`, `getAttrValueProto`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/OperationAttributeInspector.java:26
`OperationBuilder` declares 23 abstract methods under just 6 distinct name(s): `addControlInput`, `addInput`, `addInputList`, `build`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setDevice`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 23 separate responsibilities: a caller binds to 6 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 23 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/OperationBuilder.java:38
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Where the width is an overload set rather than separate responsibilities, collapse the overloads instead — segregating those relieves no caller.
Other · Code Health — Unreviewed-generation residue in this repository's Java: methods whose whole body only throws a "not implemented" or bare unsupported-operation exception, or returns a default value (or nothing) under a TODO/FIXME marker, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Java: methods that only throw a "not implemented" exception, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×2) — tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/TensorFlowTest.java:42, tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/types/TStringTest.java:115
What to do
Clear the softer debt: re-enable or delete @Disabled/@Ignore tests, decide whether each empty method or UnsupportedOperationException is deliberate (and say so in a comment), and replace @SuppressWarnings("all") with targeted, justified suppressions.
Maturity · Maturity — Whether the 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.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
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.
Do you agree with this assessment?
P1 · CI/CD gates8.5 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
What to do
Run the test suite in CI via an explicit runner step (`mvn test` for the toolchain this pipeline already uses) and gate merges on it.
Do you agree with this assessment?
P10 · Library API & versioning8.5 / 10Strong✓ Tool-verified
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.
1 public type in `org.tensorflow.internal` is marked as implementation by its own namespace, folder or name: `WeakPointerScope` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/WeakPointerScope.java:18, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/WeakPointerScope.java:18
13 public types in `org.tensorflow.internal.c_api` are marked as implementation by their own namespace, folder or name: `AbstractTFE_Context` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_Context.java:27, `internal`), `AbstractTFE_ContextOptions` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_ContextOptions.java:27, `internal`), `AbstractTFE_Op` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_Op.java:27, `internal`), `AbstractTFE_TensorHandle` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_TensorHandle.java:26, `internal`), `AbstractTF_Buffer` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_Buffer.java:29, `internal`), `AbstractTF_Function` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_Function.java:24, `internal`), `AbstractTF_Graph` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_Graph.java:27, `internal`), `AbstractTF_ImportGraphDefOptions` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_ImportGraphDefOptions.java:27, `internal`), and 5 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_Context.java:27
3 public types in `org.tensorflow.ndarray.impl.buffer` are marked as implementation by their own namespace, folder or name: `AbstractDataBuffer` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java:25, `impl`), `AbstractDataBufferWindow` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBufferWindow.java:6, `impl`), `Validator` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/Validator.java:24, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java:25
1 public type in `org.tensorflow.ndarray.impl.buffer.adapter` is marked as implementation by its own namespace, folder or name: `DataBufferAdapterFactory` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapterFactory.java:44, `impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapterFactory.java:44
4 public types in `org.tensorflow.ndarray.impl.buffer.layout` are marked as implementation by their own namespace, folder or name: `Bfloat16Layout` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16Layout.java:27, `impl`), `BoolLayout` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayout.java:24, `impl`), `Float16Layout` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Float16Layout.java:27, `impl`), `StringLayout` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/StringLayout.java:25, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16Layout.java:27
1 public type in `org.tensorflow.ndarray.impl.buffer.misc` is marked as implementation by its own namespace, folder or name: `MiscDataBufferFactory` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/MiscDataBufferFactory.java:25, `impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/MiscDataBufferFactory.java:25
1 public type in `org.tensorflow.ndarray.impl.buffer.nio` is marked as implementation by its own namespace, folder or name: `NioDataBufferFactory` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/NioDataBufferFactory.java:34, `impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/NioDataBufferFactory.java:34
1 public type in `org.tensorflow.ndarray.impl.buffer.raw` is marked as implementation by its own namespace, folder or name: `RawDataBufferFactory` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferFactory.java:30, `impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferFactory.java:30
9 public types in `org.tensorflow.ndarray.impl.dense` are marked as implementation by their own namespace, folder or name: `AbstractDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:33, `impl`), `BooleanDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java:26, `impl`), `ByteDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java:26, `impl`), `DenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java:24, `impl`), `DoubleDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java:26, `impl`), `FloatDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java:26, `impl`), `IntDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java:26, `impl`), `LongDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java:26, `impl`), and 1 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:33
3 public types in `org.tensorflow.ndarray.impl.dimension` are marked as implementation by their own namespace, folder or name: `Dimension` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Dimension.java:21, `impl`), `DimensionalSpace` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java:24, `impl`), `RelativeDimensionalSpace` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/RelativeDimensionalSpace.java:20, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Dimension.java:21
6 public types in `org.tensorflow.ndarray.impl.sequence` are marked as implementation by their own namespace, folder or name: `FastElementSequence` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/FastElementSequence.java:33, `impl`), `IndexedPositionIterator` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedPositionIterator.java:20, `impl`), `CoordsLongConsumer` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedPositionIterator.java:23, `impl`), `PositionIterator` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/PositionIterator.java:23, `impl`), `SingleElementSequence` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SingleElementSequence.java:33, `impl`), `SlicingElementSequence` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SlicingElementSequence.java:33, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/FastElementSequence.java:33
9 public types in `org.tensorflow.ndarray.impl.sparse` are marked as implementation by their own namespace, folder or name: `AbstractSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:67, `impl`), `BooleanSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:61, `impl`), `ByteSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:61, `impl`), `DoubleSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:61, `impl`), `FloatSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:61, `impl`), `IntSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:61, `impl`), `LongSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:60, `impl`), `ShortSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:61, `impl`), and 1 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:67
9 public types in `org.tensorflow.ndarray.impl.sparse.slice` are marked as implementation by their own namespace, folder or name: `BooleanSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java:30, `impl`), `ByteSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java:30, `impl`), `DoubleSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java:31, `impl`), `FloatSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java:31, `impl`), `IntSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java:31, `impl`), `LongSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java:31, `impl`), `ObjectSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java:30, `impl`), `ShortSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java:31, `impl`), and 1 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java:30
What to do
Hide `org.tensorflow.internal` (`WeakPointerScope`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `org.tensorflow.internal.c_api` (`AbstractTFE_Context`, `AbstractTFE_ContextOptions`, `AbstractTFE_Op`, `AbstractTFE_TensorHandle`, `AbstractTF_Buffer`, `AbstractTF_Function`, `AbstractTF_Graph`, `AbstractTF_ImportGraphDefOptions`, and 5 more) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `org.tensorflow.ndarray.impl.buffer` (`AbstractDataBuffer`, `AbstractDataBufferWindow`, `Validator`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `org.tensorflow.ndarray.impl.buffer.adapter` (`DataBufferAdapterFactory`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `org.tensorflow.ndarray.impl.buffer.layout` (`Bfloat16Layout`, `BoolLayout`, `Float16Layout`, `StringLayout`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `org.tensorflow.ndarray.impl.buffer.misc` (`MiscDataBufferFactory`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `org.tensorflow.ndarray.impl.buffer.nio` (`NioDataBufferFactory`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `org.tensorflow.ndarray.impl.buffer.raw` (`RawDataBufferFactory`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `org.tensorflow.ndarray.impl.dense` (`AbstractDenseNdArray`, `BooleanDenseNdArray`, `ByteDenseNdArray`, `DenseNdArray`, `DoubleDenseNdArray`, `FloatDenseNdArray`, `IntDenseNdArray`, `LongDenseNdArray`, and 1 more) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `org.tensorflow.ndarray.impl.dimension` (`Dimension`, `DimensionalSpace`, `RelativeDimensionalSpace`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `org.tensorflow.ndarray.impl.sequence` (`FastElementSequence`, `IndexedPositionIterator`, `CoordsLongConsumer`, `PositionIterator`, `SingleElementSequence`, `SlicingElementSequence`) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `org.tensorflow.ndarray.impl.sparse` (`AbstractSparseNdArray`, `BooleanSparseNdArray`, `ByteSparseNdArray`, `DoubleSparseNdArray`, `FloatSparseNdArray`, `IntSparseNdArray`, `LongSparseNdArray`, `ShortSparseNdArray`, and 1 more) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Hide `org.tensorflow.ndarray.impl.sparse.slice` (`BooleanSparseSlice`, `ByteSparseSlice`, `DoubleSparseSlice`, `FloatSparseSlice`, `IntSparseSlice`, `LongSparseSlice`, `ObjectSparseSlice`, `ShortSparseSlice`, and 1 more) (Java: package-private (no modifier), or leave its package out of `module-info` exports): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
Do you agree with this assessment?
P2 · Observability5.0 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `docs/legacy_tools`, `tensorflow-core/tensorflow-core-generator`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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 1 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:8
`REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — REDACTED:97
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.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are 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. — REDACTED:155
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 the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured. — tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/benchmark/NdArrayBenchmark.java
What to do
Run JMH with the GC profiler (`-prof gc`, or addProfiler(GCProfiler.class)) so allocation rate regressions are visible, not just time.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. 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.
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?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether Java packages are null-marked and not undermined by heavy nullness suppression — a package under `@NullMarked` (or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, or a NullAway/Checker Framework configuration naming it) makes an unannotated reference exclude null, and `@SuppressWarnings("NullAway")`, `("nullness")`, `("null")` and `castToNonNull(…)` are what silence it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
0/78 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.
What to do
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
Do you agree with this assessment?
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 — 14 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 64 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 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
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 function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads.
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 — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D1 Cyclomatic Complexity — cyclomatic complexity not measured — .cc, .java exposed no member bodies
D12 Dependency Hygiene — Dependency currency not established — central.sonatype.com did not answer
D15 Churn × Complexity Hotspots — complexity unreadable for .cc, .java — churn × complexity hotspots could not be measured
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.
D2 Cognitive Complexity — cognitive complexity not measured — .cc, .java exposed no member bodies
D21 Naming Consistency — N/A — too few peers to establish a naming convention (9010 declarations, no unit with a dominant convention).
D22 Internal API Consistency — API consistency is measured on C#, TypeScript, Go only; the exposed Java surface was not measured.
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, .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
D3 God Classes — Most of this repository's production source (.cc, .java) was not read by god-class detection, so class size was not assessed for the languages that are the product — whatever else this pass did read is not this repository's class size. Not scored — this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 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.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
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
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 1 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 77 value object(s); its 1 aggregate(s) are ORM models only — persistence, not behaviour: a CRUD model, measured, not claimed as DDD
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
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
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 data present for 396 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 0% of this repository's production lines — java (281,057 lines), cpp (247 lines), c (114 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
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 and Python were read, and no request in it can be cancelled by a caller — 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
X21 Side-effecting pattern 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
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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
X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Java was read, and it logs through none that an assembled message defeats: java.util.logging's level methods, log4j 1, commons-logging, JBoss Logging and Flogger take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J or log4j 2 (`org.slf4j.Logger`, `org.apache.logging.log4j.Logger`, Lombok's `@Slf4j`) would be judged.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
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 tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/IndexTest.java:129— // TODO: I get a (0,0) which is not what I 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 tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:177— // TODO should have automatical access to the coordinates from which this position is coming from. — 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 tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/IndexedDimension.java:38— // TODO (karllessard) for now we consider all indexed dimensions as segmented but might depend — 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 tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/IndexedDimension.java:50— // TODO (karllessard) we consider this dimension takes the same amount of memory that the — 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 tensorflow-framework/src/test/java/org/tensorflow/framework/utils/ND.java:23— // TODO used in the Callbacks, this should be a part of NDArray? — 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 tensorflow-framework/src/test/java/org/tensorflow/framework/utils/ND.java:728— // TODO — 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 tensorflow-framework/src/test/java/org/tensorflow/framework/utils/ND.java:819— // TODO — 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 tensorflow-framework/src/test/java/org/tensorflow/framework/losses/HingeTest.java:91— // todo Verify we get the same output when the same input is given — 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 tensorflow-framework/src/test/java/org/tensorflow/framework/losses/HuberTest.java:79— // todo Verify we get the same output when the same input is given — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Optimizer.java:42— // TODO make this be used. — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java:297— // TODO: hold for lazy select feature, — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:224— // TODO: hold for lazy select feature, — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java:404— // TODO handle Ragged Tensors???? — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java:752— // TODO handle ragged Tensors — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java:801— // TODO should this be moved to FramnworkOps under math. — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:192— // TODO - this does not work — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:193— // TODO output = backtrackIdentity(output); — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:194— // TODO if (output.op().type().equals(Sigmoid.OP_NAME)) { — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:195— // TODO if (output.op().numInputess() != 1) — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:196— // TODO throw new IllegalArgumentException("output can only have 1 output"); — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:197— // TODO output = output.op().inout(0); — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:198— // TODO return tf.nn.sigmoidCrossEntropyWithLogits(target, output); — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:199— // TODO} — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:258— // TODO output = backtrackIdentity(output); doesn't seem to work with Java version. — 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 tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:531— // TODO output = backtrackIdentity(output); doesn't seem to work with Java version. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
No assertions: operationsComposingZerosAreCorrectlyNamed tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/op/core/ZerosTest.java:130— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testSeparateOps tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/op/ScopeTest.java:33— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: addInputs tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/EagerOperationBuilderTest.java:56— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: setAttrs tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/EagerOperationBuilderTest.java:81— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: setDevice tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/EagerOperationBuilderTest.java:69— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: closeSessionTwiceDoesNotFail tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/EagerSessionTest.java:31— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: failOnUseAfterBuild tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/GraphOperationBuilderTest.java:34— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: failOnUseAfterGraphClose tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/GraphOperationBuilderTest.java:52— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: failImportOnInvalidGraphDefs tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/GraphTest.java:236— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: failOnUseAfterClose tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/GraphTest.java:247— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: testStatefullIfGradient tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/IfGradientTest.java:160— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: createWithConfigProto tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/SessionTest.java:174— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: gracefullyFailCreationFromNullArrayForStringTensor tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/TensorTest.java:541— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
No assertions: useAfterClose tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/TensorTest.java:492— This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
Duplicated block (5 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:317— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:317-321 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:339-343 — both copies are in the same file, so extract the 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 `tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:317` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Precision.java:291— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Precision.java:291-296 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/ConfusionMatrixConditionCount.java:140-144 — 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 `tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Precision.java:291` 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 after the matched lines, `tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/ConfusionMatrixConditionCount.java:145` calls `singletonMap` and `tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Precision.java:297` 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 (5 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:380— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:380-384 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java:49-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. 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, `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:371` calls `copyFrom` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java:48` 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 (5 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:363— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:363-367 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java:48-52 — 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, `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:354` calls `copyFrom` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java:47` 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 (5 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:366— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:366-370 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java:49-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. 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, `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:357` calls `copyFrom` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java:48` 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 (5 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:363— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:363-367 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java:49-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. 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, `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:354` calls `copyFrom` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java:48` 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 (5 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:379— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:379-383 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java:49-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. 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, `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:370` calls `copyFrom` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java:48` 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 (5 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:362— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:362-366 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java:49-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. 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, `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:353` calls `copyFrom` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java:48` 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 (5 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:363— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:363-367 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java:49-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. 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, `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:354` calls `copyFrom` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java:48` 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 (5 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TBfloat16Mapper.java:39— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TBfloat16Mapper.java:39-43 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TFloat16Mapper.java:39-43 — 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 (5 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java:176— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java:176-180 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/WeightsBroadcastOps.java:135-139 — 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 `tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java:176` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java:63— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java:63-67 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java:59-63 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `BooleanDataBuffer` in one and `ByteDataBuffer` 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 (5 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java:70— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java:70-74 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java:66-70 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `src` to `BooleanDataBuffer` in one and `ByteDataBuffer` 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 (5 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:236— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:236-240 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java:168-172 — before extracting anything, compare `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java` and `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:234` calls `cast` and `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java:166` 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 (15 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:144— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:144-158 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java:148-162 — 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 `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:144` 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 (15 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java:106— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java:106-120 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java:112-126 — 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 `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java:106` 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 (15 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java:106— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java:106-120 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java:112-126 — 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 `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java:106` 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 (15 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java:106— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java:106-120 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java:112-126 — 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 `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java:106` 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 (15 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java:106— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java:106-120 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java:112-126 — 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 `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java:106` 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 (15 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java:106— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java:106-120 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java:112-126 — 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 `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java:106` 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 (15 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:315— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:315-329 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java:79-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `DoubleDataBuffer` in one and `DataBuffer<Double>` 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 (15 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:312— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:312-326 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java:79-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `FloatDataBuffer` in one and `DataBuffer<Float>` 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 (15 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:328— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:328-342 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java:79-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `IntDataBuffer` in one and `DataBuffer<Integer>` 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 (15 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:311— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:311-325 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java:79-93 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `LongDataBuffer` in one and `DataBuffer<Long>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×9
Edited copy of a member (8 corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Ones.java:56— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Ones.java:56-63 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Zeros.java:57-66 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1987— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1987-1994 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2005-2012 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/AdaGradDA.java:186— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/AdaGradDA.java:186-195 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java:133-140 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:118— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:118-126 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:177-184 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/data/DatasetIterator.java:167— tensorflow-framework/src/main/java/org/tensorflow/framework/data/DatasetIterator.java:167-174 | tensorflow-framework/src/main/java/org/tensorflow/framework/data/DatasetOptional.java:91-99 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:159— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:159-166 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java:154-161 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/losses/BinaryCrossentropy.java:170— tensorflow-framework/src/main/java/org/tensorflow/framework/losses/BinaryCrossentropy.java:170-177 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/CategoricalCrossentropy.java:206-214 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:62— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:62-69 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/TensorFlow.java:128-135 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (8 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java:49— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/Validator.java:49-56 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/Validator.java:36-43 — 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, 6+ corresponding lines) · ×9
Edited copies of one member (3 members, 6+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:650— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:650-655 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:665-670 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:680-685 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:740— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:740-745 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:755-760 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:770-775 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:830— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:830-835 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:845-850 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:860-865 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:920— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:920-925 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:935-940 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:950-955 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1010— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1010-1015 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1025-1030 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1040-1045 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1100— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1100-1105 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1115-1120 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1130-1135 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1190— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1190-1195 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1205-1210 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1220-1225 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Hyperslab.java:75— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Hyperslab.java:75-82 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Slice.java:62-68 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java:61-66 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 6+ corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/activations/ELU.java:143— tensorflow-framework/src/main/java/org/tensorflow/framework/activations/ELU.java:143-148 | tensorflow-framework/src/main/java/org/tensorflow/framework/activations/GELU.java:132-137 | tensorflow-framework/src/main/java/org/tensorflow/framework/activations/Softmax.java:154-159 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×7
Edited copy of a member (11 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/PrecisionAtRecall.java:110— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/PrecisionAtRecall.java:110-120 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/SpecificityAtSensitivity.java:119-131 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Nadam.java:162— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Nadam.java:162-173 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/RMSProp.java:179-189 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:188— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:188-198 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Nadam.java:140-154 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:159— tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:159-170 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:341-351 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:146— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:146-156 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java:128-141 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java:35— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java:35-46 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/Validator.java:35-45 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/javadoc/CoreJavaDocNodeRenderer.java:269— tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/javadoc/CoreJavaDocNodeRenderer.java:269-279 | tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/javadoc/CoreJavaDocNodeRenderer.java:463-474 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×6
Edited copy of a member (7 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:55— tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:55-62 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:76-82 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/constraints/AbstractConstraint.java:41— tensorflow-framework/src/main/java/org/tensorflow/framework/constraints/AbstractConstraint.java:41-47 | tensorflow-framework/src/main/java/org/tensorflow/framework/constraints/AbstractConstraint.java:61-71 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/initializers/RandomNormal.java:87— tensorflow-framework/src/main/java/org/tensorflow/framework/initializers/RandomNormal.java:87-93 | tensorflow-framework/src/main/java/org/tensorflow/framework/initializers/TruncatedNormal.java:76-83 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:53— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:53-59 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:62-68 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/data/impl/TFRecordDataset.java:33— tensorflow-framework/src/main/java/org/tensorflow/framework/data/impl/TFRecordDataset.java:33-39 | tensorflow-framework/src/main/java/org/tensorflow/framework/data/impl/TextLineDataset.java:32-38 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_Op.java:52— tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_Op.java:52-58 | tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_TensorHandle.java:77-84 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (9 lines × 2) tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/ClassGenerator.java:535— tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/ClassGenerator.java:535-543 | tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/ClassGenerator.java:573-583 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:207— tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:207-215 | tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java:280-288 — 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 `tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:207` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperation.java:348— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperation.java:348-356 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperation.java:375-383 — both copies are in the same file, so extract the 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 `tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperation.java:348` 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 × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/MeanRelativeError.java:159— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/MeanRelativeError.java:159-167 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/RootMeanSquaredError.java:74-82 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:421— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:421-429 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:582-591 — 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 `tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:582` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (9 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java:58— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/AbstractNdArray.java:58-66 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java:59-67 — 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 (7 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Hinge.java:124— tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Hinge.java:124-130 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/SquaredHinge.java:126-132 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tensorflow-framework/src/main/java/org/tensorflow/framework/losses/SquaredHinge.java:125` calls `SuppressWarnings` and `tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Hinge.java:122` 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 (7 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:202— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:202-208 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java:122-129 — before extracting anything, compare `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java` and `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:170— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:170-176 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:298-304 — 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 (7 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractOperation.java:32— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractOperation.java:32-38 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperation.java:237-243 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_Context.java:52— tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_Context.java:52-58 | tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_TensorHandle.java:51-57 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:444— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:444-450 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:624-630 — 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 `tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:444` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:321— tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:321-326 | tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/Axes.java:37-42 — 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 `tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:321` 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: the declarations holding them bind `op` to `Operand<T>` in one and `Operand<? extends TType>` 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 (6 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/NativeScope.java:89— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/NativeScope.java:89-94 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/Scope.java:191-196 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/Scope.java:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:357— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:357-362 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:531-536 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:403— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:403-409 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:564-569 — 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 `tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:564` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/data/Dataset.java:78— tensorflow-framework/src/main/java/org/tensorflow/framework/data/Dataset.java:78-83 | tensorflow-framework/src/main/java/org/tensorflow/framework/data/DatasetOptional.java:70-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `other` to `Dataset` in one and `DatasetOptional` 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 (6 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/CategoricalHinge.java:73— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/CategoricalHinge.java:73-78 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Hinge.java:72-77 — 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 `tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/CategoricalHinge.java:73` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:366— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:366-373 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:640-647 — 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 `tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:366` 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) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/SparseTensor.java:80— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/SparseTensor.java:80-87 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/SparseTensor.java:88-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/RMSProp.java:200— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/RMSProp.java:200-207 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/RMSProp.java:211-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java:26— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java:26-33 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/Validator.java:26-33 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/Validator.java:24` calls `Validator` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java:24` 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 (8 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java:24— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java:24-31 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceTo.java:24-31 — 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.
FixmeComment tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/CustomGradientTest.java:36— // FIXME: Since TF 2.10.1, custom gradient registration is failing on Windows, see — 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.
FixmeComment tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/types/TStringTest.java:115— // FIXME This test does not deterministically succeed, so skip it by default — 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.
FixmeComment tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/ConcreteFunction.java:299— // FIXME need to manage input operand lifetimes — 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.
FixmeComment tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/SavedModelBundle.java:563— // FIXME: For Ryan, why marking all initializers as run before adding these ones? — 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.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×4
Edited copy of a member (17 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Precision.java:251— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Precision.java:251-267 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Recall.java:279-298 — 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) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:313— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:313-329 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java:77-93 — 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) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:310— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:310-326 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java:77-93 — 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) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:326— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:326-342 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java:77-93 — 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 (13 corresponding lines) · ×4
Edited copy of a member (13 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/AdaDelta.java:154— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/AdaDelta.java:154-166 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/AdaGradDA.java:213-226 — 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) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:364— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:364-376 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:637-650 — 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) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:93— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:93-105 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java:85-97 — 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) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:268— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:268-280 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:352-365 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×4
Edited copy of a member (6 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java:370— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java:370-375 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java:48-53 — 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) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/MeanTensor.java:68— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/MeanTensor.java:68-73 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/Reduce.java:67-73 — 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) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:85— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:85-90 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java:77-82 — 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) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerSession.java:280— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerSession.java:280-286 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:393-398 — 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.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (8 members, 50+ identical tokens) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2023— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2023-2032 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2135-2144 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2247-2256 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2359-2368 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2471-2480 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2583-2592 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2695-2704 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2808-2817 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Members sharing a duplicated core (8 members, 50+ identical tokens) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2043— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2043-2049 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2155-2161 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2267-2273 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2379-2385 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2491-2497 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2603-2609 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2715-2721 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2829-2835 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Members sharing a duplicated core (8 members, 50+ identical tokens) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3410— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3410-3422 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3468-3480 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3526-3538 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3584-3596 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3642-3654 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3700-3712 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3758-3770 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3816-3828 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java:194— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java:194-205 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/WeightsBroadcastOps.java:151-163 — 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) tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Hinge.java:122— tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Hinge.java:122-133 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/SquaredHinge.java:123-135 — 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) tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/TensorDot.java:299— tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/TensorDot.java:299-310 | tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/TensorDot.java:322-337 — 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 (16 corresponding lines) · ×3
Edited copy of a member (16 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:227— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:227-242 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java:159-174 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:327— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:327-343 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java:77-92 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:310— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:310-326 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java:76-91 — 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 copy of a member (14 corresponding lines) · ×3
Edited copy of a member (14 corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:315— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:315-328 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:337-350 — 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) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/StridedSliceHelper.java:186— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/StridedSliceHelper.java:186-199 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/StridedSliceHelper.java:222-236 — 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) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:154— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:154-168 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java:111-124 — 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, 6+ corresponding lines) · ×3
Edited copies of one member (4 members, 6+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1271— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1271-1276 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1288-1293 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1305-1311 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1323-1330 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 6+ corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/SparseCategoricalCrossentropy.java:90— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/SparseCategoricalCrossentropy.java:90-98 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/SparseTopKCategoricalAccuracy.java:105-111 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/SquaredHinge.java:76-81 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/TopKCategoricalAccuracy.java:106-111 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 6+ corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/PrecisionAtRecall.java:101— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/PrecisionAtRecall.java:101-106 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/RecallAtPrecision.java:107-112 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/SensitivityAtSpecificity.java:111-116 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/SpecificityAtSensitivity.java:110-115 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Duplicated block (13 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/BooleanMask.java:71— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/BooleanMask.java:71-83 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/BooleanMaskUpdate.java:79-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/BooleanMask.java:85` calls `scalarOf` and `tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/BooleanMaskUpdate.java:93` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:331— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:331-343 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java:80-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 `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:331` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `BooleanDataBuffer` in one and `DataBuffer<Boolean>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (13 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:314— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:314-326 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java:79-91 — 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 `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:314` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `ByteDataBuffer` in one and `DataBuffer<Byte>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (6 lines × 7) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:352— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:352-357 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:335-340 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:338-343 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:335-340 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:351-356 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:334-339 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:335-340 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:352` it begins part-way through the construct above it, so those 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 `src` to `BooleanDataBuffer` in one and `ByteDataBuffer` 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 (6 lines × 7) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1392— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1392-1397 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1476-1481 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1560-1565 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1644-1649 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1728-1733 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1812-1817 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1896-1901 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `IntNdArray` in one and `LongNdArray` 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 (6 lines × 7) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:392— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:392-397 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:375-380 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:378-383 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:375-380 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:391-396 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:374-379 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:375-380 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `src` to `BooleanNdArray` in one and `ByteNdArray` 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 (5 lines × 7) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java:35— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java:35-39 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java:24-28 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java:35-39 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java:35-39 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java:35-39 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java:35-39 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java:35-39 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `value` to `boolean` in one and `byte` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 7) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:266— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:266-270 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:255-259 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:258-262 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:255-259 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:271-275 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:254-258 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:255-259 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `src` to `BooleanNdArray` in one and `ByteNdArray` 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 (5 lines × 7) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:279— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:279-283 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:268-272 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:271-275 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:268-272 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:284-288 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:267-271 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:268-272 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `defaultValue` to `boolean` in one and `byte` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication· Members sharing a duplicated core (32 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (32 members, 50+ identical tokens) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2060— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2060-2066 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2077-2084 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2095-2103 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2114-2124 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2172-2178 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2189-2196 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2207-2215 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2226-2236 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2284-2290 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2301-2308 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2319-2327 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2338-2348 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2396-2402 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2413-2420 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2431-2439 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2450-2460 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2508-2514 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2525-2532 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2543-2551 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2562-2572 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2620-2626 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2637-2644 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2655-2663 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2674-2684 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2732-2738 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2749-2756 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2767-2775 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2786-2796 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2847-2853 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2865-2872 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2884-2892 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2904-2914 — These 32 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 32 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 32 times.
Members sharing a duplicated core (32 members, 50+ identical tokens) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3424— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3424-3433 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3435-3444 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3446-3455 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3457-3466 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3482-3491 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3493-3502 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3504-3513 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3515-3524 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3540-3549 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3551-3560 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3562-3571 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3573-3582 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3598-3607 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3609-3618 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3620-3629 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3631-3640 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3656-3665 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3667-3676 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3678-3687 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3689-3698 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3714-3723 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3725-3734 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3736-3745 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3747-3756 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3772-3781 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3783-3792 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3794-3803 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3805-3814 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3830-3839 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3841-3850 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3852-3861 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3863-3872 — These 32 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 32 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 32 times.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (7 members, 50+ identical tokens) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1391— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1391-1397 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1475-1481 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1559-1565 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1643-1649 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1727-1733 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1811-1817 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1895-1901 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
Members sharing a duplicated core (7 members, 50+ identical tokens) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1407— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1407-1414 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1491-1498 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1575-1582 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1659-1666 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1743-1750 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1827-1834 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1911-1918 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×2
Edited copy of a member (40 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:204— tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:204-245 | tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java:278-317 — These two members are one piece of code written twice and then edited apart: 40 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 (40 corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:97— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:97-138 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:297-336 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:206— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:206-229 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:321-349 — 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) tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/FullOpDef.java:89— tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/FullOpDef.java:89-118 | tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/StatefulPair.java:119-142 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×2
Edited copies of one member (3 members, 17+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:309— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:309-325 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java:77-93 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java:77-93 — 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.
Edited copies of one member (3 members, 17+ corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:199— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:199-216 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:230-247 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:261-277 — 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, 14+ corresponding lines) · ×2
Edited copies of one member (3 members, 14+ corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:333— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:333-346 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:442-460 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:594-609 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 14+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DataTransfer.java:76— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DataTransfer.java:76-90 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DataTransfer.java:93-106 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DataTransfer.java:109-122 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×2
Edited copy of a member (19 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:417— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:417-435 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java:406-427 — 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.
Edited copy of a member (19 corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:116— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:116-136 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Session.java:157-175 — 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 (10 corresponding lines) · ×2
Edited copy of a member (10 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Precision.java:238— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Precision.java:238-247 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Recall.java:265-275 — 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) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:123— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:123-132 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:379-389 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 7+ corresponding lines) · ×2
Edited copies of one member (7 members, 7+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java:42— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java:42-48 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java:31-37 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java:42-48 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java:42-48 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java:42-48 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java:42-48 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java:42-48 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
Edited copies of one member (7 members, 7+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java:51— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java:51-57 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java:40-46 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java:51-57 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java:51-57 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java:51-57 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java:51-57 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java:51-57 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×2
Edited copy of a member (5 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Nadam.java:288— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Nadam.java:288-293 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:254-258 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (5 corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TUint16Mapper.java:127— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TUint16Mapper.java:127-131 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TUint8Mapper.java:127-131 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 4+ corresponding lines) · ×2
Edited copies of one member (6 members, 4+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:117— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:117-120 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java:79-82 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java:79-82 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java:79-82 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java:79-82 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java:79-82 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
Edited copies of one member (6 members, 4+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:123— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:123-126 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java:85-88 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java:85-88 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java:85-88 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java:85-88 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java:85-88 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 5+ corresponding lines) · ×2
Edited copies of one member (5 members, 5+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java:59— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java:59-63 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java:59-63 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java:59-63 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java:59-63 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java:59-63 — 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.
Edited copies of one member (5 members, 5+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java:66— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java:66-70 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java:66-70 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java:66-70 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java:66-70 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java:66-70 — 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.
Duplicated block (12–13 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:1200— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:1200-1211 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:1303-1315 — both copies are in the same file, so extract the 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 `tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:1200` 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 (12–13 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:156— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:156-168 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java:113-124 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:156` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7–8 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Shapes.java:315— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Shapes.java:315-322 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Shapes.java:492-498 — both copies are in the same file, so extract the 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 `tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Shapes.java:492` 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 (7–8 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java:227— tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java:227-233 | tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java:237-244 — both copies are in the same file, so extract the 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 `tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java:227` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 3) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:104— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:104-110 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java:93-99 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Nadam.java:99-105 — before extracting anything, compare `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java` and `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 3) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:136— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:136-142 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java:112-118 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Nadam.java:130-136 — before extracting anything, compare `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java` and `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:136` 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.
HackComment tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java:143— // hack to work around the non-lazy select for isValidShape, otherwise validNonscalar fails on a — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D4 · Code Duplication· Near-duplicate member family (7 members, 15 shared lines) · ×1
Near-duplicate member family (7 members, 15 shared lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:347— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:347-367 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:330-350 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:333-353 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:330-350 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:346-366 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:329-349 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:330-350 — These 7 members are variants of one another: a block of 15 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (10 members, 50+ identical tokens) tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:96— tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:96-110 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:124-138 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:241-283 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:295-315 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:366-380 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:402-419 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:433-446 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:463-476 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:491-503 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:599-612 — These 10 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 10 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 10 times.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (6 members, 50+ identical tokens) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java:69— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java:69-106 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java:63-100 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java:63-100 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java:63-100 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java:63-100 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java:63-100 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Edited copy of a member (68 corresponding lines) · ×1
Edited copy of a member (68 corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/BooleanMask.java:58— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/BooleanMask.java:58-125 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/BooleanMaskUpdate.java:62-142 — 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 (48 corresponding lines) · ×1
Edited copy of a member (48 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:121— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:121-168 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java:113-163 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:71— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:71-107 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java:65-99 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 33+ corresponding lines) · ×1
Edited copies of one member (7 members, 33+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java:104— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java:104-139 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java:147-179 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java:111-143 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java:111-143 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java:111-143 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java:111-143 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java:111-143 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 30+ corresponding lines) · ×1
Edited copies of one member (6 members, 30+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:143— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:143-172 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java:105-134 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java:105-134 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java:105-134 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java:105-134 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java:105-134 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×1
Edited copy of a member (22 corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Precision.java:284— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Precision.java:284-306 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Recall.java:325-346 — 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 (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java:315— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java:315-332 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java:68-85 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 17+ corresponding lines) · ×1
Edited copies of one member (4 members, 17+ corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperation.java:246— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperation.java:246-264 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperation.java:286-304 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperation.java:340-356 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperation.java:367-383 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 20+ corresponding lines) · ×1
Edited copies of one member (3 members, 20+ corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/losses/BinaryCrossentropy.java:202— tensorflow-framework/src/main/java/org/tensorflow/framework/losses/BinaryCrossentropy.java:202-222 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/CategoricalCrossentropy.java:239-258 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/SparseCategoricalCrossentropy.java:195-214 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 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, 7+ corresponding lines) · ×1
Edited copies of one member (5 members, 7+ corresponding lines) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/AdaDelta.java:143— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/AdaDelta.java:143-150 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/AdaGradDA.java:203-209 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:216-223 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java:148-155 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Ftrl.java:231-238 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 18+ corresponding lines) · ×1
Edited copies of one member (7 members, 18+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java:92— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java:92-109 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java:111-128 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java:92-109 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java:92-109 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java:92-109 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java:92-109 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java:92-109 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:135— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:135-150 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:393-408 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java:66-81 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:1100— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:1100-1114 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:72-82 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/NativeFunction.java:51-69 — 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 copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:152— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:152-161 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:175-185 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:280-294 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 8+ corresponding lines) · ×1
Edited copies of one member (6 members, 8+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java:272— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java:272-279 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java:289-296 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java:306-313 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java:323-330 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java:340-347 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/buffer/DataBuffers.java:357-364 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 11+ corresponding lines) · ×1
Edited copies of one member (7 members, 11+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java:60— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java:60-70 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java:49-59 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java:60-70 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java:60-70 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java:60-70 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java:60-70 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java:60-70 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×1
Edited copy of a member (9 corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:485— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:485-493 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:676-684 — 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 copies of one member (3 members, 9+ corresponding lines) · ×1
Edited copies of one member (3 members, 9+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/Shape.java:286— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/Shape.java:286-294 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/Shape.java:313-321 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/Shape.java:331-348 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 11+ corresponding lines) · ×1
Edited copies of one member (8 members, 11+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java:46— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java:46-60 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java:46-56 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java:32-42 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java:46-56 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java:46-56 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java:46-56 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java:46-56 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ShortDenseNdArray.java:46-56 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×1
Edited copies of one member (4 members, 9+ corresponding lines) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:141— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:141-149 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:164-172 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:188-196 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:219-227 — 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 copies of one member (7 members, 4+ corresponding lines) · ×1
Edited copies of one member (7 members, 4+ corresponding lines) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java:86— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/BooleanDataBufferAdapter.java:86-89 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ByteDataBufferAdapter.java:105-108 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DoubleDataBufferAdapter.java:86-89 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/FloatDataBufferAdapter.java:86-89 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/IntDataBufferAdapter.java:86-89 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/LongDataBufferAdapter.java:86-89 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/ShortDataBufferAdapter.java:86-89 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 7+ corresponding lines) · ×1
Edited copies of one member (6 members, 7+ corresponding lines) tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_ContextOptions.java:50— tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_ContextOptions.java:50-56 | tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_Buffer.java:51-57 | tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_Graph.java:52-58 | tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_ImportGraphDefOptions.java:50-56 | tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_SessionOptions.java:50-56 | tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_Status.java:56-62 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
Duplicated block (20 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:207— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperationBuilder.java:207-226 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:322-341 — 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 (18 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/AdaGradDA.java:103— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/AdaGradDA.java:103-120 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/AdaGradDA.java:159-176 — both copies are in the same file, so extract the 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 `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/AdaGradDA.java:103` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15–16 lines × 3) tensorflow-framework/src/main/java/org/tensorflow/framework/losses/BinaryCrossentropy.java:204— tensorflow-framework/src/main/java/org/tensorflow/framework/losses/BinaryCrossentropy.java:204-219 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/CategoricalCrossentropy.java:241-255 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/SparseCategoricalCrossentropy.java:197-211 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (14–15 lines × 2) tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java:330— tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java:330-344 | tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java:346-359 — both copies are in the same file, so extract the 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 `tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/presets/tensorflow.java:330` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 3) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:122— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:122-135 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java:114-127 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java:105-118 — 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 `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BitSetDataBuffer.java:122` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–13 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/Axes.java:40— tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/Axes.java:40-48 | tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ReduceLogSumExp.java:158-170 — 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 `tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/Axes.java:40` 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 (10–13 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java:189— tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java:189-198 | tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java:200-212 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 8) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3411— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3411-3422 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3469-3480 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3527-3538 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3585-3596 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3643-3654 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3701-3712 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3759-3770 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3817-3828 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `array` to `int[][]` in one and `long[][]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java:319— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java:319-330 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java:71-82 — 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 × 3) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:37— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:37-47 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:155-165 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java:112-122 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 (8–10 lines × 2) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/SavedModelBundle.java:589— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/SavedModelBundle.java:589-598 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Session.java:733-740 — 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 `tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/SavedModelBundle.java:589` 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) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:317— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:317-326 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java:84-93 — 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 `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:317` 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 × 32) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3425— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3425-3433 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3436-3444 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3447-3455 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3458-3466 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3483-3491 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3494-3502 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3505-3513 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3516-3524 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3541-3549 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3552-3560 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3563-3571 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3574-3582 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3599-3607 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3610-3618 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3621-3629 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3632-3640 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3657-3665 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3668-3676 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3679-3687 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3690-3698 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3715-3723 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3726-3734 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3737-3745 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3748-3756 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3773-3781 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3784-3792 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3795-3803 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3806-3814 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3831-3839 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3842-3850 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3853-3861 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:3864-3872 — all 32 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `array` to `int[][][]` in one and `int[][][][]` 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 (9 lines × 9) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:330— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:330-338 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:313-321 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:316-324 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:313-321 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:329-337 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:313-321 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java:80-88 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java:80-88 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java:80-88 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:330` 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: the declarations holding them bind `dst` to `BooleanDataBuffer` in one and `ByteDataBuffer` 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 (9 lines × 8) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2024— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2024-2032 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2136-2144 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2248-2256 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2360-2368 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2472-2480 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2584-2592 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2696-2704 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2809-2817 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `int[]` in one and `long[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 7) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:359— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:359-367 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:342-350 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:345-353 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:342-350 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:358-366 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:341-349 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:342-350 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:359` 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 (9 lines × 3) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:312— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:312-320 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java:80-88 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java:80-88 — 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 `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:312` 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: the declarations holding them bind `dst` to `LongDataBuffer` in one and `DataBuffer<Long>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (4–7 lines × 10) tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:98— tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:98-102 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:126-129 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:244-247 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:297-300 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:371-377 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:404-407 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:435-438 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:465-468 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:493-496 | tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:604-609 — all 10 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:371` 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 `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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:369` calls `squeezeOrExpandDimensions`, `getTarget`, `getLabels` and `tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:98` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 8) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2044— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2044-2049 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2156-2161 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2268-2273 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2380-2385 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2492-2497 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2604-2609 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2716-2721 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2830-2835 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `int[][]` in one and `long[][]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 32) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2062— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2062-2066 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2078-2082 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2096-2101 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2115-2122 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2174-2178 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2190-2194 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2208-2213 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2227-2234 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2286-2290 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2302-2306 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2320-2325 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2339-2346 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2398-2402 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2414-2418 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2432-2437 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2451-2458 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2510-2514 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2526-2530 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2544-2549 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2563-2570 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2622-2626 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2638-2642 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2656-2661 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2675-2682 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2734-2738 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2750-2754 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2768-2773 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2787-2794 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2849-2853 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2866-2870 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2885-2890 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2905-2912 — all 32 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:2062` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `int[][][]` in one and `long[][][]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (2–12 lines × 3) tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/PrecisionAtRecall.java:114— tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/PrecisionAtRecall.java:114-115 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/SensitivityAtSpecificity.java:120-131 | tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/SpecificityAtSensitivity.java:119-131 — 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. 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 (38 lines × 6) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java:69— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java:69-106 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java:63-100 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java:63-100 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java:63-100 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java:63-100 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java:63-100 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `DataBuffer<Byte>` in one and `DataBuffer<Double>` 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 (5 lines × 6) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TBfloat16Mapper.java:129— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TBfloat16Mapper.java:129-133 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TFloat16Mapper.java:129-133 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TFloat32Mapper.java:127-131 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TFloat64Mapper.java:127-131 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TInt32Mapper.java:127-131 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/internal/types/TInt64Mapper.java:126-130 — 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 6 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `values` to `TBfloat16` in one and `TFloat16` 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 (7 lines × 11) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:78— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:78-84 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:222-228 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java:110-116 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java:109-115 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java:111-117 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java:111-117 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java:111-117 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java:111-117 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java:88-94 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java:111-117 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java:101-107 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/SparseSlice.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 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 (5 lines × 4) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Slice.java:35— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Slice.java:35-39 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java:34-38 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceTo.java:34-38 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Step.java:33-37 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/SliceFrom.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/index/Step.java` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the 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 (9 lines × 4) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperation.java:199— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperation.java:199-207 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerOperation.java:209-217 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperation.java:429-438 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperation.java:440-449 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind `handle` to `TFE_Op` in one and `TF_Operation` 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 (6 lines × 9) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/types/TBfloat16.java:69— tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/types/TBfloat16.java:69-75 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/types/TBool.java:61-66 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/types/TFloat16.java:66-72 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/types/TFloat32.java:54-60 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/types/TFloat64.java:54-60 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/types/TInt32.java:54-59 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/types/TInt64.java:54-59 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/types/TUint16.java:54-60 | tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/types/TUint8.java:54-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 all 9 call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `values` to `float...` in one and `boolean...` 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 (7 lines × 6) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:129— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:129-135 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java:91-97 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java:91-97 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java:91-97 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java:91-97 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java:91-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 6 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 6) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:163— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ByteNioDataBuffer.java:163-170 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/DoubleNioDataBuffer.java:125-132 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/FloatNioDataBuffer.java:125-132 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/IntNioDataBuffer.java:125-132 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/LongNioDataBuffer.java:125-132 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/ShortNioDataBuffer.java:125-132 — 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 6 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 7) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java:130— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/BooleanRawDataBuffer.java:130-137 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java:170-177 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java:134-141 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java:134-141 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java:134-141 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java:134-141 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java:134-141 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 × 6) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java:139— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java:139-144 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java:103-108 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/FloatRawDataBuffer.java:103-108 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/IntRawDataBuffer.java:103-108 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/LongRawDataBuffer.java:103-108 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ShortRawDataBuffer.java:103-108 — before extracting anything, compare `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/ByteRawDataBuffer.java` and `tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/DoubleRawDataBuffer.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (11 lines × 2) tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/TensorDot.java:84— tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/TensorDot.java:84-94 | tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/TensorDot.java:162-172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 3) tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:217— tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:217-222 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java:149-154 | tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Nadam.java:163-168 — before extracting anything, compare `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java` and `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adamax.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Nadam.java:171` calls `fill`, `shape`, `cast` and `tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Adam.java:223` 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 × 7) tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1408— tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1408-1414 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1492-1498 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1576-1582 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1660-1666 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1744-1750 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1828-1834 | tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/StdArrays.java:1912-1918 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `dst` to `IntNdArray` in one and `LongNdArray` 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.
Off the main sequence: tensorflow-ndarray — tensorflow-ndarray: abstractness 0.27, instability 0.00, distance 0.73 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
Low cohesion: Graph (LCOM4 4) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java:87— Graph's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
No direct assertions: testAlpha tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ELUTest.java:65— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallDouble tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ELUTest.java:51— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallFloat tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ELUTest.java:37— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallDouble tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ExponentialTest.java:60— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallFloat tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ExponentialTest.java:37— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallAproximate tensorflow-framework/src/test/java/org/tensorflow/framework/activations/GELUTest.java:69— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallNoAproximate tensorflow-framework/src/test/java/org/tensorflow/framework/activations/GELUTest.java:35— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallDouble tensorflow-framework/src/test/java/org/tensorflow/framework/activations/HardSigmoidTest.java:51— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallFloat tensorflow-framework/src/test/java/org/tensorflow/framework/activations/HardSigmoidTest.java:37— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallDouble tensorflow-framework/src/test/java/org/tensorflow/framework/activations/LinearTest.java:66— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallFloat tensorflow-framework/src/test/java/org/tensorflow/framework/activations/LinearTest.java:52— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallInt tensorflow-framework/src/test/java/org/tensorflow/framework/activations/LinearTest.java:38— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testAlpha tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ReLUTest.java:109— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallDouble tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ReLUTest.java:96— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallFloat tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ReLUTest.java:39— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallFloat16 tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ReLUTest.java:81— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallInt tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ReLUTest.java:53— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallLong tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ReLUTest.java:67— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testMaxValue tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ReLUTest.java:122— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testThreshold tensorflow-framework/src/test/java/org/tensorflow/framework/activations/ReLUTest.java:135— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallDouble tensorflow-framework/src/test/java/org/tensorflow/framework/activations/SELUTest.java:51— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallFloat tensorflow-framework/src/test/java/org/tensorflow/framework/activations/SELUTest.java:35— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallDouble tensorflow-framework/src/test/java/org/tensorflow/framework/activations/SigmoidTest.java:58— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testCallFloat tensorflow-framework/src/test/java/org/tensorflow/framework/activations/SigmoidTest.java:35— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
No direct assertions: testSoftmax1D tensorflow-framework/src/test/java/org/tensorflow/framework/activations/SoftmaxTest.java:87— No conventional assertion call was detected, and 372 of 515 tests in `tensorflow-framework` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
Orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/losses/Losses.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/TensorDot.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/op/MathOps.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/core/Shapes.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Recall.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/Precision.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/SparseNdArray.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/javadoc/CoreJavaDocNodeRenderer.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationAttributeInspector.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/op/linalg/MatMul.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/data/Dataset.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/losses/CategoricalCrossentropy.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/javadoc/JavaDocRenderer.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/optimizers/Nadam.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/op/NnOps.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate tensorflow-framework/src/main/java/org/tensorflow/framework/initializers/Constant.java:90— `!TNumber.class.isAssignableFrom(type) && type != TBool.class` appears character-identically in 2 files — tensorflow-framework/src/main/java/org/tensorflow/framework/initializers/Constant.java, tensorflow-framework/src/main/java/org/tensorflow/framework/initializers/Ones.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java:224— `!weightsShape.hasUnknownDimension() && !valuesShape.hasUnknownDimension() && weightsShape.isCompatibleWith(valuesShape)` appears character-identically in 2 files — tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java, tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/WeightsBroadcastOps.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/ClassGenerator.java:157— `attr.hasDefaultValue() && !attr.getType().contains("type")` appears character-identically in 2 files — tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/ClassGenerator.java, tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/StatefulPair.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java:435— `graphHandle == null || graphHandle.isNull()` appears character-identically in 2 files — tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/GraphOperationBuilder.java, tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Session.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java:30— `isValue && coords.length != dimensions.numDimensions()` appears character-identically in 2 files — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/Validator.java, tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/Validator.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-framework/src/main/java/org/tensorflow/framework/losses/BinaryCrossentropy.java:172— `labelSmoothing < 0 || labelSmoothing > 1` appears character-identically in 2 files — tensorflow-framework/src/main/java/org/tensorflow/framework/losses/BinaryCrossentropy.java, tensorflow-framework/src/main/java/org/tensorflow/framework/losses/CategoricalCrossentropy.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:236— `labelsRank == Shape.UNKNOWN_SIZE && Shape.isCompatible(labelsShape.size(-1), 1)` appears character-identically in 2 files — tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java, tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-framework/src/main/java/org/tensorflow/framework/op/nn/SoftmaxCrossEntropyWithLogits.java:80— `logits.asOutput().type() == TFloat16.class || logits.asOutput().type() == TBfloat16.class` appears character-identically in 2 files — tensorflow-framework/src/main/java/org/tensorflow/framework/op/nn/SoftmaxCrossEntropyWithLogits.java, tensorflow-framework/src/main/java/org/tensorflow/framework/op/nn/SparseSoftmaxCrossEntropyWithLogits.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerSession.java:405— `nativeHandle == null || nativeHandle.isNull()` appears character-identically in 3 files — tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/EagerSession.java, tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java, tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Session.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBuffer.java:100— `offset == 0 && values.length == length && arrayOffset == 0 && array.length == arrayLength` appears character-identically in 2 files — tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/ArrayDataBuffer.java, tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/BooleanArrayDataBuffer.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:212— `predictionsRank != Shape.UNKNOWN_SIZE || labelsRank != Shape.UNKNOWN_SIZE` appears character-identically in 2 files — tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java, tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:227— `predictionsRank == Shape.UNKNOWN_SIZE && Shape.isCompatible(predictionsShape.size(-1), 1)` appears character-identically in 2 files — tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java, tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:215— `rankDiff == expectedRankDiff + 1 && Shape.isCompatible(predictionsShape.size(-1), 1)` appears character-identically in 2 files — tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java, tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
Duplicated predicate tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java:217— `rankDiff == expectedRankDiff - 1 && Shape.isCompatible(labelsShape.size(-1), 1)` appears character-identically in 2 files — tensorflow-framework/src/main/java/org/tensorflow/framework/losses/impl/LossesHelper.java, tensorflow-framework/src/main/java/org/tensorflow/framework/op/math/ConfusionMatrix.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
P10 · Library API & versioning· Implementation type on the public API · ×13
Implementation type on the public API tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/WeakPointerScope.java:18— 1 public type in `org.tensorflow.internal` is marked as implementation by its own namespace, folder or name: `WeakPointerScope` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/WeakPointerScope.java:18, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_Context.java:27— 13 public types in `org.tensorflow.internal.c_api` are marked as implementation by their own namespace, folder or name: `AbstractTFE_Context` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_Context.java:27, `internal`), `AbstractTFE_ContextOptions` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_ContextOptions.java:27, `internal`), `AbstractTFE_Op` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_Op.java:27, `internal`), `AbstractTFE_TensorHandle` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTFE_TensorHandle.java:26, `internal`), `AbstractTF_Buffer` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_Buffer.java:29, `internal`), `AbstractTF_Function` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_Function.java:24, `internal`), `AbstractTF_Graph` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_Graph.java:27, `internal`), `AbstractTF_ImportGraphDefOptions` (tensorflow-core/tensorflow-core-native/src/main/java/org/tensorflow/internal/c_api/AbstractTF_ImportGraphDefOptions.java:27, `internal`), and 5 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
Implementation type on the public API tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java:25— 3 public types in `org.tensorflow.ndarray.impl.buffer` are marked as implementation by their own namespace, folder or name: `AbstractDataBuffer` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBuffer.java:25, `impl`), `AbstractDataBufferWindow` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/AbstractDataBufferWindow.java:6, `impl`), `Validator` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/Validator.java:24, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
Implementation type on the public API tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapterFactory.java:44— 1 public type in `org.tensorflow.ndarray.impl.buffer.adapter` is marked as implementation by its own namespace, folder or name: `DataBufferAdapterFactory` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/adapter/DataBufferAdapterFactory.java:44, `impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16Layout.java:27— 4 public types in `org.tensorflow.ndarray.impl.buffer.layout` are marked as implementation by their own namespace, folder or name: `Bfloat16Layout` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Bfloat16Layout.java:27, `impl`), `BoolLayout` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/BoolLayout.java:24, `impl`), `Float16Layout` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/Float16Layout.java:27, `impl`), `StringLayout` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/layout/StringLayout.java:25, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
Implementation type on the public API tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/MiscDataBufferFactory.java:25— 1 public type in `org.tensorflow.ndarray.impl.buffer.misc` is marked as implementation by its own namespace, folder or name: `MiscDataBufferFactory` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/misc/MiscDataBufferFactory.java:25, `impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/NioDataBufferFactory.java:34— 1 public type in `org.tensorflow.ndarray.impl.buffer.nio` is marked as implementation by its own namespace, folder or name: `NioDataBufferFactory` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/nio/NioDataBufferFactory.java:34, `impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferFactory.java:30— 1 public type in `org.tensorflow.ndarray.impl.buffer.raw` is marked as implementation by its own namespace, folder or name: `RawDataBufferFactory` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/buffer/raw/RawDataBufferFactory.java:30, `impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
Implementation type on the public API tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:33— 9 public types in `org.tensorflow.ndarray.impl.dense` are marked as implementation by their own namespace, folder or name: `AbstractDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/AbstractDenseNdArray.java:33, `impl`), `BooleanDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/BooleanDenseNdArray.java:26, `impl`), `ByteDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/ByteDenseNdArray.java:26, `impl`), `DenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DenseNdArray.java:24, `impl`), `DoubleDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/DoubleDenseNdArray.java:26, `impl`), `FloatDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/FloatDenseNdArray.java:26, `impl`), `IntDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/IntDenseNdArray.java:26, `impl`), `LongDenseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dense/LongDenseNdArray.java:26, `impl`), and 1 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
Implementation type on the public API tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Dimension.java:21— 3 public types in `org.tensorflow.ndarray.impl.dimension` are marked as implementation by their own namespace, folder or name: `Dimension` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/Dimension.java:21, `impl`), `DimensionalSpace` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/DimensionalSpace.java:24, `impl`), `RelativeDimensionalSpace` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/dimension/RelativeDimensionalSpace.java:20, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
Implementation type on the public API tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/FastElementSequence.java:33— 6 public types in `org.tensorflow.ndarray.impl.sequence` are marked as implementation by their own namespace, folder or name: `FastElementSequence` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/FastElementSequence.java:33, `impl`), `IndexedPositionIterator` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedPositionIterator.java:20, `impl`), `CoordsLongConsumer` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/IndexedPositionIterator.java:23, `impl`), `PositionIterator` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/PositionIterator.java:23, `impl`), `SingleElementSequence` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SingleElementSequence.java:33, `impl`), `SlicingElementSequence` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sequence/SlicingElementSequence.java:33, `impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
Implementation type on the public API tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:67— 9 public types in `org.tensorflow.ndarray.impl.sparse` are marked as implementation by their own namespace, folder or name: `AbstractSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/AbstractSparseNdArray.java:67, `impl`), `BooleanSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/BooleanSparseNdArray.java:61, `impl`), `ByteSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ByteSparseNdArray.java:61, `impl`), `DoubleSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java:61, `impl`), `FloatSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/FloatSparseNdArray.java:61, `impl`), `IntSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/IntSparseNdArray.java:61, `impl`), `LongSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/LongSparseNdArray.java:60, `impl`), `ShortSparseNdArray` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/ShortSparseNdArray.java:61, `impl`), and 1 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
Implementation type on the public API tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java:30— 9 public types in `org.tensorflow.ndarray.impl.sparse.slice` are marked as implementation by their own namespace, folder or name: `BooleanSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/BooleanSparseSlice.java:30, `impl`), `ByteSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ByteSparseSlice.java:30, `impl`), `DoubleSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java:31, `impl`), `FloatSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/FloatSparseSlice.java:31, `impl`), `IntSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/IntSparseSlice.java:31, `impl`), `LongSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/LongSparseSlice.java:31, `impl`), `ObjectSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ObjectSparseSlice.java:30, `impl`), `ShortSparseSlice` (tensorflow-ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/ShortSparseSlice.java:31, `impl`), and 1 more. While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
D34 · Knowledge Freshness· Most significant orphaned file · ×3
Most significant orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/impl/MetricsHelper.java:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file tensorflow-framework/src/main/java/org/tensorflow/framework/metrics/AUC.java:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file tensorflow-core/tensorflow-core-generator/src/main/java/org/tensorflow/generator/op/ClassGenerator.java:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Fat interface: OperationAttributeInspector (18 abstract methods) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/OperationAttributeInspector.java:26— `OperationAttributeInspector` declares 18 abstract methods: `getAttrBool`, `getAttrBoolList`, `getAttrFloat`, `getAttrFloatList`, `getAttrFunction`, `getAttrFunctionList`, `getAttrInt`, `getAttrIntList`, `getAttrMetadata`, `getAttrShape`, `getAttrShapeList`, `getAttrString`, `getAttrStringList`, `getAttrTensor`, `getAttrTensorList`, `getAttrType`, `getAttrTypeList`, `getAttrValueProto`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: OperationBuilder (23 abstract methods) tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/OperationBuilder.java:38— `OperationBuilder` declares 23 abstract methods under just 6 distinct name(s): `addControlInput`, `addInput`, `addInputList`, `build`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setAttr`, `setDevice`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 23 separate responsibilities: a caller binds to 6 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 23 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×2
Projects may be oversized for their cohesion tensorflow-framework/pom.xml:1— `tensorflow-framework` (21379 LoC, 163 module-visible types across 18 directories) overshoots its size bounds. 2 of 6 build unit(s) (Maven, Python) overshoot their size bounds, lowering Project Cohesion to 3.3/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.
Projects may be oversized for their cohesion tensorflow-ndarray/pom.xml:1— `tensorflow-ndarray` (20599 LoC, 86 module-visible types across 16 directories) overshoots its size bounds. 2 of 6 build unit(s) (Maven, Python) overshoot their size bounds, lowering Project Cohesion to 3.3/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.
Disabled test tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/TensorFlowTest.java:42— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Disabled test tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/types/TStringTest.java:115— A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 3 significant file(s) lose their only recent owner: tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/Graph.java, tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/op/DispatchingGradientAdapter.java, tensorflow-core/tensorflow-core-api/src/main/java/org/tensorflow/AbstractGradientAdapter.java. Pair on, review, or document these before any departure.
No ADRs found tensorflow-core/tensorflow-core-api/pom.xml:104— 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 `tensorflow-core/tensorflow-core-api/pom.xml` makes this repository a deployable product (line 104).
Dormant codebase — 155 of 294 significant files have no living knowledge — the codebase as a whole is dormant, not 155 separate risks. Counted over 294 of the 1734 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
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.
Logging is not universal — Only 1/3 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `docs/legacy_tools`, `tensorflow-core/tensorflow-core-generator`.
No SAST REDACTED:8— 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 1 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 dependency-update automation REDACTED:97— `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
No release approval gate REDACTED:155— 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.)
Benchmarks don't track allocations tensorflow-ndarray/src/test/java/org/tensorflow/ndarray/benchmark/NdArrayBenchmark.java— A JMH/Jetpack Benchmark suite exists but nothing turns on its allocation measurement — allocations (the main way hot code pressures a garbage collector or allocator) aren't being measured.
X5 · Nullable reference types· Java packages are not null-marked everywhere · ×1
Java packages are not null-marked everywhere — 0/78 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.
Skipped (documented): testNoLeaks tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/types/TStringTest.java:116— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Disabled
Skipped (documented): loadTFTextLibrary tensorflow-core/tensorflow-core-api/src/test/java/org/tensorflow/TensorFlowTest.java:44— Skipped with a documented reason — a deferral, not lazy debt: switched off by @Disabled
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
Run 01a1e58e-0775-7fa5-a1fe-1570ba329763 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 19 · Warnings: 541 · Recommendations: 576 · Info: 2 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 18:10 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.