Public report of nissl-lab/npoi, published 23 October 2026. It has the same score, grades and number of
findings as the full report. The details of security findings (where they are in the code, which known
vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Watchdog signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey →
Signed and filed in the standard's public register, 23 October 2026, 13:40 UTC · Survey ID cd_9285336eb3d04ad1bcab6311f72325b7
nissl-lab/npoi
Measured 23 October 2026, 13:32 UTC, at code version bae3fec
A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.
Code coverage is not measured: No coverage collector is wired up.
Boundary Type-Coupling is not measured: Bounded contexts not declared.
CAI scoreProvisionalDown 1 since the last survey
The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.
A very large codebase: 523,996 lines of product code in 40 projects, tests not counted · Estimated rebuild effort: about 8.4 person-years · Weakest lens: Security and Compliance, 42
Findings by how serious they are
423 critical3003 serious474 minor
7 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
23 October 2026, 13:32 UTC
A measurement, not a certificate. The Code Assurance Index records a number
together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee
the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that
implements it, and today Watchdog is the only one that does.
The code didn't build, so the score is provisional
Watchdog couldn't build the code: the build stopped with 1 error. The dimensions that need a working build, such as complexity, duplication and dead code, were measured on an incomplete picture of the code, so their grades and the score are provisional. Fix the build errors and run the survey again for a final score. The first errors: CS0246: The type or namespace name 'NPOI' could not be found (are you missing a using directive or an assembly reference?)
The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸
68of 72 dimensions measured by tools. The other 4 are advisory notes from an AI model, which explain the code but don't count towards the score.
3880of 3900 findings point to an exact file and line, so you can open each one in the code. The other 20 concern the repository as a whole, such as missing documentation.
72dimensions across 6 lenses, read from 523,996 lines of product code in 40 projects.
nissl-lab/npoi scores 48 out of 100, but the score is provisional because the code didn't build, so the ratings below may change once it does.
The weakest lens counts most in the score, and here that is Security and Compliance, which scores 42 and is rated Weak. Its Static Analysis (SAST) dimension scores 0 out of 10, and until that reaches 4, Security and Compliance can't be rated higher than Adequate. The first actions are to resolve the 1 No ADRs found finding(s) in ADR Quality and to resolve the 3 Leaked secret finding(s) in Secret Scanning, and if Security and Compliance rose to 70, the score would rise from 48 to about 52.
423 findings are critical: 340 in Explicit Debt, 21 in Knowledge Freshness, 21 in Static Analysis (SAST), 15 in Incompleteness & stubs, 13 in Test Quality, six in Project dependency cycles, three in Secret Scanning, two in Cryptographic Hygiene, one in Secrets (history) and one in Security & performance tooling.
Watchdog couldn't measure Test Reliability, Dependency Hygiene and IL Efficiency in this code, so those dimensions are left out of the score. The product code is 523,996 lines, which would take an estimated 8.4 person-years, around €1,200,000, to rebuild.
A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.
How the score is built: what each lens counts forThe lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
If Security and Compliance rose from 42 to 70, the lowest score rated Strong, the score would rise from 48 to about 52.
Code composition: what the lines of code are
Business logic 23%Supporting code 48%Tests 28%Generated by tools 0%
New since the last survey: 208 findings
These 208 critical or serious findings weren't in the previous survey, on 9 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 212 findings
These 212 critical or serious findings were in the previous survey, on 9 October 2026, and are gone from this one. The first 100 are listed here.
Incompleteness & stubs · Both branches open with the same statements — the condition does not decide them main/HSSF/Model/InternalWorkbook.cs
Incompleteness & stubs · Guard cannot change the result — returns what the code already falls through to main/HSSF/Record/Aggregates/Chart/FrameAggregate.cs
Incompleteness & stubs · Dead branch — condition is always false main/SS/Formula/Atp/DateParser.cs
Incompleteness & stubs · Both branches open with the same statements — the condition does not decide them main/SS/Formula/Eval/RelationalOperationEval/RelationalOperationEval.cs
Incompleteness & stubs · Both branches open with the same statements — the condition does not decide them main/SS/Formula/Eval/RelationalOperationEval/RelationalOperationEval.cs
€400,000 to €2,100,000, for 6,672 to 21,602 hours of work, about 8.4 person-years for 4 to 17 engineers
Difficulty of the problem
Standard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor
×0.7 at a score of 48. 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
Very large: 523,996 lines of product code
Comment lines
The estimate prices 408,415 lines. Comment lines count towards the size of 523,996 lines but aren't priced as work.
How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.
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.
Raises the score by about 3 points · Low effort · ADR Quality
2
Resolve the 3 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED, REDACTED.
Raises the score by about 3 points · Low effort · Secret Scanning
3
Strengthen data-at-rest protection: vault your keys (Azure Key Vault / AWS KMS / IDataProtector key ring) and encrypt the most sensitive columns (EF HasConversion encryption or provider-native column encryption) — partial coverage still leaves gaps.
Raises the score by about 4 points · Medium effort · Data Protection
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.
If you do one thing first · First action
Fix the build. The code didn't build, so the dimensions that need a working build were measured on an incomplete picture of the code, and every grade in this report is provisional. Once the build works, the next survey gives a final score. The compiler's first errors: CS0246: The type or namespace name 'NPOI' could not be found (are you missing a using directive or an assembly reference?)
Based on: Solution Shape
Where the investment is most exposed · Value at risk
This code would cost about €1,200,000 to build again, about 8.4 person-years of work. Its weakest lens is Security and Compliance, at 42 (Weak). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
Architecture — bounded-context dependency graph
Each box is a bounded context (its layer projects grouped, or a project count when large); arrows show dependencies between contexts. A shared kernel is where many arrows converge.
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.
132 modules, with 447 dependencies between them. 6 loops run through 57 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 92 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.
OpenXmlFormats.Wordprocessing uses OpenXmlFormats.Dml, so a change to OpenXmlFormats.Dml can break OpenXmlFormats.Wordprocessing, while a change to OpenXmlFormats.Wordprocessing can't break OpenXmlFormats.Dml.
Position
Below the diagonal: OpenXmlFormats.Wordprocessing uses a module listed above it, which is the healthy direction.
OpenXmlFormats.Wordprocessing uses OpenXmlFormats.Vml, so a change to OpenXmlFormats.Vml can break OpenXmlFormats.Wordprocessing, while a change to OpenXmlFormats.Wordprocessing can't break OpenXmlFormats.Vml.
Position
Below the diagonal: OpenXmlFormats.Wordprocessing uses a module listed above it, which is the healthy direction.
8→11 POIFS.Crypt.Standard uses POIFS.Cryptpart of a loop✕
Connections
29 pairs of types, where a type in POIFS.Crypt.Standard uses a type in POIFS.Crypt. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
POIFS.Crypt.Standard uses POIFS.Crypt, so a change to POIFS.Crypt can break POIFS.Crypt.Standard, while a change to POIFS.Crypt.Standard can't break POIFS.Crypt.
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.
8→32 POIFS.Crypt.Standard uses Utilpart of a loop✕
Connections
12 pairs of types, where a type in POIFS.Crypt.Standard uses a type in Util.
POIFS.Crypt.Standard uses POIFS.FileSystem, so a change to POIFS.FileSystem can break POIFS.Crypt.Standard, while a change to POIFS.Crypt.Standard can't break POIFS.FileSystem.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→15 SS.Formula.Functions uses SS.Formula.Evalpart of a loop✕
Connections
242 pairs of types, where a type in SS.Formula.Functions uses a type in SS.Formula.Eval. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SS.Formula.Functions uses SS.Formula.Eval, so a change to SS.Formula.Eval can break SS.Formula.Functions, while a change to SS.Formula.Functions can't break SS.Formula.Eval.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→16 SS.Formula.Functions uses SS.Formulapart of a loop✕
Connections
45 pairs of types, where a type in SS.Formula.Functions uses a type in SS.Formula. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SS.Formula.Functions uses SS.Formula, so a change to SS.Formula can break SS.Formula.Functions, while a change to SS.Formula.Functions can't break SS.Formula.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→24 SS.Formula.Functions uses SS.UserModelpart of a loop✕
Connections
1 pair of types, where a type in SS.Formula.Functions uses a type in SS.UserModel.
SS.Formula.Functions uses SS.UserModel, so a change to SS.UserModel can break SS.Formula.Functions, while a change to SS.Formula.Functions can't break SS.UserModel.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
9→32 SS.Formula.Functions uses Utilpart of a loop✕
Connections
2 pairs of types, where a type in SS.Formula.Functions uses a type in Util.
47 pairs of types, where a type in SS.Util uses a type in SS.UserModel. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
POIFS.Crypt uses POIFS.Crypt.Standard, so a change to POIFS.Crypt.Standard can break POIFS.Crypt, while a change to POIFS.Crypt can't break POIFS.Crypt.Standard.
Position
Below the diagonal: POIFS.Crypt uses a module listed above it, which is the healthy direction.
76 pairs of types, where a type in SS.Formula.PTG uses a type in Util. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SS.Formula.UDF uses SS.Formula.Functions, so a change to SS.Formula.Functions can break SS.Formula.UDF, while a change to SS.Formula.UDF can't break SS.Formula.Functions.
Position
Below the diagonal: SS.Formula.UDF uses a module listed above it, which is the healthy direction.
XDDF.UserModel.Text uses OpenXmlFormats.Dml, so a change to OpenXmlFormats.Dml can break XDDF.UserModel.Text, while a change to XDDF.UserModel.Text can't break OpenXmlFormats.Dml.
Position
Below the diagonal: XDDF.UserModel.Text uses a module listed above it, which is the healthy direction.
XDDF.UserModel.Text uses OpenXml4Net.OPC, so a change to OpenXml4Net.OPC can break XDDF.UserModel.Text, while a change to XDDF.UserModel.Text can't break OpenXml4Net.OPC.
Position
Below the diagonal: XDDF.UserModel.Text uses a module listed above it, which is the healthy direction.
14→37 XDDF.UserModel.Text uses NPOIpart of a loop✕
Connections
1 pair of types, where a type in XDDF.UserModel.Text uses a type in NPOI.
SS.Formula.Eval uses SS.Formula.Functions, so a change to SS.Formula.Functions can break SS.Formula.Eval, while a change to SS.Formula.Eval can't break SS.Formula.Functions.
Position
Below the diagonal: SS.Formula.Eval uses a module listed above it, which is the healthy direction.
SS.Formula.Eval uses SS.Formula.PTG, so a change to SS.Formula.PTG can break SS.Formula.Eval, while a change to SS.Formula.Eval can't break SS.Formula.PTG.
Position
Below the diagonal: SS.Formula.Eval uses a module listed above it, which is the healthy direction.
15→16 SS.Formula.Eval uses SS.Formulapart of a loop✕
Connections
8 pairs of types, where a type in SS.Formula.Eval uses a type in SS.Formula.
SS.Formula uses SS.Formula.Functions, so a change to SS.Formula.Functions can break SS.Formula, while a change to SS.Formula can't break SS.Formula.Functions.
Position
Below the diagonal: SS.Formula uses a module listed above it, which is the healthy direction.
31 pairs of types, where a type in SS.Formula uses a type in SS.Formula.PTG. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
27 pairs of types, where a type in SS.Formula uses a type in SS.Formula.Eval. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
31 pairs of types, where a type in SS.Formula uses a type in SS.UserModel. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
HSSF.Record.Aggregates uses SS.Util, so a change to SS.Util can break HSSF.Record.Aggregates, while a change to HSSF.Record.Aggregates can't break SS.Util.
Position
Below the diagonal: HSSF.Record.Aggregates uses a module listed above it, which is the healthy direction.
HSSF.Record.Aggregates uses SS.Formula.PTG, so a change to SS.Formula.PTG can break HSSF.Record.Aggregates, while a change to HSSF.Record.Aggregates can't break SS.Formula.PTG.
Position
Below the diagonal: HSSF.Record.Aggregates uses a module listed above it, which is the healthy direction.
HSSF.Record.Aggregates uses SS.Formula, so a change to SS.Formula can break HSSF.Record.Aggregates, while a change to HSSF.Record.Aggregates can't break SS.Formula.
Position
Below the diagonal: HSSF.Record.Aggregates uses a module listed above it, which is the healthy direction.
17→21 HSSF.Record.Aggregates uses HSSF.Modelpart of a loop✕
Connections
12 pairs of types, where a type in HSSF.Record.Aggregates uses a type in HSSF.Model.
HSSF.Record.Aggregates uses HSSF.Model, so a change to HSSF.Model can break HSSF.Record.Aggregates, while a change to HSSF.Record.Aggregates can't break HSSF.Model.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
17→22 HSSF.Record.Aggregates uses HSSF.Recordpart of a loop✕
Connections
59 pairs of types, where a type in HSSF.Record.Aggregates uses a type in HSSF.Record. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
HSSF.Record.Aggregates uses HSSF.Record, so a change to HSSF.Record can break HSSF.Record.Aggregates, while a change to HSSF.Record.Aggregates can't break HSSF.Record.
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.
17→24 HSSF.Record.Aggregates uses SS.UserModelpart of a loop✕
Connections
2 pairs of types, where a type in HSSF.Record.Aggregates uses a type in SS.UserModel.
HSSF.Record.Aggregates uses SS.UserModel, so a change to SS.UserModel can break HSSF.Record.Aggregates, while a change to HSSF.Record.Aggregates can't break SS.UserModel.
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.
HSSF.Record.CF uses SS.Formula.PTG, so a change to SS.Formula.PTG can break HSSF.Record.CF, while a change to HSSF.Record.CF can't break SS.Formula.PTG.
Position
Below the diagonal: HSSF.Record.CF uses a module listed above it, which is the healthy direction.
HSSF.Record.Chart uses SS.Formula.PTG, so a change to SS.Formula.PTG can break HSSF.Record.Chart, while a change to HSSF.Record.Chart can't break SS.Formula.PTG.
Position
Below the diagonal: HSSF.Record.Chart uses a module listed above it, which is the healthy direction.
HSSF.Record.Chart uses SS.Formula, so a change to SS.Formula can break HSSF.Record.Chart, while a change to HSSF.Record.Chart can't break SS.Formula.
Position
Below the diagonal: HSSF.Record.Chart uses a module listed above it, which is the healthy direction.
19→22 HSSF.Record.Chart uses HSSF.Recordpart of a loop✕
Connections
107 pairs of types, where a type in HSSF.Record.Chart uses a type in HSSF.Record. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
HSSF.Record.Chart uses HSSF.Record, so a change to HSSF.Record can break HSSF.Record.Chart, while a change to HSSF.Record.Chart can't break HSSF.Record.
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.
63 pairs of types, where a type in HSSF.Record.Chart uses a type in Util. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
HSSF.UserModel uses SS.Formula.Functions, so a change to SS.Formula.Functions can break HSSF.UserModel, while a change to HSSF.UserModel can't break SS.Formula.Functions.
Position
Below the diagonal: HSSF.UserModel uses a module listed above it, which is the healthy direction.
HSSF.UserModel uses SS.Formula.PTG, so a change to SS.Formula.PTG can break HSSF.UserModel, while a change to HSSF.UserModel can't break SS.Formula.PTG.
Position
Below the diagonal: HSSF.UserModel uses a module listed above it, which is the healthy direction.
HSSF.UserModel uses SS.Formula.UDF, so a change to SS.Formula.UDF can break HSSF.UserModel, while a change to HSSF.UserModel can't break SS.Formula.UDF.
Position
Below the diagonal: HSSF.UserModel uses a module listed above it, which is the healthy direction.
HSSF.UserModel uses SS.Formula.Eval, so a change to SS.Formula.Eval can break HSSF.UserModel, while a change to HSSF.UserModel can't break SS.Formula.Eval.
Position
Below the diagonal: HSSF.UserModel uses a module listed above it, which is the healthy direction.
HSSF.UserModel uses HSSF.Record.Aggregates, so a change to HSSF.Record.Aggregates can break HSSF.UserModel, while a change to HSSF.UserModel can't break HSSF.Record.Aggregates.
Position
Below the diagonal: HSSF.UserModel uses a module listed above it, which is the healthy direction.
HSSF.UserModel uses HSSF.Record.CF, so a change to HSSF.Record.CF can break HSSF.UserModel, while a change to HSSF.UserModel can't break HSSF.Record.CF.
Position
Below the diagonal: HSSF.UserModel uses a module listed above it, which is the healthy direction.
HSSF.UserModel uses HSSF.Record.Chart, so a change to HSSF.Record.Chart can break HSSF.UserModel, while a change to HSSF.UserModel can't break HSSF.Record.Chart.
Position
Below the diagonal: HSSF.UserModel uses a module listed above it, which is the healthy direction.
20→21 HSSF.UserModel uses HSSF.Modelpart of a loop✕
Connections
8 pairs of types, where a type in HSSF.UserModel uses a type in HSSF.Model.
HSSF.UserModel uses HSSF.Model, so a change to HSSF.Model can break HSSF.UserModel, while a change to HSSF.UserModel can't break HSSF.Model.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
20→22 HSSF.UserModel uses HSSF.Recordpart of a loop✕
Connections
61 pairs of types, where a type in HSSF.UserModel uses a type in HSSF.Record. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
HSSF.UserModel uses HSSF.Util, so a change to HSSF.Util can break HSSF.UserModel, while a change to HSSF.UserModel can't break HSSF.Util.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
20→24 HSSF.UserModel uses SS.UserModelpart of a loop✕
Connections
172 pairs of types, where a type in HSSF.UserModel uses a type in SS.UserModel. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
HSSF.UserModel uses POIFS.FileSystem, so a change to POIFS.FileSystem can break HSSF.UserModel, while a change to HSSF.UserModel can't break POIFS.FileSystem.
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.
HSSF.Model uses HSSF.Record.Aggregates, so a change to HSSF.Record.Aggregates can break HSSF.Model, while a change to HSSF.Model can't break HSSF.Record.Aggregates.
Position
Below the diagonal: HSSF.Model uses a module listed above it, which is the healthy direction.
112 pairs of types, where a type in HSSF.Model uses a type in HSSF.Record. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
27 pairs of types, where a type in SS.UserModel uses a type in SS.Util. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
SS.UserModel uses POIFS.FileSystem, so a change to POIFS.FileSystem can break SS.UserModel, while a change to SS.UserModel can't break POIFS.FileSystem.
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.
XSSF.UserModel.Helpers uses OpenXmlFormats.Spreadsheet, so a change to OpenXmlFormats.Spreadsheet can break XSSF.UserModel.Helpers, while a change to XSSF.UserModel.Helpers can't break OpenXmlFormats.Spreadsheet.
Position
Below the diagonal: XSSF.UserModel.Helpers uses a module listed above it, which is the healthy direction.
XSSF.UserModel.Helpers uses SS.Util, so a change to SS.Util can break XSSF.UserModel.Helpers, while a change to XSSF.UserModel.Helpers can't break SS.Util.
Position
Below the diagonal: XSSF.UserModel.Helpers uses a module listed above it, which is the healthy direction.
XSSF.UserModel.Helpers uses POIFS.Crypt, so a change to POIFS.Crypt can break XSSF.UserModel.Helpers, while a change to XSSF.UserModel.Helpers can't break POIFS.Crypt.
Position
Below the diagonal: XSSF.UserModel.Helpers uses a module listed above it, which is the healthy direction.
XSSF.UserModel.Helpers uses SS.Formula.PTG, so a change to SS.Formula.PTG can break XSSF.UserModel.Helpers, while a change to XSSF.UserModel.Helpers can't break SS.Formula.PTG.
Position
Below the diagonal: XSSF.UserModel.Helpers uses a module listed above it, which is the healthy direction.
XSSF.UserModel.Helpers uses SS.Formula, so a change to SS.Formula can break XSSF.UserModel.Helpers, while a change to XSSF.UserModel.Helpers can't break SS.Formula.
Position
Below the diagonal: XSSF.UserModel.Helpers uses a module listed above it, which is the healthy direction.
XSSF.UserModel.Helpers uses SS.UserModel, so a change to SS.UserModel can break XSSF.UserModel.Helpers, while a change to XSSF.UserModel.Helpers can't break SS.UserModel.
Position
Below the diagonal: XSSF.UserModel.Helpers uses a module listed above it, which is the healthy direction.
25→27 XSSF.UserModel.Helpers uses XSSF.Modelpart of a loop✕
Connections
1 pair of types, where a type in XSSF.UserModel.Helpers uses a type in XSSF.Model.
XSSF.UserModel.Helpers uses XSSF.Model, so a change to XSSF.Model can break XSSF.UserModel.Helpers, while a change to XSSF.UserModel.Helpers can't break XSSF.Model.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
25→28 XSSF.UserModel.Helpers uses XSSF.UserModelpart of a loop✕
Connections
8 pairs of types, where a type in XSSF.UserModel.Helpers uses a type in XSSF.UserModel.
XSSF.UserModel.Helpers uses XSSF.UserModel, so a change to XSSF.UserModel can break XSSF.UserModel.Helpers, while a change to XSSF.UserModel.Helpers can't break XSSF.UserModel.
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.
XSSF.UserModel.Extensions uses OpenXmlFormats.Spreadsheet, so a change to OpenXmlFormats.Spreadsheet can break XSSF.UserModel.Extensions, while a change to XSSF.UserModel.Extensions can't break OpenXmlFormats.Spreadsheet.
Position
Below the diagonal: XSSF.UserModel.Extensions uses a module listed above it, which is the healthy direction.
XSSF.UserModel.Extensions uses SS.UserModel, so a change to SS.UserModel can break XSSF.UserModel.Extensions, while a change to XSSF.UserModel.Extensions can't break SS.UserModel.
Position
Below the diagonal: XSSF.UserModel.Extensions uses a module listed above it, which is the healthy direction.
XSSF.UserModel.Extensions uses XSSF.UserModel.Helpers, so a change to XSSF.UserModel.Helpers can break XSSF.UserModel.Extensions, while a change to XSSF.UserModel.Extensions can't break XSSF.UserModel.Helpers.
Position
Below the diagonal: XSSF.UserModel.Extensions uses a module listed above it, which is the healthy direction.
26→27 XSSF.UserModel.Extensions uses XSSF.Modelpart of a loop✕
Connections
1 pair of types, where a type in XSSF.UserModel.Extensions uses a type in XSSF.Model.
XSSF.UserModel.Extensions uses XSSF.Model, so a change to XSSF.Model can break XSSF.UserModel.Extensions, while a change to XSSF.UserModel.Extensions can't break XSSF.Model.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
26→28 XSSF.UserModel.Extensions uses XSSF.UserModelpart of a loop✕
Connections
2 pairs of types, where a type in XSSF.UserModel.Extensions uses a type in XSSF.UserModel.
XSSF.UserModel.Extensions uses XSSF.UserModel, so a change to XSSF.UserModel can break XSSF.UserModel.Extensions, while a change to XSSF.UserModel.Extensions can't break XSSF.UserModel.
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.
XSSF.Model uses OpenXmlFormats.Spreadsheet, so a change to OpenXmlFormats.Spreadsheet can break XSSF.Model, while a change to XSSF.Model can't break OpenXmlFormats.Spreadsheet.
Position
Below the diagonal: XSSF.Model uses a module listed above it, which is the healthy direction.
XSSF.Model uses XSSF.UserModel.Helpers, so a change to XSSF.UserModel.Helpers can break XSSF.Model, while a change to XSSF.Model can't break XSSF.UserModel.Helpers.
Position
Below the diagonal: XSSF.Model uses a module listed above it, which is the healthy direction.
XSSF.Model uses XSSF.UserModel.Extensions, so a change to XSSF.UserModel.Extensions can break XSSF.Model, while a change to XSSF.Model can't break XSSF.UserModel.Extensions.
Position
Below the diagonal: XSSF.Model uses a module listed above it, which is the healthy direction.
27→28 XSSF.Model uses XSSF.UserModelpart of a loop✕
Connections
8 pairs of types, where a type in XSSF.Model uses a type in XSSF.UserModel.
XSSF.UserModel uses OpenXmlFormats.Dml, so a change to OpenXmlFormats.Dml can break XSSF.UserModel, while a change to XSSF.UserModel can't break OpenXmlFormats.Dml.
Position
Below the diagonal: XSSF.UserModel uses a module listed above it, which is the healthy direction.
48 pairs of types, where a type in XSSF.UserModel uses a type in OpenXmlFormats.Spreadsheet. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
XSSF.UserModel uses OpenXmlFormats.Spreadsheet, so a change to OpenXmlFormats.Spreadsheet can break XSSF.UserModel, while a change to XSSF.UserModel can't break OpenXmlFormats.Spreadsheet.
Position
Below the diagonal: XSSF.UserModel uses a module listed above it, which is the healthy direction.
XSSF.UserModel uses OpenXmlFormats.Vml, so a change to OpenXmlFormats.Vml can break XSSF.UserModel, while a change to XSSF.UserModel can't break OpenXmlFormats.Vml.
Position
Below the diagonal: XSSF.UserModel uses a module listed above it, which is the healthy direction.
32 pairs of types, where a type in XSSF.UserModel uses a type in OpenXml4Net.OPC. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
XSSF.UserModel uses OpenXml4Net.OPC, so a change to OpenXml4Net.OPC can break XSSF.UserModel, while a change to XSSF.UserModel can't break OpenXml4Net.OPC.
Position
Below the diagonal: XSSF.UserModel uses a module listed above it, which is the healthy direction.
29 pairs of types, where a type in XSSF.UserModel uses a type in SS.Util. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
XSSF.UserModel uses SS.Formula.PTG, so a change to SS.Formula.PTG can break XSSF.UserModel, while a change to XSSF.UserModel can't break SS.Formula.PTG.
Position
Below the diagonal: XSSF.UserModel uses a module listed above it, which is the healthy direction.
XSSF.UserModel uses SS.Formula.UDF, so a change to SS.Formula.UDF can break XSSF.UserModel, while a change to XSSF.UserModel can't break SS.Formula.UDF.
Position
Below the diagonal: XSSF.UserModel uses a module listed above it, which is the healthy direction.
XSSF.UserModel uses XDDF.UserModel.Text, so a change to XDDF.UserModel.Text can break XSSF.UserModel, while a change to XSSF.UserModel can't break XDDF.UserModel.Text.
Position
Below the diagonal: XSSF.UserModel uses a module listed above it, which is the healthy direction.
231 pairs of types, where a type in XSSF.UserModel uses a type in SS.UserModel. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
XSSF.UserModel uses XSSF.UserModel.Helpers, so a change to XSSF.UserModel.Helpers can break XSSF.UserModel, while a change to XSSF.UserModel can't break XSSF.UserModel.Helpers.
Position
Below the diagonal: XSSF.UserModel uses a module listed above it, which is the healthy direction.
XSSF.UserModel uses XSSF.UserModel.Extensions, so a change to XSSF.UserModel.Extensions can break XSSF.UserModel, while a change to XSSF.UserModel can't break XSSF.UserModel.Extensions.
Position
Below the diagonal: XSSF.UserModel uses a module listed above it, which is the healthy direction.
42 pairs of types, where a type in XSSF.UserModel uses a type in XSSF.Model. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
XSSF.UserModel uses XDDF.UserModel.Chart, so a change to XDDF.UserModel.Chart can break XSSF.UserModel, while a change to XSSF.UserModel can't break XDDF.UserModel.Chart.
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.
XSSF.UserModel uses POIFS.FileSystem, so a change to POIFS.FileSystem can break XSSF.UserModel, while a change to XSSF.UserModel can't break POIFS.FileSystem.
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.
XDDF.UserModel.Chart uses OpenXmlFormats.Dml, so a change to OpenXmlFormats.Dml can break XDDF.UserModel.Chart, while a change to XDDF.UserModel.Chart can't break OpenXmlFormats.Dml.
Position
Below the diagonal: XDDF.UserModel.Chart uses a module listed above it, which is the healthy direction.
XDDF.UserModel.Chart uses OpenXmlFormats.Spreadsheet, so a change to OpenXmlFormats.Spreadsheet can break XDDF.UserModel.Chart, while a change to XDDF.UserModel.Chart can't break OpenXmlFormats.Spreadsheet.
Position
Below the diagonal: XDDF.UserModel.Chart uses a module listed above it, which is the healthy direction.
XDDF.UserModel.Chart uses OpenXml4Net.OPC, so a change to OpenXml4Net.OPC can break XDDF.UserModel.Chart, while a change to XDDF.UserModel.Chart can't break OpenXml4Net.OPC.
Position
Below the diagonal: XDDF.UserModel.Chart uses a module listed above it, which is the healthy direction.
XDDF.UserModel.Chart uses XDDF.UserModel.Text, so a change to XDDF.UserModel.Text can break XDDF.UserModel.Chart, while a change to XDDF.UserModel.Chart can't break XDDF.UserModel.Text.
Position
Below the diagonal: XDDF.UserModel.Chart uses a module listed above it, which is the healthy direction.
XDDF.UserModel.Chart uses SS.UserModel, so a change to SS.UserModel can break XDDF.UserModel.Chart, while a change to XDDF.UserModel.Chart can't break SS.UserModel.
Position
Below the diagonal: XDDF.UserModel.Chart uses a module listed above it, which is the healthy direction.
XDDF.UserModel.Chart uses XSSF.UserModel, so a change to XSSF.UserModel can break XDDF.UserModel.Chart, while a change to XDDF.UserModel.Chart can't break XSSF.UserModel.
Position
Below the diagonal: XDDF.UserModel.Chart uses a module listed above it, which is the healthy direction.
29→37 XDDF.UserModel.Chart uses NPOIpart of a loop✕
Connections
3 pairs of types, where a type in XDDF.UserModel.Chart uses a type in NPOI.
XSSF.EventUserModel uses OpenXml4Net.OPC, so a change to OpenXml4Net.OPC can break XSSF.EventUserModel, while a change to XSSF.EventUserModel can't break OpenXml4Net.OPC.
Position
Below the diagonal: XSSF.EventUserModel uses a module listed above it, which is the healthy direction.
XSSF.EventUserModel uses SS.UserModel, so a change to SS.UserModel can break XSSF.EventUserModel, while a change to XSSF.EventUserModel can't break SS.UserModel.
Position
Below the diagonal: XSSF.EventUserModel uses a module listed above it, which is the healthy direction.
XSSF.EventUserModel uses XSSF.Model, so a change to XSSF.Model can break XSSF.EventUserModel, while a change to XSSF.EventUserModel can't break XSSF.Model.
Position
Below the diagonal: XSSF.EventUserModel uses a module listed above it, which is the healthy direction.
XSSF.EventUserModel uses XSSF.UserModel, so a change to XSSF.UserModel can break XSSF.EventUserModel, while a change to XSSF.EventUserModel can't break XSSF.UserModel.
Position
Below the diagonal: XSSF.EventUserModel uses a module listed above it, which is the healthy direction.
30→39 XSSF.EventUserModel uses XSSF.Binarypart of a loop✕
Connections
4 pairs of types, where a type in XSSF.EventUserModel uses a type in XSSF.Binary.
XSSF.EventUserModel uses XSSF.Binary, so a change to XSSF.Binary can break XSSF.EventUserModel, while a change to XSSF.EventUserModel can't break XSSF.Binary.
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.
XWPF.UserModel uses OpenXmlFormats.Dml, so a change to OpenXmlFormats.Dml can break XWPF.UserModel, while a change to XWPF.UserModel can't break OpenXmlFormats.Dml.
Position
Below the diagonal: XWPF.UserModel uses a module listed above it, which is the healthy direction.
XWPF.UserModel uses OpenXml4Net.OPC, so a change to OpenXml4Net.OPC can break XWPF.UserModel, while a change to XWPF.UserModel can't break OpenXml4Net.OPC.
Position
Below the diagonal: XWPF.UserModel uses a module listed above it, which is the healthy direction.
83 pairs of types, where a type in XWPF.UserModel uses a type in OpenXmlFormats.Wordprocessing. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
XWPF.UserModel uses OpenXmlFormats.Wordprocessing, so a change to OpenXmlFormats.Wordprocessing can break XWPF.UserModel, while a change to XWPF.UserModel can't break OpenXmlFormats.Wordprocessing.
Position
Below the diagonal: XWPF.UserModel uses a module listed above it, which is the healthy direction.
XWPF.UserModel uses XDDF.UserModel.Chart, so a change to XDDF.UserModel.Chart can break XWPF.UserModel, while a change to XWPF.UserModel can't break XDDF.UserModel.Chart.
Position
Below the diagonal: XWPF.UserModel uses a module listed above it, which is the healthy direction.
38 pairs of types, where a type in XWPF.UserModel uses a type in NPOI. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
Util uses OpenXmlFormats.Wordprocessing, so a change to OpenXmlFormats.Wordprocessing can break Util, while a change to Util can't break OpenXmlFormats.Wordprocessing.
Position
Below the diagonal: Util uses a module listed above it, which is the healthy direction.
POIFS.Properties uses POIFS.FileSystem, so a change to POIFS.FileSystem can break POIFS.Properties, while a change to POIFS.Properties can't break POIFS.FileSystem.
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.
XSSF.Streaming uses OpenXml4Net.OPC, so a change to OpenXml4Net.OPC can break XSSF.Streaming, while a change to XSSF.Streaming can't break OpenXml4Net.OPC.
Position
Below the diagonal: XSSF.Streaming uses a module listed above it, which is the healthy direction.
XSSF.Streaming uses SS.Formula.PTG, so a change to SS.Formula.PTG can break XSSF.Streaming, while a change to XSSF.Streaming can't break SS.Formula.PTG.
Position
Below the diagonal: XSSF.Streaming uses a module listed above it, which is the healthy direction.
XSSF.Streaming uses SS.Formula.UDF, so a change to SS.Formula.UDF can break XSSF.Streaming, while a change to XSSF.Streaming can't break SS.Formula.UDF.
Position
Below the diagonal: XSSF.Streaming uses a module listed above it, which is the healthy direction.
81 pairs of types, where a type in XSSF.Streaming uses a type in SS.UserModel. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
XSSF.Streaming uses XSSF.UserModel, so a change to XSSF.UserModel can break XSSF.Streaming, while a change to XSSF.Streaming can't break XSSF.UserModel.
Position
Below the diagonal: XSSF.Streaming uses a module listed above it, which is the healthy direction.
XSSF.Streaming uses XDDF.UserModel.Chart, so a change to XDDF.UserModel.Chart can break XSSF.Streaming, while a change to XSSF.Streaming can't break XDDF.UserModel.Chart.
Position
Below the diagonal: XSSF.Streaming uses a module listed above it, which is the healthy direction.
POIFS.FileSystem uses POIFS.Properties, so a change to POIFS.Properties can break POIFS.FileSystem, while a change to POIFS.FileSystem can't break POIFS.Properties.
Position
Below the diagonal: POIFS.FileSystem uses a module listed above it, which is the healthy direction.
HSSF.Extractor uses HSSF.UserModel, so a change to HSSF.UserModel can break HSSF.Extractor, while a change to HSSF.Extractor can't break HSSF.UserModel.
Position
Below the diagonal: HSSF.Extractor uses a module listed above it, which is the healthy direction.
HSSF.Extractor uses POIFS.FileSystem, so a change to POIFS.FileSystem can break HSSF.Extractor, while a change to HSSF.Extractor can't break POIFS.FileSystem.
Position
Below the diagonal: HSSF.Extractor uses a module listed above it, which is the healthy direction.
XSSF.Binary uses XSSF.UserModel.Helpers, so a change to XSSF.UserModel.Helpers can break XSSF.Binary, while a change to XSSF.Binary can't break XSSF.UserModel.Helpers.
Position
Below the diagonal: XSSF.Binary uses a module listed above it, which is the healthy direction.
XSSF.Binary uses XSSF.EventUserModel, so a change to XSSF.EventUserModel can break XSSF.Binary, while a change to XSSF.Binary can't break XSSF.EventUserModel.
Position
Below the diagonal: XSSF.Binary uses a module listed above it, which is the healthy direction.
XSSF.Extractor uses OpenXml4Net.OPC, so a change to OpenXml4Net.OPC can break XSSF.Extractor, while a change to XSSF.Extractor can't break OpenXml4Net.OPC.
Position
Below the diagonal: XSSF.Extractor uses a module listed above it, which is the healthy direction.
XSSF.Extractor uses XSSF.UserModel, so a change to XSSF.UserModel can break XSSF.Extractor, while a change to XSSF.Extractor can't break XSSF.UserModel.
Position
Below the diagonal: XSSF.Extractor uses a module listed above it, which is the healthy direction.
XSSF.Extractor uses XSSF.EventUserModel, so a change to XSSF.EventUserModel can break XSSF.Extractor, while a change to XSSF.Extractor can't break XSSF.EventUserModel.
Position
Below the diagonal: XSSF.Extractor uses a module listed above it, which is the healthy direction.
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
184
High / Critical
A03:2025 — Software Supply Chain Failures
7
Medium
A07:2025 — Authentication Failures
4
High / Critical
Roadmap
Immediately secure sensitive data by encrypting keys and columns, and fix password storage by implementing proper salted hashing. Simultaneously, resolve the three leaked secrets and address the missing architecture decision records to ensure compliance and documentation integrity.
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.
Store passwords with a salted KDF — `Microsoft.AspNetCore.Identity.PasswordHasher<T>`, `Rfc2898DeriveBytes` (PBKDF2), or BCrypt/Argon2 — and compare with `CryptographicOperations.FixedTimeEquals`. (A fast/plain hash, or a client-hashed value stored and compared verbatim, is not password storage.) Start in `main/HSSF/Record/Crypto/Biff8EncryptionKey.cs:54`.
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.
Per-file score 0–10 — a quality signature. Of 869 files carrying findings, judged against the Production bar: 4% slop · 58% mixed · 38% near-clean.
File
Score
Band
Worst signal
OpenXmlFormats/Wordprocessing/Settings.cs
1.0
Slop
Explicit Debt: WriteOnlyPrivateField
main/HSSF/Model/InternalChart.cs
1.0
Slop
Explicit Debt: WriteOnlyPrivateField
main/HSSF/Record/EscherAggregate.cs
1.0
Slop
Explicit Debt: WriteOnlyPrivateField
ooxml/XWPF/Usermodel/XWPFDocument.cs
1.0
Slop
Explicit Debt: EmptyCatchBlock
main/HPSF/Property.cs
1.2
Slop
Explicit Debt: EmptyCatchBlock
ooxml/XSSF/EventUserModel/XSSFSheetXMLHandler.cs
1.3
Slop
Explicit Debt: EmptyCatchBlock
REDACTED
1.3
Slop
Explicit Debt: WriteOnlyPrivateField
main/SS/UserModel/DataFormatter.cs
1.5
Slop
Explicit Debt: WriteOnlyPrivateField
main/SS/Format/CellDateFormatter.cs
1.5
Slop
Explicit Debt: WriteOnlyPrivateField
main/HSSF/Record/HyperlinkRecord.cs
1.6
Slop
Explicit Debt: WriteOnlyPrivateField
testcases/main/DDF/TestEscherDump.cs
1.8
Slop
Explicit Debt: WriteOnlyPrivateField
ooxml/XSSF/Streaming/SXSSFWorkbook.cs
1.9
Slop
Explicit Debt: EmptyCatchBlock
OpenXmlFormats/Vml/SpreadsheetDrawing.cs
1.9
Slop
Explicit Debt: WriteOnlyPrivateField
REDACTED
1.9
Slop
Explicit Debt: WriteOnlyPrivateField
main/HSSF/UserModel/HSSFChart.cs
1.9
Slop
Explicit Debt: WriteOnlyPrivateField
testcases/main/HPSF/Basic/TestWrite.cs
2.0
Slop
Explicit Debt: WriteOnlyPrivateField
REDACTED
2.1
Slop
Explicit Debt: EmptyCatchBlock
ooxml/XDDF/UserModel/Chart/XDDFChart.cs
2.4
Slop
Explicit Debt: EmptyCatchBlock
REDACTED
2.4
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
2.4
Slop
Static Analysis (SAST): High: REDACTED
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 — 423
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 — 3003
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 — 474
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 7
Something this survey could not settle
from the outside, and which could be critical or serious. Either a control was required and no
positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves
nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean
result. These are excluded from the score rather than awarded a pass, so the number on the cover neither
rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each
one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 68 of 72 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 72 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, 3880 of 3900 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability not included — no test tier completed within its budget.
D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: /usr/share/dotnet/sdk/10.0.400/NuGet.targets(521,5): error MSB3202: The project file "TestCases/scratchpad/TestCases.csproj" was not found. [scratchpad/NPOI.ScratchPad.sln].
D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'main/NPOI.Core.csproj' with message: The URL of repository remote 'origin' is invalid: ''.
D22 Internal API Consistency — 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. The loaded project set declares no packable project and no `.Contracts` project, so there is no intentionally-exposed surface for API consistency to be judged over.
D23 Boundary Type-Coupling — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Large codebase (523,956 production LoC in the .NET projects) with no declared bounded contexts — cross-boundary type coupling is unassessed Bounded contexts cannot be inferred from a codebase that is not physically organised by them (D-321), so with none declared there are no boundaries for the coupling pass to measure across. You can widen what we reach: name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can 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"]`.
D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `main/SS/Formula/Functions/Forecast.cs`, `scratchpad/HSLF/Model/ActiveXShape.cs`, `scratchpad/HSLF/Model/AutoShape.cs`, `scratchpad/HSLF/Model/AutoShapes.cs`, `scratchpad/HSLF/Model/Fill.cs`, … (+21 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
D39 IL Efficiency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. IL NOT MEASURED: the analyzer's own build of this repository failed for an ENVIRONMENT reason (exit 1) — MSBuild's engine or the CLR gave up, or our image does not carry the SDK band/targeting pack this repository needs. This is OUR limitation, not a defect in the repo, and it is not a statement that this repository fails to build. D18 owns the question of whether this repository builds; it was not answered here.
GD1 Unfinished & placeholder code — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 187 further occurrence(s) are not listed individually; the score already reflects all 227.
IC1 Incompleteness & stubs — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 3177 further occurrence(s) are not listed individually; the score already reflects all 3217.
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.
X3 Exception handling — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 13 further occurrence(s) are not listed individually; the score already reflects all 53.
Package restore incomplete — third-party types were unresolved in part of the solution — NuGet restore did not complete for tools/DocPartViewer/DocPartViewer/DocPartViewer.csproj, so those projects were analysed with framework references only: every check keyed on a third-party type saw an error type there and reported nothing. Findings on those projects are a lower bound; run `dotnet restore` on them and rescan.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
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.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample — it is advisory and cannot weigh a comment against the precise code change it was written to explain.
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").
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
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.
The LLM boundary
LLM-set scores this run (4): D19, D21, D24, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
258 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was CharacterSprmUncompressor.UncompressCHPOperation at 131. A further 30 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being LocaleUtil.GetLocaleFromLCID at 457 — they are counted neither in the figure above nor in this dimension's score. 21 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: main/Util/LocaleUtil.cs (LocaleUtil.GetLocaleFromLCID at 457), ooxml/XDDF/UserModel/PresetGeometry.cs (PresetGeometryExtensions.ToST_ShapeType at 189), ooxml/XDDF/UserModel/PresetColor.cs (PresetColorExtensions.ToST_PresetColorVal at 139), main/HPSF/TypedPropertyValue.cs (TypedPropertyValue.ReadValue at 73), main/HSSF/Record/UnknownRecord.cs (UnknownRecord.GetBiffName at 66), and 16 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
+ 251 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with CharacterSprmUncompressor.UncompressCHPOperation (cyclomatic 131). — Refactoring it lifts Cyclomatic Complexity from 5.7 to about 5.8/10.
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 426 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 120 down to 120 or less in Cognitive Complexity — start with Form1.button2_Click (cognitive 134), CT_ParaRPrOriginal.Write (cognitive 121). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cognitive Complexity from 5.7 to about 5.8/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.9 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 64 TooManyMethods finding(s) in God Classes — start with Paragraph.cs (3), BigInteger.cs (2), Run.cs. — One of this dimension's main actionable groups (64 warning-level).
Resolve the 62 FileTooLong finding(s) in God Classes — start with CT_PivotCacheDefinition.cs, Paragraph.cs, CT_PivotTableDefinition.cs. — One of this dimension's main actionable groups (62 warning-level).
Resolve the 36 MethodTooLong finding(s) in God Classes — start with Settings.cs (4), CT_PivotTableDefinition.cs (3), Run.cs (3). — One of this dimension's main actionable groups (36 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
247 duplicated block group(s) detected. A further 12 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.
+ 97 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 22 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with InternalChart.cs (4), DropBarAggregate.cs, CFRule12Record.cs. — One of this dimension's main actionable groups (22 warning-level).
Resolve the 18 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with LittleEndian.cs (2), REDACTED (2), BinaryRC4Encryptor.cs (2). — One of this dimension's main actionable groups (18 warning-level).
Resolve the 17 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with InternalChart.cs (3), CrtLayout12ARecord.cs (2), XDDFRunProperties.cs. — One of this dimension's main actionable groups (17 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.8 / 10Stronggated by 1 serious finding✓ 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.
Off the main sequence: NPOI.Core(net472)main/NPOI.Core.csproj:1
What to do
Resolve the 1 Off the main sequence finding(s) in Coupling — start with NPOI.Core.csproj. — One of this dimension's main actionable groups (1 warning-level).
Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
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 50 Low cohesion finding(s) in Cohesion (LCOM4) — start with Paragraph.cs (7), Text.cs (3), SpreadsheetDrawing.cs (3). — One of this dimension's main actionable groups (50 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
8454 test methods: 8454 unit, 0 integration, 0 BDD, 0 e2e.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.5 / 10Adequategated by 13 critical 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.
144 skipped (112 with a documented reason), 94 zero-assertion, 1 excluded from compilation in 1 file(s), 10 whose failure is swallowed by a catch-all, 1 mock references across 4327 tests.
No assertions (empty test): TestKthSmallest · ×8testcases/main/SS/Formula/Functions/TestStatsLib.cs:109
Tests excluded from compilation: testcases/ooxml/XSSF/UserModel/Charts/TestXSSFNumberCache.cstestcases/ooxml/XSSF/UserModel/Charts/TestXSSFNumberCache.cs:32
No assertions: TestProblemMetadata · ×80testcases/scratchpad/HWPF/Extractor/TestWordExtractorBugs.cs:32
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 8 No assertions (empty test) finding(s) in Test Quality — start with TestXWPFHeader.cs (4), TestStatsLib.cs, TestSXSSFSheet.cs. — One of this dimension's main actionable groups (8 issue-level).
Resolve the 4 Assertions commented out finding(s) in Test Quality — start with TestCellFormat.cs, TestHexDump.cs, TestDecryptor.cs. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 Tests excluded from compilation finding(s) in Test Quality — start with TestXSSFNumberCache.cs. — One of this dimension's main actionable groups (1 issue-level).
Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether 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.
Resolve the 3 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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 168 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 22 direct `PackageReference`(s), and 161 further package(s) were reached beyond them by closing the graph over nuget.org's own nuspec dependency graph — so a banned licence pulled in only by a dependency's OWN dependencies is inside this verdict. A package whose licence nuget.org could not be asked for is not graded, and version ranges are taken at their lower bound, so this is the closure as that graph states it rather than a restored consumer's exact resolution.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with ExcelStyleDateFormatter.cs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.6 / 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.
40 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is main/SS/Formula/WorkbookEvaluator.cs. Counted over 966 of the 2117 production source files in this repository: 722 are under the ~2,400-byte size floor this dimension measures over, and the remaining 429 have no attributable history left to measure.
Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
1769 deducted debt markers + unmeasured dead symbols across 523956 LoC in the .NET projects (1.2/KLoC) → score 7.7. Dead code not measured: the solution did not load cleanly, so the reference search was skipped.
+ 7 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 230 WriteOnlyPrivateField finding(s) in Explicit Debt — start with SpreadsheetDrawing.cs (60), InternalChart.cs (8), StyleDescription.cs (8). — One of this dimension's main actionable groups (230 issue-level).
Resolve the 77 NoWarnInCsproj finding(s) in Explicit Debt — start with Directory.Build.props (73), _build.csproj (3), NPOI.Benchmarks.csproj. — One of this dimension's main actionable groups (77 issue-level).
Resolve the 31 EmptyCatchBlock finding(s) in Explicit Debt — start with Property.cs (3), XDDFChart.cs (2), REDACTED (2). — One of this dimension's main actionable groups (31 issue-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D18 · Solution Shape3.0 / 10Weak✓ Tool-verified
What it measures: Whether the solution is laid out in a sensible, conventional structure.
Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.
40 projects, 11802 source files, 681341 hand-written lines of code (523956 production / 157385 test — the split is derived per file: test is what its project, its own path, or a compile-guarded region marks as test, and a file carrying no test signal counts as production), plus 811 generated (machine-written code — designer, scaffolded and tool-emitted files — excluded from quality), 76 inter-project edges (build failed). Measured across 6 solutions loaded as one workspace: `solution/NPOI.Core.sln`, `scratchpad/NPOI.ScratchPad.sln`, `benchmarks/NPOI.Benchmarks/NPOI.Benchmarks.sln`, `tools/NPOI.StyleViewer/NPOI.StyleViewer.sln`, `tools/DocPartViewer/DocPartViewer.sln`, `tools/XmlSerializationCodeGenerator/XmlSerializationCodeGenerator.sln`.
Build failed
Solution references a project that does not existscratchpad/NPOI.ScratchPad.sln
Thin analysable surface across projects: HSSFscratchpad/HSSF/HSSF.csproj
What to do
Resolve the 1 Build failed finding(s) in Solution Shape. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Solution references a project that does not exist finding(s) in Solution Shape — start with NPOI.ScratchPad.sln. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Thin analysable surface across projects finding(s) in Solution Shape — start with HSSF.csproj. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d18_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The repository's root README gives a high-quality overview (what NPOI is and its purpose) plus links to YouTube tutorials, a GitHub wiki Getting Started page, and an EULA/fee section. However the document itself is clipped mid-sentence ('[How NPOI library succeeds](https://tonyqus.medium.com') then ends with '…(clipped here by the scanner for evaluation; clipping is not a defect of the document — never report an unshown section as missing'), so any usage, contribution, or architecture documentation it names is present in the outline and must be assumed present. The main/Util/Collections/BidirectionalDictionary README is a directory README (not the repository root) that documents itself only and does not state what the directory is for; its presence alone cannot flag it as missing an overview.
Improve Documentation Quality — currently 5.0/10. — The repository's root README gives a high-quality overview (what NPOI is and its purpose) plus links to YouTube tutorials, a GitHub wiki Getting Started page, and an EULA/fee section. However the document itself is clipped mid-sentence ('[How NPOI library succeeds](https://tonyqus.medium.com') then ends with '…(clipped here by the scanner for evaluation; clipping is not a defect of the document — never report an unshown section as missing'), so any usage, contribution, or architecture documentation it names is present in the outline and must be assumed present. The main/Util/Collections/BidirectionalDictionary README is a directory README (not the repository root) that documents itself only and does not state what the directory is for; its presence alone cannot flag it as missing an overview.
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.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: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
0 naming inconsistencies across 200 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D24 · Comment ValueExemplary◐ Sampled · advisory
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Judged by language model at low temperature (0.0-0.1) on deterministically sampled inline comments with surrounding code; findings verified back to sampled comments by substring match. Advisory, sampled.
4 of 17 projects flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D27 · Navigability6.7 / 10Adequate✓ Tool-verified
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.
68 % of calls cross a namespace and 2 % go through an interface, but 71 % of collaborators are co-located — so following a call takes several hops. Baseline: large — vertical-slice locality expected.
Resolve the 3 Pass-through layer finding(s) in Navigability — start with RecordInputStream.cs, HSSFRegionUtil.cs, SXSSFWorkbook.cs. — One of this dimension's main actionable groups (3 recommendation-level).
Detailed fixes: d27_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: 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).
184 finding(s): 0 critical, 21 high, 163 medium, 0 low. 18 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 27 file(s) — `main/SS/Formula/Functions/Forecast.cs` (lines 102–103, lines 119–120, line 127, …), `scratchpad/HSLF/Model/ActiveXShape.cs` (lines 20–21, lines 21–22, line 86), `scratchpad/HSLF/Model/AutoShape.cs` (lines 20–21), `scratchpad/HSLF/Model/AutoShapes.cs` (lines 62–63, line 63, lines 65–66, …), `scratchpad/HSLF/Model/Fill.cs` (lines 20–21, lines 21–22), … (+22 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. In 1 of those file(s) — `main/SS/Formula/Functions/Forecast.cs` — the break is a C# primary constructor, which semgrep's grammar cannot parse and which hides the type from every rule scoped to it; those files were re-scanned from a shadow copy with the constructor's parameter list blanked (line and column preserving), which restores the type to the rules, and 0 additional row(s) came from that pass. Only the header's own parameter list is unread in them. In 2 of those file(s) — `scratchpad/HSLF/Model/Table.cs`, `scratchpad/HSSF/UserModel/HSSFChart.cs` — the break is at a TYPE DECLARATION (a C# primary constructor semgrep's grammar cannot parse), so the loss is wider than the named lines: rules scoped to that type see no type to scope to and are blind over its whole body, while rules matching statements keep working there. Absence of a type-scoped finding in those types is not evidence of anything.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 3 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
No action in Static Analysis (SAST) — all 18 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 (18 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
289 of 1395 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs. Counted over 1395 of the 2117 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 21 Orphaned knowledge finding(s) in Knowledge Freshness — start with CT_PivotCacheDefinition.cs, CT_PivotTableDefinition.cs, XSSFTextParagraph.cs. — One of this dimension's main actionable groups (21 issue-level).
Resolve the 268 Orphaned file finding(s) in Knowledge Freshness — start with IconMultiStateFormatting.cs (2), XSSFReader.cs, OOXMLSignatureFacet.cs. — One of this dimension's main actionable groups (268 recommendation-level).
Resolve the 1 Further orphaned files (smaller) 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.
+ 2 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 — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.
Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 10 platform declaration(s) and 0 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.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
The namespaces NPOI.OpenXmlFormats.Vml ↔ NPOI.OpenXmlFormats.Vml.Office depend on each other. The lightest dependency in the cycle is NPOI.OpenXmlFormats.Vml → NPOI.OpenXmlFormats.Vml.Office (NPOI.OpenXmlFormats.Vml.CT_Path → NPOI.OpenXmlFormats.Vml.Office.ST_ConnectType, 4 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — OpenXmlFormats/Vml/Main.cs:6
The namespaces System.Collections.Generic ↔ System.Collections.ObjectModel depend on each other. The lightest dependency in the cycle is System.Collections.Generic → System.Collections.ObjectModel (System.Collections.Generic.BidirectionalDictionary → System.Collections.ObjectModel.ReadOnlyBidirectionalDictionary, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — main/Util/Collections/BidirectionalDictionary/BidirectionalDictionary.cs:2
The namespaces NPOI ↔ NPOI.DDF ↔ NPOI.HPSF ↔ NPOI.HPSF.Wellknown ↔ NPOI.HSSF.Model ↔ NPOI.HSSF.Record ↔ NPOI.HSSF.Record.Aggregates ↔ NPOI.HSSF.Record.AutoFilter ↔ NPOI.HSSF.Record.CF ↔ NPOI.HSSF.Record.Chart ↔ NPOI.HSSF.Record.Common ↔ NPOI.HSSF.Record.Cont ↔ NPOI.HSSF.UserModel ↔ NPOI.HSSF.Util ↔ NPOI.OOXML.XSSF.UserModel ↔ NPOI.OpenXml4Net.OPC ↔ NPOI.OpenXml4Net.OPC.Internal ↔ NPOI.OpenXml4Net.OPC.Internal.Unmarshallers ↔ NPOI.POIFS.Crypt ↔ NPOI.POIFS.Crypt.Standard ↔ NPOI.POIFS.Dev ↔ NPOI.POIFS.EventFileSystem ↔ NPOI.POIFS.FileSystem ↔ NPOI.POIFS.NIO ↔ NPOI.POIFS.Properties ↔ NPOI.POIFS.Storage ↔ NPOI.SS.Format ↔ NPOI.SS.Formula ↔ NPOI.SS.Formula.Eval ↔ NPOI.SS.Formula.Functions ↔ NPOI.SS.Formula.PTG ↔ NPOI.SS.Formula.UDF ↔ NPOI.SS.UserModel ↔ NPOI.SS.UserModel.Helpers ↔ NPOI.SS.Util ↔ NPOI.Util ↔ NPOI.XDDF.UserModel.Chart ↔ NPOI.XDDF.UserModel.Text ↔ NPOI.XSSF.Model ↔ NPOI.XSSF.UserModel ↔ NPOI.XSSF.UserModel.Extensions ↔ NPOI.XSSF.UserModel.Helpers ↔ NPOI.XWPF.Model ↔ NPOI.XWPF.UserModel depend on each other. The lightest dependency in the cycle is NPOI → NPOI.OpenXml4Net.OPC.Internal (NPOI.CoreProperties → NPOI.OpenXml4Net.OPC.Internal.PackagePropertiesPart, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — ooxml/POIXMLProperties.cs:22
The namespaces NPOI.HWPF ↔ NPOI.HWPF.Model ↔ NPOI.HWPF.SPRM ↔ NPOI.HWPF.UserModel depend on each other. The lightest dependency in the cycle is NPOI.HWPF.Model → NPOI.HWPF (NPOI.HWPF.Model.PicturesTable → NPOI.HWPF.HWPFDocument, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — scratchpad/HWPF/Model/PicturesTable.cs:44
The namespaces NPOI.POIFS.Crypt.Dsig ↔ NPOI.POIFS.Crypt.Dsig.Facets ↔ NPOI.POIFS.Crypt.Dsig.Services depend on each other. The lightest dependency in the cycle is NPOI.POIFS.Crypt.Dsig → NPOI.POIFS.Crypt.Dsig.Facets (NPOI.POIFS.Crypt.Dsig.SignatureConfig → NPOI.POIFS.Crypt.Dsig.Facets.SignatureFacet, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — REDACTED:27
The namespaces NPOI.XSSF.Binary ↔ NPOI.XSSF.EventUserModel depend on each other. The lightest dependency in the cycle is NPOI.XSSF.Binary → NPOI.XSSF.EventUserModel (NPOI.XSSF.Binary.ISheetContentsHandler → NPOI.XSSF.EventUserModel.ISheetContentsHandler, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface. — ooxml/XSSF/Binary/XSSFBSheetHandler.cs:29
What to do
Break namespace cycles inside a project by moving the shared type to a namespace both sides can use, or by inverting the back edge behind an interface.
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 the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. 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.
`IEvaluationWorkbook` declares 16 members under just 12 distinct name(s): `GetSheetName`, `GetSheetIndex`, `GetSheetIndex`, `GetSheet`, `GetExternalSheet`, `GetExternalSheet`, `ConvertFromExternSheetIndex`, `GetExternalName`, `GetExternalName`, `GetName`, `GetName`, `ResolveNameXText`, `GetFormulaTokens`, `GetUDFFinder`, `ClearAllCachedResultValues`, `GetSpreadsheetVersion`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 12 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 16 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface. — main/SS/Formula/EvaluationWorkbook.cs:84
`IBorderFormatting` declares 21 members: `BorderBottom`, `BorderDiagonal`, `BorderLeft`, `BorderRight`, `BorderTop`, `BorderVertical`, `BorderHorizontal`, `BottomBorderColor`, `DiagonalBorderColor`, `LeftBorderColor`, `RightBorderColor`, `TopBorderColor`, `BottomBorderColorColor`, `DiagonalBorderColorColor`, `LeftBorderColorColor`, `RightBorderColorColor`, `TopBorderColorColor`, `VerticalBorderColor`, `VerticalBorderColorColor`, `HorizontalBorderColor`, `HorizontalBorderColorColor`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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. — main/SS/UserModel/BorderFormatting.cs:26
`ICell` declares 36 members: `ColumnIndex`, `RowIndex`, `Sheet`, `Row`, `CellType`, `SetCellType`, `SetBlank`, `CachedFormulaResultType`, `SetCellValue`, `SetCellErrorValue`, `SetCellValue`, `SetCellValue`, `SetCellValue`, `CopyCellTo`, `CellFormula`, `RemoveFormula`, `SetCellFormula`, `NumericCellValue`, `DateCellValue`, `RichStringCellValue`, `ErrorCellValue`, `StringCellValue`, `SetCellValue`, `BooleanCellValue`, `CellStyle`, `Style`, `SetAsActiveCell`, `Address`, `CellComment`, `RemoveCellComment`, `Hyperlink`, `RemoveHyperlink`, `ArrayFormulaRange`, `IsPartOfArrayFormulaGroup`, `IsMergedCell`, `GetCachedFormulaResultTypeEnum`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 36 declarations carry 32 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 32 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — main/SS/UserModel/Cell.cs:53
`ICellStyle` declares 34 members: `ShrinkToFit`, `Index`, `DataFormat`, `GetDataFormatString`, `FormatString`, `SetFont`, `FontIndex`, `IsHidden`, `IsLocked`, `IsQuotePrefixed`, `Alignment`, `WrapText`, `VerticalAlignment`, `Rotation`, `Indention`, `BorderLeft`, `BorderRight`, `BorderTop`, `BorderBottom`, `LeftBorderColor`, `RightBorderColor`, `TopBorderColor`, `BottomBorderColor`, `FillPattern`, `FillBackgroundColor`, `FillForegroundColor`, `CloneStyleFrom`, `GetFont`, `BorderDiagonalColor`, `BorderDiagonalLineStyle`, `BorderDiagonal`, `FillBackgroundColorColor`, `FillForegroundColorColor`, `ReadingOrder`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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. — main/SS/UserModel/CellStyle.cs:24
`IColumn` declares 22 members: `CreateCell`, `CreateCell`, `RemoveCell`, `ColumnNum`, `GetCell`, `GetCell`, `FirstCellNum`, `LastCellNum`, `PhysicalNumberOfCells`, `ZeroWidth`, `Width`, `IsFormatted`, `IsBestFit`, `Sheet`, `ColumnStyle`, `MoveCell`, `CopyColumnTo`, `CopyCell`, `Cells`, `OutlineLevel`, `Hidden`, `Collapsed`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 22 declarations carry 20 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 20 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — main/SS/UserModel/Column.cs:25
`IConditionalFormattingRule` declares 19 members: `CreateBorderFormatting`, `BorderFormatting`, `CreateFontFormatting`, `FontFormatting`, `CreatePatternFormatting`, `PatternFormatting`, `DataBarFormatting`, `MultiStateFormatting`, `ColorScaleFormatting`, `ConditionType`, `ComparisonOperation`, `Formula1`, `Formula2`, `Text`, `Priority`, `StopIfTrue`, `NumberFormat`, `ConditionFilterType`, `FilterConfiguration`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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. — main/SS/UserModel/ConditionalFormattingRule.cs:27
`IPrintSetup` declares 20 members: `PaperSize`, `Scale`, `PageStart`, `FitWidth`, `FitHeight`, `LeftToRight`, `Landscape`, `ValidSettings`, `NoColor`, `Draft`, `Notes`, `NoOrientation`, `UsePage`, `HResolution`, `VResolution`, `HeaderMargin`, `FooterMargin`, `Copies`, `EndNote`, `CellError`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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. — main/SS/UserModel/PrintSetup.cs:33
`IRow` declares 23 members: `CreateCell`, `CreateCell`, `RemoveCell`, `RowNum`, `GetCell`, `GetCell`, `FirstCellNum`, `LastCellNum`, `PhysicalNumberOfCells`, `ZeroHeight`, `Height`, `HeightInPoints`, `IsFormatted`, `Sheet`, `RowStyle`, `MoveCell`, `CopyRowTo`, `CopyCell`, `Cells`, `OutlineLevel`, `HasCustomHeight`, `Hidden`, `Collapsed`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 23 declarations carry 21 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 21 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — main/SS/UserModel/Row.cs:37
`ISheet` declares 115 members: `CreateRow`, `RemoveRow`, `GetRow`, `PhysicalNumberOfRows`, `FirstRowNum`, `LastRowNum`, `ForceFormulaRecalculation`, `SetColumnHidden`, `IsColumnHidden`, `CopyRow`, `CopyComment`, `SetColumnWidth`, `GetColumnWidth`, `GetColumnWidthInPixels`, `DefaultColumnWidth`, `DefaultRowHeight`, `DefaultRowHeightInPoints`, `GetColumnStyle`, `AddMergedRegion`, `AddMergedRegionUnsafe`, `ValidateMergedRegions`, `HorizontallyCenter`, `VerticallyCenter`, `RemoveMergedRegion`, `RemoveMergedRegions`, `NumMergedRegions`, `GetMergedRegion`, `MergedRegions`, `GetRowEnumerator`, `DisplayZeros`, `Autobreaks`, `DisplayGuts`, `FitToPage`, `RowSumsBelow`, `RowSumsRight`, `IsPrintGridlines`, `IsPrintRowAndColumnHeadings`, `PrintSetup`, `Header`, `Footer`, and 75 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 115 declarations carry 107 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 107 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — main/SS/UserModel/Sheet.cs:88
`IWorkbook` declares 59 members: `ActiveSheetIndex`, `FirstVisibleTab`, `SetSheetOrder`, `SetSelectedTab`, `SetActiveSheet`, `GetSheetName`, `SetSheetName`, `GetSheetIndex`, `GetSheetIndex`, `CreateSheet`, `CreateSheet`, `CloneSheet`, `NumberOfSheets`, `GetSheetAt`, `GetSheet`, `RemoveSheetAt`, `GetEnumerator`, `CreateFont`, `FindFont`, `NumberOfFonts`, `GetFontAt`, `CreateCellStyle`, `NumCellStyles`, `GetCellStyleAt`, `Write`, `NumberOfNames`, `GetName`, `GetNames`, `GetAllNames`, `GetNameAt`, `CreateName`, `GetNameIndex`, `RemoveName`, `RemoveName`, `RemoveName`, `LinkExternalWorkbook`, `SetPrintArea`, `SetPrintArea`, `GetPrintArea`, `RemovePrintArea`, and 19 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 59 declarations carry 53 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 53 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — main/SS/UserModel/Workbook.cs:35
`ICell` declares 39 members: `ColumnIndex`, `RowIndex`, `Sheet`, `Row`, `CellType`, `SetCellType`, `SetBlank`, `CachedFormulaResultType`, `SetCellValue`, `SetCellErrorValue`, `SetCellValue`, `SetCellValue`, `SetCellValue`, `SetCellValue`, `CopyCellTo`, `CellFormula`, `RemoveFormula`, `SetCellFormula`, `NumericCellValue`, `DateCellValue`, `DateOnlyCellValue`, `TimeOnlyCellValue`, `RichStringCellValue`, `ErrorCellValue`, `StringCellValue`, `SetCellValue`, `BooleanCellValue`, `CellStyle`, `Style`, `SetAsActiveCell`, `Address`, `CellComment`, `RemoveCellComment`, `Hyperlink`, `RemoveHyperlink`, `ArrayFormulaRange`, `IsPartOfArrayFormulaGroup`, `IsMergedCell`, `GetCachedFormulaResultTypeEnum`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 39 declarations carry 34 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 34 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — main/SS/UserModel/Cell.cs:53
`IPackageProperties` declares 35 members: `GetCategoryProperty`, `SetCategoryProperty`, `GetContentStatusProperty`, `SetContentStatusProperty`, `GetContentTypeProperty`, `SetContentTypeProperty`, `GetCreatedProperty`, `SetCreatedProperty`, `SetCreatedProperty`, `GetCreatorProperty`, `SetCreatorProperty`, `GetDescriptionProperty`, `SetDescriptionProperty`, `GetIdentifierProperty`, `SetIdentifierProperty`, `GetKeywordsProperty`, `SetKeywordsProperty`, `GetLanguageProperty`, `SetLanguageProperty`, `GetLastModifiedByProperty`, `SetLastModifiedByProperty`, `GetLastPrintedProperty`, `SetLastPrintedProperty`, `SetLastPrintedProperty`, `GetModifiedProperty`, `SetModifiedProperty`, `SetModifiedProperty`, `GetRevisionProperty`, `SetRevisionProperty`, `GetSubjectProperty`, `SetSubjectProperty`, `GetTitleProperty`, `SetTitleProperty`, `GetVersionProperty`, `SetVersionProperty`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 35 declarations carry 32 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 32 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — REDACTED:14
`Field` declares 19 members: `FirstSubrange`, `GetFieldEndOffset`, `GetFieldStartOffset`, `GetMarkEndCharacterRun`, `GetMarkEndOffset`, `GetMarkSeparatorCharacterRun`, `GetMarkSeparatorOffset`, `GetMarkStartCharacterRun`, `GetMarkStartOffset`, `Type`, `HasSeparator`, `IsHasSep`, `IsLocked`, `IsNested`, `IsPrivateResult`, `IsResultDirty`, `IsResultEdited`, `IsZombieEmbed`, `SecondSubrange`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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. — scratchpad/HWPF/UserModel/Field.cs:24
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.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Do you agree with this assessment?
C1 · Data Protection3.5 / 10Weak✓ Tool-verified
Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.
Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.
What to do
Strengthen data-at-rest protection: vault your keys (Azure Key Vault / AWS KMS / IDataProtector key ring) and encrypt the most sensitive columns (EF HasConversion encryption or provider-native column encryption) — partial coverage still leaves gaps.
Enforce HTTPS (UseHttpsRedirection / RequireHttpsMetadata) so data in transit is always encrypted.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in 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.
A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface. (×40) — main/DDF/EscherArrayProperty.cs:281, main/DDF/EscherArrayProperty.cs:297, main/HPSF/Wellknown/PropertyIDMap.cs:534, …
What to do
Finish or delete NotImplementedException stubs and replace placeholder literals before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.
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.
`Parse` is a shipped member whose body only throws — and it is REACHED: OpenXmlFormats/Spreadsheet/SupplementaryWorkbooks.cs:88 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — OpenXmlFormats/Spreadsheet/SupplementaryWorkbooks.cs:177
`Write` is a shipped member whose body only throws — and it is REACHED: OpenXmlFormats/Spreadsheet/SupplementaryWorkbooks.cs:115 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — OpenXmlFormats/Spreadsheet/SupplementaryWorkbooks.cs:182
`CreateRuleSERIESDATA` is a shipped member whose body only throws — and it is REACHED: main/HSSF/Model/InternalChart.cs:305 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — main/HSSF/Model/InternalChart.cs:321
`LegendEntry` is a shipped member whose body only throws — and it is REACHED: main/HSSF/Record/Aggregates/Chart/ChartRecordAggregate.cs:178 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — main/HSSF/Record/Chart/LegendExceptionRecord.cs:57
`SetClip` is a shipped member whose body only throws — and it is REACHED: main/HSSF/UserModel/EscherGraphics.cs:487 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — main/HSSF/UserModel/EscherGraphics.cs:490
`SetBlock` is a shipped member whose body only throws — and it is REACHED: main/POIFS/Crypt/CryptoAPI/CryptoAPIDecryptor.cs:195 references it (1 further site(s) in this project). This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — main/POIFS/Crypt/CryptoAPI/CryptoAPIDecryptor.cs:46
`AddSignatureInfo` is a shipped member whose body only throws — and it is REACHED: ooxml/POIFS/Crypt/Dsig/Facets/OOXMLSignatureFacet.cs:51 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — ooxml/POIFS/Crypt/Dsig/Facets/OOXMLSignatureFacet.cs:209
`newReference` is a shipped member whose body only throws — and it is REACHED: REDACTED:105 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — REDACTED:108
`getEncoded` is a shipped member whose body only throws — and it is REACHED: ooxml/POIFS/Crypt/Dsig/Services/RevocationData.cs:73 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — ooxml/POIFS/Crypt/Dsig/Services/RevocationData.cs:148
`InitXmlProvider` is a shipped member whose body only throws — and it is REACHED: ooxml/POIFS/Crypt/Dsig/SignatureInfo.cs:219 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — ooxml/POIFS/Crypt/Dsig/SignatureInfo.cs:356
`ArrayFormulaRange` is a shipped member whose body only throws — and it is REACHED: ooxml/XSSF/Streaming/SXSSFEvaluationCell.cs:155 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — ooxml/XSSF/Streaming/SXSSFCell.cs:46
`CountOfAllChildren` is a shipped member whose body only throws — and it is REACHED: ooxml/XSSF/Streaming/SXSSFPicture.cs:334 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — ooxml/XSSF/UserModel/XSSFPicture.cs:305
`FillColor` is a shipped member whose body only throws — and it is REACHED: ooxml/XSSF/Streaming/SXSSFPicture.cs:328 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — ooxml/XSSF/UserModel/XSSFPicture.cs:310
`LineStyleColor` is a shipped member whose body only throws — and it is REACHED: ooxml/XSSF/Streaming/SXSSFPicture.cs:326 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — ooxml/XSSF/UserModel/XSSFPicture.cs:334
`IsHidden` is a shipped member whose body only throws — and it is REACHED: ooxml/XSSF/Streaming/SXSSFWorkbook.cs:157 references it (1 further site(s) in this project). This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it. — ooxml/XSSF/UserModel/XSSFWorkbook.cs:1950
`CT_Property` has 36 unfinished members out of 45 declared members (methods, properties, indexers and events, whether or not each carries a body) — a scaffolded type that was never implemented. — OpenXmlFormats/DocumentPropertiesCustom.cs:78
`IsSetFiletime` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:146
`IsSetBool` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:151
`GetBool` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:156
`IsSetI1` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:161
`GetI1` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:166
`GetI2` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:171
`IsSetI2` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:176
`GetI4` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:181
`GetFiletime` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:186
`IsSetI4` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:191
`IsSetUi1` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:196
`GetUi1` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:201
`GetUi2` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:206
`GetUi4` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:211
`IsSetUi8` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:216
`IsSetUint` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:221
`GetUint` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:226
`IsSetR4` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:231
`IsSetR8` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:236
`GetR8` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:241
`GetR4` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:246
`GetUi8` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:251
`IsSetDecimal` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:256
`GetDecimal` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface. — OpenXmlFormats/DocumentPropertiesCustom.cs:261
What to do
Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.
Clear the softer debt: remove commented-out code and dead branches, re-enable or delete skipped tests, and replace blanket warning suppressions with targeted ones.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Add a README to the 16 of 17 project(s) that lack one — worth up to 1.9 pts.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
Tests aren't grouped in a dedicated test folder — the test surface isn't separable from production code at a glance.
Only 10/17 projects share a common root namespace — the code's module identity is inconsistent.
What to do
Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
Group tests in the folder your build system expects (tests/, test/, spec/, or your module's test source set) so the test surface is discoverable and CI can scope it.
Adopt a consistent root-namespace convention (a shared prefix, e.g. Acme.*); short project-file/directory names are fine as long as the RootNamespace is uniform.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Readiness · Readiness — Whether an automated pipeline builds and tests every change.
Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
`NoWarn` silences NU1903 — NuGet's vulnerability-audit warnings for high advisories. Suppressed advisories are still shipped; they are only invisible in the build log. Remove these codes from NoWarn and address or explicitly accept each advisory instead. — build/_build.csproj:7
What to do
The .NET analyzers are running but not blocking — tighten them (set <AnalysisMode>All</AnalysisMode>, or treat analyzer warnings as errors on CI) so a security/quality regression fails the build rather than scrolling past as a warning.
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.
What to do
Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where Watchdog can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads 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.
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.
What to do
Raise allocation-aware density on the hot paths — currently 42 use(s) across 525,367 production line(s) (~0.1/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.
Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other · Security — Cryptographic hygiene (weak hash/cipher, password key-derivation). This codebase has no web surface, so transport/header/cookie/CSRF controls are N/A and only crypto is scored.
Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.
`md5.ComputeHash(…)` puts the password `passwordData` through a fast general-purpose digest, so a stolen hash is guessed at billions of candidates a second whether or not it is salted — no key-derivation function (PBKDF2/scrypt/Argon2/bcrypt) stands between the password and the stored value. — main/HSSF/Record/Crypto/Biff8EncryptionKey.cs:54
`Decryptor.DEFAULT_PASSWORD Equals userPassword` checks a password against the stored one in plaintext, so the store holds the password itself and whoever reads it holds every account. Store a salted KDF hash (PBKDF2/scrypt/Argon2/bcrypt) and verify by deriving again. — main/HSSF/Record/RecordFactoryInputStream.cs:133
MD5/SHA1 is constructed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses. (×3) — main/HSSF/Record/Crypto/Biff8EncryptionKey.cs:94, main/HSSF/Record/Crypto/Biff8EncryptionKey.cs:133, main/HSSF/UserModel/HSSFWorkbook.cs:2015
What to do
Store passwords with a salted KDF — `Microsoft.AspNetCore.Identity.PasswordHasher<T>`, `Rfc2898DeriveBytes` (PBKDF2), or BCrypt/Argon2 — and compare with `CryptographicOperations.FixedTimeEquals`. (A fast/plain hash, or a client-hashed value stored and compared verbatim, is not password storage.) Start in `main/HSSF/Record/Crypto/Biff8EncryptionKey.cs:54`.
Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (`System.IO.Hashing.XxHash64`/`Crc32`) where it only derives an identifier such as a cache key or a mutex name. This repository constructs a collision-broken hash (MD5/SHA1) at 3 sites, not one: `main/HSSF/Record/Crypto/Biff8EncryptionKey.cs:94` (MD5CryptoServiceProvider), `main/HSSF/Record/Crypto/Biff8EncryptionKey.cs:133` (MD5CryptoServiceProvider), `main/HSSF/UserModel/HSSFWorkbook.cs:2015` (MD5). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged
Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.
Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.
Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document2.2 / 10Critical✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`SetPrefix` is protected and takes the `XmlNode` from its caller, and it calls itself at line 93 with a child of the node it was given — and nowhere in `SetPrefix` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `SetPrefix` can intervene. Thread a depth argument through `SetPrefix` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack. — ooxml/POIFS/Crypt/Dsig/SignatureMarshalListener.cs:93
`CheckElementForOPCCompliance` is public and takes the `XmlElement` from its caller, and it calls itself at line 435 with a child of the node it was given — and nowhere in `CheckElementForOPCCompliance` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `CheckElementForOPCCompliance` can intervene. Thread a depth argument through `CheckElementForOPCCompliance` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack. — REDACTED:435
`CompactChildNodesR` is protected and takes the `XmlElement` from its caller, and it calls itself at line 125 with a child of the node it was given — and nowhere in `CompactChildNodesR` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `CompactChildNodesR` can intervene. Thread a depth argument through `CompactChildNodesR` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack. — scratchpad/HWPF/Converter/AbstractWordUtils.cs:125
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a 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.
`dos` is a `DeflaterOutputStream`, which implements `IDisposable`, and it is created here (line 410). Every use of it in `SetPictureData` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var dos = …;`), which releases it at the end of the scope on every path including a throw. — main/DDF/EscherMetafileBlip.cs:410
`bos` is a `LittleEndianByteArrayOutputStream`, which implements `IDisposable`, and it is created here (line 43). Every use of it in `ToByteArray` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var bos = …;`), which releases it at the end of the scope on every path including a throw. — main/HPSF/ClipboardData.cs:43
`leis` is a `LittleEndianInputStream`, which implements `IDisposable`, and it is created here (line 97). Every use of it in `Create` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var leis = …;`), which releases it at the end of the scope on every path including a throw. — main/HPSF/PropertySetFactory.cs:97
`sw` is a `StringWriter`, which implements `IDisposable`, and it is created here (line 157). Every use of it in `ToString` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sw = …;`), which releases it at the end of the scope on every path including a throw. — main/HPSF/Util.cs:157
`itr` is a `ValueEnumerator`, which implements `IDisposable`, and it is created here (line 263). Every use of it in `GetRowCellBlockSize` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var itr = …;`), which releases it at the end of the scope on every path including a throw. — main/HSSF/Record/Aggregates/ValueRecordsAggregate.cs:263
`itr` is a `ValueEnumerator`, which implements `IDisposable`, and it is created here (line 375). Every use of it in `SerializeCellRow` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var itr = …;`), which releases it at the end of the scope on every path including a throw. — main/HSSF/Record/Aggregates/ValueRecordsAggregate.cs:375
`leosOut` is a `LittleEndianOutputStream`, which implements `IDisposable`, and it is created here (line 400). Every use of it in `WriteOut` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var leosOut = …;`), which releases it at the end of the scope on every path including a throw. — main/POIFS/FileSystem/Ole10Native.cs:400
`leos` is a `LittleEndianOutputStream`, which implements `IDisposable`, and it is created here (line 407). Every use of it in `WriteOut` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var leos = …;`), which releases it at the end of the scope on every path including a throw. — main/POIFS/FileSystem/Ole10Native.cs:407
`fWriter` is a `StreamWriter`, which implements `IDisposable`, and it is created here (line 108). Every use of it in `Extract` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var fWriter = …;`), which releases it at the end of the scope on every path including a throw. — main/POIFS/Macros/VBAMacroExtractor.cs:108
`FileBackedDataSource` declares a finalizer (line 98), but nothing in the type is unmanaged: no `IntPtr`/`UIntPtr` or pointer field, no `SafeHandle`, no `HandleRef`, no `extern`/`DllImport` member and no `Marshal`/`GCHandle`/`NativeMemory` use. A finalizer can only release what the garbage collector cannot, so on a purely-managed type it releases nothing and costs something: every instance is put on the finalizer queue, survives at least one extra collection, and is then finalized on a thread that is NOT the disposing one — where the managed objects it touches may already have been finalized themselves. Delete the finalizer (and the `GC.SuppressFinalize` that exists to defuse it); if a handle is added later, wrap it in a `SafeHandle`, which brings its own correct finalization. — main/POIFS/NIO/FileBackedDataSource.cs:98
`stream` is a `FileStream`, which implements `IDisposable`, and it is created here (line 59). Every use of it in `FileBackedDataSource` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var stream = …;`), which releases it at the end of the scope on every path including a throw. — main/POIFS/NIO/FileBackedDataSource.cs:59
`ms` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 125). Every use of it in `Write` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var ms = …;`), which releases it at the end of the scope on every path including a throw. — main/POIFS/property/NPropertyTable.cs:125
`inp` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 144). Every use of it in `Load` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var inp = …;`), which releases it at the end of the scope on every path including a throw. — main/Util/Collections/Properties.cs:144
`buf` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 298). Every use of it in `Dump` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var buf = …;`), which releases it at the end of the scope on every path including a throw. — main/Util/HexDump.cs:298
`fis` is a `FileStream`, which implements `IDisposable`, and it is created here (line 192). Every use of it in `UpdateIntegrityHMAC` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var fis = …;`), which releases it at the end of the scope on every path including a throw. — ooxml/POIFS/Crypt/Agile/AgileEncryptor.cs:192
`bos` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 95). Every use of it in `dereference` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var bos = …;`), which releases it at the end of the scope on every path including a throw. — ooxml/POIFS/Crypt/Dsig/OOXMLURIDereferencer.cs:95
`zip` is a `ZipFile`, which implements `IDisposable`, and it is created here (line 458). Every use of it in `InjectData` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var zip = …;`), which releases it at the end of the scope on every path including a throw. — ooxml/XSSF/Streaming/SXSSFWorkbook.cs:458
`inReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 510). Every use of it in `CopyStreamAndInjectWorksheet` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var inReader = …;`), which releases it at the end of the scope on every path including a throw. — ooxml/XSSF/Streaming/SXSSFWorkbook.cs:510
`outWriter` is a `StreamWriter`, which implements `IDisposable`, and it is created here (line 511). Every use of it in `CopyStreamAndInjectWorksheet` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var outWriter = …;`), which releases it at the end of the scope on every path including a throw. — ooxml/XSSF/Streaming/SXSSFWorkbook.cs:511
`sr` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 114). Every use of it in `Read` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sr = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:114
`sr` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 1491). Every use of it in `AddPicture` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sr = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:1491
`OPCPackage` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `relationships` itself (line 47), which makes that instance its own. But `relationships` is named in none of the methods the disposal search covered: `Dispose` (line 1832), `Close` (line 433) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`relationships?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree. — openxml4Net/OPC/OPCPackage.cs:47
`sw` is a `StringWriter`, which implements `IDisposable`, and it is created here (line 256). Every use of it in `ExcelEncodeString` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sw = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:256
`sw` is a `StreamWriter`, which implements `IDisposable`, and it is created here (line 54). Every use of it in `Save` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sw = …;`), which releases it at the end of the scope on every path including a throw. — OpenXmlFormats/Spreadsheet/Document/CalcChainDocument.cs:54
`sr` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 104). Every use of it in `ToString` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sr = …;`), which releases it at the end of the scope on every path including a throw. — REDACTED:104
`sr` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 659). Every use of it in `ToString` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sr = …;`), which releases it at the end of the scope on every path including a throw. — OpenXmlFormats/Spreadsheet/Styles/CT_Font.cs:659
`levelBuf` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 107). Every use of it in `WriteListDataTo` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var levelBuf = …;`), which releases it at the end of the scope on every path including a throw. — scratchpad/HWPF/Model/ListTables.cs:107
`levelBuf` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 131). Every use of it in `WriteListOverridesTo` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var levelBuf = …;`), which releases it at the end of the scope on every path including a throw. — scratchpad/HWPF/Model/ListTables.cs:131
`out1` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 375). Every use of it in `FillImageContent` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var out1 = …;`), which releases it at the end of the scope on every path including a throw. — scratchpad/HWPF/UserModel/Picture.cs:375
What to do
Each finding names the value and the span that decides who owns it — the `new` that created it, or the constructor parameter that handed it over. Confirm ownership from that span, then make the disposal match it: release what this type created, leave what it was injected with to whoever created THAT, and drop a finalizer whose type holds nothing unmanaged to release.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `ArgumentNullException` tells the caller a parameter was null when it provably was not.
Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.
The guard on line 218 rejects `descriptor` and line 219 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(descriptor)` is true of a value that is NOT null: it is satisfied by an EMPTY `descriptor`, and on that path `descriptor` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition. — REDACTED:219
What to do
Each finding names the throw and the test in its own condition that is true of a NON-null value. Confirm from the two, then throw the exception that describes what was actually wrong: `ArgumentException` for a value that arrived empty, or the .NET 8 helpers that spell the whole guard in one line and pick the type for you — `ArgumentException.ThrowIfNullOrEmpty(s)` / `ThrowIfNullOrWhiteSpace(s)` for strings, `ArgumentNullException.ThrowIfNull(x)` followed by `ArgumentOutOfRangeException.ThrowIfZero(x.Count)` for a collection. Splitting the two conditions is usually clearer than picking one exception for both: they are different failures and the caller may want to handle them differently.
Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.
Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.
Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped3.5 / 10Weak✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`progId` carries text this program read out of the document being converted, and it is written straight into the `progId` attribute of generated markup with nothing escaping it on the way. The value is chosen by whoever authored the file, not by this program, so it can close the attribute it sits in and open another — a crafted document becomes markup in the output this renderer produces. Escape `progId` at this site, or validate it against the shape the attribute accepts before interpolating it. — OpenXmlFormats/Spreadsheet/Sheet.cs:8582
`id` carries text this program read out of the document being converted, and it is written straight into the `r:id` attribute of generated markup with nothing escaping it on the way. The value is chosen by whoever authored the file, not by this program, so it can close the attribute it sits in and open another — a crafted document becomes markup in the output this renderer produces. Escape `id` at this site, or validate it against the shape the attribute accepts before interpolating it. — OpenXmlFormats/Spreadsheet/Sheet.cs:8582
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.
Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X27 · Collection changed while being enumerated8.0 / 10Strong✓ Tool-verified
Other · Code Health — Whether a `foreach` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is enumerating invalidates the enumerator it is holding, so the next `MoveNext` throws `InvalidOperationException` 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.
`s.properties.Values` is a live view over `s.properties` and shares its version stamp, and line 101 calls `s.properties.Add(…)` inside the loop body — a structural change to a `Dictionary`. The next `MoveNext` throws `InvalidOperationException: Collection was modified; enumeration operation may not execute`, so every pass that reaches this call ends the loop by exception instead of by running out of items, and the remaining items are never seen. — main/HPSF/Section.cs:99
`ctDrawing.cellAnchors` is enumerated directly, and line 1398 calls `ctDrawing.cellAnchors.Add(…)` inside the loop body — a structural change to a `List`. The next `MoveNext` throws `InvalidOperationException: Collection was modified; enumeration operation may not execute`, so every pass that reaches this call ends the loop by exception instead of by running out of items, and the remaining items are never seen. — OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1396
What to do
Each finding names the two spans that cannot both stand — the `foreach` source, and the call inside the body that structurally changes that same collection. Confirm from those two, then pick one: enumerate a snapshot (`foreach (var x in c.ToList())`), collect what needs changing and apply it after the loop, or — where the loop was only ever meant to act on the first match — `break` immediately after the mutation, which is the one shape that is already safe.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×23) — main/Common/UserModel/Fonts/FontCharset.cs:178, main/HPSF/CustomProperties.cs:405, main/HPSF/Property.cs:335, …
`catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×4) — main/DDF/EscherTextboxRecord.cs:178, main/DDF/EscherTextboxRecord.cs:200, main/DDF/UnknownEscherRecord.cs:210, …
`catch (RuntimeException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. — main/HPSF/Section.cs:958
`catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×3) — main/HSSF/Util/RangeAddress.cs:328, main/Util/POILogFactory.cs:121, ooxml/XSSF/Streaming/SheetDataWriter.cs:516
An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else). (×2) — main/POIFS/Crypt/Standard/StandardDecryptor.cs:327, ooxml/XSSF/Streaming/SheetDataWriter.cs:126
`catch (FormulaParseException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×3) — main/SS/Formula/Functions/ArrayFunction.cs:129, main/SS/Formula/Functions/ArrayFunction.cs:153, main/SS/Formula/Functions/ArrayFunction.cs:241
`catch (IndexOutOfRangeException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch. (×4) — main/SS/Formula/Functions/MathX.cs:530, main/SS/Formula/Functions/MathX.cs:560, main/SS/Formula/Functions/MathX.cs:590, …
What to do
Swallowed exception (empty catch)
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.
Do you agree with this assessment?
X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.
Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
This method contradicts itself about `s`: line 251 assigns it with `as HSSFSheet`, which hands back null rather than throwing when the value is not a `HSSFSheet`, but line 275 then dereferences it directly as `s.Sheet` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `s` once before the first use and handle the null case, or cast with `(HSSFSheet)` so the failure is reported where it happens — rather than leaving the two readings side by side. — main/HSSF/UserModel/HSSFOptimiser.cs:275
This method contradicts itself about `s`: line 363 assigns it with `as HSSFSheet`, which hands back null rather than throwing when the value is not a `HSSFSheet`, but line 390 then dereferences it directly as `s.Sheet` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `s` once before the first use and handle the null case, or cast with `(HSSFSheet)` so the failure is reported where it happens — rather than leaving the two readings side by side. — main/HSSF/UserModel/HSSFOptimiser.cs:390
This method contradicts itself about `pictData`: line 222 assigns it with `as HSSFPictureData`, which hands back null rather than throwing when the value is not a `HSSFPictureData`, but line 223 then dereferences it directly as `pictData.Format` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `pictData` once before the first use and handle the null case, or cast with `(HSSFPictureData)` so the failure is reported where it happens — rather than leaving the two readings side by side. — main/HSSF/UserModel/HSSFPatriarch.cs:223
This method contradicts itself about `spRecord`: line 270 assigns it with `as EscherSpRecord`, which hands back null rather than throwing when the value is not a `EscherSpRecord`, but line 271 then dereferences it directly as `spRecord.Flags` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `spRecord` once before the first use and handle the null case, or cast with `(EscherSpRecord)` so the failure is reported where it happens — rather than leaving the two readings side by side. — main/HSSF/UserModel/HSSFPatriarch.cs:271
This method contradicts itself about `pref`: line 115 assigns it with `as HSSFClientAnchor`, which hands back null rather than throwing when the value is not a `HSSFClientAnchor`, but line 117 then dereferences it directly as `pref.Row2` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `pref` once before the first use and handle the null case, or cast with `(HSSFClientAnchor)` so the failure is reported where it happens — rather than leaving the two readings side by side. — main/HSSF/UserModel/HSSFPicture.cs:117
This method contradicts itself about `anchor`: line 195 assigns it with `as HSSFAnchor`, which hands back null rather than throwing when the value is not a `HSSFAnchor`, but line 198 then dereferences it directly as `anchor.GetEscherAnchor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `anchor` once before the first use and handle the null case, or cast with `(HSSFAnchor)` so the failure is reported where it happens — rather than leaving the two readings side by side. — main/HSSF/UserModel/HSSFShape.cs:198
This method contradicts itself about `row`: line 1593 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 1615 then dereferences `row` as `row.Height` AFTER the block has closed, where the guard no longer applies. A null `row` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `row` truly cannot be null by then, the guard above is misleading and should go. — main/HSSF/UserModel/HSSFSheet.cs:1615
This method contradicts itself about `patriarch`: line 1756 assigns it with `as HSSFPatriarch`, which hands back null rather than throwing when the value is not a `HSSFPatriarch`, but line 1757 then dereferences it directly as `patriarch.Children` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `patriarch` once before the first use and handle the null case, or cast with `(HSSFPatriarch)` so the failure is reported where it happens — rather than leaving the two readings side by side. — main/HSSF/UserModel/HSSFSheet.cs:1757
This method contradicts itself about `sheet`: line 634 assigns it with `as HSSFSheet`, which hands back null rather than throwing when the value is not a `HSSFSheet`, but line 635 then dereferences it directly as `sheet.IsSelected` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `sheet` once before the first use and handle the null case, or cast with `(HSSFSheet)` so the failure is reported where it happens — rather than leaving the two readings side by side. — main/HSSF/UserModel/HSSFWorkbook.cs:635
This method contradicts itself about `hssfFont`: line 1189 assigns it with `as HSSFFont`, which hands back null rather than throwing when the value is not a `HSSFFont`, but line 1190 then dereferences it directly as `hssfFont.IsBold` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `hssfFont` once before the first use and handle the null case, or cast with `(HSSFFont)` so the failure is reported where it happens — rather than leaving the two readings side by side. — main/HSSF/UserModel/HSSFWorkbook.cs:1190
This method contradicts itself about `it`: line 64 assigns it with `as NPOIFSStream.StreamBlockByteBufferIterator`, which hands back null rather than throwing when the value is not a `NPOIFSStream.StreamBlockByteBufferIterator`, but line 68 then dereferences it directly as `it.Next` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `it` once before the first use and handle the null case, or cast with `(NPOIFSStream.StreamBlockByteBufferIterator)` so the failure is reported where it happens — rather than leaving the two readings side by side. — main/POIFS/FileSystem/NPOIFSMiniStore.cs:68
This method contradicts itself about `a`: line 171 assigns it with `as Array`, which hands back null rather than throwing when the value is not a `Array`, but line 173 then dereferences it directly as `a.Length` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `a` once before the first use and handle the null case, or cast with `(Array)` so the failure is reported where it happens — rather than leaving the two readings side by side. — main/Util/Arrays.cs:173
This method contradicts itself about `b`: line 172 assigns it with `as Array`, which hands back null rather than throwing when the value is not a `Array`, but line 173 then dereferences it directly as `b.Length` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `b` once before the first use and handle the null case, or cast with `(Array)` so the failure is reported where it happens — rather than leaving the two readings side by side. — main/Util/Arrays.cs:173
This method contradicts itself about `certKey`: line 111 assigns it with `as CT_CertificateKeyEncryptor`, which hands back null rather than throwing when the value is not a `CT_CertificateKeyEncryptor`, but line 113 then dereferences it directly as `certKey.certVerifier` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `certKey` once before the first use and handle the null case, or cast with `(CT_CertificateKeyEncryptor)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/POIFS/Crypt/Agile/AgileEncryptionVerifier.cs:113
This method contradicts itself about `cellStyle`: line 534 assigns it with `as ICellStyle`, which hands back null rather than throwing when the value is not a `ICellStyle`, but line 598 then dereferences it directly as `cellStyle.WrapText` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `cellStyle` once before the first use and handle the null case, or cast with `(ICellStyle)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/SS/Converter/ExcelToHtmlConverter.cs:598
This method contradicts itself about `nm`: line 168 assigns it with `as XSSFName`, which hands back null rather than throwing when the value is not a `XSSFName`, but line 169 then dereferences it directly as `nm.NameName` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `nm` once before the first use and handle the null case, or cast with `(XSSFName)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/BaseXSSFEvaluationWorkbook.cs:169
This method contradicts itself about `hyperlink`: line 256 assigns it with `as XSSFHyperlink`, which hands back null rather than throwing when the value is not a `XSSFHyperlink`, but line 257 then dereferences it directly as `hyperlink.CellRef` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `hyperlink` once before the first use and handle the null case, or cast with `(XSSFHyperlink)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:257
This method contradicts itself about `wb`: line 275 assigns it with `as XSSFWorkbook`, which hands back null rather than throwing when the value is not a `XSSFWorkbook`, but line 276 then dereferences it directly as `wb.GetSheetIndex` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `wb` once before the first use and handle the null case, or cast with `(XSSFWorkbook)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:276
This method contradicts itself about `destCell`: line 526 assigns it with `as XSSFCell`, which hands back null rather than throwing when the value is not a `XSSFCell`, but line 527 then dereferences it directly as `destCell.CopyCellFrom` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `destCell` once before the first use and handle the null case, or cast with `(XSSFCell)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/XSSFColumn.cs:527
This method contradicts itself about `wb`: line 461 assigns it with `as XSSFWorkbook`, which hands back null rather than throwing when the value is not a `XSSFWorkbook`, but line 462 then dereferences it directly as `wb.GetSheetIndex` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `wb` once before the first use and handle the null case, or cast with `(XSSFWorkbook)` so the failure is reported where it happens — rather than leaving the two readings side by side. — REDACTED:462
This method contradicts itself about `imgPD`: line 478 assigns it with `as XSSFPictureData`, which hands back null rather than throwing when the value is not a `XSSFPictureData`, but line 479 then dereferences it directly as `imgPD.GetPackagePart` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `imgPD` once before the first use and handle the null case, or cast with `(XSSFPictureData)` so the failure is reported where it happens — rather than leaving the two readings side by side. — REDACTED:479
This method contradicts itself about `table`: line 114 assigns it with `as XSSFTable`, which hands back null rather than throwing when the value is not a `XSSFTable`, but line 115 then dereferences it directly as `table.MapsTo` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `table` once before the first use and handle the null case, or cast with `(XSSFTable)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/XSSFMap.cs:115
This method contradicts itself about `picData`: line 293 assigns it with `as XSSFPictureData`, which hands back null rather than throwing when the value is not a `XSSFPictureData`, but line 294 then dereferences it directly as `picData.GetPackagePart` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `picData` once before the first use and handle the null case, or cast with `(XSSFPictureData)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/XSSFPicture.cs:294
This method contradicts itself about `destCell`: line 509 assigns it with `as XSSFCell`, which hands back null rather than throwing when the value is not a `XSSFCell`, but line 510 then dereferences it directly as `destCell.CopyCellFrom` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `destCell` once before the first use and handle the null case, or cast with `(XSSFCell)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/XSSFRow.cs:510
This method contradicts itself about `destRow`: line 3292 assigns it with `as XSSFRow`, which hands back null rather than throwing when the value is not a `XSSFRow`, but line 3293 then dereferences it directly as `destRow.CopyRowFrom` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `destRow` once before the first use and handle the null case, or cast with `(XSSFRow)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/XSSFSheet.cs:3293
This method contradicts itself about `table`: line 3995 assigns it with `as XSSFTable`, which hands back null rather than throwing when the value is not a `XSSFTable`, but line 3997 then dereferences it directly as `table.GetCTTable` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `table` once before the first use and handle the null case, or cast with `(XSSFTable)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/XSSFSheet.cs:3997
This method contradicts itself about `newXSSFChart`: line 4563 assigns it with `as XSSFChart`, which hands back null rather than throwing when the value is not a `XSSFChart`, but line 4567 then dereferences it directly as `newXSSFChart.GetAxis` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `newXSSFChart` once before the first use and handle the null case, or cast with `(XSSFChart)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/XSSFSheet.cs:4567
This method contradicts itself about `clonedSheet`: line 599 assigns it with `as XSSFSheet`, which hands back null rather than throwing when the value is not a `XSSFSheet`, but line 624 then dereferences it directly as `clonedSheet.GetPackagePart` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `clonedSheet` once before the first use and handle the null case, or cast with `(XSSFSheet)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/XSSFWorkbook.cs:624
This method contradicts itself about `wrapper`: line 927 assigns it with `as XSSFSheet`, which hands back null rather than throwing when the value is not a `XSSFSheet`, but line 928 then dereferences it directly as `wrapper.sheet` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `wrapper` once before the first use and handle the null case, or cast with `(XSSFSheet)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/XSSFWorkbook.cs:928
This method contradicts itself about `sheet`: line 1389 assigns it with `as XSSFSheet`, which hands back null rather than throwing when the value is not a `XSSFSheet`, but line 1391 then dereferences it directly as `sheet.OnSheetDelete` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `sheet` once before the first use and handle the null case, or cast with `(XSSFSheet)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XSSF/UserModel/XSSFWorkbook.cs:1391
This method contradicts itself about `xwpfChart`: line 2100 assigns it with `as XWPFChart`, which hands back null rather than throwing when the value is not a `XWPFChart`, but line 2101 then dereferences it directly as `xwpfChart.SetChartIndex` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `xwpfChart` once before the first use and handle the null case, or cast with `(XWPFChart)` so the failure is reported where it happens — rather than leaving the two readings side by side. — ooxml/XWPF/Usermodel/XWPFDocument.cs:2101
This method contradicts itself about `entry`: line 226 assigns it with `as ZipEntry`, which hands back null rather than throwing when the value is not a `ZipEntry`, but line 227 then dereferences it directly as `entry.Name` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `entry` once before the first use and handle the null case, or cast with `(ZipEntry)` so the failure is reported where it happens — rather than leaving the two readings side by side. — openxml4Net/OPC/ZipPackage.cs:227
This method contradicts itself about `sw`: line 297 writes `sw?.Close`, which says `sw` can be null, but line 198 then dereferences it directly as `sw.Write` with no null test between them and no guard around it. If the `?.` is right, that dereference throws NullReferenceException on the input it was written for; if `sw` truly cannot be null here, the `?.` is misleading. Settle it one way — test `sw` once before the first use and handle the null case, or drop the `?.` — rather than leaving the two readings side by side. — OpenXmlFormats/Spreadsheet/Sheet/CT_Worksheet.cs:198
This method contradicts itself about `editor`: line 209 assigns it with `as TextEditorControl`, which hands back null rather than throwing when the value is not a `TextEditorControl`, but line 230 then dereferences it directly as `editor.Text` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `editor` once before the first use and handle the null case, or cast with `(TextEditorControl)` so the failure is reported where it happens — rather than leaving the two readings side by side. — REDACTED:230
0/2 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
What to do
Where a method uses `?.` on a symbol and then dereferences it directly, settle the question once: test it before the first use and handle null, or drop the `?.`.
Where a method null-tests a symbol and then uses it after the guarded block closes, move the trailing work inside the block — the guard skips its body on null, it does not stop the method.
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
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 — 2 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 — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 17 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 — Repo shows no audit-logging mechanism (IAuditable, an immutable audit log, an EF SaveChanges interceptor) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
C4 Data Retention — Repo shows no data-retention / TTL / cleanup mechanism for personal data — absence of evidence is not evidence of a working control. Define retention periods and a purge/cleanup job (or TTL) in code, or document where retention is enforced, so this dimension can be scored.
C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 43 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
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.
C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
D11 Test Reliability — Test reliability not included
D12 Dependency Hygiene — Dependency hygiene not measured
D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
D23 Boundary Type-Coupling — Cross-context type coupling could not be assessed — this codebase's bounded contexts are neither declared nor inferable.
D25 ADR Conformance — no ADRs to check
D30 Dependency Vulnerabilities — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan
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) — 26 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D39 IL Efficiency — IL not measured — the analyzer's build of the target did not succeed
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
D8 Code Coverage — Coverage NOT MEASURED: `--collect:"XPlat Code Coverage"` names a data collector that ships in the `coverlet.collector` package, and this repository wires up none — no test project references it and no runsettings declares one. The absence of coverage here is therefore not evidence about the suite or about our analyzer environment: without a collector, `--collect` produces nothing even from a suite that builds and passes. Add a `coverlet.collector` PackageReference to the test project(s) (or commit the Cobertura/OpenCover/lcov report your CI produces) and real coverage will be measured. It is excluded from the score rather than counted as a near-zero defect.
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (a Domain/Aggregates/ValueObjects layer)
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'.
P2 Observability — This repo is a library, not a deployed service — it has no process to operate, so production observability (structured logging, tracing/metrics, health checks) is N/A. A library may log via an injected ILogger, but the absence of operational telemetry is not a defect here. If it grows a host (web API, worker), the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — this isn't a service/API/worker
P8 Schema migrations — no EF Core usage detected
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (Cobertura — `dotnet test --collect:"XPlat Code Coverage"` with a `coverlet.collector` PackageReference) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X2 Cancellation propagation — no async method does work a token could cancel
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 C# was read, and every log call in it goes through a logger that takes one finished message — its own wrapper, log4net, Console or Debug — so an interpolated message there loses nothing the API could have kept. Calls through Microsoft.Extensions.Logging, Serilog, NLog or ZLogger, or any logger with a message-template overload, would be judged.
X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:22— private XmlQualifiedName MOVEWITHCELLS — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:23— private XmlQualifiedName SIZEWITHCELLS — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:24— private XmlQualifiedName ANCHOR — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:25— private XmlQualifiedName LOCKED — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:26— private XmlQualifiedName DEFAULTSIZE — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:27— private XmlQualifiedName PRINTOBJECT — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:28— private XmlQualifiedName DISABLED — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:29— private XmlQualifiedName AUTOFILL — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:30— private XmlQualifiedName AUTOLINE — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:31— private XmlQualifiedName AUTOPICT — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:32— private XmlQualifiedName FMLAMACRO — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:33— private XmlQualifiedName TEXTHALIGN — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:34— private XmlQualifiedName TEXTVALIGN — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:35— private XmlQualifiedName LOCKTEXT — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:36— private XmlQualifiedName JUSTLASTX — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:37— private XmlQualifiedName SECRETEDIT — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:38— private XmlQualifiedName DEFAULT — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:40— private XmlQualifiedName CANCEL — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:41— private XmlQualifiedName DISMISS — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:42— private XmlQualifiedName ACCEL — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:43— private XmlQualifiedName ACCEL2 — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:45— private XmlQualifiedName COLUMN — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:46— private XmlQualifiedName VISIBLE — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:47— private XmlQualifiedName ROWHIDDEN — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
WriteOnlyPrivateField OpenXmlFormats/Vml/SpreadsheetDrawing.cs:48— private XmlQualifiedName COLHIDDEN — assigned 1 time(s), read never — this field is written and never read anywhere its type can be reached from, so the state it keeps answers no question: every assignment to it computes a value that nothing observes, on every instance, for the lifetime of each one. It reads as a flag the code branches on, and nothing branches on it. Delete the field and its assignments — or, if the value was MEANT to be consulted, the missing read is the defect this row is pointing at, and the branch that should have depended on it is not there.
NoWarnInCsproj build/_build.csproj:7— CS0649 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:57— CS0649 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj build/_build.csproj:7— CS0169 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:54— CS0169 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj — known-vulnerability alert suppressed build/_build.csproj:7— NU1903 — this is not a style rule being switched off: it is the dependency audit reporting that a package this project references has a KNOWN, already-published security vulnerability, and the entry deletes that report for the whole project — for this package and for every dependency the project takes from here on, including ones added long after whoever wrote the line has moved on. Nothing in the build will raise it again, so the next reader has no way to learn it was ever accepted. Upgrade the package to a version carrying the fix, or replace it, and drop the code from the list. Where the fix genuinely does not exist yet, keep the report and stop it FAILING the build — demote it to a warning without silencing it — and write down which advisory is being accepted and until when, so it is the acceptance that expires rather than the alert.
NoWarnInCsproj benchmarks/NPOI.Benchmarks/NPOI.Benchmarks.csproj:7— SYSLIB0014 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj testcases/Directory.Build.props:15— SYSLIB0014 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:36— CS0419 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:37— CS1570 — this project generates an XML documentation file as a build output, so its documentation is something it PUBLISHES to whoever consumes the assembly, and this entry switches off a rule whose only job is to report that documentation missing or malformed. The two decisions sit in the same file and the quiet one wins: the documentation this project ships has holes exactly where the rule would have pointed, no build says so, and the people who meet the gap are downstream — in their editor, at the moment they are trying to use the member. Write the documentation the rule is asking for and drop the code from the list; where only some elements genuinely cannot carry it, narrow the suppression to those sites and give each one its reason, so the rest of the API stays covered. If the documentation was never meant to be consumed, the honest fix is the other line — stop generating the file, so the project no longer publishes something it is choosing not to check.
NoWarnInCsproj Directory.Build.props:38— CS1572 — this project generates an XML documentation file as a build output, so its documentation is something it PUBLISHES to whoever consumes the assembly, and this entry switches off a rule whose only job is to report that documentation missing or malformed. The two decisions sit in the same file and the quiet one wins: the documentation this project ships has holes exactly where the rule would have pointed, no build says so, and the people who meet the gap are downstream — in their editor, at the moment they are trying to use the member. Write the documentation the rule is asking for and drop the code from the list; where only some elements genuinely cannot carry it, narrow the suppression to those sites and give each one its reason, so the rest of the API stays covered. If the documentation was never meant to be consumed, the honest fix is the other line — stop generating the file, so the project no longer publishes something it is choosing not to check.
NoWarnInCsproj Directory.Build.props:39— CS1573 — this project generates an XML documentation file as a build output, so its documentation is something it PUBLISHES to whoever consumes the assembly, and this entry switches off a rule whose only job is to report that documentation missing or malformed. The two decisions sit in the same file and the quiet one wins: the documentation this project ships has holes exactly where the rule would have pointed, no build says so, and the people who meet the gap are downstream — in their editor, at the moment they are trying to use the member. Write the documentation the rule is asking for and drop the code from the list; where only some elements genuinely cannot carry it, narrow the suppression to those sites and give each one its reason, so the rest of the API stays covered. If the documentation was never meant to be consumed, the honest fix is the other line — stop generating the file, so the project no longer publishes something it is choosing not to check.
NoWarnInCsproj Directory.Build.props:40— CS1574 — this project generates an XML documentation file as a build output, so its documentation is something it PUBLISHES to whoever consumes the assembly, and this entry switches off a rule whose only job is to report that documentation missing or malformed. The two decisions sit in the same file and the quiet one wins: the documentation this project ships has holes exactly where the rule would have pointed, no build says so, and the people who meet the gap are downstream — in their editor, at the moment they are trying to use the member. Write the documentation the rule is asking for and drop the code from the list; where only some elements genuinely cannot carry it, narrow the suppression to those sites and give each one its reason, so the rest of the API stays covered. If the documentation was never meant to be consumed, the honest fix is the other line — stop generating the file, so the project no longer publishes something it is choosing not to check.
NoWarnInCsproj Directory.Build.props:41— CS1584 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:42— CS1587 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:43— CS1591 — this project generates an XML documentation file as a build output, so its documentation is something it PUBLISHES to whoever consumes the assembly, and this entry switches off a rule whose only job is to report that documentation missing or malformed. The two decisions sit in the same file and the quiet one wins: the documentation this project ships has holes exactly where the rule would have pointed, no build says so, and the people who meet the gap are downstream — in their editor, at the moment they are trying to use the member. Write the documentation the rule is asking for and drop the code from the list; where only some elements genuinely cannot carry it, narrow the suppression to those sites and give each one its reason, so the rest of the API stays covered. If the documentation was never meant to be consumed, the honest fix is the other line — stop generating the file, so the project no longer publishes something it is choosing not to check.
NoWarnInCsproj Directory.Build.props:44— CS1734 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:50— CS0108 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:51— CS0114 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:52— CS0162 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj testcases/Directory.Build.props:13— CS0162 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:53— CS0168 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:55— CS0414 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:56— CS0628 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:58— CS0659 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:59— NU1900 — this warning is switched off for the WHOLE project, including builds years from now. It is raised by the build itself — the packaging, restore or SDK step — about the project as a whole, not by the compiler or an analyzer at a line of code, so there is no call site to narrow it to and no per-site directive that could carry a reason: this element is the only place the decision can be recorded. Say WHY here, in a comment on the entry, or fix what the rule is reporting and drop the code from the list.
EmptyCatchBlock main/Common/UserModel/Fonts/FontCharset.cs:178— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/HPSF/CustomProperties.cs:405— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/HPSF/Property.cs:335— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/HPSF/Property.cs:527— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/HPSF/Property.cs:602— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/HPSF/Section.cs:241— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/HSSF/Record/RecordFactory.cs:661— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/POIDocument.cs:391— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/POIFS/Crypt/Standard/StandardDecryptor.cs:327— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/POIFS/Crypt/Standard/StandardEncryptor.cs:164— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/POIFS/FileSystem/DirectoryNode.cs:234— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/POIFS/Storage/BlockAllocationTableReader.cs:234— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/SS/Formula/Functions/DateValue.cs:97— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/Util/InputStream.cs:184— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock main/Util/POILogFactory.cs:89— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ooxml/POIXMLProperties.cs:208— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ooxml/XDDF/UserModel/Chart/XDDFChart.cs:1025— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ooxml/XDDF/UserModel/Chart/XDDFChart.cs:1028— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ooxml/XSSF/Binary/XSSFBHyperlinksTable.cs:121— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ooxml/XSSF/EventUserModel/XSSFSheetXMLHandler.cs:400— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ooxml/XSSF/Streaming/SXSSFWorkbook.cs:379— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ooxml/XSSF/Streaming/SheetDataWriter.cs:126— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ooxml/XSSF/UserModel/BaseXSSFEvaluationWorkbook.cs:95— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ooxml/XWPF/Usermodel/XWPFDocument.cs:1691— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
EmptyCatchBlock ooxml/XWPF/Usermodel/XWPFHeaderFooter.cs:308— empty catch block — the error is discarded with nothing recorded, so a failure here leaves no trace anywhere. Record it through whatever this codebase already uses to report problems, or let it propagate. Where swallowing one specific failure really is correct — as it often is on a teardown/dispose path where throwing would mask the original failure — catch exactly that exception type and write down WHY in a comment on the catch. Both are needed: a comment on a catch-all still swallows every failure nobody anticipated, and a note that only restates the swallow ("ignored", "do nothing") is read as no explanation at all.
Orphaned knowledge OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge main/SS/Util/PropertyTemplate.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge REDACTED:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ooxml/XDDF/UserModel/PresetGeometry.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ooxml/XSSF/UserModel/XSSFSimpleShape.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge main/POIFS/Crypt/CryptoFunctions.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge main/SS/Formula/DataValidationEvaluator.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ooxml/XDDF/UserModel/Text/XDDFTextParagraph.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ooxml/POIFS/Crypt/Dsig/SignatureInfo.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ooxml/XDDF/UserModel/PresetColor.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ooxml/XDDF/UserModel/Text/XDDFTextRun.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge main/Util/LocaleUtil.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ooxml/XSSF/UserModel/XSSFPivotTable.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ooxml/XSSF/EventUserModel/XSSFSheetXMLHandler.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge main/SS/Formula/Functions/DStarRunner.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge ooxml/XDDF/UserModel/Text/XDDFTextBody.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge main/HSSF/Record/CFRule12Record.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge main/POIFS/FileSystem/OPOIFSFileSystem.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Orphaned knowledge main/HSSF/Record/CFRuleBase.cs:1— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Unfinished stub — throws NotImplementedException OpenXmlFormats/Spreadsheet/SupplementaryWorkbooks.cs:177— `Parse` is a shipped member whose body only throws — and it is REACHED: OpenXmlFormats/Spreadsheet/SupplementaryWorkbooks.cs:88 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException OpenXmlFormats/Spreadsheet/SupplementaryWorkbooks.cs:182— `Write` is a shipped member whose body only throws — and it is REACHED: OpenXmlFormats/Spreadsheet/SupplementaryWorkbooks.cs:115 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException main/HSSF/Model/InternalChart.cs:321— `CreateRuleSERIESDATA` is a shipped member whose body only throws — and it is REACHED: main/HSSF/Model/InternalChart.cs:305 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException main/HSSF/Record/Chart/LegendExceptionRecord.cs:57— `LegendEntry` is a shipped member whose body only throws — and it is REACHED: main/HSSF/Record/Aggregates/Chart/ChartRecordAggregate.cs:178 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/EscherGraphics.cs:490— `SetClip` is a shipped member whose body only throws — and it is REACHED: main/HSSF/UserModel/EscherGraphics.cs:487 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException main/POIFS/Crypt/CryptoAPI/CryptoAPIDecryptor.cs:46— `SetBlock` is a shipped member whose body only throws — and it is REACHED: main/POIFS/Crypt/CryptoAPI/CryptoAPIDecryptor.cs:195 references it (1 further site(s) in this project). This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException ooxml/POIFS/Crypt/Dsig/Facets/OOXMLSignatureFacet.cs:209— `AddSignatureInfo` is a shipped member whose body only throws — and it is REACHED: ooxml/POIFS/Crypt/Dsig/Facets/OOXMLSignatureFacet.cs:51 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException REDACTED:108— `newReference` is a shipped member whose body only throws — and it is REACHED: REDACTED:105 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException ooxml/POIFS/Crypt/Dsig/Services/RevocationData.cs:148— `getEncoded` is a shipped member whose body only throws — and it is REACHED: ooxml/POIFS/Crypt/Dsig/Services/RevocationData.cs:73 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException ooxml/POIFS/Crypt/Dsig/SignatureInfo.cs:356— `InitXmlProvider` is a shipped member whose body only throws — and it is REACHED: ooxml/POIFS/Crypt/Dsig/SignatureInfo.cs:219 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException ooxml/XSSF/Streaming/SXSSFCell.cs:46— `ArrayFormulaRange` is a shipped member whose body only throws — and it is REACHED: ooxml/XSSF/Streaming/SXSSFEvaluationCell.cs:155 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException ooxml/XSSF/UserModel/XSSFPicture.cs:305— `CountOfAllChildren` is a shipped member whose body only throws — and it is REACHED: ooxml/XSSF/Streaming/SXSSFPicture.cs:334 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException ooxml/XSSF/UserModel/XSSFPicture.cs:310— `FillColor` is a shipped member whose body only throws — and it is REACHED: ooxml/XSSF/Streaming/SXSSFPicture.cs:328 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException ooxml/XSSF/UserModel/XSSFPicture.cs:334— `LineStyleColor` is a shipped member whose body only throws — and it is REACHED: ooxml/XSSF/Streaming/SXSSFPicture.cs:326 references it. This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
Unfinished stub — throws NotImplementedException ooxml/XSSF/UserModel/XSSFWorkbook.cs:1950— `IsHidden` is a shipped member whose body only throws — and it is REACHED: ooxml/XSSF/Streaming/SXSSFWorkbook.cs:157 references it (1 further site(s) in this project). This is not dead surface that can be deleted — anything taking that path throws at runtime. Implement the member, or remove the code that reaches it.
D10 · Test Quality· No assertions (empty test) · ×8
No assertions (empty test): TestKthSmallest testcases/main/SS/Formula/Functions/TestStatsLib.cs:109— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): GetCellComment testcases/ooxml/XSSF/Streaming/TestSXSSFSheet.cs:107— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): TestCachedReferencesToOtherWorkbooks testcases/ooxml/XSSF/UserModel/TestXSSFFormulaEvaluation.cs:263— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): TestShiftRowBreaks testcases/ooxml/XSSF/UserModel/TestXSSFSheetShiftRows.cs:44— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): TestAddPictureData testcases/ooxml/XWPF/UserModel/TestXWPFHeader.cs:204— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): TestGetAllPictures testcases/ooxml/XWPF/UserModel/TestXWPFHeader.cs:210— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): TestGetAllPackagePictures testcases/ooxml/XWPF/UserModel/TestXWPFHeader.cs:216— Test method has an empty body — it asserts nothing and exercises no code.
No assertions (empty test): TestGetPictureDataById testcases/ooxml/XWPF/UserModel/TestXWPFHeader.cs:222— Test method has an empty body — it asserts nothing and exercises no code.
Namespace dependency cycle OpenXmlFormats/Vml/Main.cs:6— The namespaces NPOI.OpenXmlFormats.Vml ↔ NPOI.OpenXmlFormats.Vml.Office depend on each other. The lightest dependency in the cycle is NPOI.OpenXmlFormats.Vml → NPOI.OpenXmlFormats.Vml.Office (NPOI.OpenXmlFormats.Vml.CT_Path → NPOI.OpenXmlFormats.Vml.Office.ST_ConnectType, 4 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle main/Util/Collections/BidirectionalDictionary/BidirectionalDictionary.cs:2— The namespaces System.Collections.Generic ↔ System.Collections.ObjectModel depend on each other. The lightest dependency in the cycle is System.Collections.Generic → System.Collections.ObjectModel (System.Collections.Generic.BidirectionalDictionary → System.Collections.ObjectModel.ReadOnlyBidirectionalDictionary, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle ooxml/POIXMLProperties.cs:22— The namespaces NPOI ↔ NPOI.DDF ↔ NPOI.HPSF ↔ NPOI.HPSF.Wellknown ↔ NPOI.HSSF.Model ↔ NPOI.HSSF.Record ↔ NPOI.HSSF.Record.Aggregates ↔ NPOI.HSSF.Record.AutoFilter ↔ NPOI.HSSF.Record.CF ↔ NPOI.HSSF.Record.Chart ↔ NPOI.HSSF.Record.Common ↔ NPOI.HSSF.Record.Cont ↔ NPOI.HSSF.UserModel ↔ NPOI.HSSF.Util ↔ NPOI.OOXML.XSSF.UserModel ↔ NPOI.OpenXml4Net.OPC ↔ NPOI.OpenXml4Net.OPC.Internal ↔ NPOI.OpenXml4Net.OPC.Internal.Unmarshallers ↔ NPOI.POIFS.Crypt ↔ NPOI.POIFS.Crypt.Standard ↔ NPOI.POIFS.Dev ↔ NPOI.POIFS.EventFileSystem ↔ NPOI.POIFS.FileSystem ↔ NPOI.POIFS.NIO ↔ NPOI.POIFS.Properties ↔ NPOI.POIFS.Storage ↔ NPOI.SS.Format ↔ NPOI.SS.Formula ↔ NPOI.SS.Formula.Eval ↔ NPOI.SS.Formula.Functions ↔ NPOI.SS.Formula.PTG ↔ NPOI.SS.Formula.UDF ↔ NPOI.SS.UserModel ↔ NPOI.SS.UserModel.Helpers ↔ NPOI.SS.Util ↔ NPOI.Util ↔ NPOI.XDDF.UserModel.Chart ↔ NPOI.XDDF.UserModel.Text ↔ NPOI.XSSF.Model ↔ NPOI.XSSF.UserModel ↔ NPOI.XSSF.UserModel.Extensions ↔ NPOI.XSSF.UserModel.Helpers ↔ NPOI.XWPF.Model ↔ NPOI.XWPF.UserModel depend on each other. The lightest dependency in the cycle is NPOI → NPOI.OpenXml4Net.OPC.Internal (NPOI.CoreProperties → NPOI.OpenXml4Net.OPC.Internal.PackagePropertiesPart, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle scratchpad/HWPF/Model/PicturesTable.cs:44— The namespaces NPOI.HWPF ↔ NPOI.HWPF.Model ↔ NPOI.HWPF.SPRM ↔ NPOI.HWPF.UserModel depend on each other. The lightest dependency in the cycle is NPOI.HWPF.Model → NPOI.HWPF (NPOI.HWPF.Model.PicturesTable → NPOI.HWPF.HWPFDocument, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle REDACTED:27— The namespaces NPOI.POIFS.Crypt.Dsig ↔ NPOI.POIFS.Crypt.Dsig.Facets ↔ NPOI.POIFS.Crypt.Dsig.Services depend on each other. The lightest dependency in the cycle is NPOI.POIFS.Crypt.Dsig → NPOI.POIFS.Crypt.Dsig.Facets (NPOI.POIFS.Crypt.Dsig.SignatureConfig → NPOI.POIFS.Crypt.Dsig.Facets.SignatureFacet, 1 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Namespace dependency cycle ooxml/XSSF/Binary/XSSFBSheetHandler.cs:29— The namespaces NPOI.XSSF.Binary ↔ NPOI.XSSF.EventUserModel depend on each other. The lightest dependency in the cycle is NPOI.XSSF.Binary → NPOI.XSSF.EventUserModel (NPOI.XSSF.Binary.ISheetContentsHandler → NPOI.XSSF.EventUserModel.ISheetContentsHandler, 2 type pair(s)); cut that one first, e.g. by moving the shared type to a namespace both can use or inverting it behind an interface.
Assertions commented out: TestApplyObjectDate testcases/main/SS/Format/TestCellFormat.cs:651— The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
Assertions commented out: TestConstruct testcases/main/Util/TestHexDump.cs:477— The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
Assertions commented out: Test58616 testcases/ooxml/POIFS/Crypt/TestDecryptor.cs:164— The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
Assertions commented out: DeserializeVmlDrawingDocumentTest testcases/ooxml/OpenXmlFormats/Spreadsheet/VmlDrawingDocumentTest.cs:87— The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
DiscardedPureResult scratchpad/HWPF/Extractor/Word6Extractor.cs:103— ret[i].Replace("\r", "\ufffe"); — strings are immutable, so this call cannot change the text it was called on: it computes a new string and the statement throws it away, leaving the original exactly as it was. The line reads as the transformation it names, and the value that comes out of this method later is the untransformed one. Assign the result — to the same variable, or to the field or property the transformed text was meant to reach — or, if the call really was pointless, delete the line rather than leaving something that looks like it works.
DiscardedPureResult scratchpad/HWPF/Extractor/Word6Extractor.cs:104— ret[i].Replace("\ufffe", "\r\n"); — strings are immutable, so this call cannot change the text it was called on: it computes a new string and the statement throws it away, leaving the original exactly as it was. The line reads as the transformation it names, and the value that comes out of this method later is the untransformed one. Assign the result — to the same variable, or to the field or property the transformed text was meant to reach — or, if the call really was pointless, delete the line rather than leaving something that looks like it works.
S1 · Cryptographic Hygiene· Password hashing without a KDF · ×2
Password hashing without a KDF main/HSSF/Record/Crypto/Biff8EncryptionKey.cs:54— `md5.ComputeHash(…)` puts the password `passwordData` through a fast general-purpose digest, so a stolen hash is guessed at billions of candidates a second whether or not it is salted — no key-derivation function (PBKDF2/scrypt/Argon2/bcrypt) stands between the password and the stored value.
Password hashing without a KDF main/HSSF/Record/RecordFactoryInputStream.cs:133— `Decryptor.DEFAULT_PASSWORD Equals userPassword` checks a password against the stored one in plaintext, so the store holds the password itself and whoever reads it holds every account. Store a salted KDF hash (PBKDF2/scrypt/Argon2/bcrypt) and verify by deriving again.
D10 · Test Quality· Tests excluded from compilation · ×1
Tests excluded from compilation: testcases/ooxml/XSSF/UserModel/Charts/TestXSSFNumberCache.cs testcases/ooxml/XSSF/UserModel/Charts/TestXSSFNumberCache.cs:32— 1 test method(s) in this file, but `NPOI.OOXML.TestCases.Core.csproj` drops it from the build with `<Compile Remove="XSSF\UserModel\Charts\TestXSSFNumberCache.cs" />`. It never compiles, never runs, and never reports as skipped — unlike a `Skip = "..."` attribute, nothing in a green test run says these tests are gone. Restore it to the compilation, or delete the file so the tree stops implying coverage that isn't there.
NuGet vulnerability audit suppressed via NoWarn build/_build.csproj:7— `NoWarn` silences NU1903 — NuGet's vulnerability-audit warnings for high advisories. Suppressed advisories are still shipped; they are only invisible in the build log. Remove these codes from NoWarn and address or explicitly accept each advisory instead.
TodoComment OpenXmlFormats/Spreadsheet/CustomXmlMappings.cs:20— // TODO the initial elements of schemaField and mapField must be ensured somewhere else - or is there a save 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.
TodoComment OpenXmlFormats/Spreadsheet/CustomXmlMappings.cs:108— // TODO ensure initialization = new XmlElement(); // 1..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 OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:144— //TODO add namespaceUri — 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 OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheRecords.cs:64— //TODO add namespaceUri — 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 OpenXmlFormats/Spreadsheet/SharedString/CT_Rst.cs:43— //TODO: diff has-space case and no-space case — 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 OpenXmlFormats/Spreadsheet/Sheet/CT_Comment.cs:96— // 0..1 TODO: Type is ST_Guid — 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 OpenXmlFormats/Spreadsheet/Styles/CT_Colors.cs:183— // TODO change all the uses theme to use uint instead of signed integer variants — 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 OpenXmlFormats/Spreadsheet/Styles/CT_Colors.cs:405— // TODO change all the uses theme to use uint instead of signed integer variants — 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 REDACTED:116— //TODO: NPOI duplication code, fix it. — 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 OpenXmlFormats/Vml/Main.cs:1326— // TODO remove — 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 main/DDF/EscherArrayProperty.cs:201— // TODO: this part is strange - it doesn't make sense to compare — 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 main/DDF/EscherContainerRecord.cs:289— // TODO - keep looping? Do we expect multiple matches? — 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 main/GlobalSuppressions.cs:12— // TODO fix warnings: — 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 main/GlobalSuppressions.cs:42— // TODO fix warnings: — 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 main/GlobalSuppressions.cs:78— // TODO: apply fix that is proposed in the code: — 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 main/GlobalSuppressions.cs:91— // TODO: fix needs some minutes, because the constructor adds itself to the given parameter BlockList. — 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 main/HPSF/CodePageString.cs:53— // TODO Some files, such as TestVisioWithCodepage.vsd, are currently
TodoComment main/HSSF/Extractor/EventBasedExcelExtractor.cs:262— // TODO: Find object to match nrec.GetShapeId() — 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 main/HSSF/Extractor/OldExcelExtractor.cs:243— // TODO track the XFs and Format Strings — 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 main/HSSF/Extractor/OldExcelExtractor.cs:328— // TODO Need to fetch / use format strings — 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 main/HSSF/Model/InternalChart.cs:874— // TODO: Add Pattern constants to record — 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 main/HSSF/UserModel/HSSFChart.cs:886— // TODO: Add Pattern constants to record — 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 main/HSSF/Model/InternalSheet.cs:56— // TODO - Is it legal for dims record to be missing? — 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 main/HSSF/Model/InternalSheet.cs:212— // TODO - take chart streams off into separate java objects — 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: TestProblemMetadata testcases/scratchpad/HWPF/Extractor/TestWordExtractorBugs.cs:32— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestOpen testcases/scratchpad/HWPF/TestHWPFPictures.cs:61— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestUtf testcases/scratchpad/HWPF/UserModel/TestBug46610.cs:30— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestUtf2 testcases/scratchpad/HWPF/UserModel/TestBug46610.cs:35— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestFastSaved testcases/scratchpad/HWPF/UserModel/TestPictures.cs:167— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestFastSaved2 testcases/scratchpad/HWPF/UserModel/TestPictures.cs:174— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestFastSaved3 testcases/scratchpad/HWPF/UserModel/TestPictures.cs:181— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestListEntryNoListTable testcases/scratchpad/HWPF/UserModel/TestProblems.cs:41— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestSprmAIOOB testcases/scratchpad/HWPF/UserModel/TestProblems.cs:62— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestOpen testcases/scratchpad/HWPF/UserModel/TestRangeDelete.cs:61— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestOpen testcases/scratchpad/HWPF/UserModel/TestRangeInsertion.cs:54— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestOpen testcases/scratchpad/HWPF/UserModel/TestRangeReplacement.cs:50— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: ReadDocumentSummaryInformation testcases/main/HPSF/Basic/TestReadAllFiles.cs:166— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: Test61300Extractor testcases/main/HPSF/Extractor/TestHPSFPropertiesExtractor.cs:201— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestInputStreamNPOIHeader testcases/main/HSSF/Extractor/TestOldExcelExtractor.cs:279— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestNPOIFSFileSystem testcases/main/HSSF/Extractor/TestOldExcelExtractor.cs:294— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestDirectoryNode testcases/main/HSSF/Extractor/TestOldExcelExtractor.cs:309— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestBOFRecord1 testcases/main/HSSF/Record/TestBOFRecord.cs:33— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestNPOIBug6177 testcases/main/HSSF/Record/TestRecordFactory.cs:260— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestLeftoverDataException testcases/main/HSSF/Record/TestRecordInputStream.cs:108— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: TestReadBook testcases/main/HSSF/Record/TestUnicodeNameRecord.cs:32— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: Test14460 REDACTED:137— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: Test14330 REDACTED:143— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: Test22742 REDACTED:267— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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: Test12561_1 REDACTED:273— This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* — so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, 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.
FixmeComment main/HPSF/PropertySet.cs:420— /* FIXME (3): Ensure that at most "length" bytes are read. */ — 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 main/HPSF/PropertySet.cs:466— /* FIXME (3): Ensure that at most "length" bytes are read. */ — 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 main/HPSF/SummaryInformation.cs:438— /* FIXME: */ — 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 main/HPSF/TypeWriter.cs:52— // FIXME: unsigned — 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 main/HSSF/UserModel/HSSFDataValidation.cs:58— //FIXME: This cast can be avoided. — 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 main/HSSF/UserModel/HSSFSheet.cs:739— // FIXME: this may be faster if it looped over array formulas directly rather than looping over each cell in — 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 main/SS/Util/CellAddress.cs:84— // FIXME: breaks if Address Contains a sheet name or dollar signs from an absolute CellReference — 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 main/SS/Util/CellReference.cs:72— // FIXME: _sheetName may be null, depending on the entry point. — 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 main/SS/Util/CellUtil.cs:143— // FIXME: Cached value may be stale — 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 ooxml/XSSF/Streaming/AutoSizeColumnTracker.cs:326— // FIXME: if cell belongs to a merged region, some of the merged region may have fallen outside of the random access window — 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 ooxml/XSSF/Streaming/AutoSizeColumnTracker.cs:346— // FIXME: if cell belongs to a merged region, some of the merged region may have fallen outside of the random access window — 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 ooxml/XSSF/Streaming/AutoSizeColumnTracker.cs:329— // FIXME: Most cells are not merged, so calling getCellWidth twice re-computes the same value twice. — 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 ooxml/XSSF/Streaming/AutoSizeColumnTracker.cs:349— // FIXME: Most cells are not merged, so calling getCellWidth twice re-computes the same value twice. — 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 ooxml/XSSF/UserModel/BaseXSSFEvaluationWorkbook.cs:385— * FIXME: Caching tables by name here for fast formula lookup means the map is out of date if — 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 ooxml/XSSF/UserModel/BaseXSSFEvaluationWorkbook.cs:397— // FIXME: use org.apache.commons.collections.map.CaseInsensitiveMap — 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 ooxml/XSSF/UserModel/XSSFColor.cs:412— // FIXME: this method would be more useful if it could convert any Color to an XSSFColor — 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 ooxml/XSSF/UserModel/XSSFDataValidationConstraint.cs:99— //FIXME: Need to confirm if this is not a formula. — 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 ooxml/XSSF/UserModel/XSSFHyperlink.cs:116— //FIXME: change to protected if/when SXSSFHyperlink class is created — 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 ooxml/XSSF/UserModel/XSSFRow.cs:475— // FIXME: remove type casting when copyCellFrom(Cell, CellCopyPolicy) is added to Cell interface — 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 ooxml/XSSF/UserModel/XSSFRow.cs:522— // FIXME: is this something that rowShifter could be doing? — 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 ooxml/XSSF/UserModel/XSSFSheet.cs:3302— // FIXME: is this something that rowShifter could be doing? — 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 ooxml/XSSF/UserModel/XSSFSheet.cs:3265— // FIXME: is special behavior needed if srcRows and destRows belong to the same sheets and the regions overlap? — 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 ooxml/XSSF/UserModel/XSSFSheet.cs:3274— // FIXME: if srcRows contains gaps or null values, clear out those rows that will be overwritten — 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 ooxml/XSSF/UserModel/XSSFSheet.cs:4987— // FIXME: this may be faster if it looped over array formulas — 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 ooxml/XSSF/UserModel/XSSFSheet.cs:5524— // FIXME: (performance optimization) this should be moved outside the for-loop so that comments only needs to be iterated over once. — 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.
TooManyMethods: CT_P OpenXmlFormats/Wordprocessing/Paragraph.cs— TooManyMethods — 609 significant lines (blank, comment-only and punctuation-only lines excluded), 240 methods. The bar is 30 methods; this is 210 over it, 8.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CT_R OpenXmlFormats/Wordprocessing/Run.cs— TooManyMethods — 577 significant lines (blank, comment-only and punctuation-only lines excluded), 240 methods. The bar is 30 methods; this is 210 over it, 8.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CT_Comment OpenXmlFormats/Wordprocessing/Markup.cs— TooManyMethods — 499 significant lines (blank, comment-only and punctuation-only lines excluded), 221 methods. The bar is 30 methods; this is 191 over it, 7.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: XSSFSheet ooxml/XSSF/UserModel/XSSFSheet.cs— TooManyMethods — 2862 significant lines (blank, comment-only and punctuation-only lines excluded), 209 methods. The bar is 30 methods; this is 179 over it, 6.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: FileInformationBlock scratchpad/HWPF/Model/FileInformationBlock.cs— TooManyMethods — 403 significant lines (blank, comment-only and punctuation-only lines excluded), 137 methods. The bar is 30 methods; this is 107 over it, 4.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HSSFSheet main/HSSF/UserModel/HSSFSheet.cs— TooManyMethods — 1212 significant lines (blank, comment-only and punctuation-only lines excluded), 126 methods. The bar is 30 methods; this is 96 over it, 4.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: XSSFWorkbook ooxml/XSSF/UserModel/XSSFWorkbook.cs— TooManyMethods — 947 significant lines (blank, comment-only and punctuation-only lines excluded), 125 methods. The bar is 30 methods; this is 95 over it, 4.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SXSSFSheet ooxml/XSSF/Streaming/SXSSFSheet.cs— TooManyMethods — 580 significant lines (blank, comment-only and punctuation-only lines excluded), 118 methods. The bar is 30 methods; this is 88 over it, 3.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: HSSFWorkbook main/HSSF/UserModel/HSSFWorkbook.cs— TooManyMethods — 893 significant lines (blank, comment-only and punctuation-only lines excluded), 110 methods. The bar is 30 methods; this is 80 over it, 3.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: InternalWorkbook main/HSSF/Model/InternalWorkbook.cs— TooManyMethods — 1313 significant lines (blank, comment-only and punctuation-only lines excluded), 107 methods. The bar is 30 methods; this is 77 over it, 3.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: XWPFDocument ooxml/XWPF/Usermodel/XWPFDocument.cs— TooManyMethods — 698 significant lines (blank, comment-only and punctuation-only lines excluded), 100 methods. The bar is 30 methods; this is 70 over it, 3.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CT_TrPrBase OpenXmlFormats/Wordprocessing/Table.cs— TooManyMethods — 264 significant lines (blank, comment-only and punctuation-only lines excluded), 95 methods. The bar is 30 methods; this is 65 over it, 3.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: InternalSheet main/HSSF/Model/InternalSheet.cs— TooManyMethods — 846 significant lines (blank, comment-only and punctuation-only lines excluded), 81 methods. The bar is 30 methods; this is 51 over it, 2.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CharacterRun scratchpad/HWPF/UserModel/CharacterRun.cs— TooManyMethods — 274 significant lines (blank, comment-only and punctuation-only lines excluded), 74 methods. The bar is 30 methods; this is 44 over it, 2.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: OPCPackage openxml4Net/OPC/OPCPackage.cs— TooManyMethods — 622 significant lines (blank, comment-only and punctuation-only lines excluded), 72 methods. The bar is 30 methods; this is 42 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BigInteger main/Util/BigInteger.cs— TooManyMethods — 753 significant lines (blank, comment-only and punctuation-only lines excluded), 70 methods. The bar is 30 methods; this is 40 over it, 2.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: FormulaParser main/SS/Formula/FormulaParser.cs— TooManyMethods — 1098 significant lines (blank, comment-only and punctuation-only lines excluded), 69 methods. The bar is 30 methods; this is 39 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SignatureConfig REDACTED— TooManyMethods — 253 significant lines (blank, comment-only and punctuation-only lines excluded), 69 methods. The bar is 30 methods; this is 39 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CT_Font OpenXmlFormats/Spreadsheet/Styles/CT_Font.cs— TooManyMethods — 447 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SXSSFWorkbook ooxml/XSSF/Streaming/SXSSFWorkbook.cs— TooManyMethods — 375 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: XDDFChart ooxml/XDDF/UserModel/Chart/XDDFChart.cs— TooManyMethods — 414 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Paragraph scratchpad/HWPF/UserModel/Paragraph.cs— TooManyMethods — 253 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 30 methods; this is 36 over it, 2.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MutableBigInteger main/Util/BigInteger.cs— TooManyMethods — 755 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CT_Worksheet OpenXmlFormats/Spreadsheet/Sheet/CT_Worksheet.cs— TooManyMethods — 595 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: InternalChart main/HSSF/Model/InternalChart.cs— TooManyMethods — 568 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
FileTooLong: PivotTable/CT_PivotCacheDefinition.cs OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs— FileTooLong — 4778 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4278 over it, 9.56× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Wordprocessing/Paragraph.cs OpenXmlFormats/Wordprocessing/Paragraph.cs— FileTooLong — 4668 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 4168 over it, 9.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: PivotTable/CT_PivotTableDefinition.cs OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs— FileTooLong — 4124 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3624 over it, 8.25× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Wordprocessing/Settings.cs OpenXmlFormats/Wordprocessing/Settings.cs— FileTooLong — 3973 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3473 over it, 7.95× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Wordprocessing/Table.cs OpenXmlFormats/Wordprocessing/Table.cs— FileTooLong — 3582 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3082 over it, 7.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Vml/Main.cs OpenXmlFormats/Vml/Main.cs— FileTooLong — 3570 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3070 over it, 7.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: UserModel/XSSFSheet.cs ooxml/XSSF/UserModel/XSSFSheet.cs— FileTooLong — 2926 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2426 over it, 5.85× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Drawing/ShapeEffects.cs OpenXmlFormats/Drawing/ShapeEffects.cs— FileTooLong — 2547 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2047 over it, 5.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Vml/OfficeDrawing.cs OpenXmlFormats/Vml/OfficeDrawing.cs— FileTooLong — 2241 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1741 over it, 4.48× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Wordprocessing/Sdt.cs OpenXmlFormats/Wordprocessing/Sdt.cs— FileTooLong — 1946 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1446 over it, 3.89× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Wordprocessing/Run.cs OpenXmlFormats/Wordprocessing/Run.cs— FileTooLong — 1672 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1172 over it, 3.34× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Wordprocessing/CustomXml.cs OpenXmlFormats/Wordprocessing/CustomXml.cs— FileTooLong — 1540 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1040 over it, 3.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Util/BigInteger.cs main/Util/BigInteger.cs— FileTooLong — 1513 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1013 over it, 3.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Wordprocessing/Styles.cs OpenXmlFormats/Wordprocessing/Styles.cs— FileTooLong — 1403 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 903 over it, 2.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Drawing/ShapeProperties.cs OpenXmlFormats/Drawing/ShapeProperties.cs— FileTooLong — 1376 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 876 over it, 2.75× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Model/InternalWorkbook.cs main/HSSF/Model/InternalWorkbook.cs— FileTooLong — 1327 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 827 over it, 2.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Drawing/ShapeGeometry.cs OpenXmlFormats/Drawing/ShapeGeometry.cs— FileTooLong — 1323 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 823 over it, 2.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: UserModel/HSSFSheet.cs main/HSSF/UserModel/HSSFSheet.cs— FileTooLong — 1262 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 762 over it, 2.52× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Drawing/SpreadsheetDrawing.cs OpenXmlFormats/Drawing/SpreadsheetDrawing.cs— FileTooLong — 1221 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 721 over it, 2.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Formula/FormulaParser.cs main/SS/Formula/FormulaParser.cs— FileTooLong — 1158 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 658 over it, 2.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Wordprocessing/HdrFtr.cs OpenXmlFormats/Wordprocessing/HdrFtr.cs— FileTooLong — 1082 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 582 over it, 2.16× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Wordprocessing/Numbering.cs OpenXmlFormats/Wordprocessing/Numbering.cs— FileTooLong — 1075 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 575 over it, 2.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: UserModel/XSSFWorkbook.cs ooxml/XSSF/UserModel/XSSFWorkbook.cs— FileTooLong — 971 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 471 over it, 1.94× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Spreadsheet/ExternalConnections.cs OpenXmlFormats/Spreadsheet/ExternalConnections.cs— FileTooLong — 963 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 463 over it, 1.93× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: UserModel/HSSFWorkbook.cs main/HSSF/UserModel/HSSFWorkbook.cs— FileTooLong — 934 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 434 over it, 1.87× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Low cohesion: CT_RPr (LCOM4 27) OpenXmlFormats/Wordprocessing/Paragraph.cs:3975— CT_RPr's methods fall into 27 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 27 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: SignatureConfig (LCOM4 24) REDACTED:37— SignatureConfig's methods fall into 24 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 24 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_Worksheet (LCOM4 23) OpenXmlFormats/Spreadsheet/Sheet/CT_Worksheet.cs:10— CT_Worksheet's methods fall into 23 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 23 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_RPrElt (LCOM4 16) OpenXmlFormats/Spreadsheet/SharedString/CT_RPrElt.cs:14— CT_RPrElt's methods fall into 16 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 16 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: InternalSheet (LCOM4 12) main/HSSF/Model/InternalSheet.cs:49— InternalSheet's methods fall into 12 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 12 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_TextListStyle (LCOM4 11) OpenXmlFormats/Drawing/Text.cs:108— CT_TextListStyle's methods fall into 11 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 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_PPrBase (LCOM4 11) OpenXmlFormats/Wordprocessing/Paragraph.cs:6128— CT_PPrBase's methods fall into 11 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 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_LineSer (LCOM4 10) OpenXmlFormats/Drawing/Chart/LineChart.cs:12— CT_LineSer's methods fall into 10 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 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_ScatterSer (LCOM4 10) OpenXmlFormats/Drawing/Chart/ScatterChart.cs:15— CT_ScatterSer's methods fall into 10 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 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_PieSer (LCOM4 9) OpenXmlFormats/Drawing/Chart/PieChart.cs:306— CT_PieSer's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_TextBodyProperties (LCOM4 9) OpenXmlFormats/Drawing/Text.cs:513— CT_TextBodyProperties's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_AreaSer (LCOM4 8) OpenXmlFormats/Drawing/Chart/AreaChart.cs:220— CT_AreaSer's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_BarSer (LCOM4 8) OpenXmlFormats/Drawing/Chart/BarChart.cs:470— CT_BarSer's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_RadarSer (LCOM4 8) OpenXmlFormats/Drawing/Chart/RadarChart.cs:14— CT_RadarSer's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_ShapeProperties (LCOM4 8) OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:583— CT_ShapeProperties's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_PivotTableDefinition (LCOM4 8) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:14— CT_PivotTableDefinition's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_ClientData (LCOM4 8) OpenXmlFormats/Vml/SpreadsheetDrawing.cs:12— CT_ClientData's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_BarChart (LCOM4 7) OpenXmlFormats/Drawing/Chart/BarChart.cs:14— CT_BarChart's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_SolidColorFillProperties (LCOM4 7) OpenXmlFormats/Drawing/ShapeEffects.cs:1983— CT_SolidColorFillProperties's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_Workbook (LCOM4 7) OpenXmlFormats/Spreadsheet/Workbook/CT_Workbook.cs:12— CT_Workbook's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_Shape (LCOM4 7) OpenXmlFormats/Vml/Main.cs:615— CT_Shape's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_Shapetype (LCOM4 7) OpenXmlFormats/Vml/Main.cs:3701— CT_Shapetype's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_PPr (LCOM4 7) OpenXmlFormats/Wordprocessing/Paragraph.cs:951— CT_PPr's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_TblPrBase (LCOM4 7) OpenXmlFormats/Wordprocessing/Table.cs:1144— CT_TblPrBase's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: CT_TblBorders (LCOM4 7) OpenXmlFormats/Wordprocessing/Table.cs:2348— CT_TblBorders's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Unfinished stub — throws NotImplementedException main/DDF/EscherArrayProperty.cs:281— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/DDF/EscherArrayProperty.cs:297— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HPSF/Wellknown/PropertyIDMap.cs:534— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HPSF/Wellknown/PropertyIDMap.cs:539— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/Model/InternalChart.cs:321— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/Model/InternalChart.cs:716— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/Record/Chart/LegendExceptionRecord.cs:57— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/Record/MergeCellsRecord.cs:85— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/EscherGraphics.cs:490— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/HSSFCell.cs:1484— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/HSSFRow.cs:689— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/HSSFRow.cs:702— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/HSSFRow.cs:790— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/HSSFShape.cs:128— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/HSSFShape.cs:468— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/HSSFShape.cs:474— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/HSSFSheet.cs:3358— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/HSSFWorkbook.cs:2424— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/HSSFWorkbook.cs:2468— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/HSSFWorkbook.cs:2473— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/HSSF/UserModel/HSSFWorkbook.cs:2483— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/POIFS/Crypt/CryptoAPI/CryptoAPIDecryptor.cs:46— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/POIFS/Crypt/CryptoAPI/CryptoAPIDecryptor.cs:74— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/POIFS/FileSystem/DirectoryNode.cs:674— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException main/POIFS/FileSystem/DirectoryNode.cs:679— A shipped member still throws NotImplementedException — generated scaffolding that was never completed. Implement it or remove the dead surface.
MethodTooLong: FunctionEval.ProduceFunctions main/SS/Formula/Eval/FunctionEval.cs:97— MethodTooLong — ProduceFunctions runs 355 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 255 over it, 3.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: InternalWorkbook.CreateExtendedFormat main/HSSF/Model/InternalWorkbook.cs:1723— MethodTooLong — CreateExtendedFormat runs 292 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 192 over it, 2.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EscherDump.DumpOld main/DDF/EscherDump.cs:67— MethodTooLong — DumpOld runs 286 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 186 over it, 2.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EscherProperties.InitProps main/DDF/EscherProperties.cs:342— MethodTooLong — InitProps runs 281 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 181 over it, 2.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: EscherDump.PropertyName main/DDF/EscherDump.cs:444— MethodTooLong — PropertyName runs 280 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 180 over it, 2.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: ParagraphSprmUncompressor.UncompressPAPOperation scratchpad/HWPF/SPRM/ParagraphSprmUncompressor.cs:70— MethodTooLong — UncompressPAPOperation runs 239 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 139 over it, 2.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: RecordFactory.RecordFactory(…) main/HSSF/Record/RecordFactory.cs:121— MethodTooLong — RecordFactory(…) runs 208 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 108 over it, 2.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CT_Settings.Parse OpenXmlFormats/Wordprocessing/Settings.cs:19— MethodTooLong — Parse runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CT_Settings.Write OpenXmlFormats/Wordprocessing/Settings.cs:234— MethodTooLong — Write runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: Form1.button2_Click tools/XmlSerializationCodeGenerator/Form1.cs:111— MethodTooLong — button2_Click runs 193 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 93 over it, 1.93× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: DateFormatConverter.PrepareLocalePrefixes main/SS/Util/DateFormatConverter.cs:147— MethodTooLong — PrepareLocalePrefixes runs 180 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: IndexedColors.IndexedColors(…) main/SS/UserModel/IndexedColors.cs:108— MethodTooLong — IndexedColors(…) runs 174 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CT_PivotTableDefinition.Parse OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:18— MethodTooLong — Parse runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TypedPropertyValue.ReadValue main/HPSF/TypedPropertyValue.cs:53— MethodTooLong — ReadValue runs 164 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 64 over it, 1.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: FormulaParser.ParseStructuredReference main/SS/Formula/FormulaParser.cs:701— MethodTooLong — ParseStructuredReference runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CT_RunTrackChange.Parse OpenXmlFormats/Wordprocessing/Run.cs:2079— MethodTooLong — Parse runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AbstractWordConverter.ProcessCharacters scratchpad/HWPF/Converter/AbstractWordConverter.cs:223— MethodTooLong — ProcessCharacters runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CT_Tbl.Parse OpenXmlFormats/Wordprocessing/Table.cs:43— MethodTooLong — Parse runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CT_Compat.Parse OpenXmlFormats/Wordprocessing/Settings.cs:4891— MethodTooLong — Parse runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: AnalysisToolPak.CreateFunctionsMap main/SS/Formula/Atp/AnalysisToolPak.cs:71— MethodTooLong — CreateFunctionsMap runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CT_Compat.Write OpenXmlFormats/Wordprocessing/Settings.cs:5034— MethodTooLong — Write runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: WorkbookEvaluator.EvaluateFormula main/SS/Formula/WorkbookEvaluator.cs:572— MethodTooLong — EvaluateFormula runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CHPBinTable.Rebuild scratchpad/HWPF/Model/CHPBinTable.cs:110— MethodTooLong — Rebuild runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: CT_P.Parse OpenXmlFormats/Wordprocessing/Paragraph.cs:62— MethodTooLong — Parse runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: InternalSheet.InternalSheet(…) main/HSSF/Model/InternalSheet.cs:206— MethodTooLong — InternalSheet(…) runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
+ 11 more in this group — see findings.md.
X5 · Nullable reference types· Symbol treated as nullable, then dereferenced unguarded · ×33
Symbol treated as nullable, then dereferenced unguarded main/HSSF/UserModel/HSSFOptimiser.cs:275— This method contradicts itself about `s`: line 251 assigns it with `as HSSFSheet`, which hands back null rather than throwing when the value is not a `HSSFSheet`, but line 275 then dereferences it directly as `s.Sheet` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `s` once before the first use and handle the null case, or cast with `(HSSFSheet)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded main/HSSF/UserModel/HSSFOptimiser.cs:390— This method contradicts itself about `s`: line 363 assigns it with `as HSSFSheet`, which hands back null rather than throwing when the value is not a `HSSFSheet`, but line 390 then dereferences it directly as `s.Sheet` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `s` once before the first use and handle the null case, or cast with `(HSSFSheet)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded main/HSSF/UserModel/HSSFPatriarch.cs:223— This method contradicts itself about `pictData`: line 222 assigns it with `as HSSFPictureData`, which hands back null rather than throwing when the value is not a `HSSFPictureData`, but line 223 then dereferences it directly as `pictData.Format` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `pictData` once before the first use and handle the null case, or cast with `(HSSFPictureData)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded main/HSSF/UserModel/HSSFPatriarch.cs:271— This method contradicts itself about `spRecord`: line 270 assigns it with `as EscherSpRecord`, which hands back null rather than throwing when the value is not a `EscherSpRecord`, but line 271 then dereferences it directly as `spRecord.Flags` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `spRecord` once before the first use and handle the null case, or cast with `(EscherSpRecord)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded main/HSSF/UserModel/HSSFPicture.cs:117— This method contradicts itself about `pref`: line 115 assigns it with `as HSSFClientAnchor`, which hands back null rather than throwing when the value is not a `HSSFClientAnchor`, but line 117 then dereferences it directly as `pref.Row2` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `pref` once before the first use and handle the null case, or cast with `(HSSFClientAnchor)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded main/HSSF/UserModel/HSSFShape.cs:198— This method contradicts itself about `anchor`: line 195 assigns it with `as HSSFAnchor`, which hands back null rather than throwing when the value is not a `HSSFAnchor`, but line 198 then dereferences it directly as `anchor.GetEscherAnchor` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `anchor` once before the first use and handle the null case, or cast with `(HSSFAnchor)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded main/HSSF/UserModel/HSSFSheet.cs:1757— This method contradicts itself about `patriarch`: line 1756 assigns it with `as HSSFPatriarch`, which hands back null rather than throwing when the value is not a `HSSFPatriarch`, but line 1757 then dereferences it directly as `patriarch.Children` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `patriarch` once before the first use and handle the null case, or cast with `(HSSFPatriarch)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded main/HSSF/UserModel/HSSFWorkbook.cs:635— This method contradicts itself about `sheet`: line 634 assigns it with `as HSSFSheet`, which hands back null rather than throwing when the value is not a `HSSFSheet`, but line 635 then dereferences it directly as `sheet.IsSelected` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `sheet` once before the first use and handle the null case, or cast with `(HSSFSheet)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded main/HSSF/UserModel/HSSFWorkbook.cs:1190— This method contradicts itself about `hssfFont`: line 1189 assigns it with `as HSSFFont`, which hands back null rather than throwing when the value is not a `HSSFFont`, but line 1190 then dereferences it directly as `hssfFont.IsBold` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `hssfFont` once before the first use and handle the null case, or cast with `(HSSFFont)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded main/POIFS/FileSystem/NPOIFSMiniStore.cs:68— This method contradicts itself about `it`: line 64 assigns it with `as NPOIFSStream.StreamBlockByteBufferIterator`, which hands back null rather than throwing when the value is not a `NPOIFSStream.StreamBlockByteBufferIterator`, but line 68 then dereferences it directly as `it.Next` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `it` once before the first use and handle the null case, or cast with `(NPOIFSStream.StreamBlockByteBufferIterator)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded main/Util/Arrays.cs:173— This method contradicts itself about `a`: line 171 assigns it with `as Array`, which hands back null rather than throwing when the value is not a `Array`, but line 173 then dereferences it directly as `a.Length` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `a` once before the first use and handle the null case, or cast with `(Array)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded main/Util/Arrays.cs:173— This method contradicts itself about `b`: line 172 assigns it with `as Array`, which hands back null rather than throwing when the value is not a `Array`, but line 173 then dereferences it directly as `b.Length` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `b` once before the first use and handle the null case, or cast with `(Array)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ooxml/POIFS/Crypt/Agile/AgileEncryptionVerifier.cs:113— This method contradicts itself about `certKey`: line 111 assigns it with `as CT_CertificateKeyEncryptor`, which hands back null rather than throwing when the value is not a `CT_CertificateKeyEncryptor`, but line 113 then dereferences it directly as `certKey.certVerifier` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `certKey` once before the first use and handle the null case, or cast with `(CT_CertificateKeyEncryptor)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ooxml/SS/Converter/ExcelToHtmlConverter.cs:598— This method contradicts itself about `cellStyle`: line 534 assigns it with `as ICellStyle`, which hands back null rather than throwing when the value is not a `ICellStyle`, but line 598 then dereferences it directly as `cellStyle.WrapText` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `cellStyle` once before the first use and handle the null case, or cast with `(ICellStyle)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ooxml/XSSF/UserModel/BaseXSSFEvaluationWorkbook.cs:169— This method contradicts itself about `nm`: line 168 assigns it with `as XSSFName`, which hands back null rather than throwing when the value is not a `XSSFName`, but line 169 then dereferences it directly as `nm.NameName` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `nm` once before the first use and handle the null case, or cast with `(XSSFName)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:257— This method contradicts itself about `hyperlink`: line 256 assigns it with `as XSSFHyperlink`, which hands back null rather than throwing when the value is not a `XSSFHyperlink`, but line 257 then dereferences it directly as `hyperlink.CellRef` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `hyperlink` once before the first use and handle the null case, or cast with `(XSSFHyperlink)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:276— This method contradicts itself about `wb`: line 275 assigns it with `as XSSFWorkbook`, which hands back null rather than throwing when the value is not a `XSSFWorkbook`, but line 276 then dereferences it directly as `wb.GetSheetIndex` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `wb` once before the first use and handle the null case, or cast with `(XSSFWorkbook)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ooxml/XSSF/UserModel/XSSFColumn.cs:527— This method contradicts itself about `destCell`: line 526 assigns it with `as XSSFCell`, which hands back null rather than throwing when the value is not a `XSSFCell`, but line 527 then dereferences it directly as `destCell.CopyCellFrom` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `destCell` once before the first use and handle the null case, or cast with `(XSSFCell)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded REDACTED:462— This method contradicts itself about `wb`: line 461 assigns it with `as XSSFWorkbook`, which hands back null rather than throwing when the value is not a `XSSFWorkbook`, but line 462 then dereferences it directly as `wb.GetSheetIndex` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `wb` once before the first use and handle the null case, or cast with `(XSSFWorkbook)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded REDACTED:479— This method contradicts itself about `imgPD`: line 478 assigns it with `as XSSFPictureData`, which hands back null rather than throwing when the value is not a `XSSFPictureData`, but line 479 then dereferences it directly as `imgPD.GetPackagePart` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `imgPD` once before the first use and handle the null case, or cast with `(XSSFPictureData)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ooxml/XSSF/UserModel/XSSFMap.cs:115— This method contradicts itself about `table`: line 114 assigns it with `as XSSFTable`, which hands back null rather than throwing when the value is not a `XSSFTable`, but line 115 then dereferences it directly as `table.MapsTo` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `table` once before the first use and handle the null case, or cast with `(XSSFTable)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ooxml/XSSF/UserModel/XSSFPicture.cs:294— This method contradicts itself about `picData`: line 293 assigns it with `as XSSFPictureData`, which hands back null rather than throwing when the value is not a `XSSFPictureData`, but line 294 then dereferences it directly as `picData.GetPackagePart` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `picData` once before the first use and handle the null case, or cast with `(XSSFPictureData)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ooxml/XSSF/UserModel/XSSFRow.cs:510— This method contradicts itself about `destCell`: line 509 assigns it with `as XSSFCell`, which hands back null rather than throwing when the value is not a `XSSFCell`, but line 510 then dereferences it directly as `destCell.CopyCellFrom` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `destCell` once before the first use and handle the null case, or cast with `(XSSFCell)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ooxml/XSSF/UserModel/XSSFSheet.cs:3293— This method contradicts itself about `destRow`: line 3292 assigns it with `as XSSFRow`, which hands back null rather than throwing when the value is not a `XSSFRow`, but line 3293 then dereferences it directly as `destRow.CopyRowFrom` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `destRow` once before the first use and handle the null case, or cast with `(XSSFRow)` so the failure is reported where it happens — rather than leaving the two readings side by side.
Symbol treated as nullable, then dereferenced unguarded ooxml/XSSF/UserModel/XSSFSheet.cs:3997— This method contradicts itself about `table`: line 3995 assigns it with `as XSSFTable`, which hands back null rather than throwing when the value is not a `XSSFTable`, but line 3997 then dereferences it directly as `table.GetCTTable` with no null test between them and no guard around it. If the `as` is right, that dereference throws NullReferenceException on the input it was written for — and the NullReferenceException names neither the cast nor the type that failed. Settle it one way — test `table` once before the first use and handle the null case, or cast with `(XSSFTable)` so the failure is reported where it happens — rather than leaving the two readings side by side.
X18 · Disposal-pattern correctness· Disposable created and abandoned in the method that made it · ×27
Disposable created and abandoned in the method that made it main/DDF/EscherMetafileBlip.cs:410— `dos` is a `DeflaterOutputStream`, which implements `IDisposable`, and it is created here (line 410). Every use of it in `SetPictureData` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var dos = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it main/HPSF/ClipboardData.cs:43— `bos` is a `LittleEndianByteArrayOutputStream`, which implements `IDisposable`, and it is created here (line 43). Every use of it in `ToByteArray` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var bos = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it main/HPSF/PropertySetFactory.cs:97— `leis` is a `LittleEndianInputStream`, which implements `IDisposable`, and it is created here (line 97). Every use of it in `Create` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var leis = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it main/HPSF/Util.cs:157— `sw` is a `StringWriter`, which implements `IDisposable`, and it is created here (line 157). Every use of it in `ToString` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sw = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it main/HSSF/Record/Aggregates/ValueRecordsAggregate.cs:263— `itr` is a `ValueEnumerator`, which implements `IDisposable`, and it is created here (line 263). Every use of it in `GetRowCellBlockSize` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var itr = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it main/HSSF/Record/Aggregates/ValueRecordsAggregate.cs:375— `itr` is a `ValueEnumerator`, which implements `IDisposable`, and it is created here (line 375). Every use of it in `SerializeCellRow` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var itr = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it main/POIFS/FileSystem/Ole10Native.cs:400— `leosOut` is a `LittleEndianOutputStream`, which implements `IDisposable`, and it is created here (line 400). Every use of it in `WriteOut` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var leosOut = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it main/POIFS/FileSystem/Ole10Native.cs:407— `leos` is a `LittleEndianOutputStream`, which implements `IDisposable`, and it is created here (line 407). Every use of it in `WriteOut` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var leos = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it main/POIFS/Macros/VBAMacroExtractor.cs:108— `fWriter` is a `StreamWriter`, which implements `IDisposable`, and it is created here (line 108). Every use of it in `Extract` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var fWriter = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it main/POIFS/NIO/FileBackedDataSource.cs:59— `stream` is a `FileStream`, which implements `IDisposable`, and it is created here (line 59). Every use of it in `FileBackedDataSource` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var stream = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it main/POIFS/property/NPropertyTable.cs:125— `ms` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 125). Every use of it in `Write` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var ms = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it main/Util/Collections/Properties.cs:144— `inp` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 144). Every use of it in `Load` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var inp = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it main/Util/HexDump.cs:298— `buf` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 298). Every use of it in `Dump` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var buf = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it ooxml/POIFS/Crypt/Agile/AgileEncryptor.cs:192— `fis` is a `FileStream`, which implements `IDisposable`, and it is created here (line 192). Every use of it in `UpdateIntegrityHMAC` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var fis = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it ooxml/POIFS/Crypt/Dsig/OOXMLURIDereferencer.cs:95— `bos` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 95). Every use of it in `dereference` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var bos = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it ooxml/XSSF/Streaming/SXSSFWorkbook.cs:458— `zip` is a `ZipFile`, which implements `IDisposable`, and it is created here (line 458). Every use of it in `InjectData` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var zip = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it ooxml/XSSF/Streaming/SXSSFWorkbook.cs:510— `inReader` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 510). Every use of it in `CopyStreamAndInjectWorksheet` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var inReader = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it ooxml/XSSF/Streaming/SXSSFWorkbook.cs:511— `outWriter` is a `StreamWriter`, which implements `IDisposable`, and it is created here (line 511). Every use of it in `CopyStreamAndInjectWorksheet` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var outWriter = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it REDACTED:114— `sr` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 114). Every use of it in `Read` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sr = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it REDACTED:1491— `sr` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 1491). Every use of it in `AddPicture` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sr = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it REDACTED:256— `sw` is a `StringWriter`, which implements `IDisposable`, and it is created here (line 256). Every use of it in `ExcelEncodeString` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sw = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it OpenXmlFormats/Spreadsheet/Document/CalcChainDocument.cs:54— `sw` is a `StreamWriter`, which implements `IDisposable`, and it is created here (line 54). Every use of it in `Save` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sw = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it REDACTED:104— `sr` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 104). Every use of it in `ToString` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sr = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it OpenXmlFormats/Spreadsheet/Styles/CT_Font.cs:659— `sr` is a `StreamReader`, which implements `IDisposable`, and it is created here (line 659). Every use of it in `ToString` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var sr = …;`), which releases it at the end of the scope on every path including a throw.
Disposable created and abandoned in the method that made it scratchpad/HWPF/Model/ListTables.cs:107— `levelBuf` is a `MemoryStream`, which implements `IDisposable`, and it is created here (line 107). Every use of it in `WriteListDataTo` reads a member through it — it is never returned, never stored, never handed to anything else, and never disposed — so this method both creates the value and is the last thing that can release it, and does not. Nothing announces the leak: the object holds its resource until finalization if its type has a finalizer, and until the process ends if it does not, so the cost accumulates once per CALL rather than showing up as a failure. Declare it with `using` (`using var levelBuf = …;`), which releases it at the end of the scope on every path including a throw.
Swallowed exception (empty catch) main/Common/UserModel/Fonts/FontCharset.cs:178— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/HPSF/CustomProperties.cs:405— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/HPSF/Property.cs:335— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/HPSF/Property.cs:527— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/HPSF/Property.cs:602— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/HPSF/Section.cs:241— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/HSSF/Record/RecordFactory.cs:661— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/POIDocument.cs:391— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/POIFS/Crypt/Standard/StandardDecryptor.cs:327— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else).
Swallowed exception (empty catch) main/POIFS/Crypt/Standard/StandardEncryptor.cs:164— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/POIFS/FileSystem/DirectoryNode.cs:234— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/POIFS/Storage/BlockAllocationTableReader.cs:234— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/SS/Formula/Functions/DateValue.cs:97— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/Util/InputStream.cs:184— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) main/Util/POILogFactory.cs:89— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ooxml/POIXMLProperties.cs:208— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ooxml/XDDF/UserModel/Chart/XDDFChart.cs:1025— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ooxml/XDDF/UserModel/Chart/XDDFChart.cs:1028— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ooxml/XSSF/Binary/XSSFBHyperlinksTable.cs:121— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ooxml/XSSF/EventUserModel/XSSFSheetXMLHandler.cs:400— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ooxml/XSSF/Streaming/SheetDataWriter.cs:126— An empty catch block silently discards the error — failures vanish with no log and no rethrow. On a teardown path letting it propagate is not an option (throwing out of `Dispose()` masks the failure already in flight and abandons the rest of the cleanup), so make the swallow deliberate instead: record it through whatever this codebase already uses to report problems — or, if one specific failure truly cannot matter, catch exactly that exception type and say why in a comment on the catch (a comment on a catch-all still swallows everything else).
Swallowed exception (empty catch) ooxml/XSSF/Streaming/SXSSFWorkbook.cs:379— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ooxml/XSSF/UserModel/BaseXSSFEvaluationWorkbook.cs:95— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ooxml/XWPF/Usermodel/XWPFDocument.cs:1691— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) ooxml/XWPF/Usermodel/XWPFHeaderFooter.cs:308— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:146— `IsSetFiletime` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:151— `IsSetBool` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:156— `GetBool` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:161— `IsSetI1` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:166— `GetI1` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:171— `GetI2` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:176— `IsSetI2` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:181— `GetI4` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:186— `GetFiletime` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:191— `IsSetI4` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:196— `IsSetUi1` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:201— `GetUi1` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:206— `GetUi2` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:211— `GetUi4` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:216— `IsSetUi8` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:221— `IsSetUint` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:226— `GetUint` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:231— `IsSetR4` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:236— `IsSetR8` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:241— `GetR8` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:246— `GetR4` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:251— `GetUi8` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:256— `IsSetDecimal` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
Unfinished stub — throws NotImplementedException OpenXmlFormats/DocumentPropertiesCustom.cs:261— `GetDecimal` is a shipped member whose whole body throws NotImplementedException — scaffolding that was never completed. Implement it or remove the dead surface.
ClassTooLong: CT_Settings OpenXmlFormats/Wordprocessing/Settings.cs— ClassTooLong — 1161 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 761 over it, 2.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CT_PivotTableDefinition OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs— ClassTooLong — 1052 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 652 over it, 2.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CT_Compat OpenXmlFormats/Wordprocessing/Settings.cs— ClassTooLong — 737 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 337 over it, 1.84× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CT_PivotField OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs— ClassTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 242 over it, 1.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: EscherDump main/DDF/EscherDump.cs— ClassTooLong — 620 significant lines (blank, comment-only and punctuation-only lines excluded), 8 methods. The bar is 400 significant lines; this is 220 over it, 1.55× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: EscherProperties main/DDF/EscherProperties.cs— ClassTooLong — 598 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 198 over it, 1.50× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: PresetGeometryExtensions ooxml/XDDF/UserModel/PresetGeometry.cs— ClassTooLong — 574 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 174 over it, 1.44× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: ExtendedFormatRecord main/HSSF/Record/ExtendedFormatRecord.cs— ClassTooLong — 522 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 122 over it, 1.31× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FormulaShifter main/SS/Formula/FormulaShifter.cs— ClassTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 103 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CT_ParaRPr OpenXmlFormats/Wordprocessing/Paragraph.cs— ClassTooLong — 503 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 103 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: LocaleUtil main/Util/LocaleUtil.cs— ClassTooLong — 494 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 94 over it, 1.24× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: CellNumberFormatter main/SS/Format/CellNumberFormatter.cs— ClassTooLong — 491 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 91 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CT_PPrBase OpenXmlFormats/Wordprocessing/Paragraph.cs— ClassTooLong — 482 significant lines (blank, comment-only and punctuation-only lines excluded), 20 methods. The bar is 400 significant lines; this is 82 over it, 1.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ExcelToHtmlConverter ooxml/SS/Converter/ExcelToHtmlConverter.cs— ClassTooLong — 479 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 79 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: EscherAggregate main/HSSF/Record/EscherAggregate.cs— ClassTooLong — 470 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 70 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: XSSFSimpleShape ooxml/XSSF/UserModel/XSSFSimpleShape.cs— ClassTooLong — 461 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 61 over it, 1.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: XWPFTable ooxml/XWPF/Usermodel/XWPFTable.cs— ClassTooLong — 459 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 59 over it, 1.15× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CT_Tbl OpenXmlFormats/Wordprocessing/Table.cs— ClassTooLong — 428 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 28 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: PresetColorExtensions ooxml/XDDF/UserModel/PresetColor.cs— ClassTooLong — 424 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 24 over it, 1.06× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
ClassTooLong: DataFormatter main/SS/UserModel/DataFormatter.cs— ClassTooLong — 421 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 21 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CT_Stroke OpenXmlFormats/Vml/Main.cs— ClassTooLong — 406 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 6 over it, 1.02× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: FunctionEval main/SS/Formula/Eval/FunctionEval.cs— ClassTooLong — 404 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 4 over it, 1.01× the bar. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
Duplicated block (9 lines × 2) main/HSSF/Record/Aggregates/Chart/DropBarAggregate.cs:38— main/HSSF/Record/Aggregates/Chart/DropBarAggregate.cs:38-46 | main/HSSF/Record/Aggregates/Chart/FrameAggregate.cs:39-47 — 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 `main/HSSF/Record/Aggregates/Chart/DropBarAggregate.cs:38` 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) main/HSSF/Record/CFRule12Record.cs:414— main/HSSF/Record/CFRule12Record.cs:414-422 | main/HSSF/Record/CFRuleRecord.cs:142-150 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) main/SS/Formula/Functions/IPMT.cs:34— main/SS/Formula/Functions/IPMT.cs:34-42 | main/SS/Formula/Functions/PPMT.cs:43-51 — 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) main/SS/Formula/PTG/Deleted3DPxg.cs:49— main/SS/Formula/PTG/Deleted3DPxg.cs:49-57 | main/SS/Formula/PTG/NameXPxg.cs:55-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.
Duplicated block (9 lines × 2) main/SS/Util/PropertyTemplate.cs:912— main/SS/Util/PropertyTemplate.cs:912-920 | main/SS/Util/PropertyTemplate.cs:949-957 — both copies are in the same file, so extract the 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 `main/SS/Util/PropertyTemplate.cs:912` 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) ooxml/XWPF/Usermodel/XWPFParagraph.cs:497— ooxml/XWPF/Usermodel/XWPFParagraph.cs:497-505 | ooxml/XWPF/Usermodel/XWPFParagraph.cs:516-524 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) main/HSSF/Model/InternalChart.cs:475— main/HSSF/Model/InternalChart.cs:475-483 | main/HSSF/UserModel/HSSFChart.cs:681-689 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) main/HSSF/Model/InternalChart.cs:506— main/HSSF/Model/InternalChart.cs:506-514 | main/HSSF/UserModel/HSSFChart.cs:577-585 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) main/HSSF/Model/InternalChart.cs:658— main/HSSF/Model/InternalChart.cs:658-666 | main/HSSF/UserModel/HSSFChart.cs:866-874 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) main/HSSF/Model/InternalChart.cs:897— main/HSSF/Model/InternalChart.cs:897-905 | main/HSSF/UserModel/HSSFChart.cs:909-917 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) main/HSSF/Record/Chart/CrtLayout12ARecord.cs:62— main/HSSF/Record/Chart/CrtLayout12ARecord.cs:62-70 | main/HSSF/Record/Chart/CrtLayout12Record.cs:154-162 — 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 what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction — check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only.
Duplicated block (9 lines × 2) main/HSSF/UserModel/HSSFSheet.cs:3021— main/HSSF/UserModel/HSSFSheet.cs:3021-3029 | main/HSSF/UserModel/HSSFSheet.cs:3091-3099 — both copies are in the same file, so extract the 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 `main/HSSF/UserModel/HSSFSheet.cs:3021` 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) main/SS/Formula/Functions/Text/Mid.cs:32— main/SS/Formula/Functions/Text/Mid.cs:32-40 | main/SS/Formula/Functions/Text/Replace.cs:44-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `main/SS/Formula/Functions/Text/Mid.cs:32` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) main/HPSF/HPSFPropertiesOnlyDocument.cs:63— main/HPSF/HPSFPropertiesOnlyDocument.cs:63-74 | main/HSSF/UserModel/HSSFWorkbook.cs:1361-1369 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) main/HSSF/Model/ParseNode.cs:154— main/HSSF/Model/ParseNode.cs:154-162 | main/SS/Formula/ParseNode.cs:174-182 — before extracting anything, compare `main/HSSF/Model/ParseNode.cs` and `main/SS/Formula/ParseNode.cs` 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) main/SS/Formula/Functions/Column.cs:53— main/SS/Formula/Functions/Column.cs:53-61 | main/SS/Formula/Functions/Row.cs:54-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:61— ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:61-69 | ooxml/XDDF/UserModel/Chart/XDDFLine3DChartData.cs:62-70 — before extracting anything, compare `ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs` and `ooxml/XDDF/UserModel/Chart/XDDFLine3DChartData.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) ooxml/XDDF/UserModel/Chart/XDDFSurface3DChartData.cs:63— ooxml/XDDF/UserModel/Chart/XDDFSurface3DChartData.cs:63-71 | ooxml/XDDF/UserModel/Chart/XDDFSurfaceChartData.cs:63-71 — before extracting anything, compare `ooxml/XDDF/UserModel/Chart/XDDFSurface3DChartData.cs` and `ooxml/XDDF/UserModel/Chart/XDDFSurfaceChartData.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) ooxml/XDDF/UserModel/XDDFCustomGeometry2D.cs:195— ooxml/XDDF/UserModel/XDDFCustomGeometry2D.cs:195-203 | ooxml/XDDF/UserModel/XDDFPresetGeometry2D.cs:79-87 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) ooxml/XDDF/UserModel/XDDFGradientFillProperties.cs:85— ooxml/XDDF/UserModel/XDDFGradientFillProperties.cs:85-93 | ooxml/XDDF/UserModel/XDDFTileInfoProperties.cs:75-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) ooxml/XSSF/Streaming/SXSSFCell.cs:260— ooxml/XSSF/Streaming/SXSSFCell.cs:260-268 | ooxml/XSSF/UserModel/XSSFCell.cs:914-923 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) ooxml/XSSF/UserModel/XSSFPictureData.cs:132— ooxml/XSSF/UserModel/XSSFPictureData.cs:132-140 | ooxml/XWPF/Usermodel/XWPFPictureData.cs:106-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) main/SS/Formula/FormulaParser.cs:761— main/SS/Formula/FormulaParser.cs:761-765 | main/SS/Formula/FormulaParser.cs:846-850 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `main/SS/Formula/FormulaParser.cs:761` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `main/SS/Formula/FormulaParser.cs:768` calls `GetChar` and `main/SS/Formula/FormulaParser.cs:851` 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) main/HSSF/Record/Chart/ChartStartBlockRecord.cs:85— main/HSSF/Record/Chart/ChartStartBlockRecord.cs:85-89 | main/HSSF/Record/Chart/StartBlockRecord.cs:102-106 — 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, `main/HSSF/Record/Chart/StartBlockRecord.cs:107` calls `Append`, `ShortToHex` and `main/HSSF/Record/Chart/ChartStartBlockRecord.cs:90` 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 (5 lines × 2) main/HSSF/UserModel/HSSFPolygon.cs:89— main/HSSF/UserModel/HSSFPolygon.cs:89-93 | main/HSSF/UserModel/HSSFTextbox.cs:97-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) main/HSSF/Record/Chart/AxisOptionsRecord.cs:109— main/HSSF/Record/Chart/AxisOptionsRecord.cs:109-113 | main/HSSF/Record/Chart/CategorySeriesAxisRecord.cs:73-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.
Duplicated block (5 lines × 2) main/HSSF/Record/Chart/ChartEndBlockRecord.cs:91— main/HSSF/Record/Chart/ChartEndBlockRecord.cs:91-95 | main/HSSF/Record/Chart/EndBlockRecord.cs:96-100 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) main/DDF/EscherBlipWMFRecord.cs:326— main/DDF/EscherBlipWMFRecord.cs:326-330 | main/DDF/EscherTextboxRecord.cs:202-206 — 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 `main/DDF/EscherBlipWMFRecord.cs:326` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 2) main/HSSF/Record/CellRecord.cs:117— main/HSSF/Record/CellRecord.cs:117-121 | main/HSSF/Record/OldCellRecord.cs:116-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) main/HSSF/UserModel/HSSFComment.cs:285— main/HSSF/UserModel/HSSFComment.cs:285-289 | main/HSSF/UserModel/HSSFTextbox.cs:132-136 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) main/SS/Formula/Atp/WorkdayCalculator.cs:42— main/SS/Formula/Atp/WorkdayCalculator.cs:42-46 | main/SS/Formula/Atp/WorkdayCalculator.cs:47-51 — both copies are in the same file, so extract the 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `main/SS/Formula/Atp/WorkdayCalculator.cs:46` calls `Add` and `main/SS/Formula/Atp/WorkdayCalculator.cs:51` 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 (5 lines × 2) main/Util/LittleEndian.cs:541— main/Util/LittleEndian.cs:541-545 | main/Util/LittleEndian.cs:589-593 — both copies are in the same file, so extract the 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 `main/Util/LittleEndian.cs:541` 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) main/Util/LittleEndian.cs:542— main/Util/LittleEndian.cs:542-546 | main/Util/LittleEndian.cs:594-598 — both copies are in the same file, so extract the 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 `main/Util/LittleEndian.cs:594` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) REDACTED:282— REDACTED:282-286 | REDACTED:308-312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) main/HSSF/Record/HeaderFooterRecord.cs:88— main/HSSF/Record/HeaderFooterRecord.cs:88-92 | main/HSSF/Record/UserSViewBegin.cs:84-88 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) main/HSSF/UserModel/HSSFCell.cs:1478— main/HSSF/UserModel/HSSFCell.cs:1478-1482 | ooxml/XSSF/UserModel/XSSFCell.cs:1447-1451 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) main/POIFS/Crypt/BinaryRC4/BinaryRC4Encryptor.cs:89— main/POIFS/Crypt/BinaryRC4/BinaryRC4Encryptor.cs:89-93 | main/POIFS/Crypt/CryptoAPI/CryptoAPIEncryptor.cs:43-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) main/POIFS/Crypt/BinaryRC4/BinaryRC4Encryptor.cs:151— main/POIFS/Crypt/BinaryRC4/BinaryRC4Encryptor.cs:151-155 | main/POIFS/Crypt/CryptoAPI/CryptoAPIEncryptor.cs:219-223 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (5 lines × 2) ooxml/XDDF/UserModel/Chart/XDDFChart.cs:105— ooxml/XDDF/UserModel/Chart/XDDFChart.cs:105-110 | ooxml/XWPF/Usermodel/XWPFChart.cs:39-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (5 lines × 2) REDACTED:366— REDACTED:366-370 | ooxml/XSSF/UserModel/XSSFShapeGroup.cs:355-359 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) ooxml/XDDF/UserModel/Text/XDDFRunProperties.cs:200— ooxml/XDDF/UserModel/Text/XDDFRunProperties.cs:200-207 | ooxml/XDDF/UserModel/XDDFLineProperties.cs:296-303 — 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 `ooxml/XDDF/UserModel/Text/XDDFRunProperties.cs:200` it begins part-way through the construct above it, so those exact lines 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) main/DDF/EscherBSERecord.cs:354— main/DDF/EscherBSERecord.cs:354-361 | main/DDF/EscherBlipWMFRecord.cs:289-296 — 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 `main/DDF/EscherBSERecord.cs:354` 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) main/HSSF/Record/Chart/CrtLayout12ARecord.cs:140— main/HSSF/Record/Chart/CrtLayout12ARecord.cs:140-147 | main/HSSF/Record/Chart/CrtLayout12Record.cs:134-141 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) main/HSSF/UserModel/EscherGraphics.cs:246— main/HSSF/UserModel/EscherGraphics.cs:246-253 | main/HSSF/UserModel/EscherGraphics.cs:399-406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) main/HSSF/UserModel/HSSFCombobox.cs:48— main/HSSF/UserModel/HSSFCombobox.cs:48-55 | main/HSSF/UserModel/HSSFPolygon.cs:61-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) main/SS/Util/SheetUtil.cs:544— main/SS/Util/SheetUtil.cs:544-551 | main/SS/Util/SheetUtil.cs:565-572 — both copies are in the same file, so extract the 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) main/HSSF/Model/InternalChart.cs:806— main/HSSF/Model/InternalChart.cs:806-813 | main/HSSF/UserModel/HSSFChart.cs:400-407 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) main/HSSF/Record/Chart/CrtLayout12ARecord.cs:113— main/HSSF/Record/Chart/CrtLayout12ARecord.cs:113-120 | main/HSSF/Record/Chart/CrtLayout12Record.cs:103-110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `main/HSSF/Record/Chart/CrtLayout12Record.cs:100` calls `ReadLong`, `ReadInt` and `main/HSSF/Record/Chart/CrtLayout12ARecord.cs:111` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) main/HSSF/UserModel/HSSFWorkbook.cs:892— main/HSSF/UserModel/HSSFWorkbook.cs:892-899 | main/SS/Util/SheetUtil.cs:993-1000 — 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 `main/HSSF/UserModel/HSSFWorkbook.cs:892` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `main/HSSF/UserModel/HSSFWorkbook.cs:890` calls `GetUniqueSheetName` and `main/SS/Util/SheetUtil.cs:992` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (8 lines × 2) main/POIFS/FileSystem/NPOIFSStream.cs:238— main/POIFS/FileSystem/NPOIFSStream.cs:238-245 | main/Util/OutputStream.cs:23-30 — 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 `main/POIFS/FileSystem/NPOIFSStream.cs:238` 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) ooxml/XSSF/UserModel/XSSFCellStyle.cs:1164— ooxml/XSSF/UserModel/XSSFCellStyle.cs:1164-1171 | ooxml/XSSF/UserModel/XSSFCellStyle.cs:1183-1190 — both copies are in the same file, so extract the 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 `ooxml/XSSF/UserModel/XSSFCellStyle.cs:1164` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) main/HSSF/Model/InternalChart.cs:383— main/HSSF/Model/InternalChart.cs:383-390 | main/HSSF/UserModel/HSSFChart.cs:700-707 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) main/HSSF/Model/InternalChart.cs:518— main/HSSF/Model/InternalChart.cs:518-525 | main/HSSF/UserModel/HSSFChart.cs:589-596 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) main/HSSF/Record/ObjectProtectRecord.cs:79— main/HSSF/Record/ObjectProtectRecord.cs:79-86 | main/HSSF/Record/ScenarioProtectRecord.cs:87-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) main/SS/Formula/PTG/Area2DPtgBase.cs:72— main/SS/Formula/PTG/Area2DPtgBase.cs:72-79 | main/SS/Formula/PTG/Ref2DPtgBase.cs:82-89 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) main/Util/Arrays.cs:301— main/Util/Arrays.cs:301-308 | main/Util/BigInteger.cs:1823-1830 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) main/Util/IntList.cs:311— main/Util/IntList.cs:311-318 | main/Util/ShortList.cs:313-320 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) main/SS/Formula/Atp/TextJoinFunction.cs:128— main/SS/Formula/Atp/TextJoinFunction.cs:128-134 | main/SS/Formula/Functions/PercentRank.cs:149-155 — 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 `main/SS/Formula/Atp/TextJoinFunction.cs:128` 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 lines × 2) main/HSSF/UserModel/HeaderFooter.cs:63— main/HSSF/UserModel/HeaderFooter.cs:63-69 | main/HSSF/UserModel/HeaderFooter.cs:75-81 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) main/HSSF/Record/Aggregates/Chart/DVAxisAggregate.cs:58— main/HSSF/Record/Aggregates/Chart/DVAxisAggregate.cs:58-64 | main/HSSF/Record/Aggregates/Chart/SeriesAxisAggregate.cs:42-48 — 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 `main/HSSF/Record/Aggregates/Chart/DVAxisAggregate.cs:58` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `main/HSSF/Record/Aggregates/Chart/DVAxisAggregate.cs:55` calls `PeekNextChartSid`, `AXMAggregate` and `main/HSSF/Record/Aggregates/Chart/SeriesAxisAggregate.cs:40` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) main/POIFS/Storage/DataInputBlock.cs:132— main/POIFS/Storage/DataInputBlock.cs:132-138 | main/Util/LittleEndianByteArrayInputStream.cs:117-123 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) main/DDF/EscherClientAnchorRecord.cs:175— main/DDF/EscherClientAnchorRecord.cs:175-181 | main/DDF/EscherClientDataRecord.cs:113-119 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) ooxml/XSSF/UserModel/XSSFPivotTable.cs:275— ooxml/XSSF/UserModel/XSSFPivotTable.cs:275-281 | ooxml/XSSF/UserModel/XSSFPivotTable.cs:532-538 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) main/SS/Formula/Functions/Index.cs:151— main/SS/Formula/Functions/Index.cs:151-157 | main/SS/Formula/Functions/Var3or4ArgFunction.cs:35-41 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `main/SS/Formula/Functions/Index.cs:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `main/SS/Formula/Functions/Index.cs:150` calls `Evaluate` and `main/SS/Formula/Functions/Var3or4ArgFunction.cs:34` 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 (7 lines × 2) main/SS/UserModel/IndexedColors.cs:229— main/SS/UserModel/IndexedColors.cs:229-235 | main/SS/UserModel/IndexedColors.cs:237-243 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) ooxml/XSSF/UserModel/XSSFChildAnchor.cs:31— ooxml/XSSF/UserModel/XSSFChildAnchor.cs:31-37 | ooxml/XSSF/UserModel/XSSFChildGroupAnchor.cs:34-40 — 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, `ooxml/XSSF/UserModel/XSSFChildGroupAnchor.cs:33` calls `AddNewChOff`, `AddNewChExt` and `ooxml/XSSF/UserModel/XSSFChildAnchor.cs:31` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) main/HSSF/Model/InternalChart.cs:670— main/HSSF/Model/InternalChart.cs:670-676 | main/HSSF/UserModel/HSSFChart.cs:819-825 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) main/HSSF/Model/InternalChart.cs:827— main/HSSF/Model/InternalChart.cs:827-833 | main/HSSF/UserModel/HSSFChart.cs:973-979 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) main/HSSF/Model/ParseNode.cs:191— main/HSSF/Model/ParseNode.cs:191-197 | main/SS/Formula/ParseNode.cs:208-214 — before extracting anything, compare `main/HSSF/Model/ParseNode.cs` and `main/SS/Formula/ParseNode.cs` 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) main/HSSF/Record/Chart/ChartStartBlockRecord.cs:47— main/HSSF/Record/Chart/ChartStartBlockRecord.cs:47-53 | main/HSSF/Record/Chart/ChartStartObjectRecord.cs:43-49 — before extracting anything, compare `main/HSSF/Record/Chart/ChartStartBlockRecord.cs` and `main/HSSF/Record/Chart/ChartStartObjectRecord.cs` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) main/HSSF/Record/Chart/ChartStartBlockRecord.cs:74— main/HSSF/Record/Chart/ChartStartBlockRecord.cs:74-80 | main/HSSF/Record/Chart/ChartStartObjectRecord.cs:69-75 — before extracting anything, compare `main/HSSF/Record/Chart/ChartStartBlockRecord.cs` and `main/HSSF/Record/Chart/ChartStartObjectRecord.cs` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) main/SS/Formula/Functions/NormSDist.cs:34— main/SS/Formula/Functions/NormSDist.cs:34-40 | main/SS/Formula/Functions/NormSInv.cs:34-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Swallowed exception (caught, then discarded) main/DDF/EscherTextboxRecord.cs:178— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/DDF/EscherTextboxRecord.cs:200— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/DDF/UnknownEscherRecord.cs:210— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/HPSF/Section.cs:958— `catch (RuntimeException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/HSSF/Util/RangeAddress.cs:328— `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/SS/Formula/Functions/ArrayFunction.cs:129— `catch (FormulaParseException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/SS/Formula/Functions/ArrayFunction.cs:153— `catch (FormulaParseException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/SS/Formula/Functions/ArrayFunction.cs:241— `catch (FormulaParseException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/SS/Formula/Functions/MathX.cs:530— `catch (IndexOutOfRangeException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/SS/Formula/Functions/MathX.cs:560— `catch (IndexOutOfRangeException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/SS/Formula/Functions/MathX.cs:590— `catch (IndexOutOfRangeException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/SS/Formula/Functions/MathX.cs:622— `catch (IndexOutOfRangeException)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/Util/POILogFactory.cs:121— `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) main/Util/SystemOutLogger.cs:94— `catch` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Swallowed exception (caught, then discarded) ooxml/XSSF/Streaming/SheetDataWriter.cs:516— `catch (Exception)` does nothing with the exception it caught — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch. Log it through whatever this codebase already uses to report problems, or let it propagate; if one specific failure genuinely cannot matter, catch exactly that exception type and say why in a comment on the catch.
Duplicated block (10 lines × 2) main/HSSF/Model/InternalChart.cs:871— main/HSSF/Model/InternalChart.cs:871-880 | main/HSSF/UserModel/HSSFChart.cs:883-892 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) main/HSSF/Model/InternalChart.cs:884— main/HSSF/Model/InternalChart.cs:884-893 | main/HSSF/UserModel/HSSFChart.cs:896-905 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) main/SS/Util/RegionUtil.cs:73— main/SS/Util/RegionUtil.cs:73-82 | main/SS/Util/RegionUtil.cs:93-102 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `border` to `int` in one and `BorderStyle` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `main/SS/Util/RegionUtil.cs:70` calls `Obsolete` and `main/SS/Util/RegionUtil.cs:82` 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 (10 lines × 2) main/SS/Util/RegionUtil.cs:132— main/SS/Util/RegionUtil.cs:132-141 | main/SS/Util/RegionUtil.cs:151-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `border` to `int` in one and `BorderStyle` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `main/SS/Util/RegionUtil.cs:129` calls `Obsolete` and `main/SS/Util/RegionUtil.cs:141` 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 (10 lines × 2) main/SS/Util/RegionUtil.cs:191— main/SS/Util/RegionUtil.cs:191-200 | main/SS/Util/RegionUtil.cs:210-219 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 `border` to `int` in one and `BorderStyle` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `main/SS/Util/RegionUtil.cs:188` calls `Obsolete` and `main/SS/Util/RegionUtil.cs:200` 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 (10 lines × 2) main/SS/Util/RegionUtil.cs:250— main/SS/Util/RegionUtil.cs:250-259 | main/SS/Util/RegionUtil.cs:269-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 `border` to `int` in one and `BorderStyle` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `main/SS/Util/RegionUtil.cs:247` calls `Obsolete` and `main/SS/Util/RegionUtil.cs:259` 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 (10 lines × 2) main/HSSF/Model/InternalChart.cs:762— main/HSSF/Model/InternalChart.cs:762-771 | main/HSSF/UserModel/HSSFChart.cs:417-426 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 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 (10 lines × 2) ooxml/XSSF/UserModel/XSSFSheet.cs:149— ooxml/XSSF/UserModel/XSSFSheet.cs:149-159 | ooxml/XSSF/UserModel/XSSFSheet.cs:648-657 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ooxml/XSSF/UserModel/XSSFSheet.cs:149` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (10 lines × 2) main/HSSF/Model/InternalChart.cs:170— main/HSSF/Model/InternalChart.cs:170-179 | main/HSSF/Record/Aggregates/PageSettingsBlock.cs:388-397 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) main/POIFS/FileSystem/EntryUtils.cs:101— main/POIFS/FileSystem/EntryUtils.cs:101-110 | main/POIUtils.cs:71-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) main/POIFS/Storage/HeaderBlock.cs:199— main/POIFS/Storage/HeaderBlock.cs:199-208 | main/POIFS/Storage/HeaderBlockReader.cs:143-152 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs:246— ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs:246-255 | ooxml/XDDF/UserModel/Chart/XDDFScatterChartData.cs:218-227 — before extracting anything, compare `ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs` and `ooxml/XDDF/UserModel/Chart/XDDFScatterChartData.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) ooxml/XDDF/UserModel/Chart/XDDFSurface3DChartData.cs:50— ooxml/XDDF/UserModel/Chart/XDDFSurface3DChartData.cs:50-59 | ooxml/XDDF/UserModel/Chart/XDDFSurfaceChartData.cs:50-59 — before extracting anything, compare `ooxml/XDDF/UserModel/Chart/XDDFSurface3DChartData.cs` and `ooxml/XDDF/UserModel/Chart/XDDFSurfaceChartData.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) main/DDF/EscherMetafileBlip.cs:345— main/DDF/EscherMetafileBlip.cs:345-350 | main/DDF/EscherPictBlip.cs:279-284 — before extracting anything, compare `main/DDF/EscherMetafileBlip.cs` and `main/DDF/EscherPictBlip.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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, `main/DDF/EscherMetafileBlip.cs:344` calls `ToHex` and `main/DDF/EscherPictBlip.cs:278` 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 (6 lines × 2) ooxml/XDDF/UserModel/Text/XDDFTextBody.cs:515— ooxml/XDDF/UserModel/Text/XDDFTextBody.cs:515-520 | ooxml/XDDF/UserModel/Text/XDDFTextBody.cs:567-572 — both copies are in the same file, so extract the 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 `ooxml/XDDF/UserModel/Text/XDDFTextBody.cs:515` 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) ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1105— ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1105-1110 | ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1123-1128 — both copies are in the same file, so extract the 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 `ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1105` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) main/HPSF/ClassID.cs:238— main/HPSF/ClassID.cs:238-243 | main/HPSF/ClassID.cs:244-249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) main/HSSF/Model/InternalSheet.cs:1805— main/HSSF/Model/InternalSheet.cs:1805-1810 | main/HSSF/Model/InternalSheet.cs:1854-1859 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (6 lines × 2) main/HSSF/Record/EscherAggregate.cs:619— main/HSSF/Record/EscherAggregate.cs:619-624 | main/HSSF/Record/EscherAggregate.cs:639-644 — both copies are in the same file, so extract the 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 `main/HSSF/Record/EscherAggregate.cs:619` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) main/HSSF/Model/InternalChart.cs:853— main/HSSF/Model/InternalChart.cs:853-858 | main/HSSF/UserModel/HSSFChart.cs:934-939 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) main/HSSF/Model/InternalChart.cs:862— main/HSSF/Model/InternalChart.cs:862-867 | main/HSSF/UserModel/HSSFChart.cs:943-948 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) main/HSSF/Record/Chart/AlRunsRecord.cs:103— main/HSSF/Record/Chart/AlRunsRecord.cs:103-108 | main/HSSF/Record/Chart/ChartTitleFormatRecord.cs:97-102 — before extracting anything, compare `main/HSSF/Record/Chart/AlRunsRecord.cs` and `main/HSSF/Record/Chart/ChartTitleFormatRecord.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) main/SS/Util/AreaReference.cs:582— main/SS/Util/AreaReference.cs:582-587 | main/SS/Util/CellReference.cs:446-451 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) ooxml/XDDF/UserModel/XDDFCustomGeometry2D.cs:169— ooxml/XDDF/UserModel/XDDFCustomGeometry2D.cs:169-174 | ooxml/XDDF/UserModel/XDDFPresetGeometry2D.cs:53-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (6 lines × 2) ooxml/XDDF/UserModel/XDDFCustomGeometry2D.cs:178— ooxml/XDDF/UserModel/XDDFCustomGeometry2D.cs:178-183 | ooxml/XDDF/UserModel/XDDFPresetGeometry2D.cs:62-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) main/SS/Formula/Functions/NormInv.cs:29— main/SS/Formula/Functions/NormInv.cs:29-42 | main/SS/Formula/Functions/Standardize.cs:20-33 — 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 (14 lines × 2) main/HSSF/UserModel/HSSFPolygon.cs:140— main/HSSF/UserModel/HSSFPolygon.cs:140-153 | main/HSSF/UserModel/HSSFPolygon.cs:163-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) main/SS/Formula/Functions/Npv.cs:31— main/SS/Formula/Functions/Npv.cs:31-44 | main/SS/Formula/Functions/Numeric/NumericFunction.cs:67-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) main/SS/Util/PropertyTemplate.cs:368— main/SS/Util/PropertyTemplate.cs:368-381 | main/SS/Util/PropertyTemplate.cs:417-430 — both copies are in the same file, so extract the 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 `main/SS/Util/PropertyTemplate.cs:368` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) main/SS/Util/PropertyTemplate.cs:744— main/SS/Util/PropertyTemplate.cs:744-757 | main/SS/Util/PropertyTemplate.cs:794-807 — both copies are in the same file, so extract the 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 `main/SS/Util/PropertyTemplate.cs:744` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) main/SS/Util/SheetUtil.cs:1002— main/SS/Util/SheetUtil.cs:1002-1015 | ooxml/XSSF/UserModel/XSSFWorkbook.cs:733-746 — 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 `main/SS/Util/SheetUtil.cs:1002` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) ooxml/XWPF/Extractor/XWPFWordExtractor.cs:191— ooxml/XWPF/Extractor/XWPFWordExtractor.cs:191-204 | ooxml/XWPF/Usermodel/XWPFSDTContent.cs:138-151 — 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 `ooxml/XWPF/Extractor/XWPFWordExtractor.cs:191` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14 lines × 2) REDACTED:1153— REDACTED:1153-1166 | ooxml/XWPF/Usermodel/XWPFSharedRun.cs:137-150 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1153` 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 (14 lines × 2) main/SS/Formula/Eval/IntersectionEval.cs:99— main/SS/Formula/Eval/IntersectionEval.cs:99-112 | main/SS/Formula/Eval/RangeEval.cs:65-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) main/SS/Formula/Functions/LinearRegressionFunction.cs:267— main/SS/Formula/Functions/LinearRegressionFunction.cs:267-280 | main/SS/Formula/Functions/XYNumericFunction.cs:278-291 — before extracting anything, compare `main/SS/Formula/Functions/LinearRegressionFunction.cs` and `main/SS/Formula/Functions/XYNumericFunction.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs:229— ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs:229-242 | ooxml/XDDF/UserModel/Chart/XDDFScatterChartData.cs:196-209 — before extracting anything, compare `ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs` and `ooxml/XDDF/UserModel/Chart/XDDFScatterChartData.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. 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.
Test cannot fail: TestWriteEmptyPropertySet testcases/main/HPSF/Basic/TestWrite.cs:141— This test's act runs inside `catch` at line 178 of this file, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. Adding an assertion inside that region does not fix it: the assertion throws, and the same catch swallows it exactly like the exception it replaced. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
Test cannot fail: Test61701 testcases/ooxml/XSSF/EventUserModel/TestXSSFReader.cs:353— This test's act runs inside `catch (Exception)` at line 362 of this file, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. Adding an assertion inside that region does not fix it: the assertion throws, and the same catch swallows it exactly like the exception it replaced. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
Test cannot fail: TestAddColor testcases/main/HSSF/UserModel/TestHSSFPalette.cs:257— This test's act runs inside `catch (Exception)` at line 265 of this file, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 1 assertion(s) this test does make are inside that region, and an xUnit/NUnit assertion reports by THROWING — so they are caught and discarded too, which is why nothing else here flags this test. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
Test cannot fail: TestWriteFailsOnLoop testcases/main/POIFS/FileSystem/TestNPOIFSStream.cs:889— This test's act runs inside `catch (Exception)` at line 907 of this file, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 2 assertion(s) this test does make are inside that region, and an xUnit/NUnit assertion reports by THROWING — so they are caught and discarded too, which is why nothing else here flags this test. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
Test cannot fail: TestIrrFromSpreadsheet testcases/main/SS/Formula/Functions/TestIrr.cs:88— This test's act runs inside `catch (Exception)` at line 107 of this file, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 1 assertion(s) this test does make are inside that region, and an xUnit/NUnit assertion reports by THROWING — so they are caught and discarded too, which is why nothing else here flags this test. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
Test cannot fail: TestBug56655 testcases/main/SS/UserModel/BaseTestFormulaEvaluator.cs:625— This test's act runs inside `catch (Exception)` at line 643 of this file, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 4 assertion(s) this test does make are inside that region, and an xUnit/NUnit assertion reports by THROWING — so they are caught and discarded too, which is why nothing else here flags this test. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
Test cannot fail: TestBug56655a testcases/main/SS/UserModel/BaseTestFormulaEvaluator.cs:649— This test's act runs inside `catch (Exception)` at line 672 of this file, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 6 assertion(s) this test does make are inside that region, and an xUnit/NUnit assertion reports by THROWING — so they are caught and discarded too, which is why nothing else here flags this test. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
Test cannot fail: TestBug61532 testcases/main/SS/UserModel/BaseTestFormulaEvaluator.cs:707— This test's act runs inside `catch (Exception)` at line 735 of this file, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 11 assertion(s) this test does make are inside that region, and an xUnit/NUnit assertion reports by THROWING — so they are caught and discarded too, which is why nothing else here flags this test. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
Test cannot fail: Test61869 REDACTED:720— This test's act runs inside `catch (Exception)` at line 747 of this file, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 12 assertion(s) this test does make are inside that region, and an xUnit/NUnit assertion reports by THROWING — so they are caught and discarded too, which is why nothing else here flags this test. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
Test cannot fail: TestBug55814 testcases/ooxml/XSSF/UserModel/TestXSSFComment.cs:301— This test's act runs inside `catch (Exception)` at line 328 of this file, which catches every exception and neither rethrows nor verifies — so the method passes whether or not the behaviour it names actually happens. The 5 assertion(s) this test does make are inside that region, and an xUnit/NUnit assertion reports by THROWING — so they are caught and discarded too, which is why nothing else here flags this test. Assert the outcome instead of catching it: `Assert.Throws<T>(() => …)` (or the framework equivalent) when a throw is the expected result, or narrow the catch to the one exception type and assert on it. A catch-all that only logs belongs in production code, not between a test and its verdict.
HackComment main/HSSF/Record/FeatHdrRecord.cs:125— //HACK: do a "cheat" Clone, see Record.java for more information — 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.
HackComment main/HSSF/Record/FeatRecord.cs:217— //HACK: do a "cheat" Clone, see Record.java for more information — 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.
HackComment main/HSSF/Record/HeaderFooterRecord.cs:117— //HACK: do a "cheat" Clone, see Record.java for more information — 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.
HackComment main/HSSF/Record/UserSViewBegin.cs:102— //HACK: do a "cheat" Clone, see Record.java for more information — 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.
HackComment main/HSSF/Record/UserSViewEnd.cs:86— //HACK: do a "cheat" Clone, see Record.java for more information — 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.
HackComment scratchpad/HWPF/UserModel/Picture.cs:366— // HACK: Detect compressed images. In reality there should be some way to determine — 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.
HackComment testcases/main/HSSF/EventModel/TestEventRecordFactory.cs:69— // hack to pass boolean by ref into inner class — 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.
HackComment testcases/main/POIFS/FileSystem/TestNPOIFSStream.cs:234— // Hack the FAT so that it goes 0->1->2->0 — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment testcases/main/POIFS/FileSystem/TestNPOIFSStream.cs:894— // Hack the FAT so that it goes 0->1->2->0 — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment testcases/main/SS/Formula/TestEvaluationCache.cs:161— // hack to tell the difference between formula and plain value — 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.
Duplicated block (12 lines × 2) main/SS/Formula/Functions/Matrix/MatrixFunction.cs:191— main/SS/Formula/Functions/Matrix/MatrixFunction.cs:191-202 | main/SS/Formula/Functions/Matrix/MatrixFunction.cs:216-227 — both copies are in the same file, so extract the 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 `main/SS/Formula/Functions/Matrix/MatrixFunction.cs: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.
Duplicated block (12 lines × 2) main/SS/Formula/EvaluationConditionalFormatRule.cs:594— main/SS/Formula/EvaluationConditionalFormatRule.cs:594-605 | main/SS/Formula/EvaluationConditionalFormatRule.cs:616-627 — both copies are in the same file, so extract the 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 `main/SS/Formula/EvaluationConditionalFormatRule.cs:594` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) main/POIFS/Storage/HeaderBlock.cs:145— main/POIFS/Storage/HeaderBlock.cs:145-156 | main/POIFS/Storage/HeaderBlockReader.cs:118-129 — 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 `main/POIFS/Storage/HeaderBlock.cs:145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) main/Common/UserModel/Fonts/FontCharset.cs:149— main/Common/UserModel/Fonts/FontCharset.cs:149-160 | main/SS/UserModel/FontCharset.cs:83-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) main/HSSF/Model/ParseNode.cs:57— main/HSSF/Model/ParseNode.cs:57-68 | main/SS/Formula/ParseNode.cs:55-69 — before extracting anything, compare `main/HSSF/Model/ParseNode.cs` and `main/SS/Formula/ParseNode.cs` 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 (12 lines × 2) ooxml/XSSF/Model/ThemesTable.cs:36— ooxml/XSSF/Model/ThemesTable.cs:36-47 | ooxml/XWPF/Usermodel/XWPFTheme.cs:33-44 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (12 lines × 2) main/HSSF/Record/CellRecord.cs:176— main/HSSF/Record/CellRecord.cs:176-187 | main/HSSF/Record/FormulaRecord.cs:434-445 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `obj` to `object` in one and `Object` 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) ooxml/XDDF/UserModel/Chart/XDDFLayout.cs:53— ooxml/XDDF/UserModel/Chart/XDDFLayout.cs:53-64 | ooxml/XDDF/UserModel/Chart/XDDFManualLayout.cs:90-101 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
XxxComment main/SS/Formula/Functions/DateFunc.cs:105— // XXX fix 1900/1904 problem — 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.
XxxComment main/SS/Formula/Functions/WeekdayFunc.cs:90— // (XXX 1904-windowing not respected) — 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.
XxxComment REDACTED:213— // * XXX: not correct according to RFC 4514. — 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.
XxxComment ooxml/SS/Converter/ExcelToHtmlConverter.cs:479— // XXX: enrich — 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.
XxxComment ooxml/SS/Converter/ExcelToHtmlConverter.cs:540— // XXX: enrich — 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.
XxxComment ooxml/SS/Converter/ExcelToHtmlUtils.cs:44— // XXX: shall we support fill? — 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.
XxxComment scratchpad/HWPF/SPRM/ParagraphSprmCompressor.cs:204— // XXX: sprm code 0x6428 is sprmPBrcBetween80, but accessed property linked to sprmPBrcBar80 (0x6629) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
Duplicated block (17 lines × 2) main/HSSF/Record/Aggregates/CFRecordsAggregate.cs:334— main/HSSF/Record/Aggregates/CFRecordsAggregate.cs:334-350 | main/SS/UserModel/Helpers/BaseRowColShifter.cs:51-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 (17 lines × 2) main/HSSF/Model/InternalChart.cs:407— main/HSSF/Model/InternalChart.cs:407-423 | main/HSSF/UserModel/HSSFChart.cs:613-629 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (17 lines × 2) main/SS/Formula/Functions/Complex.cs:53— main/SS/Formula/Functions/Complex.cs:53-69 | main/SS/Formula/Functions/Complex.cs:72-88 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (17 lines × 2) main/SS/Formula/Eval/RelationalOperationEval/RelationalOperationEval.cs:142— main/SS/Formula/Eval/RelationalOperationEval/RelationalOperationEval.cs:142-158 | main/SS/Formula/Eval/RelationalOperationEval/RelationalOperationEval.cs:162-178 — both copies are in the same file, so extract the 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 `main/SS/Formula/Eval/RelationalOperationEval/RelationalOperationEval.cs:142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (17 lines × 2) main/SS/Formula/Functions/ArrayFunction.cs:75— main/SS/Formula/Functions/ArrayFunction.cs:75-91 | main/SS/Formula/Functions/ArrayFunction.cs:97-114 — both copies are in the same file, so extract the 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 `main/SS/Formula/Functions/ArrayFunction.cs:75` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note 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 (17 lines × 2) ooxml/SS/Converter/ExcelToHtmlConverter.cs:508— ooxml/SS/Converter/ExcelToHtmlConverter.cs:508-524 | ooxml/SS/Converter/ExcelToHtmlConverter.cs:576-592 — both copies are in the same file, so extract the 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 `ooxml/SS/Converter/ExcelToHtmlConverter.cs:508` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) main/HSSF/Record/Aggregates/Chart/AttachedLabelAggregate.cs:89— main/HSSF/Record/Aggregates/Chart/AttachedLabelAggregate.cs:89-103 | main/HSSF/Record/Aggregates/Chart/LDAggregate.cs:48-62 — 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 `main/HSSF/Record/Aggregates/Chart/AttachedLabelAggregate.cs:89` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) ooxml/XWPF/Usermodel/XWPFDocument.cs:601— ooxml/XWPF/Usermodel/XWPFDocument.cs:601-615 | ooxml/XWPF/Usermodel/XWPFDocument.cs:627-641 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) main/HSSF/Model/InternalChart.cs:488— main/HSSF/Model/InternalChart.cs:488-502 | main/HSSF/UserModel/HSSFChart.cs:559-573 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) main/HSSF/Record/Chart/AlRunsRecord.cs:127— main/HSSF/Record/Chart/AlRunsRecord.cs:127-141 | main/HSSF/Record/Chart/ChartTitleFormatRecord.cs:121-135 — before extracting anything, compare `main/HSSF/Record/Chart/AlRunsRecord.cs` and `main/HSSF/Record/Chart/ChartTitleFormatRecord.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) main/Util/BigInteger.cs:3311— main/Util/BigInteger.cs:3311-3326 | main/Util/BigInteger.cs:3331-3345 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) ooxml/XSSF/UserModel/XSSFFactory.cs:58— ooxml/XSSF/UserModel/XSSFFactory.cs:58-73 | ooxml/XWPF/Usermodel/XWPFFactory.cs:57-71 — 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 (13 lines × 2) main/SS/Formula/Eval/PercentEval.cs:36— main/SS/Formula/Eval/PercentEval.cs:36-48 | main/SS/Formula/Eval/UnaryMinusEval.cs:39-51 — 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 (13 lines × 2) main/SS/Formula/Atp/XLookupFunction.cs:59— main/SS/Formula/Atp/XLookupFunction.cs:59-71 | main/SS/Formula/Atp/XMatchFunction.cs:34-46 — before extracting anything, compare `main/SS/Formula/Atp/XLookupFunction.cs` and `main/SS/Formula/Atp/XMatchFunction.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `main/SS/Formula/Atp/XLookupFunction.cs:59` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) main/HSSF/Record/Chart/AlRunsRecord.cs:88— main/HSSF/Record/Chart/AlRunsRecord.cs:88-100 | main/HSSF/Record/Chart/ChartTitleFormatRecord.cs:82-94 — before extracting anything, compare `main/HSSF/Record/Chart/AlRunsRecord.cs` and `main/HSSF/Record/Chart/ChartTitleFormatRecord.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) main/HSSF/UserModel/HSSFShapeGroup.cs:197— main/HSSF/UserModel/HSSFShapeGroup.cs:197-209 | main/HSSF/UserModel/HSSFShapeGroup.cs:255-267 — both copies are in the same file, so extract the 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 `main/HSSF/UserModel/HSSFShapeGroup.cs:197` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 2) main/SS/UserModel/ExtendedColor.cs:189— main/SS/UserModel/ExtendedColor.cs:189-201 | ooxml/XSSF/UserModel/XSSFColor.cs:300-312 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) main/DDF/EscherMetafileBlip.cs:89— main/DDF/EscherMetafileBlip.cs:89-101 | main/DDF/EscherPictBlip.cs:71-83 — before extracting anything, compare `main/DDF/EscherMetafileBlip.cs` and `main/DDF/EscherPictBlip.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) main/HSSF/Model/InternalWorkbook.cs:2736— main/HSSF/Model/InternalWorkbook.cs:2736-2746 | main/HSSF/Model/InternalWorkbook.cs:2776-2786 — both copies are in the same file, so extract the 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 `main/HSSF/Model/InternalWorkbook.cs:2736` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) main/POIFS/FileSystem/POIFSDocumentReader.cs:276— main/POIFS/FileSystem/POIFSDocumentReader.cs:276-286 | main/Util/ByteArrayInputStream.cs:143-153 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) main/HSSF/Record/Chart/AlRunsRecord.cs:148— main/HSSF/Record/Chart/AlRunsRecord.cs:148-158 | main/HSSF/Record/Chart/ChartTitleFormatRecord.cs:142-152 — before extracting anything, compare `main/HSSF/Record/Chart/AlRunsRecord.cs` and `main/HSSF/Record/Chart/ChartTitleFormatRecord.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 2) main/HSSF/UserModel/HSSFWorkbook.cs:1775— main/HSSF/UserModel/HSSFWorkbook.cs:1775-1785 | ooxml/XSSF/UserModel/XSSFWorkbook.cs:1504-1514 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) main/Util/BigInteger.cs:1537— main/Util/BigInteger.cs:1537-1547 | main/Util/BigInteger.cs:1608-1618 — both copies are in the same file, so extract the 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 `main/Util/BigInteger.cs:1537` 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 (16 lines × 2) main/HSSF/UserModel/HSSFSheet.cs:2426— main/HSSF/UserModel/HSSFSheet.cs:2426-2441 | ooxml/XSSF/UserModel/XSSFSheet.cs:2022-2037 — 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 `main/HSSF/UserModel/HSSFSheet.cs:2426` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ooxml/XSSF/UserModel/XSSFSheet.cs:2019` calls `EnsureWorksheetLoaded` and `main/HSSF/UserModel/HSSFSheet.cs:2423` 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 (16 lines × 2) main/HSSF/Model/InternalChart.cs:427— main/HSSF/Model/InternalChart.cs:427-442 | main/HSSF/UserModel/HSSFChart.cs:633-648 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (16 lines × 2) main/HSSF/UserModel/HSSFCell.cs:680— main/HSSF/UserModel/HSSFCell.cs:680-695 | ooxml/XSSF/UserModel/XSSFCell.cs:607-622 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (16 lines × 2) ooxml/XDDF/UserModel/Text/XDDFParagraphBulletProperties.cs:70— ooxml/XDDF/UserModel/Text/XDDFParagraphBulletProperties.cs:70-85 | ooxml/XDDF/UserModel/Text/XDDFParagraphBulletProperties.cs:263-278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) ooxml/XSSF/UserModel/XSSFSheet.cs:4379— ooxml/XSSF/UserModel/XSSFSheet.cs:4379-4396 | ooxml/XSSF/UserModel/XSSFWorkbook.cs:669-684 — 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 `ooxml/XSSF/UserModel/XSSFSheet.cs:4379` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
Members sharing a duplicated core (4 members, 50+ identical tokens) main/DDF/EscherArrayProperty.cs:168— main/DDF/EscherArrayProperty.cs:168-179 | main/DDF/EscherComplexProperty.cs:179-188 | main/DDF/EscherRGBProperty.cs:78-84 | main/DDF/EscherSimpleProperty.cs:139-146 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) main/HSSF/Model/InternalChart.cs:584— main/HSSF/Model/InternalChart.cs:584-611 | main/HSSF/UserModel/HSSFChart.cs:528-555 | main/HSSF/UserModel/HSSFChart.cs:735-762 | main/HSSF/UserModel/HSSFChart.cs:765-792 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) main/HSSF/Model/InternalChart.cs:745— main/HSSF/Model/InternalChart.cs:745-760 | main/HSSF/Model/InternalSheet.cs:1189-1204 | main/HSSF/Record/Aggregates/PageSettingsBlock.cs:322-337 | main/HSSF/UserModel/HSSFChart.cs:375-396 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) main/SS/Util/PropertyTemplate.cs:367— main/SS/Util/PropertyTemplate.cs:367-394 | main/SS/Util/PropertyTemplate.cs:416-443 | main/SS/Util/PropertyTemplate.cs:743-770 | main/SS/Util/PropertyTemplate.cs:793-820 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Duplicated block (19 lines × 2) REDACTED:1198— REDACTED:1198-1216 | ooxml/XWPF/Usermodel/XWPFSharedRun.cs:103-121 — 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 `REDACTED:1198` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1007— ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1007-1025 | ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1067-1085 — both copies are in the same file, so extract the 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 `ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1007` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs:202— ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs:202-220 | ooxml/XDDF/UserModel/Chart/XDDFScatterChartData.cs:166-184 — before extracting anything, compare `ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs` and `ooxml/XDDF/UserModel/Chart/XDDFScatterChartData.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (19 lines × 2) ooxml/XSSF/UserModel/Helpers/XSSFPasswordHelper.cs:132— ooxml/XSSF/UserModel/Helpers/XSSFPasswordHelper.cs:132-150 | ooxml/XSSF/UserModel/Helpers/XSSFPasswordHelper.cs:182-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ooxml/XSSF/UserModel/Helpers/XSSFPasswordHelper.cs:132` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) main/SS/Formula/Atp/XLookupFunction.cs:77— main/SS/Formula/Atp/XLookupFunction.cs:77-94 | main/SS/Formula/Atp/XMatchFunction.cs:52-69 — before extracting anything, compare `main/SS/Formula/Atp/XLookupFunction.cs` and `main/SS/Formula/Atp/XMatchFunction.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (18 lines × 2) main/SS/Formula/Functions/Dec2Bin.cs:65— main/SS/Formula/Functions/Dec2Bin.cs:65-82 | main/SS/Formula/Functions/Dec2Hex.cs:70-87 — 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 `main/SS/Formula/Functions/Dec2Bin.cs:65` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (18 lines × 2) ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:135— ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:135-152 | ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:220-237 — both copies are in the same file, so extract the 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 `ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:135` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) ooxml/XSSF/UserModel/XSSFRichTextString.cs:369— ooxml/XSSF/UserModel/XSSFRichTextString.cs:369-386 | ooxml/XSSF/UserModel/XSSFRichTextString.cs:626-643 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (20 lines × 2) ooxml/XDDF/UserModel/Text/XDDFRunProperties.cs:176— ooxml/XDDF/UserModel/Text/XDDFRunProperties.cs:176-195 | ooxml/XDDF/UserModel/XDDFLineProperties.cs:276-295 — 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 (20 lines × 2) main/HSSF/Model/RecordOrderer.cs:160— main/HSSF/Model/RecordOrderer.cs:160-179 | main/HSSF/Model/RecordOrderer.cs:382-401 — both copies are in the same file, so extract the 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 `main/HSSF/Model/RecordOrderer.cs:160` 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 (20 lines × 2) main/SS/Formula/PTG/Area3DPxg.cs:72— main/SS/Formula/PTG/Area3DPxg.cs:72-91 | main/SS/Formula/PTG/Ref3DPxg.cs:73-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (20 lines × 2) main/HSSF/UserModel/HSSFOptimiser.cs:96— main/HSSF/UserModel/HSSFOptimiser.cs:96-116 | main/HSSF/UserModel/HSSFOptimiser.cs:308-327 — both copies are in the same file, so extract the 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 `main/HSSF/UserModel/HSSFOptimiser.cs:96` 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.
BarePragmaDisable OpenXmlFormats/Wordprocessing/Markup.cs:726— #pragma warning disable format — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable OpenXmlFormats/Wordprocessing/Paragraph.cs:614— #pragma warning disable format — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
BarePragmaDisable OpenXmlFormats/Wordprocessing/Run.cs:298— #pragma warning disable format — the disable is closed again below, so its scope is not the problem; what it records is no reason: there is nothing on the directive line, and no ordinary comment attached to it either side. A suppression is a decision somebody made, and without the reason the next reader cannot tell a considered exception from an unexamined one, so it is never revisited and it outlives the code it was written for. Put the reason on the directive line — what makes this site legitimately different — or fix what the rule is pointing at and delete the pair. A rationale in the member's documentation comment does not clear this row and is not meant to: it explains the member to its callers, and the next person to touch the suppression is not reading it for that.
Duplicated block (9 lines × 3) main/HSSF/Record/Cont/ContinuableRecordInput.cs:107— main/HSSF/Record/Cont/ContinuableRecordInput.cs:107-115 | main/POIFS/Storage/DataInputBlock.cs:141-149 | main/Util/LittleEndianByteArrayInputStream.cs:126-134 — 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 `main/HSSF/Record/Cont/ContinuableRecordInput.cs:107` 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 (9 lines × 3) main/HSSF/UserModel/HSSFPatriarch.cs:348— main/HSSF/UserModel/HSSFPatriarch.cs:348-356 | main/HSSF/UserModel/HSSFShapeGroup.cs:199-207 | main/HSSF/UserModel/HSSFShapeGroup.cs:257-265 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 3) ooxml/XWPF/Usermodel/XWPFComment.cs:185— ooxml/XWPF/Usermodel/XWPFComment.cs:185-194 | ooxml/XWPF/Usermodel/XWPFFootnote.cs:161-169 | ooxml/XWPF/Usermodel/XWPFHeaderFooter.cs:199-208 — 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. 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.
Weak hash algorithm main/HSSF/Record/Crypto/Biff8EncryptionKey.cs:94— MD5/SHA1 is constructed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses.
Weak hash algorithm main/HSSF/Record/Crypto/Biff8EncryptionKey.cs:133— MD5/SHA1 is constructed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses.
Weak hash algorithm main/HSSF/UserModel/HSSFWorkbook.cs:2015— MD5/SHA1 is constructed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ for content integrity, or a KDF (PBKDF2/Argon2/BCrypt) for password storage. If it only derives a non-security identifier (a cache key, a file or mutex name), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as `System.IO.Hashing.XxHash64`/`Crc32` says it in code — since the algorithm alone cannot distinguish the two uses.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×3
Recursive walk over a caller-supplied document has no depth cap ooxml/POIFS/Crypt/Dsig/SignatureMarshalListener.cs:93— `SetPrefix` is protected and takes the `XmlNode` from its caller, and it calls itself at line 93 with a child of the node it was given — and nowhere in `SetPrefix` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `SetPrefix` can intervene. Thread a depth argument through `SetPrefix` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap REDACTED:435— `CheckElementForOPCCompliance` is public and takes the `XmlElement` from its caller, and it calls itself at line 435 with a child of the node it was given — and nowhere in `CheckElementForOPCCompliance` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `CheckElementForOPCCompliance` can intervene. Thread a depth argument through `CheckElementForOPCCompliance` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap scratchpad/HWPF/Converter/AbstractWordUtils.cs:125— `CompactChildNodesR` is protected and takes the `XmlElement` from its caller, and it calls itself at line 125 with a child of the node it was given — and nowhere in `CompactChildNodesR` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the tree it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. A document nested past the stack that remains raises `StackOverflowException`, which .NET neither lets you catch nor unwinds: the process is torn down where it stands, taking every other request in flight with it, and no `try`/`catch` around `CompactChildNodesR` can intervene. Thread a depth argument through `CompactChildNodesR` and reject the document past a fixed maximum, or rewrite the descent with an explicit stack.
CT_ShapeProperties.Parse (cyclomatic 19) OpenXmlFormats/Drawing/ShapeProperties.cs:2086— CT_ShapeProperties.Parse has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ShapeProperties.Parse (cyclomatic 19) OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:887— CT_ShapeProperties.Parse has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ShapeProperties.Write (cyclomatic 17) OpenXmlFormats/Drawing/ShapeProperties.cs:2131— CT_ShapeProperties.Write has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ShapeProperties.Write (cyclomatic 17) OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:932— CT_ShapeProperties.Write has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ShapeProperties.Parse (cognitive 19) OpenXmlFormats/Drawing/ShapeProperties.cs:2086— CT_ShapeProperties.Parse has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ShapeProperties.Parse (cognitive 19) OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:887— CT_ShapeProperties.Parse has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ShapeProperties.Write (cognitive 16) OpenXmlFormats/Drawing/ShapeProperties.cs:2131— CT_ShapeProperties.Write has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ShapeProperties.Write (cognitive 16) OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:932— CT_ShapeProperties.Write has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D4 · Code Duplication· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (6 members, 50+ identical tokens) ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:73— ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:73-84 | ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs:119-130 | ooxml/XDDF/UserModel/Chart/XDDFLine3DChartData.cs:74-85 | ooxml/XDDF/UserModel/Chart/XDDFPie3DChartData.cs:38-49 | ooxml/XDDF/UserModel/Chart/XDDFSurface3DChartData.cs:79-90 | ooxml/XDDF/UserModel/Chart/XDDFSurfaceChartData.cs:79-90 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
Members sharing a duplicated core (6 members, 50+ identical tokens) ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:113— ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:113-127 | ooxml/XDDF/UserModel/Chart/XDDFBarChartData.cs:183-196 | ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs:128-141 | ooxml/XDDF/UserModel/Chart/XDDFPieChartData.cs:100-113 | ooxml/XDDF/UserModel/Chart/XDDFRadarChartData.cs:139-152 | ooxml/XDDF/UserModel/Chart/XDDFScatterChartData.cs:241-254 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (5 members, 50+ identical tokens) ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:74— ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:74-84 | ooxml/XDDF/UserModel/Chart/XDDFBarChartData.cs:140-150 | ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs:87-97 | ooxml/XDDF/UserModel/Chart/XDDFPieChartData.cs:58-68 | ooxml/XDDF/UserModel/Chart/XDDFRadarChartData.cs:98-108 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Members sharing a duplicated core (5 members, 50+ identical tokens) ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs:192— ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs:192-212 | ooxml/XDDF/UserModel/Chart/XDDFLine3DChartData.cs:147-167 | ooxml/XDDF/UserModel/Chart/XDDFPie3DChartData.cs:111-131 | ooxml/XDDF/UserModel/Chart/XDDFSurface3DChartData.cs:140-160 | ooxml/XDDF/UserModel/Chart/XDDFSurfaceChartData.cs:140-160 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
Duplicated block (32 lines × 2) main/SS/Formula/CellCacheEntry.cs:60— main/SS/Formula/CellCacheEntry.cs:60-91 | main/SS/Formula/EvaluationCache.cs:198-229 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (32 lines × 2) ooxml/XSSF/UserModel/XSSFRichTextString.cs:334— ooxml/XSSF/UserModel/XSSFRichTextString.cs:334-365 | ooxml/XSSF/UserModel/XSSFRichTextString.cs:591-622 — both copies are in the same file, so extract the 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 (28 lines × 2) main/SS/Formula/FormulaShifter.cs:598— main/SS/Formula/FormulaShifter.cs:598-625 | main/SS/Formula/FormulaShifter.cs:635-662 — both copies are in the same file, so extract the 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 `main/SS/Formula/FormulaShifter.cs:598` 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 (28 lines × 2) ooxml/XWPF/Usermodel/XWPFChart.cs:212— ooxml/XWPF/Usermodel/XWPFChart.cs:212-239 | ooxml/XWPF/Usermodel/XWPFPictureData.cs:173-200 — 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 `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.
Duplicated block (27 lines × 2) ooxml/XSSF/UserModel/XSSFSheet.cs:4521— ooxml/XSSF/UserModel/XSSFSheet.cs:4521-4547 | ooxml/XSSF/UserModel/XSSFSheet.cs:6232-6258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (27 lines × 2) main/HSSF/Model/InternalChart.cs:218— main/HSSF/Model/InternalChart.cs:218-244 | main/HSSF/Record/Aggregates/PageSettingsBlock.cs:436-462 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (24 lines × 2) ooxml/XWPF/Usermodel/XWPFDocument.cs:1672— ooxml/XWPF/Usermodel/XWPFDocument.cs:1672-1695 | ooxml/XWPF/Usermodel/XWPFHeaderFooter.cs:289-312 — 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 (24 lines × 2) main/HSSF/UserModel/HSSFWorkbook.cs:477— main/HSSF/UserModel/HSSFWorkbook.cs:477-500 | ooxml/XSSF/UserModel/XSSFWorkbook.cs:1703-1726 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (23 lines × 2) main/HSSF/UserModel/HSSFName.cs:178— main/HSSF/UserModel/HSSFName.cs:178-200 | ooxml/XSSF/UserModel/XSSFName.cs:402-424 — 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 `main/HSSF/UserModel/HSSFName.cs:178` 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 `name` to `String` in one and `string` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (23 lines × 2) main/HSSF/UserModel/HSSFWorkbook.cs:504— main/HSSF/UserModel/HSSFWorkbook.cs:504-526 | ooxml/XSSF/UserModel/XSSFWorkbook.cs:1730-1752 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (22 lines × 2) main/SS/Formula/Functions/LinearRegressionFunction.cs:136— main/SS/Formula/Functions/LinearRegressionFunction.cs:136-157 | main/SS/Formula/Functions/XYNumericFunction.cs:138-159 — before extracting anything, compare `main/SS/Formula/Functions/LinearRegressionFunction.cs` and `main/SS/Formula/Functions/XYNumericFunction.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `main/SS/Formula/Functions/XYNumericFunction.cs:164` calls `CreateAccumulator` and `main/SS/Formula/Functions/LinearRegressionFunction.cs:159` 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 (22 lines × 2) main/HSSF/UserModel/HSSFShapeTypes.cs:53— main/HSSF/UserModel/HSSFShapeTypes.cs:53-74 | main/SS/UserModel/ShapeTypes.cs:125-146 — 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 (21 lines × 2) main/HSSF/Model/InternalChart.cs:189— main/HSSF/Model/InternalChart.cs:189-209 | main/HSSF/Record/Aggregates/PageSettingsBlock.cs:407-427 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (21 lines × 2) main/HSSF/UserModel/HSSFShapeTypes.cs:137— main/HSSF/UserModel/HSSFShapeTypes.cs:137-157 | main/SS/UserModel/ShapeTypes.cs:168-188 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (13–14 lines × 2) main/DDF/EscherMetafileBlip.cs:143— main/DDF/EscherMetafileBlip.cs:143-155 | main/DDF/EscherPictBlip.cs:116-129 — before extracting anything, compare `main/DDF/EscherMetafileBlip.cs` and `main/DDF/EscherPictBlip.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13–14 lines × 2) main/SS/Util/ImageUtils.cs:249— main/SS/Util/ImageUtils.cs:249-261 | main/SS/Util/ImageUtils.cs:285-298 — both copies are in the same file, so extract the 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 `main/SS/Util/ImageUtils.cs:249` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (6 lines × 3) ooxml/XSSF/UserModel/XSSFShapeGroup.cs:324— ooxml/XSSF/UserModel/XSSFShapeGroup.cs:324-329 | ooxml/XSSF/UserModel/XSSFShapeGroup.cs:332-337 | ooxml/XSSF/UserModel/XSSFShapeGroup.cs:340-345 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ooxml/XSSF/UserModel/XSSFShapeGroup.cs:324` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) main/HSSF/UserModel/EvaluationCycleDetector.cs:101— main/HSSF/UserModel/EvaluationCycleDetector.cs:101-106 | main/HSSF/Util/GUID.cs:117-122 | main/SS/UserModel/CellValue.cs:128-133 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 3) main/SS/Formula/Functions/NormInv.cs:54— main/SS/Formula/Functions/NormInv.cs:54-60 | main/SS/Formula/Functions/Standardize.cs:45-51 | main/SS/Formula/Functions/TDist.cs:70-76 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 3) ooxml/XWPF/Usermodel/XWPFComment.cs:175— ooxml/XWPF/Usermodel/XWPFComment.cs:175-182 | ooxml/XWPF/Usermodel/XWPFFootnote.cs:181-187 | ooxml/XWPF/Usermodel/XWPFHeaderFooter.cs:219-226 — 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. 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.
X24 · Document value interpolated into markup unescaped· Document value reaches a markup attribute unescaped · ×2
Document value reaches a markup attribute unescaped OpenXmlFormats/Spreadsheet/Sheet.cs:8582— `progId` carries text this program read out of the document being converted, and it is written straight into the `progId` attribute of generated markup with nothing escaping it on the way. The value is chosen by whoever authored the file, not by this program, so it can close the attribute it sits in and open another — a crafted document becomes markup in the output this renderer produces. Escape `progId` at this site, or validate it against the shape the attribute accepts before interpolating it.
Document value reaches a markup attribute unescaped OpenXmlFormats/Spreadsheet/Sheet.cs:8582— `id` carries text this program read out of the document being converted, and it is written straight into the `r:id` attribute of generated markup with nothing escaping it on the way. The value is chosen by whoever authored the file, not by this program, so it can close the attribute it sits in and open another — a crafted document becomes markup in the output this renderer produces. Escape `id` at this site, or validate it against the shape the attribute accepts before interpolating it.
X27 · Collection changed while being enumerated· Collection is structurally changed while it is being enumerated · ×2
Collection is structurally changed while it is being enumerated main/HPSF/Section.cs:99— `s.properties.Values` is a live view over `s.properties` and shares its version stamp, and line 101 calls `s.properties.Add(…)` inside the loop body — a structural change to a `Dictionary`. The next `MoveNext` throws `InvalidOperationException: Collection was modified; enumeration operation may not execute`, so every pass that reaches this call ends the loop by exception instead of by running out of items, and the remaining items are never seen.
Collection is structurally changed while it is being enumerated OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1396— `ctDrawing.cellAnchors` is enumerated directly, and line 1398 calls `ctDrawing.cellAnchors.Add(…)` inside the loop body — a structural change to a `List`. The next `MoveNext` throws `InvalidOperationException: Collection was modified; enumeration operation may not execute`, so every pass that reaches this call ends the loop by exception instead of by running out of items, and the remaining items are never seen.
CharacterSprmUncompressor.UncompressCHPOperation (cyclomatic 131) scratchpad/HWPF/SPRM/CharacterSprmUncompressor.cs:63— CharacterSprmUncompressor.UncompressCHPOperation has cyclomatic complexity 131 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
CT_Settings.Write (cyclomatic 102) OpenXmlFormats/Wordprocessing/Settings.cs:234— CT_Settings.Write has cyclomatic complexity 102 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Settings.Parse (cyclomatic 100) OpenXmlFormats/Wordprocessing/Settings.cs:19— CT_Settings.Parse has cyclomatic complexity 100 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ParaRPrOriginal.Write (cyclomatic 83) OpenXmlFormats/Wordprocessing/Paragraph.cs:5654— CT_ParaRPrOriginal.Write has cyclomatic complexity 83 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
ParagraphSprmUncompressor.UncompressPAPOperation (cyclomatic 81) scratchpad/HWPF/SPRM/ParagraphSprmUncompressor.cs:70— ParagraphSprmUncompressor.UncompressPAPOperation has cyclomatic complexity 81 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
CT_RPrOriginal.Write (cyclomatic 79) OpenXmlFormats/Wordprocessing/Paragraph.cs:7435— CT_RPrOriginal.Write has cyclomatic complexity 79 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CT_PivotTableDefinition.Parse (cyclomatic 77) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:18— CT_PivotTableDefinition.Parse has cyclomatic complexity 77 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ParagraphSprmCompressor.CompressParagraphProperty (cyclomatic 74) scratchpad/HWPF/SPRM/ParagraphSprmCompressor.cs:32— ParagraphSprmCompressor.CompressParagraphProperty has cyclomatic complexity 74 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Compat.Parse (cyclomatic 68) OpenXmlFormats/Wordprocessing/Settings.cs:4891— CT_Compat.Parse has cyclomatic complexity 68 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Form1.button2_Click (cyclomatic 68) tools/XmlSerializationCodeGenerator/Form1.cs:111— Form1.button2_Click has cyclomatic complexity 68 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_Compat.Write (cyclomatic 66) OpenXmlFormats/Wordprocessing/Settings.cs:5034— CT_Compat.Write has cyclomatic complexity 66 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EscherDump.DumpOld (cyclomatic 65) main/DDF/EscherDump.cs:67— EscherDump.DumpOld has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FormulaParser.ParseStructuredReference (cyclomatic 61) main/SS/Formula/FormulaParser.cs:701— FormulaParser.ParseStructuredReference has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_R.Write (cyclomatic 61) OpenXmlFormats/Wordprocessing/Run.cs:724— CT_R.Write has cyclomatic complexity 61 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CharacterSprmCompressor.CompressCharacterProperty (cyclomatic 59) scratchpad/HWPF/SPRM/CharacterSprmCompressor.cs:31— CharacterSprmCompressor.CompressCharacterProperty has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SharedStringsTable.ReadFromStreamViaXmlReader (cyclomatic 58) ooxml/XSSF/Model/SharedStringsTable.cs:249— SharedStringsTable.ReadFromStreamViaXmlReader has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AbstractWordConverter.ProcessCharacters (cyclomatic 58) scratchpad/HWPF/Converter/AbstractWordConverter.cs:223— AbstractWordConverter.ProcessCharacters has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SectionSprmCompressor.CompressSectionProperty (cyclomatic 58) scratchpad/HWPF/SPRM/SectionSprmCompressor.cs:36— SectionSprmCompressor.CompressSectionProperty has cyclomatic complexity 58 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_P.Write (cyclomatic 56) OpenXmlFormats/Wordprocessing/Paragraph.cs:289— CT_P.Write has cyclomatic complexity 56 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Body.Write (cyclomatic 53) OpenXmlFormats/Wordprocessing/Document.cs:365— CT_Body.Write has cyclomatic complexity 53 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_FtnEdn.Write (cyclomatic 52) OpenXmlFormats/Wordprocessing/HdrFtr.cs:1047— CT_FtnEdn.Write has cyclomatic complexity 52 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RunTrackChange.Parse (cyclomatic 52) OpenXmlFormats/Wordprocessing/Run.cs:2079— CT_RunTrackChange.Parse has cyclomatic complexity 52 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_PivotField.Parse (cyclomatic 51) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:2139— CT_PivotField.Parse has cyclomatic complexity 51 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RunTrackChange.Write (cyclomatic 51) OpenXmlFormats/Wordprocessing/Run.cs:2335— CT_RunTrackChange.Write has cyclomatic complexity 51 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
OperatorEnumHelper.IsValid (cyclomatic 50) main/SS/Formula/EvaluationConditionalFormatRule.cs:26— OperatorEnumHelper.IsValid has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_Tbl.Parse (cyclomatic 49) OpenXmlFormats/Wordprocessing/Table.cs:43— CT_Tbl.Parse has cyclomatic complexity 49 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Tbl.Write (cyclomatic 49) OpenXmlFormats/Wordprocessing/Table.cs:279— CT_Tbl.Write has cyclomatic complexity 49 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EvaluationConditionalFormatRule.CheckFilter (cyclomatic 48) main/SS/Formula/EvaluationConditionalFormatRule.cs:550— EvaluationConditionalFormatRule.CheckFilter has cyclomatic complexity 48 (threshold 15). Of this number, 30 points are the body's own statements and 18 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_ParaRPr.Parse (cyclomatic 47) OpenXmlFormats/Wordprocessing/Paragraph.cs:1924— CT_ParaRPr.Parse has cyclomatic complexity 47 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RubyContent.Write (cyclomatic 47) OpenXmlFormats/Wordprocessing/Run.cs:1351— CT_RubyContent.Write has cyclomatic complexity 47 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ParaRPrOriginal.Parse (cyclomatic 46) OpenXmlFormats/Wordprocessing/Paragraph.cs:5516— CT_ParaRPrOriginal.Parse has cyclomatic complexity 46 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ParaRPr.Write (cyclomatic 45) OpenXmlFormats/Wordprocessing/Paragraph.cs:2025— CT_ParaRPr.Write has cyclomatic complexity 45 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RPr.Parse (cyclomatic 43) OpenXmlFormats/Wordprocessing/Paragraph.cs:4065— CT_RPr.Parse has cyclomatic complexity 43 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Worksheet.Parse (cyclomatic 42) OpenXmlFormats/Spreadsheet/Sheet/CT_Worksheet.cs:95— CT_Worksheet.Parse has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Worksheet.Write (cyclomatic 42) OpenXmlFormats/Spreadsheet/Sheet/CT_Worksheet.cs:193— CT_Worksheet.Write has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RPrOriginal.Parse (cyclomatic 42) OpenXmlFormats/Wordprocessing/Paragraph.cs:7305— CT_RPrOriginal.Parse has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChartRecordAggregate.WriteStartBlock (cyclomatic 41) main/HSSF/Record/Aggregates/Chart/ChartRecordAggregate.cs:104— ChartRecordAggregate.WriteStartBlock has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WorkbookEvaluator.EvaluateFormula (cyclomatic 41) main/SS/Formula/WorkbookEvaluator.cs:572— WorkbookEvaluator.EvaluateFormula has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_RPr.Write (cyclomatic 41) OpenXmlFormats/Wordprocessing/Paragraph.cs:4158— CT_RPr.Write has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InternalSheet.InternalSheet.ctor (cyclomatic 40) main/HSSF/Model/InternalSheet.cs:206— InternalSheet.InternalSheet.ctor has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_PPr.Parse (cyclomatic 40) OpenXmlFormats/Wordprocessing/Paragraph.cs:981— CT_PPr.Parse has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_PPr.Write (cyclomatic 39) OpenXmlFormats/Wordprocessing/Paragraph.cs:1072— CT_PPr.Write has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_R.Parse (cyclomatic 39) OpenXmlFormats/Wordprocessing/Run.cs:531— CT_R.Parse has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_P.Parse (cyclomatic 38) OpenXmlFormats/Wordprocessing/Paragraph.cs:62— CT_P.Parse has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HSSFOptimiser.OptimiseCellStyles (cyclomatic 37) main/HSSF/UserModel/HSSFOptimiser.cs:195— HSSFOptimiser.OptimiseCellStyles has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Value.ConvertTextToNumber (cyclomatic 37) main/SS/Formula/Functions/Value.cs:59— Value.ConvertTextToNumber has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_PPrBase.Parse (cyclomatic 37) OpenXmlFormats/Wordprocessing/Paragraph.cs:6247— CT_PPrBase.Parse has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
VariantSupport.Write (cyclomatic 36) main/HPSF/VariantSupport.cs:266— VariantSupport.Write has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_SmartTagRun.Parse (cyclomatic 36) OpenXmlFormats/Wordprocessing/CustomXml.cs:1304— CT_SmartTagRun.Parse has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SmartTagRun.Write (cyclomatic 36) OpenXmlFormats/Wordprocessing/CustomXml.cs:1482— CT_SmartTagRun.Write has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_PPrBase.Write (cyclomatic 36) OpenXmlFormats/Wordprocessing/Paragraph.cs:6332— CT_PPrBase.Write has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SdtPr.Write (cyclomatic 36) OpenXmlFormats/Wordprocessing/Sdt.cs:1948— CT_SdtPr.Write has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Row.Parse (cyclomatic 36) OpenXmlFormats/Wordprocessing/Table.cs:5555— CT_Row.Parse has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_CustomXmlRun.Parse (cyclomatic 35) OpenXmlFormats/Wordprocessing/CustomXml.cs:823— CT_CustomXmlRun.Parse has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SdtContentRun.Parse (cyclomatic 35) OpenXmlFormats/Wordprocessing/Sdt.cs:2246— CT_SdtContentRun.Parse has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Tc.Parse (cyclomatic 35) OpenXmlFormats/Wordprocessing/Table.cs:3384— CT_Tc.Parse has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DataFormatter.CreateDateFormat (cyclomatic 34) main/SS/UserModel/DataFormatter.cs:555— DataFormatter.CreateDateFormat has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_Shapetype.Write (cyclomatic 34) OpenXmlFormats/Vml/Main.cs:3842— CT_Shapetype.Write has cyclomatic complexity 34 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CT_CustomXmlRun.Write (cyclomatic 34) OpenXmlFormats/Wordprocessing/CustomXml.cs:997— CT_CustomXmlRun.Write has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Body.Parse (cyclomatic 34) OpenXmlFormats/Wordprocessing/Document.cs:195— CT_Body.Parse has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_FtnEdn.Parse (cyclomatic 34) OpenXmlFormats/Wordprocessing/HdrFtr.cs:882— CT_FtnEdn.Parse has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SdtContentRun.Write (cyclomatic 34) OpenXmlFormats/Wordprocessing/Sdt.cs:2417— CT_SdtContentRun.Write has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_HdrFtr.Parse (cyclomatic 33) OpenXmlFormats/Wordprocessing/HdrFtr.cs:29— CT_HdrFtr.Parse has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Comment.Parse (cyclomatic 33) OpenXmlFormats/Wordprocessing/Markup.cs:310— CT_Comment.Parse has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Tc.Write (cyclomatic 33) OpenXmlFormats/Wordprocessing/Table.cs:3554— CT_Tc.Write has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TableSprmUncompressor.UncompressTAPOperation (cyclomatic 33) scratchpad/HWPF/SPRM/TableSprmUncompressor.cs:104— TableSprmUncompressor.UncompressTAPOperation has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
PackagePartName.CheckPCharCompliance (cyclomatic 32) openxml4Net/OPC/PackagePartName.cs:291— PackagePartName.CheckPCharCompliance has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_CustomXmlRow.Parse (cyclomatic 32) OpenXmlFormats/Wordprocessing/CustomXml.cs:36— CT_CustomXmlRow.Parse has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (CT_CustomXmlBlock.Parse, CT_CustomXmlCell.Parse) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_CustomXmlBlock.Parse (cyclomatic 32) OpenXmlFormats/Wordprocessing/CustomXml.cs:1709— CT_CustomXmlBlock.Parse has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (CT_CustomXmlRow.Parse, CT_CustomXmlCell.Parse) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_CustomXmlCell.Parse (cyclomatic 32) OpenXmlFormats/Wordprocessing/CustomXml.cs:2141— CT_CustomXmlCell.Parse has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (CT_CustomXmlRow.Parse, CT_CustomXmlBlock.Parse) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_HdrFtr.Write (cyclomatic 32) OpenXmlFormats/Wordprocessing/HdrFtr.cs:189— CT_HdrFtr.Write has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Comment.Write (cyclomatic 32) OpenXmlFormats/Wordprocessing/Markup.cs:475— CT_Comment.Write has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SdtContentBlock.Parse (cyclomatic 32) OpenXmlFormats/Wordprocessing/Sdt.cs:993— CT_SdtContentBlock.Parse has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Row.Write (cyclomatic 32) OpenXmlFormats/Wordprocessing/Table.cs:5723— CT_Row.Write has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MissingRecordAwareHSSFListener.ProcessRecord (cyclomatic 31) main/HSSF/EventUserModel/MissingRecordAwareHSSFListener.cs:60— MissingRecordAwareHSSFListener.ProcessRecord has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExcelExtractor.Text.get (cyclomatic 31) main/HSSF/Extractor/ExcelExtractor.cs:148— ExcelExtractor.Text.get has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FormulaParser.ParseRangeable (cyclomatic 31) main/SS/Formula/FormulaParser.cs:511— FormulaParser.ParseRangeable has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FormulaShifter.RowMoveAreaPtg (cyclomatic 31) main/SS/Formula/FormulaShifter.cs:664— FormulaShifter.RowMoveAreaPtg has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (FormulaShifter.ColumnMoveAreaPtg) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
FormulaShifter.ColumnMoveAreaPtg (cyclomatic 31) main/SS/Formula/FormulaShifter.cs:830— FormulaShifter.ColumnMoveAreaPtg has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (FormulaShifter.RowMoveAreaPtg) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Properties.LoadConvert (cyclomatic 31) main/Util/Collections/Properties.cs:230— Properties.LoadConvert has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
CT_PivotCacheDefinition.Parse (cyclomatic 31) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:16— CT_PivotCacheDefinition.Parse has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_CustomXmlRow.Write (cyclomatic 31) OpenXmlFormats/Wordprocessing/CustomXml.cs:194— CT_CustomXmlRow.Write has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_CustomXmlCell.Write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_CustomXmlBlock.Write (cyclomatic 31) OpenXmlFormats/Wordprocessing/CustomXml.cs:1868— CT_CustomXmlBlock.Write has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_CustomXmlCell.Write (cyclomatic 31) OpenXmlFormats/Wordprocessing/CustomXml.cs:2299— CT_CustomXmlCell.Write has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_CustomXmlRow.Write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_SdtContentCell.Parse (cyclomatic 31) OpenXmlFormats/Wordprocessing/Sdt.cs:47— CT_SdtContentCell.Parse has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_SdtContentRow.Parse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_SdtContentBlock.Write (cyclomatic 31) OpenXmlFormats/Wordprocessing/Sdt.cs:1149— CT_SdtContentBlock.Write has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SdtContentRow.Parse (cyclomatic 31) OpenXmlFormats/Wordprocessing/Sdt.cs:1494— CT_SdtContentRow.Parse has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_SdtContentCell.Parse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
XSSFSheetXMLHandler.StartElement (cyclomatic 30) ooxml/XSSF/EventUserModel/XSSFSheetXMLHandler.cs:194— XSSFSheetXMLHandler.StartElement has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_SdtContentCell.Write (cyclomatic 30) OpenXmlFormats/Wordprocessing/Sdt.cs:198— CT_SdtContentCell.Write has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_SdtContentRow.Write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_SdtContentRow.Write (cyclomatic 30) OpenXmlFormats/Wordprocessing/Sdt.cs:1645— CT_SdtContentRow.Write has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_SdtContentCell.Write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
EvaluationConditionalFormatRule.CheckValue (cyclomatic 29) main/SS/Formula/EvaluationConditionalFormatRule.cs:433— EvaluationConditionalFormatRule.CheckValue has cyclomatic complexity 29 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
PackagingUriHelper.RelativizeUri (cyclomatic 29) openxml4Net/OPC/PackagingUriHelper.cs:284— PackagingUriHelper.RelativizeUri has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_RubyContent.Parse (cyclomatic 29) OpenXmlFormats/Wordprocessing/Run.cs:1210— CT_RubyContent.Parse has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TrPr.Write (cyclomatic 29) OpenXmlFormats/Wordprocessing/Table.cs:4035— CT_TrPr.Write has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChartRecordAggregate.WriteEndBlock (cyclomatic 28) main/HSSF/Record/Aggregates/Chart/ChartRecordAggregate.cs:409— ChartRecordAggregate.WriteEndBlock has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
XSSFSheetXMLHandler.EndElement (cyclomatic 28) ooxml/XSSF/EventUserModel/XSSFSheetXMLHandler.cs:326— XSSFSheetXMLHandler.EndElement has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SharedStringsTable.ParseRPrChild (cyclomatic 28) ooxml/XSSF/Model/SharedStringsTable.cs:432— SharedStringsTable.ParseRPrChild has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
CT_Style.Parse (cyclomatic 28) OpenXmlFormats/Wordprocessing/Styles.cs:697— CT_Style.Parse has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HSSFChart.CreateSeries (cyclomatic 27) main/HSSF/UserModel/HSSFChart.cs:1193— HSSFChart.CreateSeries has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CellFormatPart.formatType (cyclomatic 27) main/SS/Format/CellFormatPart.cs:367— CellFormatPart.formatType has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
CellNumberFormatter.FormatValue (cyclomatic 27) main/SS/Format/CellNumberFormatter.cs:533— CellNumberFormatter.FormatValue has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DStarRunner.Evaluate (cyclomatic 27) main/SS/Formula/Functions/DStarRunner.cs:70— DStarRunner.Evaluate has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
DateUtil.GetExcelDate (cyclomatic 27) main/SS/UserModel/DateUtil.cs:126— DateUtil.GetExcelDate has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ExcelToHtmlConverter.ProcessCell (cyclomatic 27) ooxml/SS/Converter/ExcelToHtmlConverter.cs:531— ExcelToHtmlConverter.ProcessCell has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CHPBinTable.Rebuild (cyclomatic 27) scratchpad/HWPF/Model/CHPBinTable.cs:110— CHPBinTable.Rebuild has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HSSFSheet.SetRepeatingRowsAndColumns (cyclomatic 26) main/HSSF/UserModel/HSSFSheet.cs:2826— HSSFSheet.SetRepeatingRowsAndColumns has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
CellNumberFormatter.CellNumberFormatter.ctor (cyclomatic 26) main/SS/Format/CellNumberFormatter.cs:145— CellNumberFormatter.CellNumberFormatter.ctor has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SheetUtil.ToDataTable (cyclomatic 26) main/SS/Util/SheetUtil.cs:1082— SheetUtil.ToDataTable has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_Rst.XmlText.get (cyclomatic 26) OpenXmlFormats/Spreadsheet/SharedString/CT_Rst.cs:111— CT_Rst.XmlText.get has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_Font.Write (cyclomatic 26) OpenXmlFormats/Spreadsheet/Styles/CT_Font.cs:95— CT_Font.Write has cyclomatic complexity 26 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CT_Font.Clone (cyclomatic 26) OpenXmlFormats/Spreadsheet/Styles/CT_Font.cs:665— CT_Font.Clone has cyclomatic complexity 26 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CT_Style.Write (cyclomatic 26) OpenXmlFormats/Wordprocessing/Styles.cs:762— CT_Style.Write has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TrPrBase.Write (cyclomatic 26) OpenXmlFormats/Wordprocessing/Table.cs:3068— CT_TrPrBase.Write has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InternalWorkbook.CreateWorkbook (cyclomatic 25) main/HSSF/Model/InternalWorkbook.cs:169— InternalWorkbook.CreateWorkbook has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: InternalWorkbook.CreateExtendedFormat (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
CT_Shapetype.Parse (cyclomatic 25) OpenXmlFormats/Vml/Main.cs:3762— CT_Shapetype.Parse has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SectPr.Parse (cyclomatic 25) OpenXmlFormats/Wordprocessing/Paragraph.cs:3125— CT_SectPr.Parse has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: CT_PPrBase.IsEmpty.get (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
CT_SectPr.Write (cyclomatic 25) OpenXmlFormats/Wordprocessing/Paragraph.cs:3188— CT_SectPr.Write has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: CT_PPrBase.IsEmpty.get (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
CellNumberFormatter.Writeint (cyclomatic 24) main/SS/Format/CellNumberFormatter.cs:959— CellNumberFormatter.Writeint has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ZipPackage.GetPartsImpl (cyclomatic 24) openxml4Net/OPC/ZipPackage.cs:180— ZipPackage.GetPartsImpl has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_Shape.Parse (cyclomatic 24) OpenXmlFormats/Vml/Main.cs:639— CT_Shape.Parse has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SdtPr.Parse (cyclomatic 24) OpenXmlFormats/Wordprocessing/Sdt.cs:1832— CT_SdtPr.Parse has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TableRow.initCells (cyclomatic 24) scratchpad/HWPF/UserModel/TableRow.cs:51— TableRow.initCells has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HSSFOptimiser.OptimiseFonts (cyclomatic 23) main/HSSF/UserModel/HSSFOptimiser.cs:47— HSSFOptimiser.OptimiseFonts has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DatePartHandler.HandlePart (cyclomatic 23) main/SS/Format/CellDateFormatter.cs:64— DatePartHandler.HandlePart has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Index.GetValueFromArea (cyclomatic 23) main/SS/Formula/Functions/Index.cs:196— Index.GetValueFromArea has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WorkbookEvaluator.GetEvalForPtg (cyclomatic 23) main/SS/Formula/WorkbookEvaluator.cs:903— WorkbookEvaluator.GetEvalForPtg has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DataFormatter.cleanFormatForNumber (cyclomatic 23) main/SS/UserModel/DataFormatter.cs:724— DataFormatter.cleanFormatForNumber has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Properties.Load (cyclomatic 23) main/Util/Collections/Properties.cs:143— Properties.Load has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_SharedItems.Parse (cyclomatic 23) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1768— CT_SharedItems.Parse has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Table.Parse (cyclomatic 23) OpenXmlFormats/Spreadsheet/Sheet/CT_Table.cs:103— CT_Table.Parse has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PAPBinTable.Rebuild (cyclomatic 23) scratchpad/HWPF/Model/PAPBinTable.cs:146— PAPBinTable.Rebuild has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HSSFCell.SetCellType (cyclomatic 22) main/HSSF/UserModel/HSSFCell.cs:257— HSSFCell.SetCellType has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CellFormat.GetApplicableFormatPart (cyclomatic 22) main/SS/Format/CellFormat.cs:343— CellFormat.GetApplicableFormatPart has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WorkbookEvaluator.EvaluateAny (cyclomatic 22) main/SS/Formula/WorkbookEvaluator.cs:399— WorkbookEvaluator.EvaluateAny has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TableStyleTypeExtension.GetRange (cyclomatic 22) main/SS/UserModel/TableStyleType.cs:90— TableStyleTypeExtension.GetRange has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ExcelToHtmlConverter.ProcessRow (cyclomatic 22) ooxml/SS/Converter/ExcelToHtmlConverter.cs:313— ExcelToHtmlConverter.ProcessRow has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFExcelExtractor.Text.get (cyclomatic 22) ooxml/XSSF/Extractor/XSSFExcelExtractor.cs:193— XSSFExcelExtractor.Text.get has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFRichTextString.ToCTFont (cyclomatic 22) ooxml/XSSF/UserModel/XSSFRichTextString.cs:577— XSSFRichTextString.ToCTFont has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
XSSFSimpleShape.GetBulletPrefix (cyclomatic 22) ooxml/XSSF/UserModel/XSSFSimpleShape.cs:341— XSSFSimpleShape.GetBulletPrefix has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
XWPFDocument.OnDocumentRead (cyclomatic 22) ooxml/XWPF/Usermodel/XWPFDocument.cs:98— XWPFDocument.OnDocumentRead has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Workbook.Parse (cyclomatic 22) OpenXmlFormats/Spreadsheet/Workbook/CT_Workbook.cs:61— CT_Workbook.Parse has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SectPrBase.Parse (cyclomatic 22) OpenXmlFormats/Wordprocessing/Paragraph.cs:2240— CT_SectPrBase.Parse has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: CT_PPrBase.IsEmpty.get (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
InternalChart.InternalChart.ctor (cyclomatic 21) main/HSSF/Model/InternalChart.cs:34— InternalChart.InternalChart.ctor has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DateUtil.IsADateFormat (cyclomatic 21) main/SS/UserModel/DateUtil.cs:627— DateUtil.IsADateFormat has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFRichTextString.SetRunAttributes (cyclomatic 21) ooxml/XSSF/UserModel/XSSFRichTextString.cs:326— XSSFRichTextString.SetRunAttributes has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Workbook.Write (cyclomatic 21) OpenXmlFormats/Spreadsheet/Workbook/CT_Workbook.cs:113— CT_Workbook.Write has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Shape.Write (cyclomatic 21) OpenXmlFormats/Vml/Main.cs:720— CT_Shape.Write has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TblPr.Parse (cyclomatic 21) OpenXmlFormats/Wordprocessing/Table.cs:2782— CT_TblPr.Parse has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TextListener.ProcessRecord (cyclomatic 20) main/HSSF/Extractor/EventBasedExcelExtractor.cs:183— TextListener.ProcessRecord has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
InternalWorkbook.FindDrawingGroup (cyclomatic 20) main/HSSF/Model/InternalWorkbook.cs:2696— InternalWorkbook.FindDrawingGroup has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: InternalWorkbook.CreateExtendedFormat (cyclomatic 27) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
CellUtil.CopyCell (cyclomatic 20) main/SS/Util/CellUtil.cs:132— CellUtil.CopyCell has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFSheet.SetRepeatingRowsAndColumns (cyclomatic 20) ooxml/XSSF/UserModel/XSSFSheet.cs:6145— XSSFSheet.SetRepeatingRowsAndColumns has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_CacheHierarchy.Parse (cyclomatic 20) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:6363— CT_CacheHierarchy.Parse has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SectPrBase.Write (cyclomatic 20) OpenXmlFormats/Wordprocessing/Paragraph.cs:2295— CT_SectPrBase.Write has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: CT_PPrBase.IsEmpty.get (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
CT_TblPrBase.Parse (cyclomatic 20) OpenXmlFormats/Wordprocessing/Table.cs:1190— CT_TblPrBase.Parse has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_TcPr.Parse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_TcPr.Parse (cyclomatic 20) OpenXmlFormats/Wordprocessing/Table.cs:4746— CT_TcPr.Parse has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_TblPrBase.Parse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
RecordFactoryInputStream.ReadNextRecord (cyclomatic 19) main/HSSF/Record/RecordFactoryInputStream.cs:332— RecordFactoryInputStream.ReadNextRecord has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HSSFShapeFactory.CreateShapeTree (cyclomatic 19) main/HSSF/UserModel/HSSFShapeFactory.cs:38— HSSFShapeFactory.CreateShapeTree has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HSSFSheet.ShiftRows (cyclomatic 19) main/HSSF/UserModel/HSSFSheet.cs:1544— HSSFSheet.ShiftRows has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CellNumberFormatter.WriteFraction (cyclomatic 19) main/SS/Format/CellNumberFormatter.cs:792— CellNumberFormatter.WriteFraction has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FormulaRenderer.ToFormulaString (cyclomatic 19) main/SS/Formula/FormulaRenderer.cs:44— FormulaRenderer.ToFormulaString has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LinearRegressionFunction.EvaluateInternal (cyclomatic 19) main/SS/Formula/Functions/LinearRegressionFunction.cs:159— LinearRegressionFunction.EvaluateInternal has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DataFormatter.GetFormat (cyclomatic 19) main/SS/UserModel/DataFormatter.cs:319— DataFormatter.GetFormat has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Arrays.DeepEquals0 (cyclomatic 19) main/Util/Arrays.cs:700— Arrays.DeepEquals0 has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
XDDFTextBody.RetrieveProperties (cyclomatic 19) ooxml/XDDF/UserModel/Text/XDDFTextBody.cs:590— XDDFTextBody.RetrieveProperties has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFSheetXMLHandler.CheckForEmptyCellComments (cyclomatic 19) ooxml/XSSF/EventUserModel/XSSFSheetXMLHandler.cs:484— XSSFSheetXMLHandler.CheckForEmptyCellComments has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StylesTable.WriteTo (cyclomatic 19) ooxml/XSSF/Model/StylesTable.cs:826— StylesTable.WriteTo has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFWorkbook.OnDocumentRead (cyclomatic 19) ooxml/XSSF/UserModel/XSSFWorkbook.cs:313— XSSFWorkbook.OnDocumentRead has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_BubbleSer.Write (cyclomatic 19) OpenXmlFormats/Drawing/Chart/BubbleChart.cs:206— CT_BubbleSer.Write has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TextBodyProperties.Write (cyclomatic 19) OpenXmlFormats/Drawing/Text.cs:678— CT_TextBodyProperties.Write has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_MailMerge.Parse (cyclomatic 19) OpenXmlFormats/Wordprocessing/Settings.cs:2964— CT_MailMerge.Parse has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TblPr.Write (cyclomatic 19) OpenXmlFormats/Wordprocessing/Table.cs:2831— CT_TblPr.Write has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TcPrInner.Parse (cyclomatic 19) OpenXmlFormats/Wordprocessing/Table.cs:4205— CT_TcPrInner.Parse has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HSSFCellUtil.CopyCell (cyclomatic 18) main/HSSF/Util/HSSFCellUtil.cs:74— HSSFCellUtil.CopyCell has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArrayFunction._evaluateTwoArrayArgs (cyclomatic 18) main/SS/Formula/Functions/ArrayFunction.cs:65— ArrayFunction._evaluateTwoArrayArgs has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Complex.Evaluate (cyclomatic 18) main/SS/Formula/Functions/Complex.cs:50— Complex.Evaluate has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DStarRunner.testNormalCondition (cyclomatic 18) main/SS/Formula/Functions/DStarRunner.cs:327— DStarRunner.testNormalCondition has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OperationEvaluationContext.GetDynamicReference (cyclomatic 18) main/SS/Formula/OperationEvaluationContext.cs:229— OperationEvaluationContext.GetDynamicReference has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
SheetUtil.CopyRow (cyclomatic 18) main/SS/Util/SheetUtil.cs:183— SheetUtil.CopyRow has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
EmbeddedExtractor.ExtractAll (cyclomatic 18) ooxml/XSSF/Extractor/EmbeddedExtractor.cs:103— EmbeddedExtractor.ExtractAll has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFSimpleShape.ProcessAutoNumGroup (cyclomatic 18) ooxml/XSSF/UserModel/XSSFSimpleShape.cs:254— XSSFSimpleShape.ProcessAutoNumGroup has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_BarSer.Write (cyclomatic 18) OpenXmlFormats/Drawing/Chart/BarChart.cs:553— CT_BarSer.Write has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ScatterSer.Write (cyclomatic 18) OpenXmlFormats/Drawing/Chart/ScatterChart.cs:96— CT_ScatterSer.Write has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_PivotTableDefinition.Write (cyclomatic 18) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:190— CT_PivotTableDefinition.Write has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RPrElt.Parse (cyclomatic 18) OpenXmlFormats/Spreadsheet/SharedString/CT_RPrElt.cs:35— CT_RPrElt.Parse has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Font.Parse (cyclomatic 18) OpenXmlFormats/Spreadsheet/Styles/CT_Font.cs:42— CT_Font.Parse has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TblPrBase.Write (cyclomatic 18) OpenXmlFormats/Wordprocessing/Table.cs:1237— CT_TblPrBase.Write has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_TcPr.Write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_TrPr.Parse (cyclomatic 18) OpenXmlFormats/Wordprocessing/Table.cs:3956— CT_TrPr.Parse has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TcPr.Write (cyclomatic 18) OpenXmlFormats/Wordprocessing/Table.cs:4797— CT_TcPr.Write has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_TblPrBase.Write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Section.Section.ctor (cyclomatic 17) main/HPSF/Section.cs:119— Section.Section.ctor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OldExcelExtractor.Text.get (cyclomatic 17) main/HSSF/Extractor/OldExcelExtractor.cs:237— OldExcelExtractor.Text.get has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ChartFormatsAggregate.ChartFormatsAggregate.ctor (cyclomatic 17) main/HSSF/Record/Aggregates/Chart/ChartFormatsAggregate.cs:55— ChartFormatsAggregate.ChartFormatsAggregate.ctor has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
HSSFChart.GetSheetCharts (cyclomatic 17) main/HSSF/UserModel/HSSFChart.cs:144— HSSFChart.GetSheetCharts has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CellNumberPartHandler.HandlePart (cyclomatic 17) main/SS/Format/CellNumberPartHandler.cs:39— CellNumberPartHandler.HandlePart has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
FormulaParser.ParseSimpleRangePart (cyclomatic 17) main/SS/Formula/FormulaParser.cs:1207— FormulaParser.ParseSimpleRangePart has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PercentRank.calculateRank (cyclomatic 17) main/SS/Formula/Functions/PercentRank.cs:90— PercentRank.calculateRank has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
OperandClassTransformer.TransformNode (cyclomatic 17) main/SS/Formula/OperandClassTransformer.cs:93— OperandClassTransformer.TransformNode has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DataFormatter.CreateFormat (cyclomatic 17) main/SS/UserModel/DataFormatter.cs:432— DataFormatter.CreateFormat has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CellReferenceParser.TryParse (cyclomatic 17) main/SS/Util/CellReferenceParser.cs:62— CellReferenceParser.TryParse has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SheetUtil.CopyRow (cyclomatic 17) main/SS/Util/SheetUtil.cs:92— SheetUtil.CopyRow has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFExportToXml.ExportToXML (cyclomatic 17) REDACTED:97— XSSFExportToXml.ExportToXML has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StylesTable.ReadFrom (cyclomatic 17) ooxml/XSSF/Model/StylesTable.cs:293— StylesTable.ReadFrom has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
XSSFSheet.CopyColumn (cyclomatic 17) ooxml/XSSF/UserModel/XSSFSheet.cs:4161— XSSFSheet.CopyColumn has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFSimpleShape.ApplyAttributes (cyclomatic 17) ooxml/XSSF/UserModel/XSSFSimpleShape.cs:990— XSSFSimpleShape.ApplyAttributes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFTextParagraph.IsBullet.set (cyclomatic 17) ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1003— XSSFTextParagraph.IsBullet.set has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (XSSFTextParagraph.SetBullet) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
XSSFTextParagraph.SetBullet (cyclomatic 17) ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1063— XSSFTextParagraph.SetBullet has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (XSSFTextParagraph.IsBullet.set) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
XWPFRun._getText (cyclomatic 17) REDACTED:652— XWPFRun._getText has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_AreaSer.Write (cyclomatic 17) OpenXmlFormats/Drawing/Chart/AreaChart.cs:292— CT_AreaSer.Write has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_BarSer.Parse (cyclomatic 17) OpenXmlFormats/Drawing/Chart/BarChart.cs:509— CT_BarSer.Parse has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_BubbleSer.Parse (cyclomatic 17) OpenXmlFormats/Drawing/Chart/BubbleChart.cs:161— CT_BubbleSer.Parse has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_LineSer.Write (cyclomatic 17) OpenXmlFormats/Drawing/Chart/LineChart.cs:92— CT_LineSer.Write has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Stroke.Parse (cyclomatic 17) OpenXmlFormats/Vml/Main.cs:2598— CT_Stroke.Parse has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_MailMerge.Write (cyclomatic 17) OpenXmlFormats/Wordprocessing/Settings.cs:3009— CT_MailMerge.Write has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TcPrInner.Write (cyclomatic 17) OpenXmlFormats/Wordprocessing/Table.cs:4250— CT_TcPrInner.Write has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TextRulerAtom.Read (cyclomatic 17) scratchpad/HSLF/Record/TextRulerAtom.cs:111— TextRulerAtom.Read has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Property.ToString (cyclomatic 16) main/HPSF/Property.cs:499— Property.ToString has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HSSFChart.RemoveSeries (cyclomatic 16) main/HSSF/UserModel/HSSFChart.cs:1346— HSSFChart.RemoveSeries has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DocumentFactoryHelper.ScanForPassword (cyclomatic 16) main/POIFS/FileSystem/DocumentFactoryHelper.cs:174— DocumentFactoryHelper.ScanForPassword has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CellGeneralFormatter.FormatValue (cyclomatic 16) main/SS/Format/CellGeneralFormatter.cs:52— CellGeneralFormatter.FormatValue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RelationalOperationEval.DoCompare (cyclomatic 16) main/SS/Formula/Eval/RelationalOperationEval/RelationalOperationEval.cs:40— RelationalOperationEval.DoCompare has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StringMatcher.GetWildCardPattern (cyclomatic 16) main/SS/Formula/Functions/Countif.cs:469— StringMatcher.GetWildCardPattern has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Indirect.ParseWorkbookAndSheetName (cyclomatic 16) main/SS/Formula/Functions/Indirect.cs:177— Indirect.ParseWorkbookAndSheetName has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
LookupUtils.BinarySearchIndexOfValue (cyclomatic 16) main/SS/Formula/Functions/LookupUtils.cs:500— LookupUtils.BinarySearchIndexOfValue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WorkbookUtil.CreateSafeSheetName (cyclomatic 16) main/SS/Util/WorkbookUtil.cs:56— WorkbookUtil.CreateSafeSheetName has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Arrays.DeepToString (cyclomatic 16) main/Util/Arrays.cs:1012— Arrays.DeepToString has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BigInteger.BigInteger.ctor (cyclomatic 16) main/Util/BigInteger.cs:212— BigInteger.BigInteger.ctor has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BigInteger.ShiftRight (cyclomatic 16) main/Util/BigInteger.cs:1339— BigInteger.ShiftRight has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IdentifierManager.Reserve (cyclomatic 16) ooxml/Util/IdentifierManager.cs:75— IdentifierManager.Reserve has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IdentifierManager.Release (cyclomatic 16) ooxml/Util/IdentifierManager.cs:178— IdentifierManager.Release has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SheetDataWriter.OutputQuotedString (cyclomatic 16) ooxml/XSSF/Streaming/SheetDataWriter.cs:396— SheetDataWriter.OutputQuotedString has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
XSSFCellBorder.GetBorder (cyclomatic 16) ooxml/XSSF/UserModel/Extensions/XSSFCellBorder.cs:174— XSSFCellBorder.GetBorder has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFCell.SetCellType (cyclomatic 16) ooxml/XSSF/UserModel/XSSFCell.cs:1082— XSSFCell.SetCellType has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFDataValidationHelper.CreateValidation (cyclomatic 16) ooxml/XSSF/UserModel/XSSFDataValidationHelper.cs:124— XSSFDataValidationHelper.CreateValidation has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFSheet.Write (cyclomatic 16) ooxml/XSSF/UserModel/XSSFSheet.cs:1669— XSSFSheet.Write has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XSSFSheet.CopyCell (cyclomatic 16) ooxml/XSSF/UserModel/XSSFSheet.cs:6363— XSSFSheet.CopyCell has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XWPFParagraph.NumLevelText.get (cyclomatic 16) ooxml/XWPF/Usermodel/XWPFParagraph.cs:400— XWPFParagraph.NumLevelText.get has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XWPFPictureData.Equals (cyclomatic 16) ooxml/XWPF/Usermodel/XWPFPictureData.cs:205— XWPFPictureData.Equals has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
XWPFSettings.SetEnforcementEditValue (cyclomatic 16) ooxml/XWPF/Usermodel/XWPFSettings.cs:184— XWPFSettings.SetEnforcementEditValue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CT_LineSer.Parse (cyclomatic 16) OpenXmlFormats/Drawing/Chart/LineChart.cs:50— CT_LineSer.Parse has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_OfPieChart.Write (cyclomatic 16) OpenXmlFormats/Drawing/Chart/PieChart.cs:1017— CT_OfPieChart.Write has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ScatterSer.Parse (cyclomatic 16) OpenXmlFormats/Drawing/Chart/ScatterChart.cs:53— CT_ScatterSer.Parse has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TextBodyProperties.Parse (cyclomatic 16) OpenXmlFormats/Drawing/Text.cs:618— CT_TextBodyProperties.Parse has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SharedItems.Write (cyclomatic 16) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1840— CT_SharedItems.Write has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_CacheField.Parse (cyclomatic 16) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2237— CT_CacheField.Parse has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_PivotHierarchy.Parse (cyclomatic 16) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:5877— CT_PivotHierarchy.Parse has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RPrElt.Write (cyclomatic 16) OpenXmlFormats/Spreadsheet/SharedString/CT_RPrElt.cs:78— CT_RPrElt.Write has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Lvl.Parse (cyclomatic 16) OpenXmlFormats/Wordprocessing/Numbering.cs:1306— CT_Lvl.Parse has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Lvl.Write (cyclomatic 16) OpenXmlFormats/Wordprocessing/Numbering.cs:1350— CT_Lvl.Write has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WordToFoUtils.SetCharactersProperties (cyclomatic 16) scratchpad/HWPF/Converter/WordToFoUtils.cs:63— WordToFoUtils.SetCharactersProperties has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WordToHtmlConverter.ProcessTable (cyclomatic 16) scratchpad/HWPF/Converter/WordToHtmlConverter.cs:471— WordToHtmlConverter.ProcessTable has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
HWPFDocument.HWPFDocument.ctor (cyclomatic 16) scratchpad/HWPF/HWPFDocument.cs:175— HWPFDocument.HWPFDocument.ctor has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Form1.RecursiveRun (cyclomatic 16) tools/XmlSerializationCodeGenerator/Form1.cs:57— Form1.RecursiveRun has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Form1.GetXmlAttributePrefix (cyclomatic 16) tools/XmlSerializationCodeGenerator/Form1.cs:446— Form1.GetXmlAttributePrefix has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Form1.GetXmlPrefix) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Form1.GetXmlPrefix (cyclomatic 16) tools/XmlSerializationCodeGenerator/Form1.cs:511— Form1.GetXmlPrefix has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (Form1.GetXmlAttributePrefix) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Hotspot: main/SS/UserModel/ExcelStyleDateFormatter.cs main/SS/UserModel/ExcelStyleDateFormatter.cs:130— main/SS/UserModel/ExcelStyleDateFormatter.cs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in ExcelStyleDateFormatter.Format at line 130. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-09..2026-10-07, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-09 22:35:16 +08:00' --until='2026-10-07 22:35:16 +08:00' --full-history --no-merges -- main/SS/UserModel/ExcelStyleDateFormatter.cs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D17 · Explicit Debt· BareSuppressMessage repeated 76 times in one file · ×1
BareSuppressMessage repeated 76 times in one file main/GlobalSuppressions.cs:13— The identical BareSuppressMessage (`System.Diagnostics.CodeAnalysis.SuppressMessage`) appears 76 times in one file — one decision applied repeatedly (e.g. the same rule silenced on every overload of a fluent API), not 76 independent debts. Decide it once — at the type or project level, or by fixing the underlying pattern — rather than occurrence-by-occurrence. (Every occurrence still counts toward the score and metrics.)
Build failed — The target solution did not build cleanly (errors: 1), which caps Solution Shape at 3/10 — the most basic shape signal is that it compiles. First errors: CS0246: The type or namespace name 'NPOI' could not be found (are you missing a using directive or an assembly reference?).
D18 · Solution Shape· Solution references a project that does not exist · ×1
Solution references a project that does not exist scratchpad/NPOI.ScratchPad.sln— `scratchpad/NPOI.ScratchPad.sln` declares 1 project file(s) that are missing from the tree (`TestCases/scratchpad/TestCases.csproj`). A solution-level restore or build fails on a dangling reference, so anyone building the solution rather than an individual project is blocked. Delete the stale entry from the solution, or restore the missing project file.
Form1.button2_Click (cognitive 134) tools/XmlSerializationCodeGenerator/Form1.cs:111— Form1.button2_Click has cognitive complexity 134 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_ParaRPrOriginal.Write (cognitive 121) OpenXmlFormats/Wordprocessing/Paragraph.cs:5654— CT_ParaRPrOriginal.Write has cognitive complexity 121 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SharedStringsTable.ReadFromStreamViaXmlReader (cognitive 117) ooxml/XSSF/Model/SharedStringsTable.cs:249— SharedStringsTable.ReadFromStreamViaXmlReader has cognitive complexity 117 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_RPrOriginal.Write (cognitive 117) OpenXmlFormats/Wordprocessing/Paragraph.cs:7435— CT_RPrOriginal.Write has cognitive complexity 117 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
AbstractWordConverter.ProcessCharacters (cognitive 116) scratchpad/HWPF/Converter/AbstractWordConverter.cs:223— AbstractWordConverter.ProcessCharacters has cognitive complexity 116 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
WorkbookEvaluator.EvaluateFormula (cognitive 110) main/SS/Formula/WorkbookEvaluator.cs:572— WorkbookEvaluator.EvaluateFormula has cognitive complexity 110 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CT_Settings.Write (cognitive 105) OpenXmlFormats/Wordprocessing/Settings.cs:234— CT_Settings.Write has cognitive complexity 105 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Settings.Parse (cognitive 100) OpenXmlFormats/Wordprocessing/Settings.cs:19— CT_Settings.Parse has cognitive complexity 100 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FormulaParser.ParseStructuredReference (cognitive 96) main/SS/Formula/FormulaParser.cs:701— FormulaParser.ParseStructuredReference has cognitive complexity 96 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
OperatorEnumHelper.IsValid (cognitive 83) main/SS/Formula/EvaluationConditionalFormatRule.cs:26— OperatorEnumHelper.IsValid has cognitive complexity 83 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Properties.Load (cognitive 80) main/Util/Collections/Properties.cs:143— Properties.Load has cognitive complexity 80 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ExcelExtractor.Text.get (cognitive 78) main/HSSF/Extractor/ExcelExtractor.cs:148— ExcelExtractor.Text.get has cognitive complexity 78 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_PivotTableDefinition.Parse (cognitive 77) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:18— CT_PivotTableDefinition.Parse has cognitive complexity 77 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CharacterSprmCompressor.CompressCharacterProperty (cognitive 77) scratchpad/HWPF/SPRM/CharacterSprmCompressor.cs:31— CharacterSprmCompressor.CompressCharacterProperty has cognitive complexity 77 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ParagraphSprmCompressor.CompressParagraphProperty (cognitive 75) scratchpad/HWPF/SPRM/ParagraphSprmCompressor.cs:32— ParagraphSprmCompressor.CompressParagraphProperty has cognitive complexity 75 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
HSSFOptimiser.OptimiseCellStyles (cognitive 72) main/HSSF/UserModel/HSSFOptimiser.cs:195— HSSFOptimiser.OptimiseCellStyles has cognitive complexity 72 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFExcelExtractor.Text.get (cognitive 72) ooxml/XSSF/Extractor/XSSFExcelExtractor.cs:193— XSSFExcelExtractor.Text.get has cognitive complexity 72 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
EscherDump.DumpOld (cognitive 68) main/DDF/EscherDump.cs:67— EscherDump.DumpOld has cognitive complexity 68 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_Compat.Parse (cognitive 68) OpenXmlFormats/Wordprocessing/Settings.cs:4891— CT_Compat.Parse has cognitive complexity 68 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Rst.XmlText.get (cognitive 67) OpenXmlFormats/Spreadsheet/SharedString/CT_Rst.cs:111— CT_Rst.XmlText.get has cognitive complexity 67 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InternalSheet.InternalSheet.ctor (cognitive 66) main/HSSF/Model/InternalSheet.cs:206— InternalSheet.InternalSheet.ctor has cognitive complexity 66 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CellNumberFormatter.FormatValue (cognitive 65) main/SS/Format/CellNumberFormatter.cs:533— CellNumberFormatter.FormatValue has cognitive complexity 65 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_Compat.Write (cognitive 65) OpenXmlFormats/Wordprocessing/Settings.cs:5034— CT_Compat.Write has cognitive complexity 65 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SectionSprmCompressor.CompressSectionProperty (cognitive 65) scratchpad/HWPF/SPRM/SectionSprmCompressor.cs:36— SectionSprmCompressor.CompressSectionProperty has cognitive complexity 65 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CT_R.Write (cognitive 62) OpenXmlFormats/Wordprocessing/Run.cs:724— CT_R.Write has cognitive complexity 62 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PackagePartName.CheckPCharCompliance (cognitive 61) openxml4Net/OPC/PackagePartName.cs:291— PackagePartName.CheckPCharCompliance has cognitive complexity 61 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FormulaParser.ParseRangeable (cognitive 59) main/SS/Formula/FormulaParser.cs:511— FormulaParser.ParseRangeable has cognitive complexity 59 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DataFormatter.CreateDateFormat (cognitive 59) main/SS/UserModel/DataFormatter.cs:555— DataFormatter.CreateDateFormat has cognitive complexity 59 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CellNumberFormatter.CellNumberFormatter.ctor (cognitive 58) main/SS/Format/CellNumberFormatter.cs:145— CellNumberFormatter.CellNumberFormatter.ctor has cognitive complexity 58 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
EvaluationConditionalFormatRule.CheckFilter (cognitive 58) main/SS/Formula/EvaluationConditionalFormatRule.cs:550— EvaluationConditionalFormatRule.CheckFilter has cognitive complexity 58 (threshold 15). Of this number, 29 points are the body's own statements and 29 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChartRecordAggregate.WriteStartBlock (cognitive 57) main/HSSF/Record/Aggregates/Chart/ChartRecordAggregate.cs:104— ChartRecordAggregate.WriteStartBlock has cognitive complexity 57 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_P.Write (cognitive 56) OpenXmlFormats/Wordprocessing/Paragraph.cs:289— CT_P.Write has cognitive complexity 56 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
InternalWorkbook.FindDrawingGroup (cognitive 54) main/HSSF/Model/InternalWorkbook.cs:2696— InternalWorkbook.FindDrawingGroup has cognitive complexity 54 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
HSSFOptimiser.OptimiseFonts (cognitive 54) main/HSSF/UserModel/HSSFOptimiser.cs:47— HSSFOptimiser.OptimiseFonts has cognitive complexity 54 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Value.ConvertTextToNumber (cognitive 53) main/SS/Formula/Functions/Value.cs:59— Value.ConvertTextToNumber has cognitive complexity 53 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_Body.Write (cognitive 53) OpenXmlFormats/Wordprocessing/Document.cs:365— CT_Body.Write has cognitive complexity 53 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_FtnEdn.Write (cognitive 52) OpenXmlFormats/Wordprocessing/HdrFtr.cs:1047— CT_FtnEdn.Write has cognitive complexity 52 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RunTrackChange.Parse (cognitive 52) OpenXmlFormats/Wordprocessing/Run.cs:2079— CT_RunTrackChange.Parse has cognitive complexity 52 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CHPBinTable.Rebuild (cognitive 52) scratchpad/HWPF/Model/CHPBinTable.cs:110— CHPBinTable.Rebuild has cognitive complexity 52 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SheetUtil.ToDataTable (cognitive 51) main/SS/Util/SheetUtil.cs:1082— SheetUtil.ToDataTable has cognitive complexity 51 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_PivotField.Parse (cognitive 51) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:2139— CT_PivotField.Parse has cognitive complexity 51 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RunTrackChange.Write (cognitive 51) OpenXmlFormats/Wordprocessing/Run.cs:2335— CT_RunTrackChange.Write has cognitive complexity 51 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Tbl.Write (cognitive 50) OpenXmlFormats/Wordprocessing/Table.cs:279— CT_Tbl.Write has cognitive complexity 50 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CT_Tbl.Parse (cognitive 49) OpenXmlFormats/Wordprocessing/Table.cs:43— CT_Tbl.Parse has cognitive complexity 49 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
VariantSupport.Write (cognitive 48) main/HPSF/VariantSupport.cs:266— VariantSupport.Write has cognitive complexity 48 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DStarRunner.testNormalCondition (cognitive 48) main/SS/Formula/Functions/DStarRunner.cs:327— DStarRunner.testNormalCondition has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XSSFSheetXMLHandler.StartElement (cognitive 48) ooxml/XSSF/EventUserModel/XSSFSheetXMLHandler.cs:194— XSSFSheetXMLHandler.StartElement has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XSSFExportToXml.ExportToXML (cognitive 48) REDACTED:97— XSSFExportToXml.ExportToXML has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SXSSFWorkbook.CopyStreamAndInjectWorksheet (cognitive 48) ooxml/XSSF/Streaming/SXSSFWorkbook.cs:507— SXSSFWorkbook.CopyStreamAndInjectWorksheet has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XWPFParagraph.XWPFParagraph.ctor (cognitive 48) ooxml/XWPF/Usermodel/XWPFParagraph.cs:53— XWPFParagraph.XWPFParagraph.ctor has cognitive complexity 48 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PackagingUriHelper.RelativizeUri (cognitive 48) openxml4Net/OPC/PackagingUriHelper.cs:284— PackagingUriHelper.RelativizeUri has cognitive complexity 48 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_Shapetype.Write (cognitive 48) OpenXmlFormats/Vml/Main.cs:3842— CT_Shapetype.Write has cognitive complexity 48 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CT_ParaRPr.Parse (cognitive 47) OpenXmlFormats/Wordprocessing/Paragraph.cs:1924— CT_ParaRPr.Parse has cognitive complexity 47 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RubyContent.Write (cognitive 47) OpenXmlFormats/Wordprocessing/Run.cs:1351— CT_RubyContent.Write has cognitive complexity 47 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HSSFChart.CreateSeries (cognitive 46) main/HSSF/UserModel/HSSFChart.cs:1193— HSSFChart.CreateSeries has cognitive complexity 46 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Index.GetValueFromArea (cognitive 46) main/SS/Formula/Functions/Index.cs:196— Index.GetValueFromArea has cognitive complexity 46 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XWPFParagraph.SearchText (cognitive 46) ooxml/XWPF/Usermodel/XWPFParagraph.cs:1420— XWPFParagraph.SearchText has cognitive complexity 46 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CT_ParaRPrOriginal.Parse (cognitive 46) OpenXmlFormats/Wordprocessing/Paragraph.cs:5516— CT_ParaRPrOriginal.Parse has cognitive complexity 46 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
PAPBinTable.Rebuild (cognitive 46) scratchpad/HWPF/Model/PAPBinTable.cs:146— PAPBinTable.Rebuild has cognitive complexity 46 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataFormatter.cleanFormatForNumber (cognitive 45) main/SS/UserModel/DataFormatter.cs:724— DataFormatter.cleanFormatForNumber has cognitive complexity 45 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ExcelToHtmlConverter.ProcessRow (cognitive 45) ooxml/SS/Converter/ExcelToHtmlConverter.cs:313— ExcelToHtmlConverter.ProcessRow has cognitive complexity 45 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFSheet.ShiftCommentsAndRows (cognitive 44) ooxml/XSSF/UserModel/XSSFSheet.cs:5646— XSSFSheet.ShiftCommentsAndRows has cognitive complexity 44 (threshold 15). Of this number, 43 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CT_ParaRPr.Write (cognitive 44) OpenXmlFormats/Wordprocessing/Paragraph.cs:2025— CT_ParaRPr.Write has cognitive complexity 44 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_R.Parse (cognitive 44) OpenXmlFormats/Wordprocessing/Run.cs:531— CT_R.Parse has cognitive complexity 44 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ArrayFunction._evaluateTwoArrayArgs (cognitive 43) main/SS/Formula/Functions/ArrayFunction.cs:65— ArrayFunction._evaluateTwoArrayArgs has cognitive complexity 43 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_Worksheet.Write (cognitive 43) OpenXmlFormats/Spreadsheet/Sheet/CT_Worksheet.cs:193— CT_Worksheet.Write has cognitive complexity 43 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RPr.Parse (cognitive 43) OpenXmlFormats/Wordprocessing/Paragraph.cs:4065— CT_RPr.Parse has cognitive complexity 43 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Ffn.Equals (cognitive 43) scratchpad/HWPF/Model/Ffn.cs:179— Ffn.Equals has cognitive complexity 43 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
OPCPackage.GetParts (cognitive 42) openxml4Net/OPC/OPCPackage.cs:789— OPCPackage.GetParts has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZipPackage.GetPartsImpl (cognitive 42) openxml4Net/OPC/ZipPackage.cs:180— ZipPackage.GetPartsImpl has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_Worksheet.Parse (cognitive 42) OpenXmlFormats/Spreadsheet/Sheet/CT_Worksheet.cs:95— CT_Worksheet.Parse has cognitive complexity 42 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_PPr.Parse (cognitive 42) OpenXmlFormats/Wordprocessing/Paragraph.cs:981— CT_PPr.Parse has cognitive complexity 42 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RPrOriginal.Parse (cognitive 42) OpenXmlFormats/Wordprocessing/Paragraph.cs:7305— CT_RPrOriginal.Parse has cognitive complexity 42 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LookupUtils.BinarySearchIndexOfValue (cognitive 41) main/SS/Formula/Functions/LookupUtils.cs:500— LookupUtils.BinarySearchIndexOfValue has cognitive complexity 41 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MissingRecordAwareHSSFListener.ProcessRecord (cognitive 40) main/HSSF/EventUserModel/MissingRecordAwareHSSFListener.cs:60— MissingRecordAwareHSSFListener.ProcessRecord has cognitive complexity 40 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CellGeneralFormatter.FormatValue (cognitive 40) main/SS/Format/CellGeneralFormatter.cs:52— CellGeneralFormatter.FormatValue has cognitive complexity 40 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XSSFSheetXMLHandler.EndElement (cognitive 40) ooxml/XSSF/EventUserModel/XSSFSheetXMLHandler.cs:326— XSSFSheetXMLHandler.EndElement has cognitive complexity 40 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_RPr.Write (cognitive 40) OpenXmlFormats/Wordprocessing/Paragraph.cs:4158— CT_RPr.Write has cognitive complexity 40 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EvaluationCache.NotifyUpdateCell (cognitive 39) main/SS/Formula/EvaluationCache.cs:50— EvaluationCache.NotifyUpdateCell has cognitive complexity 39 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
FormulaShifter.RowMoveAreaPtg (cognitive 39) main/SS/Formula/FormulaShifter.cs:664— FormulaShifter.RowMoveAreaPtg has cognitive complexity 39 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (FormulaShifter.ColumnMoveAreaPtg) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
FormulaShifter.ColumnMoveAreaPtg (cognitive 39) main/SS/Formula/FormulaShifter.cs:830— FormulaShifter.ColumnMoveAreaPtg has cognitive complexity 39 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (FormulaShifter.RowMoveAreaPtg) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
XSSFSheetXMLHandler.CheckForEmptyCellComments (cognitive 39) ooxml/XSSF/EventUserModel/XSSFSheetXMLHandler.cs:484— XSSFSheetXMLHandler.CheckForEmptyCellComments has cognitive complexity 39 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XSSFSheet.ShiftCommentsAndColumns (cognitive 39) ooxml/XSSF/UserModel/XSSFSheet.cs:5752— XSSFSheet.ShiftCommentsAndColumns has cognitive complexity 39 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CT_PPr.Write (cognitive 39) OpenXmlFormats/Wordprocessing/Paragraph.cs:1072— CT_PPr.Write has cognitive complexity 39 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_PPrBase.Parse (cognitive 39) OpenXmlFormats/Wordprocessing/Paragraph.cs:6247— CT_PPrBase.Parse has cognitive complexity 39 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
RLEDecompressingInputStream.ReadChunk (cognitive 38) main/Util/RLEDecompressingInputStream.cs:199— RLEDecompressingInputStream.ReadChunk has cognitive complexity 38 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExcelToHtmlConverter.BuildStyle (cognitive 38) ooxml/SS/Converter/ExcelToHtmlConverter.cs:692— ExcelToHtmlConverter.BuildStyle has cognitive complexity 38 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CT_P.Parse (cognitive 38) OpenXmlFormats/Wordprocessing/Paragraph.cs:62— CT_P.Parse has cognitive complexity 38 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CellNumberFormatter.Writeint (cognitive 37) main/SS/Format/CellNumberFormatter.cs:959— CellNumberFormatter.Writeint has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_SmartTagRun.Write (cognitive 37) OpenXmlFormats/Wordprocessing/CustomXml.cs:1482— CT_SmartTagRun.Write has cognitive complexity 37 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HSSFCell.SetCellType (cognitive 36) main/HSSF/UserModel/HSSFCell.cs:257— HSSFCell.SetCellType has cognitive complexity 36 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HSSFShape.Anchor.set (cognitive 36) main/HSSF/UserModel/HSSFShape.cs:151— HSSFShape.Anchor.set has cognitive complexity 36 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
HSSFCellUtil.CopyCell (cognitive 36) main/HSSF/Util/HSSFCellUtil.cs:74— HSSFCellUtil.CopyCell has cognitive complexity 36 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XSSFSheet.OnDeleteFormula (cognitive 36) ooxml/XSSF/UserModel/XSSFSheet.cs:1816— XSSFSheet.OnDeleteFormula has cognitive complexity 36 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CT_SmartTagRun.Parse (cognitive 36) OpenXmlFormats/Wordprocessing/CustomXml.cs:1304— CT_SmartTagRun.Parse has cognitive complexity 36 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_PPrBase.Write (cognitive 36) OpenXmlFormats/Wordprocessing/Paragraph.cs:6332— CT_PPrBase.Write has cognitive complexity 36 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SdtPr.Write (cognitive 36) OpenXmlFormats/Wordprocessing/Sdt.cs:1948— CT_SdtPr.Write has cognitive complexity 36 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Row.Parse (cognitive 36) OpenXmlFormats/Wordprocessing/Table.cs:5555— CT_Row.Parse has cognitive complexity 36 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HSSFChart.GetSheetCharts (cognitive 35) main/HSSF/UserModel/HSSFChart.cs:144— HSSFChart.GetSheetCharts has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HSSFChart.RemoveSeries (cognitive 35) main/HSSF/UserModel/HSSFChart.cs:1346— HSSFChart.RemoveSeries has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LinearRegressionFunction.EvaluateInternal (cognitive 35) main/SS/Formula/Functions/LinearRegressionFunction.cs:159— LinearRegressionFunction.EvaluateInternal has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XDDFRunProperties.SetFonts (cognitive 35) ooxml/XDDF/UserModel/Text/XDDFRunProperties.cs:253— XDDFRunProperties.SetFonts has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_Font.Write (cognitive 35) OpenXmlFormats/Spreadsheet/Styles/CT_Font.cs:95— CT_Font.Write has cognitive complexity 35 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CT_Font.Clone (cognitive 35) OpenXmlFormats/Spreadsheet/Styles/CT_Font.cs:665— CT_Font.Clone has cognitive complexity 35 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CT_CustomXmlRun.Parse (cognitive 35) OpenXmlFormats/Wordprocessing/CustomXml.cs:823— CT_CustomXmlRun.Parse has cognitive complexity 35 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SdtContentRun.Parse (cognitive 35) OpenXmlFormats/Wordprocessing/Sdt.cs:2246— CT_SdtContentRun.Parse has cognitive complexity 35 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Tc.Parse (cognitive 35) OpenXmlFormats/Wordprocessing/Table.cs:3384— CT_Tc.Parse has cognitive complexity 35 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WordToHtmlConverter.ProcessTable (cognitive 35) scratchpad/HWPF/Converter/WordToHtmlConverter.cs:471— WordToHtmlConverter.ProcessTable has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFExportToXml.GetComplexTypeNodeFromSchemaChildren (cognitive 34) REDACTED:574— XSSFExportToXml.GetComplexTypeNodeFromSchemaChildren has cognitive complexity 34 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CT_CustomXmlRun.Write (cognitive 34) OpenXmlFormats/Wordprocessing/CustomXml.cs:997— CT_CustomXmlRun.Write has cognitive complexity 34 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Body.Parse (cognitive 34) OpenXmlFormats/Wordprocessing/Document.cs:195— CT_Body.Parse has cognitive complexity 34 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_FtnEdn.Parse (cognitive 34) OpenXmlFormats/Wordprocessing/HdrFtr.cs:882— CT_FtnEdn.Parse has cognitive complexity 34 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SdtContentRun.Write (cognitive 34) OpenXmlFormats/Wordprocessing/Sdt.cs:2417— CT_SdtContentRun.Write has cognitive complexity 34 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TableRow.initCells (cognitive 34) scratchpad/HWPF/UserModel/TableRow.cs:51— TableRow.initCells has cognitive complexity 34 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HSSFRecordStream.GetNextRecord (cognitive 33) main/HSSF/EventUserModel/HSSFRecordStream.cs:128— HSSFRecordStream.GetNextRecord has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
InternalWorkbook.CloneDrawings (cognitive 33) main/HSSF/Model/InternalWorkbook.cs:523— InternalWorkbook.CloneDrawings has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CellFormat.GetApplicableFormatPart (cognitive 33) main/SS/Format/CellFormat.cs:343— CellFormat.GetApplicableFormatPart has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExcelToHtmlConverter.ProcessCell (cognitive 33) ooxml/SS/Converter/ExcelToHtmlConverter.cs:531— ExcelToHtmlConverter.ProcessCell has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFRowColShifter.UpdateConditionalFormatting (cognitive 33) ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:272— XSSFRowColShifter.UpdateConditionalFormatting has cognitive complexity 33 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XWPFParagraph.BuildRunsInOrderFromXml (cognitive 33) ooxml/XWPF/Usermodel/XWPFParagraph.cs:125— XWPFParagraph.BuildRunsInOrderFromXml has cognitive complexity 33 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CT_HdrFtr.Parse (cognitive 33) OpenXmlFormats/Wordprocessing/HdrFtr.cs:29— CT_HdrFtr.Parse has cognitive complexity 33 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Comment.Parse (cognitive 33) OpenXmlFormats/Wordprocessing/Markup.cs:310— CT_Comment.Parse has cognitive complexity 33 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Tc.Write (cognitive 33) OpenXmlFormats/Wordprocessing/Table.cs:3554— CT_Tc.Write has cognitive complexity 33 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LookupUtils.LookupIndexOfValue (cognitive 32) main/SS/Formula/Functions/LookupUtils.cs:454— LookupUtils.LookupIndexOfValue has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFSimpleShape.ProcessAutoNumGroup (cognitive 32) ooxml/XSSF/UserModel/XSSFSimpleShape.cs:254— XSSFSimpleShape.ProcessAutoNumGroup has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XWPFRun._getText (cognitive 32) REDACTED:652— XWPFRun._getText has cognitive complexity 32 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CT_PivotCacheDefinition.Parse (cognitive 32) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:16— CT_PivotCacheDefinition.Parse has cognitive complexity 32 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CT_CustomXmlRow.Parse (cognitive 32) OpenXmlFormats/Wordprocessing/CustomXml.cs:36— CT_CustomXmlRow.Parse has cognitive complexity 32 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (CT_CustomXmlBlock.Parse, CT_CustomXmlCell.Parse) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_CustomXmlBlock.Parse (cognitive 32) OpenXmlFormats/Wordprocessing/CustomXml.cs:1709— CT_CustomXmlBlock.Parse has cognitive complexity 32 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (CT_CustomXmlRow.Parse, CT_CustomXmlCell.Parse) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_CustomXmlCell.Parse (cognitive 32) OpenXmlFormats/Wordprocessing/CustomXml.cs:2141— CT_CustomXmlCell.Parse has cognitive complexity 32 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 2 other methods here (CT_CustomXmlRow.Parse, CT_CustomXmlBlock.Parse) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_HdrFtr.Write (cognitive 32) OpenXmlFormats/Wordprocessing/HdrFtr.cs:189— CT_HdrFtr.Write has cognitive complexity 32 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Comment.Write (cognitive 32) OpenXmlFormats/Wordprocessing/Markup.cs:475— CT_Comment.Write has cognitive complexity 32 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SdtContentBlock.Parse (cognitive 32) OpenXmlFormats/Wordprocessing/Sdt.cs:993— CT_SdtContentBlock.Parse has cognitive complexity 32 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Row.Write (cognitive 32) OpenXmlFormats/Wordprocessing/Table.cs:5723— CT_Row.Write has cognitive complexity 32 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
NPOIFSFileSystem.GetFreeBlock (cognitive 31) main/POIFS/FileSystem/NPOIFSFileSystem.cs:531— NPOIFSFileSystem.GetFreeBlock has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LookupUtils.LookupFirstIndexOfValue (cognitive 31) main/SS/Formula/Functions/LookupUtils.cs:679— LookupUtils.LookupFirstIndexOfValue has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (LookupUtils.LookupLastIndexOfValue) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
LookupUtils.LookupLastIndexOfValue (cognitive 31) main/SS/Formula/Functions/LookupUtils.cs:747— LookupUtils.LookupLastIndexOfValue has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (LookupUtils.LookupFirstIndexOfValue) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
HexDump.Dump (cognitive 31) main/Util/HexDump.cs:214— HexDump.Dump has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFSheet.RemoveOverwrittenRows (cognitive 31) ooxml/XSSF/UserModel/XSSFSheet.cs:5498— XSSFSheet.RemoveOverwrittenRows has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XWPFParagraph.NumLevelText.get (cognitive 31) ooxml/XWPF/Usermodel/XWPFParagraph.cs:400— XWPFParagraph.NumLevelText.get has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_CustomXmlRow.Write (cognitive 31) OpenXmlFormats/Wordprocessing/CustomXml.cs:194— CT_CustomXmlRow.Write has cognitive complexity 31 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_CustomXmlCell.Write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_CustomXmlBlock.Write (cognitive 31) OpenXmlFormats/Wordprocessing/CustomXml.cs:1868— CT_CustomXmlBlock.Write has cognitive complexity 31 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_CustomXmlCell.Write (cognitive 31) OpenXmlFormats/Wordprocessing/CustomXml.cs:2299— CT_CustomXmlCell.Write has cognitive complexity 31 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_CustomXmlRow.Write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_SdtContentCell.Parse (cognitive 31) OpenXmlFormats/Wordprocessing/Sdt.cs:47— CT_SdtContentCell.Parse has cognitive complexity 31 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_SdtContentRow.Parse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_SdtContentBlock.Write (cognitive 31) OpenXmlFormats/Wordprocessing/Sdt.cs:1149— CT_SdtContentBlock.Write has cognitive complexity 31 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SdtContentRow.Parse (cognitive 31) OpenXmlFormats/Wordprocessing/Sdt.cs:1494— CT_SdtContentRow.Parse has cognitive complexity 31 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_SdtContentCell.Parse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CellNumberFormatter.WriteFraction (cognitive 30) main/SS/Format/CellNumberFormatter.cs:792— CellNumberFormatter.WriteFraction has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BooleanFunction.Calculate (cognitive 30) main/SS/Formula/Functions/Boolean/BooleanFunction.cs:42— BooleanFunction.Calculate has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MultiOperandNumericFunction.CollectValues (cognitive 30) main/SS/Formula/Functions/MultiOperandNumericFunction.cs:138— MultiOperandNumericFunction.CollectValues has cognitive complexity 30 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
WorkbookEvaluator.EvaluateAny (cognitive 30) main/SS/Formula/WorkbookEvaluator.cs:399— WorkbookEvaluator.EvaluateAny has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Arrays.DeepToString (cognitive 30) main/Util/Arrays.cs:1012— Arrays.DeepToString has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
MutableBigInteger.divideMagnitude (cognitive 30) main/Util/BigInteger.cs:2783— MutableBigInteger.divideMagnitude has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
EmbeddedExtractor.ExtractAll (cognitive 30) ooxml/XSSF/Extractor/EmbeddedExtractor.cs:103— EmbeddedExtractor.ExtractAll has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFColumn.CopyColumnFrom (cognitive 30) ooxml/XSSF/UserModel/XSSFColumn.cs:481— XSSFColumn.CopyColumnFrom has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFRow.CopyRowFrom (cognitive 30) ooxml/XSSF/UserModel/XSSFRow.cs:467— XSSFRow.CopyRowFrom has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFSheet.CopySheetImages (cognitive 30) ooxml/XSSF/UserModel/XSSFSheet.cs:6220— XSSFSheet.CopySheetImages has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XSSFSheet.CopyCell (cognitive 30) ooxml/XSSF/UserModel/XSSFSheet.cs:6363— XSSFSheet.CopyCell has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XSSFTextParagraph.IsBullet.set (cognitive 30) ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1003— XSSFTextParagraph.IsBullet.set has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (XSSFTextParagraph.SetBullet) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
XSSFTextParagraph.SetBullet (cognitive 30) ooxml/XSSF/UserModel/XSSFTextParagraph.cs:1063— XSSFTextParagraph.SetBullet has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (XSSFTextParagraph.IsBullet.set) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
XWPFDocument.OnDocumentRead (cognitive 30) ooxml/XWPF/Usermodel/XWPFDocument.cs:98— XWPFDocument.OnDocumentRead has cognitive complexity 30 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CT_SdtContentCell.Write (cognitive 30) OpenXmlFormats/Wordprocessing/Sdt.cs:198— CT_SdtContentCell.Write has cognitive complexity 30 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_SdtContentRow.Write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_SdtContentRow.Write (cognitive 30) OpenXmlFormats/Wordprocessing/Sdt.cs:1645— CT_SdtContentRow.Write has cognitive complexity 30 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_SdtContentCell.Write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
EventRecordFactory.ProcessRecords (cognitive 29) main/HSSF/EventModel/EventRecordFactory.cs:95— EventRecordFactory.ProcessRecords has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ValidationEnum_LIST.IsValidValue (cognitive 29) main/SS/Formula/DataValidationEvaluator.cs:339— ValidationEnum_LIST.IsValidValue has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EvaluationConditionalFormatRule.CheckValue (cognitive 29) main/SS/Formula/EvaluationConditionalFormatRule.cs:433— EvaluationConditionalFormatRule.CheckValue has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FormulaRenderer.ToFormulaString (cognitive 29) main/SS/Formula/FormulaRenderer.cs:44— FormulaRenderer.ToFormulaString has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CellUtil.CopyCell (cognitive 29) main/SS/Util/CellUtil.cs:132— CellUtil.CopyCell has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFTable.GetCommonXpath (cognitive 29) ooxml/XSSF/UserModel/XSSFTable.cs:172— XSSFTable.GetCommonXpath has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CT_Stroke.Parse (cognitive 29) OpenXmlFormats/Vml/Main.cs:2598— CT_Stroke.Parse has cognitive complexity 29 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_RubyContent.Parse (cognitive 29) OpenXmlFormats/Wordprocessing/Run.cs:1210— CT_RubyContent.Parse has cognitive complexity 29 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TrPr.Write (cognitive 29) OpenXmlFormats/Wordprocessing/Table.cs:4035— CT_TrPr.Write has cognitive complexity 29 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WordToFoConverter.ProcessTable (cognitive 29) scratchpad/HWPF/Converter/WordToFoConverter.cs:450— WordToFoConverter.ProcessTable has cognitive complexity 29 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextListener.ProcessRecord (cognitive 28) main/HSSF/Extractor/EventBasedExcelExtractor.cs:183— TextListener.ProcessRecord has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HSSFSheet.ShiftRows (cognitive 28) main/HSSF/UserModel/HSSFSheet.cs:1544— HSSFSheet.ShiftRows has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IdentifierManager.Release (cognitive 28) ooxml/Util/IdentifierManager.cs:178— IdentifierManager.Release has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XDDFTextBody.RetrieveProperties (cognitive 28) ooxml/XDDF/UserModel/Text/XDDFTextBody.cs:590— XDDFTextBody.RetrieveProperties has cognitive complexity 28 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
XSSFWorkbook.OnDocumentRead (cognitive 28) ooxml/XSSF/UserModel/XSSFWorkbook.cs:313— XSSFWorkbook.OnDocumentRead has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_Style.Parse (cognitive 28) OpenXmlFormats/Wordprocessing/Styles.cs:697— CT_Style.Parse has cognitive complexity 28 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BaseObject.Clone (cognitive 28) scratchpad/HWPF/Model/BaseObject.cs:38— BaseObject.Clone has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RecordFactoryInputStream.ReadNextRecord (cognitive 27) main/HSSF/Record/RecordFactoryInputStream.cs:332— RecordFactoryInputStream.ReadNextRecord has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HSSFShapeFactory.CreateShapeTree (cognitive 27) main/HSSF/UserModel/HSSFShapeFactory.cs:38— HSSFShapeFactory.CreateShapeTree has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
VBAMacroReader.ReadMacros (cognitive 27) main/POIFS/Macros/VBAMacroReader.cs:344— VBAMacroReader.ReadMacros has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Indirect.ParseWorkbookAndSheetName (cognitive 27) main/SS/Formula/Functions/Indirect.cs:177— Indirect.ParseWorkbookAndSheetName has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PercentRank.calculateRank (cognitive 27) main/SS/Formula/Functions/PercentRank.cs:90— PercentRank.calculateRank has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
IdentifierManager.Reserve (cognitive 27) ooxml/Util/IdentifierManager.cs:75— IdentifierManager.Reserve has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFSheet.Write (cognitive 27) ooxml/XSSF/UserModel/XSSFSheet.cs:1669— XSSFSheet.Write has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFSimpleShape.ApplyAttributes (cognitive 27) ooxml/XSSF/UserModel/XSSFSimpleShape.cs:990— XSSFSimpleShape.ApplyAttributes has cognitive complexity 27 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Form1.RecursiveRun (cognitive 27) tools/XmlSerializationCodeGenerator/Form1.cs:57— Form1.RecursiveRun has cognitive complexity 27 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Section.Section.ctor (cognitive 26) main/HPSF/Section.cs:119— Section.Section.ctor has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InternalChart.InternalChart.ctor (cognitive 26) main/HSSF/Model/InternalChart.cs:34— InternalChart.InternalChart.ctor has cognitive complexity 26 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ChartRecordAggregate.WriteEndBlock (cognitive 26) main/HSSF/Record/Aggregates/Chart/ChartRecordAggregate.cs:409— ChartRecordAggregate.WriteEndBlock has cognitive complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
RecordInputStream.ReadStringCommon (cognitive 26) main/HSSF/Record/RecordInputStream.cs:437— RecordInputStream.ReadStringCommon has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Complex.Evaluate (cognitive 26) main/SS/Formula/Functions/Complex.cs:50— Complex.Evaluate has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DStarRunner.FullFillsConditions (cognitive 26) main/SS/Formula/Functions/DStarRunner.cs:255— DStarRunner.FullFillsConditions has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataFormatter.GetFormat (cognitive 26) main/SS/UserModel/DataFormatter.cs:319— DataFormatter.GetFormat has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SheetUtil.CopyRow (cognitive 26) main/SS/Util/SheetUtil.cs:183— SheetUtil.CopyRow has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BigInteger.ShiftRight (cognitive 26) main/Util/BigInteger.cs:1339— BigInteger.ShiftRight has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFRichTextString.ToCTFont (cognitive 26) ooxml/XSSF/UserModel/XSSFRichTextString.cs:577— XSSFRichTextString.ToCTFont has cognitive complexity 26 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
XWPFSettings.SetEnforcementEditValue (cognitive 26) ooxml/XWPF/Usermodel/XWPFSettings.cs:184— XWPFSettings.SetEnforcementEditValue has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_SectPr.Write (cognitive 26) OpenXmlFormats/Wordprocessing/Paragraph.cs:3188— CT_SectPr.Write has cognitive complexity 26 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Style.Write (cognitive 26) OpenXmlFormats/Wordprocessing/Styles.cs:762— CT_Style.Write has cognitive complexity 26 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TrPrBase.Write (cognitive 26) OpenXmlFormats/Wordprocessing/Table.cs:3068— CT_TrPrBase.Write has cognitive complexity 26 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
EntryUtils.AreDirectoriesIdentical (cognitive 25) main/POIFS/FileSystem/EntryUtils.cs:184— EntryUtils.AreDirectoriesIdentical has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XLookupFunction.evaluate (cognitive 25) main/SS/Formula/Atp/XLookupFunction.cs:98— XLookupFunction.evaluate has cognitive complexity 25 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DateUtil.GetExcelDate (cognitive 25) main/SS/UserModel/DateUtil.cs:126— DateUtil.GetExcelDate has cognitive complexity 25 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
LZWDecompresser.decompress (cognitive 25) main/Util/LZWDecompresser.cs:103— LZWDecompresser.decompress has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFRichTextString.SetRunAttributes (cognitive 25) ooxml/XSSF/UserModel/XSSFRichTextString.cs:326— XSSFRichTextString.SetRunAttributes has cognitive complexity 25 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CT_Shapetype.Parse (cognitive 25) OpenXmlFormats/Vml/Main.cs:3762— CT_Shapetype.Parse has cognitive complexity 25 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SectPr.Parse (cognitive 25) OpenXmlFormats/Wordprocessing/Paragraph.cs:3125— CT_SectPr.Parse has cognitive complexity 25 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MainForm.ShowDocPartTree (cognitive 25) REDACTED:37— MainForm.ShowDocPartTree has cognitive complexity 25 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InternalWorkbook.Serialize (cognitive 24) main/HSSF/Model/InternalWorkbook.cs:1186— InternalWorkbook.Serialize has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HSSFSheet.recomputeFirstAndLastRowsForRowShift (cognitive 24) main/HSSF/UserModel/HSSFSheet.cs:1692— HSSFSheet.recomputeFirstAndLastRowsForRowShift has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HSSFSheet.SetRepeatingRowsAndColumns (cognitive 24) main/HSSF/UserModel/HSSFSheet.cs:2826— HSSFSheet.SetRepeatingRowsAndColumns has cognitive complexity 24 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DocumentFactoryHelper.ScanForPassword (cognitive 24) main/POIFS/FileSystem/DocumentFactoryHelper.cs:174— DocumentFactoryHelper.ScanForPassword has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationalOperationEval.DoCompare (cognitive 24) main/SS/Formula/Eval/RelationalOperationEval/RelationalOperationEval.cs:40— RelationalOperationEval.DoCompare has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FormulaParser.ParseSheetName (cognitive 24) main/SS/Formula/FormulaParser.cs:1435— FormulaParser.ParseSheetName has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Baseifs.AggregateMatchingCells (cognitive 24) main/SS/Formula/Functions/Baseifs.cs:144— Baseifs.AggregateMatchingCells has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NCellRange.ForEachCell (cognitive 24) main/SS/UserModel/NCellRange.cs:151— NCellRange.ForEachCell has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Properties.LoadConvert (cognitive 24) main/Util/Collections/Properties.cs:230— Properties.LoadConvert has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExcelToHtmlConverter.ProcessDocumentInformation (cognitive 24) ooxml/SS/Converter/ExcelToHtmlConverter.cs:273— ExcelToHtmlConverter.ProcessDocumentInformation has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StylesTable.WriteTo (cognitive 24) ooxml/XSSF/Model/StylesTable.cs:826— StylesTable.WriteTo has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_Shape.Parse (cognitive 24) OpenXmlFormats/Vml/Main.cs:639— CT_Shape.Parse has cognitive complexity 24 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SdtPr.Parse (cognitive 24) OpenXmlFormats/Wordprocessing/Sdt.cs:1832— CT_SdtPr.Parse has cognitive complexity 24 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HeaderFooter.SplitParts (cognitive 23) main/HSSF/UserModel/HeaderFooter.cs:40— HeaderFooter.SplitParts has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HSSFSheet.CopyTo (cognitive 23) main/HSSF/UserModel/HSSFSheet.cs:3074— HSSFSheet.CopyTo has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FormulaParser.ParseSimpleRangePart (cognitive 23) main/SS/Formula/FormulaParser.cs:1207— FormulaParser.ParseSimpleRangePart has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Match.FindIndexOfValue (cognitive 23) main/SS/Formula/Functions/Match.cs:219— Match.FindIndexOfValue has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OperandClassTransformer.TransformFunctionNode (cognitive 23) main/SS/Formula/OperandClassTransformer.cs:222— OperandClassTransformer.TransformFunctionNode has cognitive complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
DataFormatter.CreateFormat (cognitive 23) main/SS/UserModel/DataFormatter.cs:432— DataFormatter.CreateFormat has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StylesTable.ReadFrom (cognitive 23) ooxml/XSSF/Model/StylesTable.cs:293— StylesTable.ReadFrom has cognitive complexity 23 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
XSSFSimpleShape.Text.get (cognitive 23) ooxml/XSSF/UserModel/XSSFSimpleShape.cs:196— XSSFSimpleShape.Text.get has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFTextRun.SetFontFamily (cognitive 23) ooxml/XSSF/UserModel/XSSFTextRun.cs:179— XSSFTextRun.SetFontFamily has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XWPFTableCell.AppendBodyElementText (cognitive 23) ooxml/XWPF/Usermodel/XWPFTableCell.cs:562— XWPFTableCell.AppendBodyElementText has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EncryptionDocument.WriteKeyEncryptorChild (cognitive 23) REDACTED:143— EncryptionDocument.WriteKeyEncryptorChild has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_SharedItems.Parse (cognitive 23) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1768— CT_SharedItems.Parse has cognitive complexity 23 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SharedItems.Write (cognitive 23) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1840— CT_SharedItems.Write has cognitive complexity 23 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CT_Table.Parse (cognitive 23) OpenXmlFormats/Spreadsheet/Sheet/CT_Table.cs:103— CT_Table.Parse has cognitive complexity 23 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Dxfs.Parse (cognitive 23) OpenXmlFormats/Spreadsheet/Styles/CT_Dxfs.cs:21— CT_Dxfs.Parse has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PAPFormattedDiskPage.ToByteArray (cognitive 23) scratchpad/HWPF/Model/PAPFormattedDiskPage.cs:157— PAPFormattedDiskPage.ToByteArray has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
POIFSReader.ProcessProperties (cognitive 22) main/POIFS/EventFileSystem/POIFSReader.cs:188— POIFSReader.ProcessProperties has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CellFormatPart.formatType (cognitive 22) main/SS/Format/CellFormatPart.cs:367— CellFormatPart.formatType has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReplacingInputStream.Read (cognitive 22) main/Util/ReplacingInputStream.cs:142— ReplacingInputStream.Read has cognitive complexity 22 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ExcelToHtmlConverter.BuildStyle_Font (cognitive 22) ooxml/SS/Converter/ExcelToHtmlConverter.cs:828— ExcelToHtmlConverter.BuildStyle_Font has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFRowColShifter.UpdateColumnFormulas (cognitive 22) ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:165— XSSFRowColShifter.UpdateColumnFormulas has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XSSFSheet.CopyRow (cognitive 22) ooxml/XSSF/UserModel/XSSFSheet.cs:6300— XSSFSheet.CopyRow has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ContentTypeManager.RemoveContentType (cognitive 22) openxml4Net/OPC/Internal/ContentTypeManager.cs:189— ContentTypeManager.RemoveContentType has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZipPackage.SaveImpl (cognitive 22) openxml4Net/OPC/ZipPackage.cs:525— ZipPackage.SaveImpl has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_BubbleSer.Write (cognitive 22) OpenXmlFormats/Drawing/Chart/BubbleChart.cs:206— CT_BubbleSer.Write has cognitive complexity 22 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Workbook.Parse (cognitive 22) OpenXmlFormats/Spreadsheet/Workbook/CT_Workbook.cs:61— CT_Workbook.Parse has cognitive complexity 22 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SectPrBase.Parse (cognitive 22) OpenXmlFormats/Wordprocessing/Paragraph.cs:2240— CT_SectPrBase.Parse has cognitive complexity 22 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
DefaultFontReplacer.Update (cognitive 22) scratchpad/HWPF/Converter/DefaultFontReplacer.cs:28— DefaultFontReplacer.Update has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CharacterSprmUncompressor.UncompressCHPOperation (cognitive 22) scratchpad/HWPF/SPRM/CharacterSprmUncompressor.cs:63— CharacterSprmUncompressor.UncompressCHPOperation has cognitive complexity 22 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
FieldsImpl.ParseFieldStructureImpl (cognitive 22) scratchpad/HWPF/UserModel/FieldsImpl.cs:148— FieldsImpl.ParseFieldStructureImpl has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Property.ToString (cognitive 21) main/HPSF/Property.cs:499— Property.ToString has cognitive complexity 21 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CFRecordsAggregate.UpdateFormulasAfterCellShift (cognitive 21) main/HSSF/Record/Aggregates/CFRecordsAggregate.cs:276— CFRecordsAggregate.UpdateFormulasAfterCellShift has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FontFormatting.ToString (cognitive 21) main/HSSF/Record/CF/FontFormatting.cs:383— FontFormatting.ToString has cognitive complexity 21 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ExtendedFormatRecord.Equals (cognitive 21) main/HSSF/Record/ExtendedFormatRecord.cs:1015— ExtendedFormatRecord.Equals has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HyperlinkRecord.HyperlinkRecord.ctor (cognitive 21) main/HSSF/Record/HyperlinkRecord.cs:123— HyperlinkRecord.HyperlinkRecord.ctor has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HyperlinkRecord.DataSize.get (cognitive 21) main/HSSF/Record/HyperlinkRecord.cs:536— HyperlinkRecord.DataSize.get has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TextJoinFunction.Evaluate (cognitive 21) main/SS/Formula/Atp/TextJoinFunction.cs:21— TextJoinFunction.Evaluate has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RelationalOperationEval.EvaluateArray (cognitive 21) main/SS/Formula/Eval/RelationalOperationEval/RelationalOperationEval.cs:135— RelationalOperationEval.EvaluateArray has cognitive complexity 21 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ArrayFunction._evaluateOneArrayArg (cognitive 21) main/SS/Formula/Functions/ArrayFunction.cs:197— ArrayFunction._evaluateOneArrayArg has cognitive complexity 21 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
DStarRunner.Evaluate (cognitive 21) main/SS/Formula/Functions/DStarRunner.cs:70— DStarRunner.Evaluate has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DateUtil.IsADateFormat (cognitive 21) main/SS/UserModel/DateUtil.cs:627— DateUtil.IsADateFormat has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BigInteger.BigInteger.ctor (cognitive 21) main/Util/BigInteger.cs:212— BigInteger.BigInteger.ctor has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
POIXMLDocumentPart.Read (cognitive 21) ooxml/POIXMLDocumentPart.cs:762— POIXMLDocumentPart.Read has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFCellStyle.CloneStyleFrom (cognitive 21) ooxml/XSSF/UserModel/XSSFCellStyle.cs:123— XSSFCellStyle.CloneStyleFrom has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XWPFRun.XWPFRun.ctor (cognitive 21) REDACTED:65— XWPFRun.XWPFRun.ctor has cognitive complexity 21 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
PackagePropertiesUnmarshaller.CheckElementForOPCCompliance (cognitive 21) REDACTED:375— PackagePropertiesUnmarshaller.CheckElementForOPCCompliance has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PackagePartName.Compare (cognitive 21) openxml4Net/OPC/PackagePartName.cs:597— PackagePartName.Compare has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_ScatterSer.Write (cognitive 21) OpenXmlFormats/Drawing/Chart/ScatterChart.cs:96— CT_ScatterSer.Write has cognitive complexity 21 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Workbook.Write (cognitive 21) OpenXmlFormats/Spreadsheet/Workbook/CT_Workbook.cs:113— CT_Workbook.Write has cognitive complexity 21 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Shape.Write (cognitive 21) OpenXmlFormats/Vml/Main.cs:720— CT_Shape.Write has cognitive complexity 21 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TblPr.Parse (cognitive 21) OpenXmlFormats/Wordprocessing/Table.cs:2782— CT_TblPr.Parse has cognitive complexity 21 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AbstractWordConverter.TryDeadField (cognitive 21) scratchpad/HWPF/Converter/AbstractWordConverter.cs:928— AbstractWordConverter.TryDeadField has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
InternalSheet.VisitContainedRecords (cognitive 20) main/HSSF/Model/InternalSheet.cs:2180— InternalSheet.VisitContainedRecords has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EmbeddedObjectRefSubRecord.EmbeddedObjectRefSubRecord.ctor (cognitive 20) main/HSSF/Record/EmbeddedObjectRefSubRecord.cs:77— EmbeddedObjectRefSubRecord.EmbeddedObjectRefSubRecord.ctor has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HyperlinkRecord.Serialize (cognitive 20) main/HSSF/Record/HyperlinkRecord.cs:464— HyperlinkRecord.Serialize has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HSSFSheet.GetSheetImageIds (cognitive 20) main/HSSF/UserModel/HSSFSheet.cs:3184— HSSFSheet.GetSheetImageIds has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (HSSFSheet.ApplyEscherRemap) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
HSSFSheet.ApplyEscherRemap (cognitive 20) main/HSSF/UserModel/HSSFSheet.cs:3214— HSSFSheet.ApplyEscherRemap has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (HSSFSheet.GetSheetImageIds) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
HSSFSheet.CopyRow (cognitive 20) main/HSSF/UserModel/HSSFSheet.cs:3270— HSSFSheet.CopyRow has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
FormulaShifter.AdjustPtgDueToRowMove (cognitive 20) main/SS/Formula/FormulaShifter.cs:280— FormulaShifter.AdjustPtgDueToRowMove has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (FormulaShifter.AdjustPtgDueToColumnMove) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
FormulaShifter.AdjustPtgDueToColumnMove (cognitive 20) main/SS/Formula/FormulaShifter.cs:365— FormulaShifter.AdjustPtgDueToColumnMove has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (FormulaShifter.AdjustPtgDueToRowMove) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
WorkbookEvaluator.GetEvalForPtg (cognitive 20) main/SS/Formula/WorkbookEvaluator.cs:903— WorkbookEvaluator.GetEvalForPtg has cognitive complexity 20 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AreaReference.SeparateAreaRefs (cognitive 20) main/SS/Util/AreaReference.cs:595— AreaReference.SeparateAreaRefs has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageUtils.SetPreferredSize (cognitive 20) main/SS/Util/ImageUtils.cs:210— ImageUtils.SetPreferredSize has cognitive complexity 20 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ExcelToHtmlConverter.BuildStyle_Border (cognitive 20) ooxml/SS/Converter/ExcelToHtmlConverter.cs:778— ExcelToHtmlConverter.BuildStyle_Border has cognitive complexity 20 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SharedStringsTable.ParseRPrChild (cognitive 20) ooxml/XSSF/Model/SharedStringsTable.cs:432— SharedStringsTable.ParseRPrChild has cognitive complexity 20 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
XSSFCell.RichStringCellValue.get (cognitive 20) ooxml/XSSF/UserModel/XSSFCell.cs:353— XSSFCell.RichStringCellValue.get has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_AreaSer.Write (cognitive 20) OpenXmlFormats/Drawing/Chart/AreaChart.cs:292— CT_AreaSer.Write has cognitive complexity 20 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_BarSer.Write (cognitive 20) OpenXmlFormats/Drawing/Chart/BarChart.cs:553— CT_BarSer.Write has cognitive complexity 20 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_CacheHierarchy.Parse (cognitive 20) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:6363— CT_CacheHierarchy.Parse has cognitive complexity 20 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TblPrBase.Parse (cognitive 20) OpenXmlFormats/Wordprocessing/Table.cs:1190— CT_TblPrBase.Parse has cognitive complexity 20 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_TcPr.Parse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_TcPr.Parse (cognitive 20) OpenXmlFormats/Wordprocessing/Table.cs:4746— CT_TcPr.Parse has cognitive complexity 20 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_TblPrBase.Parse) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
Form1.button5_Click (cognitive 20) tools/XmlSerializationCodeGenerator/Form1.cs:625— Form1.button5_Click has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EscherPropertyFactory.CreateProperties (cognitive 19) main/DDF/EscherPropertyFactory.cs:42— EscherPropertyFactory.CreateProperties has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
EscherAggregate.CreateAggregate (cognitive 19) main/HSSF/Record/EscherAggregate.cs:434— EscherAggregate.CreateAggregate has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HSSFSheet.GetRepeatingRowsOrColums (cognitive 19) main/HSSF/UserModel/HSSFSheet.cs:2914— HSSFSheet.GetRepeatingRowsOrColums has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DocumentBlock.Convert (cognitive 19) main/POIFS/Storage/DocumentBlock.cs:114— DocumentBlock.Convert has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CellFormatPart.ParseFormat (cognitive 19) main/SS/Format/CellFormatPart.cs:526— CellFormatPart.ParseFormat has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CellNumberFormatter.interpretIntegerCommas (cognitive 19) main/SS/Format/CellNumberFormatter.cs:454— CellNumberFormatter.interpretIntegerCommas has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FormulaParser.ParseErrorLiteral (cognitive 19) main/SS/Formula/FormulaParser.cs:2117— FormulaParser.ParseErrorLiteral has cognitive complexity 19 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
BaseNumberUtils.ConvertToDecimal (cognitive 19) main/SS/Formula/Functions/BaseNumberUtils.cs:28— BaseNumberUtils.ConvertToDecimal has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CountUtils.CountMatchingCellsInArea (cognitive 19) main/SS/Formula/Functions/CountUtils.cs:87— CountUtils.CountMatchingCellsInArea has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OperandClassTransformer.TransformNode (cognitive 19) main/SS/Formula/OperandClassTransformer.cs:93— OperandClassTransformer.TransformNode has cognitive complexity 19 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
WorkbookEvaluator.AdjustRegionRelativeReference (cognitive 19) main/SS/Formula/WorkbookEvaluator.cs:360— WorkbookEvaluator.AdjustRegionRelativeReference has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CellReferenceParser.TryParse (cognitive 19) main/SS/Util/CellReferenceParser.cs:62— CellReferenceParser.TryParse has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Arrays.DeepEquals0 (cognitive 19) main/Util/Arrays.cs:700— Arrays.DeepEquals0 has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
MutableBigInteger.binaryGCD (cognitive 19) main/Util/BigInteger.cs:2983— MutableBigInteger.binaryGCD has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFSheet.CopyRows (cognitive 19) ooxml/XSSF/UserModel/XSSFSheet.cs:3216— XSSFSheet.CopyRows has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFSheet.GetRepeatingRowsOrColums (cognitive 19) ooxml/XSSF/UserModel/XSSFSheet.cs:6093— XSSFSheet.GetRepeatingRowsOrColums has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFSheet.SetRepeatingRowsAndColumns (cognitive 19) ooxml/XSSF/UserModel/XSSFSheet.cs:6145— XSSFSheet.SetRepeatingRowsAndColumns has cognitive complexity 19 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
XSSFWorkbook.CloneSheet (cognitive 19) ooxml/XSSF/UserModel/XSSFWorkbook.cs:582— XSSFWorkbook.CloneSheet has cognitive complexity 19 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
XWPFWordExtractor.AppendParagraphText (cognitive 19) ooxml/XWPF/Extractor/XWPFWordExtractor.cs:114— XWPFWordExtractor.AppendParagraphText has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XWPFParagraph.GetNumStartOverride (cognitive 19) ooxml/XWPF/Usermodel/XWPFParagraph.cs:455— XWPFParagraph.GetNumStartOverride has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XWPFParagraph.RemoveRun (cognitive 19) ooxml/XWPF/Usermodel/XWPFParagraph.cs:1613— XWPFParagraph.RemoveRun has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XWPFPictureData.Equals (cognitive 19) ooxml/XWPF/Usermodel/XWPFPictureData.cs:205— XWPFPictureData.Equals has cognitive complexity 19 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_LineSer.Write (cognitive 19) OpenXmlFormats/Drawing/Chart/LineChart.cs:92— CT_LineSer.Write has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_OfPieChart.Write (cognitive 19) OpenXmlFormats/Drawing/Chart/PieChart.cs:1017— CT_OfPieChart.Write has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_SectPrBase.Write (cognitive 19) OpenXmlFormats/Wordprocessing/Paragraph.cs:2295— CT_SectPrBase.Write has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_MailMerge.Parse (cognitive 19) OpenXmlFormats/Wordprocessing/Settings.cs:2964— CT_MailMerge.Parse has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TcPrInner.Parse (cognitive 19) OpenXmlFormats/Wordprocessing/Table.cs:4205— CT_TcPrInner.Parse has cognitive complexity 19 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
TableSprmUncompressor.UncompressTAPOperation (cognitive 19) scratchpad/HWPF/SPRM/TableSprmUncompressor.cs:104— TableSprmUncompressor.UncompressTAPOperation has cognitive complexity 19 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
Property.ReadDictionary (cognitive 18) main/HPSF/Property.cs:252— Property.ReadDictionary has cognitive complexity 18 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Property.Equals (cognitive 18) main/HPSF/Property.cs:405— Property.Equals has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContinuableRecordOutput.WriteCharacterData (cognitive 18) main/HSSF/Record/Cont/ContinuableRecordOutput.cs:191— ContinuableRecordOutput.WriteCharacterData has cognitive complexity 18 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
EmbeddedObjectRefSubRecord.Serialize (cognitive 18) main/HSSF/Record/EmbeddedObjectRefSubRecord.cs:273— EmbeddedObjectRefSubRecord.Serialize has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DatePartHandler.HandlePart (cognitive 18) main/SS/Format/CellDateFormatter.cs:64— DatePartHandler.HandlePart has cognitive complexity 18 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AverageIfs.GetAvgFromMatchingCells (cognitive 18) main/SS/Formula/Functions/Averageifs.cs:104— AverageIfs.GetAvgFromMatchingCells has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LookupUtils.XlookupIndexOfValue (cognitive 18) main/SS/Formula/Functions/LookupUtils.cs:620— LookupUtils.XlookupIndexOfValue has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StatsLib.mode (cognitive 18) main/SS/Formula/Functions/StatsLib.cs:105— StatsLib.mode has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XYNumericFunction.EvaluateInternal (cognitive 18) main/SS/Formula/Functions/XYNumericFunction.cs:166— XYNumericFunction.EvaluateInternal has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DataFormatter.FormatCellValue (cognitive 18) main/SS/UserModel/DataFormatter.cs:1164— DataFormatter.FormatCellValue has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageUtils.GetJpegDpi (cognitive 18) main/SS/Util/ImageUtils.cs:132— ImageUtils.GetJpegDpi has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExcelToHtmlConverter.ProcessSheet (cognitive 18) ooxml/SS/Converter/ExcelToHtmlConverter.cs:200— ExcelToHtmlConverter.ProcessSheet has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFExportToXml.Compare (cognitive 18) REDACTED:440— XSSFExportToXml.Compare has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SXSSFFormulaEvaluator.EvaluateAllFormulaCells (cognitive 18) ooxml/XSSF/Streaming/SXSSFFormulaEvaluator.cs:76— SXSSFFormulaEvaluator.EvaluateAllFormulaCells has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_BarChart.Write (cognitive 18) OpenXmlFormats/Drawing/Chart/BarChart.cs:83— CT_BarChart.Write has cognitive complexity 18 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TextBodyProperties.Write (cognitive 18) OpenXmlFormats/Drawing/Text.cs:678— CT_TextBodyProperties.Write has cognitive complexity 18 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_CacheField.Write (cognitive 18) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2281— CT_CacheField.Write has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CT_RPrElt.Parse (cognitive 18) OpenXmlFormats/Spreadsheet/SharedString/CT_RPrElt.cs:35— CT_RPrElt.Parse has cognitive complexity 18 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Font.Parse (cognitive 18) OpenXmlFormats/Spreadsheet/Styles/CT_Font.cs:42— CT_Font.Parse has cognitive complexity 18 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TblPr.Write (cognitive 18) OpenXmlFormats/Wordprocessing/Table.cs:2831— CT_TblPr.Write has cognitive complexity 18 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TrPr.Parse (cognitive 18) OpenXmlFormats/Wordprocessing/Table.cs:3956— CT_TrPr.Parse has cognitive complexity 18 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
AbstractWordConverter.ProcessField (cognitive 18) scratchpad/HWPF/Converter/AbstractWordConverter.cs:639— AbstractWordConverter.ProcessField has cognitive complexity 18 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
AbstractWordConverter.ProcessParagraphes (cognitive 18) scratchpad/HWPF/Converter/AbstractWordConverter.cs:833— AbstractWordConverter.ProcessParagraphes has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChartFormatsAggregate.ChartFormatsAggregate.ctor (cognitive 17) main/HSSF/Record/Aggregates/Chart/ChartFormatsAggregate.cs:55— ChartFormatsAggregate.ChartFormatsAggregate.ctor has cognitive complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
SeriesFormatAggregate.SeriesFormatAggregate.ctor (cognitive 17) main/HSSF/Record/Aggregates/Chart/SeriesFormatAggregate.cs:39— SeriesFormatAggregate.SeriesFormatAggregate.ctor has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NPOIFSMiniStore.GetFreeBlock (cognitive 17) main/POIFS/FileSystem/NPOIFSMiniStore.cs:198— NPOIFSMiniStore.GetFreeBlock has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
POIFSDocumentPath.Equals (cognitive 17) main/POIFS/FileSystem/POIFSDocumentPath.cs:133— POIFSDocumentPath.Equals has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CellNumberFormatter.WriteScientific (cognitive 17) main/SS/Format/CellNumberFormatter.cs:685— CellNumberFormatter.WriteScientific has cognitive complexity 17 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
CellNumberFormatter.WriteFractional (cognitive 17) main/SS/Format/CellNumberFormatter.cs:1036— CellNumberFormatter.WriteFractional has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ConditionalFormattingEvaluator.GetMatchingCells (cognitive 17) main/SS/Formula/ConditionalFormattingEvaluator.cs:264— ConditionalFormattingEvaluator.GetMatchingCells has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FormulaCellCacheEntrySet.Remove (cognitive 17) main/SS/Formula/FormulaCellCacheEntrySet.cs:128— FormulaCellCacheEntrySet.Remove has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FloorCeilingMathBase.Evaluate (cognitive 17) main/SS/Formula/Functions/FloorCeilingMathBase.cs:67— FloorCeilingMathBase.Evaluate has cognitive complexity 17 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Imaginary.Evaluate (cognitive 17) main/SS/Formula/Functions/Imaginary.cs:59— Imaginary.Evaluate has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TwoArrayArg.Evaluate (cognitive 17) main/SS/Formula/Functions/Matrix/MatrixFunction.cs:170— TwoArrayArg.Evaluate has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
OperationEvaluationContext.GetDynamicReference (cognitive 17) main/SS/Formula/OperationEvaluationContext.cs:229— OperationEvaluationContext.GetDynamicReference has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NCellRange.Cells.get (cognitive 17) main/SS/UserModel/NCellRange.cs:183— NCellRange.Cells.get has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TableStyleTypeExtension.GetRange (cognitive 17) main/SS/UserModel/TableStyleType.cs:90— TableStyleTypeExtension.GetRange has cognitive complexity 17 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
NumberComparer.Compare (cognitive 17) main/SS/Util/NumberComparer.cs:36— NumberComparer.Compare has cognitive complexity 17 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
SheetUtil.CopyRow (cognitive 17) main/SS/Util/SheetUtil.cs:92— SheetUtil.CopyRow has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SheetUtil.GetColumnWidth (cognitive 17) main/SS/Util/SheetUtil.cs:678— SheetUtil.GetColumnWidth has cognitive complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
BigInteger.BitLength (cognitive 17) main/Util/BigInteger.cs:476— BigInteger.BitLength has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
MutableBigInteger.leftShift (cognitive 17) main/Util/BigInteger.cs:2229— MutableBigInteger.leftShift has cognitive complexity 17 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
HexDump.Dump (cognitive 17) main/Util/HexDump.cs:109— HexDump.Dump has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFSheet.CopyColumn (cognitive 17) ooxml/XSSF/UserModel/XSSFSheet.cs:4161— XSSFSheet.CopyColumn has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ZipPackage.ZipPackage.ctor (cognitive 17) openxml4Net/OPC/ZipPackage.cs:91— ZipPackage.ZipPackage.ctor has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CT_BarSer.Parse (cognitive 17) OpenXmlFormats/Drawing/Chart/BarChart.cs:509— CT_BarSer.Parse has cognitive complexity 17 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_BubbleSer.Parse (cognitive 17) OpenXmlFormats/Drawing/Chart/BubbleChart.cs:161— CT_BubbleSer.Parse has cognitive complexity 17 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_LineChart.Write (cognitive 17) OpenXmlFormats/Drawing/Chart/LineChart.cs:1041— CT_LineChart.Write has cognitive complexity 17 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Missing.Write (cognitive 17) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4082— CT_Missing.Write has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: 2 other methods here (CT_Number.Write, CT_String.Write) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_Number.Write (cognitive 17) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4454— CT_Number.Write has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: 2 other methods here (CT_Missing.Write, CT_String.Write) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_String.Write (cognitive 17) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4824— CT_String.Write has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function. This shape REPEATS in the file: 2 other methods here (CT_Missing.Write, CT_Number.Write) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_PivotTableDefinition.Write (cognitive 17) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:190— CT_PivotTableDefinition.Write has cognitive complexity 17 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TblPrBase.Write (cognitive 17) OpenXmlFormats/Wordprocessing/Table.cs:1237— CT_TblPrBase.Write has cognitive complexity 17 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_TcPr.Write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
CT_TcPr.Write (cognitive 17) OpenXmlFormats/Wordprocessing/Table.cs:4797— CT_TcPr.Write has cognitive complexity 17 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CT_TblPrBase.Write) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
WordToFoUtils.SetCharactersProperties (cognitive 17) scratchpad/HWPF/Converter/WordToFoUtils.cs:63— WordToFoUtils.SetCharactersProperties has cognitive complexity 17 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
DrawingManager.AllocateShapeId (cognitive 16) main/HSSF/Model/DrawingManager.cs:56— DrawingManager.AllocateShapeId has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ColumnInfoRecordsAggregate.SetColumn (cognitive 16) main/HSSF/Record/Aggregates/ColumnInfoRecordsAggregate.cs:520— ColumnInfoRecordsAggregate.SetColumn has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LbsDataSubRecord.Serialize (cognitive 16) main/HSSF/Record/LbsDataSubRecord.cs:219— LbsDataSubRecord.Serialize has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StreamEncryptionInfo.StreamEncryptionInfo.ctor (cognitive 16) main/HSSF/Record/RecordFactoryInputStream.cs:55— StreamEncryptionInfo.StreamEncryptionInfo.ctor has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
HSSFSheet.ValidateArrayFormulas (cognitive 16) main/HSSF/UserModel/HSSFSheet.cs:737— HSSFSheet.ValidateArrayFormulas has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HSSFSheet.GetHyperlink (cognitive 16) main/HSSF/UserModel/HSSFSheet.cs:2515— HSSFSheet.GetHyperlink has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SimpleFraction.BuildFractionMaxDenominator (cognitive 16) main/SS/Format/SimpleFraction.cs:81— SimpleFraction.BuildFractionMaxDenominator has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XLookupFunction._evaluate (cognitive 16) main/SS/Formula/Atp/XLookupFunction.cs:37— XLookupFunction._evaluate has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
FormulaParser.Function (cognitive 16) main/SS/Formula/FormulaParser.cs:1615— FormulaParser.Function has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Address.Evaluate (cognitive 16) main/SS/Formula/Functions/Address.cs:36— Address.Evaluate has cognitive complexity 16 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
Dec2Bin.Evaluate (cognitive 16) main/SS/Formula/Functions/Dec2Bin.cs:58— Dec2Bin.Evaluate has cognitive complexity 16 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ImReal.Evaluate (cognitive 16) main/SS/Formula/Functions/ImReal.cs:47— ImReal.Evaluate has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PercentRank.Evaluate (cognitive 16) main/SS/Formula/Functions/PercentRank.cs:20— PercentRank.Evaluate has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
OperationEvaluationContext.CreateExternSheetRefEvaluator (cognitive 16) main/SS/Formula/OperationEvaluationContext.cs:103— OperationEvaluationContext.CreateExternSheetRefEvaluator has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExternSheetNameResolver.PrependSheetName (cognitive 16) main/SS/Formula/PTG/ExternSheetNameResolver.cs:10— ExternSheetNameResolver.PrependSheetName has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExcelStyleDateFormatter.Format (cognitive 16) main/SS/UserModel/ExcelStyleDateFormatter.cs:130— ExcelStyleDateFormatter.Format has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CellRangeUtil.MergeCellRanges (cognitive 16) main/SS/Util/CellRangeUtil.cs:107— CellRangeUtil.MergeCellRanges has cognitive complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
CellUtil.SetCellStyleProperties (cognitive 16) main/SS/Util/CellUtil.cs:455— CellUtil.SetCellStyleProperties has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SheetUtil.MeasureCellWidth (cognitive 16) main/SS/Util/SheetUtil.cs:589— SheetUtil.MeasureCellWidth has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MutableBigInteger.compareHalf (cognitive 16) main/Util/BigInteger.cs:1967— MutableBigInteger.compareHalf has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HexRead.ReadData (cognitive 16) main/Util/HexRead.cs:125— HexRead.ReadData has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ExcelToHtmlUtils.BuildMergedRangesMap (cognitive 16) ooxml/SS/Converter/ExcelToHtmlUtils.cs:66— ExcelToHtmlUtils.BuildMergedRangesMap has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SheetDataWriter.WriteCell (cognitive 16) ooxml/XSSF/Streaming/SheetDataWriter.cs:261— SheetDataWriter.WriteCell has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFCellBorder.GetBorder (cognitive 16) ooxml/XSSF/UserModel/Extensions/XSSFCellBorder.cs:174— XSSFCellBorder.GetBorder has cognitive complexity 16 (threshold 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
ColumnHelper.GetColumn1Based (cognitive 16) ooxml/XSSF/UserModel/Helpers/ColumnHelper.cs:126— ColumnHelper.GetColumn1Based has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFName.ValidateName (cognitive 16) ooxml/XSSF/UserModel/XSSFName.cs:376— XSSFName.ValidateName has cognitive complexity 16 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
XSSFRichTextString.ApplyFont (cognitive 16) ooxml/XSSF/UserModel/XSSFRichTextString.cs:151— XSSFRichTextString.ApplyFont has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFSheet.CreateFreezePane (cognitive 16) ooxml/XSSF/UserModel/XSSFSheet.cs:2129— XSSFSheet.CreateFreezePane has cognitive complexity 16 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
XSSFSheet.RemoveColumn (cognitive 16) ooxml/XSSF/UserModel/XSSFSheet.cs:2931— XSSFSheet.RemoveColumn has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFSheet.ValidateArrayFormulas (cognitive 16) ooxml/XSSF/UserModel/XSSFSheet.cs:4985— XSSFSheet.ValidateArrayFormulas has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
XSSFVMLDrawing.FindCommentShape (cognitive 16) REDACTED:291— XSSFVMLDrawing.FindCommentShape has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
XWPFRun.handleRubyContent (cognitive 16) REDACTED:607— XWPFRun.handleRubyContent has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PackagePropertiesPart.SetDateValue (cognitive 16) REDACTED:558— PackagePropertiesPart.SetDateValue has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PackagingUriHelper.ResolvePartUri (cognitive 16) openxml4Net/OPC/PackagingUriHelper.cs:454— PackagingUriHelper.ResolvePartUri has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Bar3DChart.Write (cognitive 16) OpenXmlFormats/Drawing/Chart/BarChart.cs:1062— CT_Bar3DChart.Write has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_LineSer.Parse (cognitive 16) OpenXmlFormats/Drawing/Chart/LineChart.cs:50— CT_LineSer.Parse has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_ScatterSer.Parse (cognitive 16) OpenXmlFormats/Drawing/Chart/ScatterChart.cs:53— CT_ScatterSer.Parse has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TextBodyProperties.Parse (cognitive 16) OpenXmlFormats/Drawing/Text.cs:618— CT_TextBodyProperties.Parse has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_CacheField.Parse (cognitive 16) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2237— CT_CacheField.Parse has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_PivotHierarchy.Parse (cognitive 16) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:5877— CT_PivotHierarchy.Parse has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Comments.FindExtraNamespace (cognitive 16) OpenXmlFormats/Wordprocessing/Markup.cs:203— CT_Comments.FindExtraNamespace has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CT_Lvl.Parse (cognitive 16) OpenXmlFormats/Wordprocessing/Numbering.cs:1306— CT_Lvl.Parse has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_Lvl.Write (cognitive 16) OpenXmlFormats/Wordprocessing/Numbering.cs:1350— CT_Lvl.Write has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_MailMerge.Write (cognitive 16) OpenXmlFormats/Wordprocessing/Settings.cs:3009— CT_MailMerge.Write has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CT_TcPrInner.Write (cognitive 16) OpenXmlFormats/Wordprocessing/Table.cs:4250— CT_TcPrInner.Write has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
WordToFoUtils.SetTableCellProperties (cognitive 16) scratchpad/HWPF/Converter/WordToFoUtils.cs:279— WordToFoUtils.SetTableCellProperties has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WordToHtmlUtils.AddTableCellProperties (cognitive 16) scratchpad/HWPF/Converter/WordToHtmlUtils.cs:175— WordToHtmlUtils.AddTableCellProperties has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
HWPFDocument.HWPFDocument.ctor (cognitive 16) scratchpad/HWPF/HWPFDocument.cs:175— HWPFDocument.HWPFDocument.ctor has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ListTables.Equals (cognitive 16) scratchpad/HWPF/Model/ListTables.cs:197— ListTables.Equals has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StyleSheet.Equals (cognitive 16) scratchpad/HWPF/Model/StyleSheet.cs:177— StyleSheet.Equals has cognitive complexity 16 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Range.FindRange (cognitive 16) scratchpad/HWPF/UserModel/Range.cs:1073— Range.FindRange has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication· Near-duplicate member family (4 members, 27 shared lines) · ×1
Near-duplicate member family (4 members, 27 shared lines) main/SS/Formula/Functions/LookupUtils.cs:456— main/SS/Formula/Functions/LookupUtils.cs:456-499 | main/SS/Formula/Functions/LookupUtils.cs:502-578 | main/SS/Formula/Functions/LookupUtils.cs:680-737 | main/SS/Formula/Functions/LookupUtils.cs:749-805 — These 4 members are variants of one another: a block of 27 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) main/SS/Formula/Functions/Mode.cs:40— main/SS/Formula/Functions/Mode.cs:40-73 | main/SS/Formula/Functions/StatsLib.cs:106-134 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) ooxml/XSSF/UserModel/XSSFSimpleShape.cs:470— ooxml/XSSF/UserModel/XSSFSimpleShape.cs:470-520 | ooxml/XSSF/UserModel/XSSFSimpleShape.cs:567-603 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) main/DDF/EscherBitmapBlip.cs:143— main/DDF/EscherBitmapBlip.cs:143-153 | main/DDF/EscherBlipRecord.cs:169-176 | main/DDF/EscherClientAnchorRecord.cs:195-213 | main/DDF/EscherClientDataRecord.cs:124-133 | main/DDF/EscherMetafileBlip.cs:357-373 | main/DDF/EscherPictBlip.cs:289-303 | main/DDF/UnknownEscherRecord.cs:225-240 — 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.
Duplicated block (52 lines × 2) main/SS/Formula/Functions/LookupUtils.cs:686— main/SS/Formula/Functions/LookupUtils.cs:686-737 | main/SS/Formula/Functions/LookupUtils.cs:754-805 — both copies are in the same file, so extract the 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 `main/SS/Formula/Functions/LookupUtils.cs:686` 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 (35–47 lines × 2) main/SS/Formula/Functions/LookupUtils.cs:462— main/SS/Formula/Functions/LookupUtils.cs:462-496 | main/SS/Formula/Functions/LookupUtils.cs:515-561 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (38–40 lines × 2) main/SS/Formula/Functions/DollarDe.cs:18— main/SS/Formula/Functions/DollarDe.cs:18-55 | main/SS/Formula/Functions/DollarFr.cs:12-51 — before extracting anything, compare `main/SS/Formula/Functions/DollarDe.cs` and `main/SS/Formula/Functions/DollarFr.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `main/SS/Formula/Functions/DollarDe.cs:18` 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 (38 lines × 2) ooxml/XDDF/UserModel/Chart/XDDFChartData.cs:196— ooxml/XDDF/UserModel/Chart/XDDFChartData.cs:196-233 | ooxml/XDDF/UserModel/Chart/XDDFChartData.cs:289-326 — both copies are in the same file, so extract the 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 `ooxml/XDDF/UserModel/Chart/XDDFChartData.cs:196` 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 `data` to `IXDDFDataSource<T>` in one and `IXDDFNumericalDataSource<V>` 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 (27–38 lines × 4) main/SS/Formula/Functions/LookupUtils.cs:462— main/SS/Formula/Functions/LookupUtils.cs:462-488 | main/SS/Formula/Functions/LookupUtils.cs:515-552 | main/SS/Formula/Functions/LookupUtils.cs:688-725 | main/SS/Formula/Functions/LookupUtils.cs:756-793 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `main/SS/Formula/Functions/LookupUtils.cs:462` 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 (33–34 lines × 2) ooxml/SS/UserModel/WorkbookFactory.cs:299— ooxml/SS/UserModel/WorkbookFactory.cs:299-332 | ooxml/SS/UserModel/WorkbookFactory.cs:337-369 — both copies are in the same file, so extract the 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 `ooxml/SS/UserModel/WorkbookFactory.cs:299` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note 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 (26 lines × 2) main/SS/Formula/FormulaShifter.cs:784— main/SS/Formula/FormulaShifter.cs:784-809 | main/SS/Formula/FormulaShifter.cs:950-975 — both copies are in the same file, so extract the 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 `main/SS/Formula/FormulaShifter.cs:784` 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 (26–29 lines × 2) main/HSSF/UserModel/HSSFSheet.cs:2261— main/HSSF/UserModel/HSSFSheet.cs:2261-2286 | ooxml/XSSF/UserModel/XSSFSheet.cs:6014-6042 — 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 `main/HSSF/UserModel/HSSFSheet.cs:2261` 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 (28–29 lines × 2) main/HSSF/UserModel/HSSFSheet.cs:2831— main/HSSF/UserModel/HSSFSheet.cs:2831-2859 | ooxml/XSSF/UserModel/XSSFSheet.cs:6148-6175 — 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 (19–27 lines × 3) main/HSSF/UserModel/HSSFSheet.cs:3053— main/HSSF/UserModel/HSSFSheet.cs:3053-3071 | main/HSSF/UserModel/HSSFSheet.cs:3123-3141 | ooxml/XSSF/UserModel/XSSFSheet.cs:4458-4484 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (26–27 lines × 3) main/SS/Formula/Functions/LinearRegressionFunction.cs:167— main/SS/Formula/Functions/LinearRegressionFunction.cs:167-192 | main/SS/Formula/Functions/LinearRegressionFunction.cs:205-231 | main/SS/Formula/Functions/XYNumericFunction.cs:174-199 — before extracting anything, compare `main/SS/Formula/Functions/LinearRegressionFunction.cs` and `main/SS/Formula/Functions/XYNumericFunction.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 63 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 `main/SS/Formula/Functions/LinearRegressionFunction.cs:167` 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 (23–27 lines × 2) main/POIFS/Crypt/BinaryRC4/BinaryRC4Decryptor.cs:57— main/POIFS/Crypt/BinaryRC4/BinaryRC4Decryptor.cs:57-83 | main/POIFS/Crypt/CryptoAPI/CryptoAPIDecryptor.cs:99-121 — 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 (20–27 lines × 2) main/SS/Formula/Functions/Mode.cs:40— main/SS/Formula/Functions/Mode.cs:40-66 | main/SS/Formula/Functions/StatsLib.cs:111-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 both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `main/SS/Formula/Functions/Mode.cs:40` 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 (25 lines × 2) main/HSSF/Record/BlankRecord.cs:148— main/HSSF/Record/BlankRecord.cs:148-172 | main/HSSF/Record/CellRecord.cs:88-112 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (23–26 lines × 2) main/SS/Formula/Functions/Count.cs:51— main/SS/Formula/Functions/Count.cs:51-73 | main/SS/Formula/Functions/Counta.cs:47-72 — 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 (25–26 lines × 2) ooxml/XSSF/UserModel/XSSFSheet.cs:5686— ooxml/XSSF/UserModel/XSSFSheet.cs:5686-5710 | ooxml/XSSF/UserModel/XSSFSheet.cs:5799-5824 — both copies are in the same file, so extract the 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 `ooxml/XSSF/UserModel/XSSFSheet.cs:5686` 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 (22 lines × 4) main/HSSF/Model/InternalChart.cs:590— main/HSSF/Model/InternalChart.cs:590-611 | main/HSSF/UserModel/HSSFChart.cs:534-555 | main/HSSF/UserModel/HSSFChart.cs:741-762 | main/HSSF/UserModel/HSSFChart.cs:771-792 — before extracting anything, compare `main/HSSF/Model/InternalChart.cs` and `main/HSSF/UserModel/HSSFChart.cs` as WHOLE FILES: this scan already matched 19 separate duplicated blocks between them, totalling at least 195 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 `main/HSSF/Model/InternalChart.cs:590` 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 (23 lines × 3) main/SS/Formula/Functions/ArrayFunction.cs:125— main/SS/Formula/Functions/ArrayFunction.cs:125-147 | main/SS/Formula/Functions/ArrayFunction.cs:149-171 | main/SS/Formula/Functions/ArrayFunction.cs:237-259 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (20–24 lines × 2) ooxml/XSSF/UserModel/XSSFColumn.cs:423— ooxml/XSSF/UserModel/XSSFColumn.cs:423-446 | ooxml/XSSF/UserModel/XSSFRow.cs:409-428 — 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 (22–23 lines × 2) ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:78— ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:78-99 | ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:166-188 — both copies are in the same file, so extract the 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 `ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:100` calls `UpdateRefInCTCellFormula` and `ooxml/XSSF/UserModel/Helpers/XSSFRowColShifter.cs:189` 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 (19–22 lines × 2) main/SS/UserModel/TableStyleType.cs:185— main/SS/UserModel/TableStyleType.cs:185-203 | main/SS/UserModel/TableStyleType.cs:212-233 — both copies are in the same file, so extract the 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 `main/SS/UserModel/TableStyleType.cs:185` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (21–22 lines × 2) ooxml/XSSF/UserModel/XSSFSimpleShape.cs:475— ooxml/XSSF/UserModel/XSSFSimpleShape.cs:475-495 | ooxml/XSSF/UserModel/XSSFSimpleShape.cs:569-590 — both copies are in the same file, so extract the 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 `ooxml/XSSF/UserModel/XSSFSimpleShape.cs:475` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (20 lines × 5) ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs:193— ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs:193-212 | ooxml/XDDF/UserModel/Chart/XDDFLine3DChartData.cs:148-167 | ooxml/XDDF/UserModel/Chart/XDDFPie3DChartData.cs:112-131 | ooxml/XDDF/UserModel/Chart/XDDFSurface3DChartData.cs:141-160 | ooxml/XDDF/UserModel/Chart/XDDFSurfaceChartData.cs:141-160 — before extracting anything, compare `ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs` and `ooxml/XDDF/UserModel/Chart/XDDFLine3DChartData.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (20–21 lines × 2) main/HSSF/Record/Aggregates/Chart/ChartSheetAggregate.cs:92— main/HSSF/Record/Aggregates/Chart/ChartSheetAggregate.cs:92-112 | main/HSSF/Record/Aggregates/ChartSubstreamRecordAggregate.cs:78-97 — 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 (18–19 lines × 2) main/SS/UserModel/TableStyleType.cs:134— main/SS/UserModel/TableStyleType.cs:134-151 | main/SS/UserModel/TableStyleType.cs:159-177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `main/SS/UserModel/TableStyleType.cs:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–19 lines × 2) ooxml/POIFS/Crypt/Agile/AgileDecryptor.cs:141— ooxml/POIFS/Crypt/Agile/AgileDecryptor.cs:141-159 | ooxml/POIFS/Crypt/Agile/AgileDecryptor.cs:206-216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ooxml/POIFS/Crypt/Agile/AgileDecryptor.cs:141` 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 (17–19 lines × 2) ooxml/XSSF/EventUserModel/XSSFBReader.cs:265— ooxml/XSSF/EventUserModel/XSSFBReader.cs:265-283 | ooxml/XSSF/EventUserModel/XSSFBReader.cs:291-307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ooxml/XSSF/EventUserModel/XSSFBReader.cs:264` calls `GetUInt` and `ooxml/XSSF/EventUserModel/XSSFBReader.cs:291` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (15–17 lines × 6) main/SS/Formula/Functions/Dec2Bin.cs:60— main/SS/Formula/Functions/Dec2Bin.cs:60-76 | main/SS/Formula/Functions/Dec2Bin.cs:91-107 | main/SS/Formula/Functions/Dec2Hex.cs:65-81 | main/SS/Formula/Functions/Dec2Hex.cs:96-112 | main/SS/Formula/Functions/Delta.cs:51-65 | main/SS/Formula/Functions/Delta.cs:67-82 — there are 6 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. 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–17 lines × 3) ooxml/XWPF/Usermodel/XWPFDocument.cs:235— ooxml/XWPF/Usermodel/XWPFDocument.cs:235-251 | ooxml/XWPF/Usermodel/XWPFFooter.cs:154-168 | ooxml/XWPF/Usermodel/XWPFFootnotes.cs:103-117 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ooxml/XWPF/Usermodel/XWPFDocument.cs:235` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16–17 lines × 2) ooxml/XSSF/Streaming/SXSSFCell.cs:643— ooxml/XSSF/Streaming/SXSSFCell.cs:643-659 | ooxml/XSSF/UserModel/XSSFCell.cs:1150-1165 — 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 `ooxml/XSSF/Streaming/SXSSFCell.cs:643` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (16 lines × 3) main/SS/Formula/Functions/ArrayFunction.cs:72— main/SS/Formula/Functions/ArrayFunction.cs:72-87 | main/SS/Formula/Functions/ArrayFunction.cs:94-109 | main/SS/Formula/Functions/ArrayFunction.cs:204-219 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `main/SS/Formula/Functions/ArrayFunction.cs:72` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (14–16 lines × 2) main/HSSF/UserModel/HSSFRow.cs:459— main/HSSF/UserModel/HSSFRow.cs:459-472 | ooxml/XSSF/Streaming/SXSSFRow.cs:286-301 — 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 `ooxml/XSSF/Streaming/SXSSFRow.cs:286` 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 (14–15 lines × 6) ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:113— ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:113-127 | ooxml/XDDF/UserModel/Chart/XDDFBarChartData.cs:183-196 | ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs:128-141 | ooxml/XDDF/UserModel/Chart/XDDFPieChartData.cs:100-113 | ooxml/XDDF/UserModel/Chart/XDDFRadarChartData.cs:139-152 | ooxml/XDDF/UserModel/Chart/XDDFScatterChartData.cs:241-254 — 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.
Duplicated block (15 lines × 3) main/HSSF/Model/InternalChart.cs:746— main/HSSF/Model/InternalChart.cs:746-760 | main/HSSF/Model/InternalSheet.cs:1190-1204 | main/HSSF/Record/Aggregates/PageSettingsBlock.cs:323-337 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12–15 lines × 2) main/SS/Formula/Atp/XLookupFunction.cs:101— main/SS/Formula/Atp/XLookupFunction.cs:101-112 | main/SS/Formula/Atp/XMatchFunction.cs:75-89 — before extracting anything, compare `main/SS/Formula/Atp/XLookupFunction.cs` and `main/SS/Formula/Atp/XMatchFunction.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `main/SS/Formula/Atp/XLookupFunction.cs:101` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14–15 lines × 2) main/Util/Arrays.cs:198— main/Util/Arrays.cs:198-212 | main/Util/Arrays.cs:673-686 — both copies are in the same file, so extract the 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 `main/Util/Arrays.cs:198` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 4) main/SS/Util/PropertyTemplate.cs:368— main/SS/Util/PropertyTemplate.cs:368-377 | main/SS/Util/PropertyTemplate.cs:417-426 | main/SS/Util/PropertyTemplate.cs:744-753 | main/SS/Util/PropertyTemplate.cs:794-803 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `main/SS/Util/PropertyTemplate.cs:368` 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) main/HSSF/Record/Aggregates/Chart/ChartSheetAggregate.cs:97— main/HSSF/Record/Aggregates/Chart/ChartSheetAggregate.cs:97-111 | main/HSSF/Record/Aggregates/ChartSubstreamRecordAggregate.cs:83-96 | main/HSSF/Record/Aggregates/CustomViewSettingsRecordAggregate.cs:85-98 — 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. 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–14 lines × 2) main/POIFS/FileSystem/DocumentFactoryHelper.cs:199— main/POIFS/FileSystem/DocumentFactoryHelper.cs:199-212 | main/POIFS/FileSystem/DocumentFactoryHelper.cs:227-238 — both copies are in the same file, so extract the 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 `main/POIFS/FileSystem/DocumentFactoryHelper.cs:199` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12–13 lines × 6) main/HSSF/Model/InternalWorkbook.cs:1733— main/HSSF/Model/InternalWorkbook.cs:1733-1744 | main/HSSF/Model/InternalWorkbook.cs:1914-1926 | main/HSSF/Model/InternalWorkbook.cs:1988-1999 | main/HSSF/Model/InternalWorkbook.cs:2000-2011 | main/HSSF/Model/InternalWorkbook.cs:2012-2023 | main/HSSF/Model/InternalWorkbook.cs:2024-2035 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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, `main/HSSF/Model/InternalWorkbook.cs:1733` calls `unchecked` and `main/HSSF/Model/InternalWorkbook.cs:1914` 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 (10–13 lines × 3) ooxml/XSSF/UserModel/XSSFConnector.cs:61— ooxml/XSSF/UserModel/XSSFConnector.cs:61-70 | ooxml/XSSF/UserModel/XSSFFreeform.cs:58-67 | ooxml/XSSF/UserModel/XSSFPicture.cs:99-111 — 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 (11–13 lines × 2) main/DDF/EscherDggRecord.cs:111— main/DDF/EscherDggRecord.cs:111-123 | main/DDF/EscherSplitMenuColorsRecord.cs:72-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. Read the line range as the matched WINDOW rather than a finished unit: at `main/DDF/EscherDggRecord.cs:111` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12–13 lines × 2) main/SS/Formula/Atp/MRound.cs:49— main/SS/Formula/Atp/MRound.cs:49-61 | main/SS/Formula/Atp/RandBetween.cs:59-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. Read the line range as the matched WINDOW rather than a finished unit: at `main/SS/Formula/Atp/MRound.cs:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11–12 lines × 25) main/HSSF/Model/InternalWorkbook.cs:1735— main/HSSF/Model/InternalWorkbook.cs:1735-1745 | main/HSSF/Model/InternalWorkbook.cs:1747-1757 | main/HSSF/Model/InternalWorkbook.cs:1759-1769 | main/HSSF/Model/InternalWorkbook.cs:1771-1781 | main/HSSF/Model/InternalWorkbook.cs:1783-1793 | main/HSSF/Model/InternalWorkbook.cs:1795-1805 | main/HSSF/Model/InternalWorkbook.cs:1807-1817 | main/HSSF/Model/InternalWorkbook.cs:1819-1829 | main/HSSF/Model/InternalWorkbook.cs:1831-1841 | main/HSSF/Model/InternalWorkbook.cs:1843-1853 | main/HSSF/Model/InternalWorkbook.cs:1855-1865 | main/HSSF/Model/InternalWorkbook.cs:1867-1877 | main/HSSF/Model/InternalWorkbook.cs:1879-1889 | main/HSSF/Model/InternalWorkbook.cs:1891-1901 | main/HSSF/Model/InternalWorkbook.cs:1903-1914 | main/HSSF/Model/InternalWorkbook.cs:1916-1927 | main/HSSF/Model/InternalWorkbook.cs:1929-1939 | main/HSSF/Model/InternalWorkbook.cs:1941-1951 | main/HSSF/Model/InternalWorkbook.cs:1953-1963 | main/HSSF/Model/InternalWorkbook.cs:1965-1975 | main/HSSF/Model/InternalWorkbook.cs:1977-1988 | main/HSSF/Model/InternalWorkbook.cs:1990-2000 | main/HSSF/Model/InternalWorkbook.cs:2002-2012 | main/HSSF/Model/InternalWorkbook.cs:2014-2024 | main/HSSF/Model/InternalWorkbook.cs:2026-2036 — all 25 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `main/HSSF/Model/InternalWorkbook.cs:1733` calls `unchecked` and `main/HSSF/Model/InternalWorkbook.cs:1914` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (11–12 lines × 2) main/SS/Formula/Functions/Dec2Bin.cs:138— main/SS/Formula/Functions/Dec2Bin.cs:138-149 | main/SS/Formula/Functions/Dec2Hex.cs:146-156 — 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 (10–11 lines × 2) main/DDF/AbstractEscherOptRecord.cs:229— main/DDF/AbstractEscherOptRecord.cs:229-239 | main/DDF/EscherOptRecord.cs:91-100 — 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 (4–11 lines × 3) main/HSSF/Record/Chart/DataLabExtRecord.cs:73— main/HSSF/Record/Chart/DataLabExtRecord.cs:73-83 | main/HSSF/Record/Chart/DataLabelExtensionRecord.cs:74-84 | main/HSSF/Record/TableStylesRecord.cs:92-95 — before extracting anything, compare `main/HSSF/Record/Chart/DataLabExtRecord.cs` and `main/HSSF/Record/Chart/DataLabelExtensionRecord.cs` as WHOLE FILES: 94% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `main/HSSF/Record/TableStylesRecord.cs:90` calls `StringBuilder`, `Append` and `main/HSSF/Record/Chart/DataLabExtRecord.cs:73` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 6) ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:76— ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:76-84 | ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs:122-130 | ooxml/XDDF/UserModel/Chart/XDDFLine3DChartData.cs:77-85 | ooxml/XDDF/UserModel/Chart/XDDFPie3DChartData.cs:41-49 | ooxml/XDDF/UserModel/Chart/XDDFSurface3DChartData.cs:82-90 | ooxml/XDDF/UserModel/Chart/XDDFSurfaceChartData.cs:82-90 — before extracting anything, compare `ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs` and `ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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 `ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:76` 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 (7 lines × 7) main/HSSF/Model/InternalWorkbook.cs:1914— main/HSSF/Model/InternalWorkbook.cs:1914-1920 | main/HSSF/Model/InternalWorkbook.cs:1988-1994 | main/HSSF/Model/InternalWorkbook.cs:2000-2006 | main/HSSF/Model/InternalWorkbook.cs:2012-2018 | main/HSSF/Model/InternalWorkbook.cs:2024-2030 | main/HSSF/Model/InternalWorkbook.cs:2036-2042 | main/HSSF/Model/InternalWorkbook.cs:2061-2067 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 5) ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:77— ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:77-84 | ooxml/XDDF/UserModel/Chart/XDDFBarChartData.cs:143-150 | ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs:90-97 | ooxml/XDDF/UserModel/Chart/XDDFPieChartData.cs:61-68 | ooxml/XDDF/UserModel/Chart/XDDFRadarChartData.cs:101-108 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:77` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8–9 lines × 4) main/HSSF/Model/InternalChart.cs:745— main/HSSF/Model/InternalChart.cs:745-753 | main/HSSF/Model/InternalSheet.cs:1189-1197 | main/HSSF/Record/Aggregates/PageSettingsBlock.cs:322-330 | main/HSSF/UserModel/HSSFChart.cs:375-382 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `main/HSSF/Model/InternalChart.cs:745` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 3) main/HSSF/UserModel/HSSFChart.cs:518— main/HSSF/UserModel/HSSFChart.cs:518-525 | main/HSSF/UserModel/HSSFChart.cs:718-725 | main/HSSF/UserModel/HSSFChart.cs:855-862 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7–8 lines × 2) main/DDF/EscherSpRecord.cs:83— main/DDF/EscherSpRecord.cs:83-90 | main/DDF/EscherSpgrRecord.cs:73-79 — 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 `main/DDF/EscherSpRecord.cs:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (4–7 lines × 5) main/DDF/EscherBitmapBlip.cs:144— main/DDF/EscherBitmapBlip.cs:144-148 | main/DDF/EscherBlipRecord.cs:170-173 | main/DDF/EscherClientAnchorRecord.cs:195-201 | main/DDF/EscherClientDataRecord.cs:124-130 | main/DDF/UnknownEscherRecord.cs:226-229 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `main/DDF/EscherClientAnchorRecord.cs:195` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `main/DDF/EscherBitmapBlip.cs:148` calls `Append`, `ToHex` and `main/DDF/EscherBlipRecord.cs:173` 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 (4–5 lines × 4) main/DDF/EscherArrayProperty.cs:168— main/DDF/EscherArrayProperty.cs:168-172 | main/DDF/EscherComplexProperty.cs:181-184 | main/DDF/EscherRGBProperty.cs:78-82 | main/DDF/EscherSimpleProperty.cs:139-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `main/DDF/EscherArrayProperty.cs:168` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `main/DDF/EscherComplexProperty.cs:180` calls `ToHex`, `StringBuilder` and `main/DDF/EscherArrayProperty.cs:168` 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 (3–5 lines × 3) main/DDF/EscherBitmapBlip.cs:146— main/DDF/EscherBitmapBlip.cs:146-148 | main/DDF/EscherMetafileBlip.cs:357-361 | main/DDF/EscherPictBlip.cs:289-293 — before extracting anything, compare `main/DDF/EscherMetafileBlip.cs` and `main/DDF/EscherPictBlip.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 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 `main/DDF/EscherMetafileBlip.cs:357` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `main/DDF/EscherBitmapBlip.cs:144` calls `ToHex`, `StringBuilder` and `main/DDF/EscherMetafileBlip.cs:357` 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 (45 lines × 2) main/POIFS/Crypt/Standard/StandardEncryptionInfoBuilder.cs:53— main/POIFS/Crypt/Standard/StandardEncryptionInfoBuilder.cs:53-104 | ooxml/POIFS/Crypt/Agile/AgileEncryptionInfoBuilder.cs:53-97 — 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 (54 lines × 2) ooxml/XDDF/UserModel/XDDFGradientStop.cs:77— ooxml/XDDF/UserModel/XDDFGradientStop.cs:77-130 | ooxml/XDDF/UserModel/XDDFSolidFillProperties.cs:80-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 4) main/SS/Formula/Functions/Averageifs.cs:159— main/SS/Formula/Functions/Averageifs.cs:159-169 | main/SS/Formula/Functions/Baseifs.cs:190-200 | main/SS/Formula/Functions/Rank.cs:166-176 | main/SS/Formula/Functions/Sumif.cs:159-171 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
Duplicated block (7 lines × 5) main/SS/Formula/Functions/BesselJ.cs:40— main/SS/Formula/Functions/BesselJ.cs:40-46 | main/SS/Formula/Functions/Delta.cs:89-96 | main/SS/Formula/Functions/DollarDe.cs:69-76 | main/SS/Formula/Functions/DollarFr.cs:66-73 | main/SS/Formula/Functions/TInv.cs:38-44 — before extracting anything, compare `main/SS/Formula/Functions/DollarDe.cs` and `main/SS/Formula/Functions/DollarFr.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 (5 lines × 10) main/SS/Formula/Functions/BesselJ.cs:48— main/SS/Formula/Functions/BesselJ.cs:48-52 | main/SS/Formula/Functions/DollarDe.cs:12-16 | main/SS/Formula/Functions/DollarFr.cs:75-79 | main/SS/Formula/Functions/NormDist.cs:64-68 | main/SS/Formula/Functions/NormInv.cs:62-66 | main/SS/Formula/Functions/NormSDist.cs:42-46 | main/SS/Formula/Functions/NormSInv.cs:42-46 | main/SS/Formula/Functions/Standardize.cs:53-57 | main/SS/Formula/Functions/TDist.cs:78-82 | main/SS/Formula/Functions/TInv.cs:31-35 — before extracting anything, compare `main/SS/Formula/Functions/DollarDe.cs` and `main/SS/Formula/Functions/DollarFr.cs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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) main/SS/Formula/Functions/Bin2Dec.cs:138— main/SS/Formula/Functions/Bin2Dec.cs:138-143 | main/SS/Formula/Functions/FactDouble.cs:93-98 | main/SS/Formula/Functions/Hex2Dec.cs:72-77 | main/SS/Formula/Functions/ImReal.cs:105-110 | main/SS/Formula/Functions/Imaginary.cs:118-123 | main/SS/Formula/Functions/Oct2Dec.cs:64-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 6 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 4) ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:44— ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:44-52 | ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs:49-57 | ooxml/XDDF/UserModel/Chart/XDDFLine3DChartData.cs:45-53 | ooxml/XDDF/UserModel/Chart/XDDFPie3DChartData.cs:26-34 — before extracting anything, compare `ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs` and `ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 6) ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:106— ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:106-115 | ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs:152-161 | ooxml/XDDF/UserModel/Chart/XDDFLine3DChartData.cs:107-116 | ooxml/XDDF/UserModel/Chart/XDDFPie3DChartData.cs:71-80 | ooxml/XDDF/UserModel/Chart/XDDFSurface3DChartData.cs:112-121 | ooxml/XDDF/UserModel/Chart/XDDFSurfaceChartData.cs:112-121 — before extracting anything, compare `ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs` and `ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 4) ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:119— ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:119-131 | ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs:165-177 | ooxml/XDDF/UserModel/Chart/XDDFLine3DChartData.cs:120-132 | ooxml/XDDF/UserModel/Chart/XDDFPie3DChartData.cs:84-96 — before extracting anything, compare `ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs` and `ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 6) ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:52— ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:52-58 | ooxml/XDDF/UserModel/Chart/XDDFBarChartData.cs:66-75 | ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs:65-74 | ooxml/XDDF/UserModel/Chart/XDDFPieChartData.cs:46-55 | ooxml/XDDF/UserModel/Chart/XDDFRadarChartData.cs:71-80 | ooxml/XDDF/UserModel/Chart/XDDFScatterChartData.cs:66-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 all 6 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `ooxml/XDDF/UserModel/Chart/XDDFBarChartData.cs:62` calls `DefineAxis`, `GetAxIdArray` and `ooxml/XDDF/UserModel/Chart/XDDFPieChartData.cs:43` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 6) ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:140— ooxml/XDDF/UserModel/Chart/XDDFAreaChartData.cs:140-152 | ooxml/XDDF/UserModel/Chart/XDDFBarChartData.cs:209-228 | ooxml/XDDF/UserModel/Chart/XDDFLineChartData.cs:154-173 | ooxml/XDDF/UserModel/Chart/XDDFPieChartData.cs:126-145 | ooxml/XDDF/UserModel/Chart/XDDFRadarChartData.cs:165-184 | ooxml/XDDF/UserModel/Chart/XDDFScatterChartData.cs:267-286 — 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.
Duplicated block (5 lines × 4) ooxml/XDDF/UserModel/Text/XDDFBodyProperties.cs:168— ooxml/XDDF/UserModel/Text/XDDFBodyProperties.cs:168-172 | ooxml/XDDF/UserModel/Text/XDDFParagraphProperties.cs:400-404 | ooxml/XDDF/UserModel/Text/XDDFRunProperties.cs:470-474 | ooxml/XDDF/UserModel/XDDFLineProperties.cs:240-244 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `ooxml/XDDF/UserModel/Text/XDDFBodyProperties.cs:168` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Off the main sequence: NPOI.Core(net472) main/NPOI.Core.csproj:1— NPOI.Core(net472): abstractness 0.15, instability 0.00, distance 0.85 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
Coverage not measured — no coverage collector is wired up — Coverage NOT MEASURED: `--collect:"XPlat Code Coverage"` names a data collector that ships in the `coverlet.collector` package, and this repository wires up none — no test project references it and no runsettings declares one. The absence of coverage here is therefore not evidence about the suite or about our analyzer environment: without a collector, `--collect` produces nothing even from a suite that builds and passes. Add a `coverlet.collector` PackageReference to the test project(s) (or commit the Cobertura/OpenCover/lcov report your CI produces) and real coverage will be measured. It is excluded from the score rather than counted as a near-zero defect.
Skeleton type — most members are unfinished OpenXmlFormats/DocumentPropertiesCustom.cs:78— `CT_Property` has 36 unfinished members out of 45 declared members (methods, properties, indexers and events, whether or not each carries a body) — a scaffolded type that was never implemented.
X18 · Disposal-pattern correctness· Finalizer on a type that owns no unmanaged resource · ×1
Finalizer on a type that owns no unmanaged resource main/POIFS/NIO/FileBackedDataSource.cs:98— `FileBackedDataSource` declares a finalizer (line 98), but nothing in the type is unmanaged: no `IntPtr`/`UIntPtr` or pointer field, no `SafeHandle`, no `HandleRef`, no `extern`/`DllImport` member and no `Marshal`/`GCHandle`/`NativeMemory` use. A finalizer can only release what the garbage collector cannot, so on a purely-managed type it releases nothing and costs something: every instance is put on the finalizer queue, survives at least one extra collection, and is then finalized on a thread that is NOT the disposing one — where the managed objects it touches may already have been finalized themselves. Delete the finalizer (and the `GC.SuppressFinalize` that exists to defuse it); if a handle is added later, wrap it in a `SafeHandle`, which brings its own correct finalization.
X18 · Disposal-pattern correctness· Owned disposable field is never released · ×1
Owned disposable field is never released openxml4Net/OPC/OPCPackage.cs:47— `OPCPackage` implements `IDisposable` — so it has told every caller it holds something worth releasing — and it constructs `relationships` itself (line 47), which makes that instance its own. But `relationships` is named in none of the methods the disposal search covered: `Dispose` (line 1832), `Close` (line 433) — that is `Dispose` plus every method `Dispose` calls BY NAME, so a release reached through an interface, a delegate or a base class is not followed and is worth checking before acting. On what was read, the type's disposal releases everything except the one thing it owns. A disposable the owner never disposes is held until finalization if its type has a finalizer, and forever if it does not — which for a synchronisation primitive, a timer, a stream or a handle means the resource accumulates once per instance for the life of the process. Release it in `Dispose` (`relationships?.Dispose();`), or, if it truly does not need releasing, drop `IDisposable` from the type so the claim and the behaviour agree.
X20 · Mistyped argument guard· Argument guard throws the exception its own condition disproves · ×1
Argument guard throws the exception its own condition disproves REDACTED:219— The guard on line 218 rejects `descriptor` and line 219 reports that rejection as `ArgumentNullException` — but the condition's own test `string.IsNullOrEmpty(descriptor)` is true of a value that is NOT null: it is satisfied by an EMPTY `descriptor`, and on that path `descriptor` was already proven non-null by the very expression that decided it (`||` short-circuits, so the null test to its left had to be false to get here). So a caller who passes a valid empty argument is told a parameter was null. That is not a wording problem: the exception type is the contract. A caller catching `ArgumentNullException` to handle a real null swallows the empty case with it, and whoever reads the stack trace later is told a failure the source disproves. .NET separates the two on purpose — `ArgumentNullException.ThrowIfNull` and `ArgumentException.ThrowIfNullOrEmpty` are two helpers because they are two failures. Throw `ArgumentException` for the empty case, or split the guard and throw each on its own condition.
X5 · Nullable reference types· Null guard scopes only part of the work it protects · ×1
Null guard scopes only part of the work it protects main/HSSF/UserModel/HSSFSheet.cs:1615— This method contradicts itself about `row`: line 1593 tests it for null before doing anything with it — the author's own statement that null is an input this code expects — but that `if` scopes only the block beneath it, and line 1615 then dereferences `row` as `row.Height` AFTER the block has closed, where the guard no longer applies. A null `row` skips the guarded body and reaches that line anyway, throwing NullReferenceException on exactly the input the guard was written for. If the dereference belongs to the guarded work, move it inside the block; if `row` truly cannot be null by then, the guard above is misleading and should go.
Orphaned file ooxml/XSSF/EventUserModel/XSSFReader.cs: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 ooxml/POIFS/Crypt/Dsig/Facets/OOXMLSignatureFacet.cs: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 ooxml/POIFS/Crypt/Agile/AgileDecryptor.cs: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 ooxml/XSSF/Extractor/EmbeddedExtractor.cs: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 ooxml/POIFS/Crypt/Dsig/Facets/XAdESXLSignatureFacet.cs: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 main/POIFS/Macros/VBAMacroReader.cs: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 main/Util/InputStream.cs: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 main/POIFS/Crypt/DataSpaceMapUtils.cs: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 ooxml/XSSF/Streaming/AutoSizeColumnTracker.cs: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 main/Util/PushbackInputStream.cs: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 ooxml/XWPF/Usermodel/XWPFComment.cs: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 main/Util/CodePageUtil.cs: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 main/POIFS/Crypt/Standard/StandardDecryptor.cs: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 main/SS/Util/ImageUtils.cs: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 ooxml/XDDF/UserModel/Text/XDDFRunProperties.cs: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 main/HSSF/Record/Chart/AxisOptionsRecord.cs: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 ooxml/XSSF/Binary/XSSFBSheetHandler.cs: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 ooxml/XDDF/UserModel/Chart/XDDFDataSourcesFactory.cs: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 main/POIFS/Crypt/ChunkedCipherOutputStream.cs: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 main/SS/Formula/BaseFormulaEvaluator.cs: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 main/SS/Formula/ConditionalFormattingEvaluator.cs: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 main/DDF/EscherColorRef.cs: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 main/SS/UserModel/TableStyleType.cs: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 ooxml/XSSF/UserModel/XSSFFreeform.cs: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 main/POIFS/FileSystem/DocumentFactoryHelper.cs: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 main/SS/Formula/Functions/Count.cs:134— `!areEval.IsSubTotal(rowIndex, columnIndex) && !areEval.IsRowHidden(rowIndex)` appears character-identically in 2 files — main/SS/Formula/Functions/Count.cs, main/SS/Formula/Functions/Counta.cs. 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 main/Util/IntList.cs:256— `!rval && (o != null) && (o.GetType() == this.GetType())` appears character-identically in 2 files — main/Util/IntList.cs, main/Util/ShortList.cs. 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 main/HSSF/UserModel/HSSFWorkbook.cs:511— `(active < oldIndex && active < newIndex) || (active > oldIndex && active > newIndex)` appears character-identically in 2 files — main/HSSF/UserModel/HSSFWorkbook.cs, ooxml/XSSF/UserModel/XSSFWorkbook.cs. 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 main/POIFS/FileSystem/NPOIFSStream.cs:237— `(off < 0) || (off > b.Length) || (len < 0) || ((off + len) > b.Length) || ((off + len) < 0)` appears character-identically in 2 files — main/POIFS/FileSystem/NPOIFSStream.cs, main/Util/OutputStream.cs. 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 main/HSSF/Record/Chart/AlRunsRecord.cs:135— `(oldPos == ctf.Offset) && (idx < (m_formats.Count - 1))` appears character-identically in 2 files — main/HSSF/Record/Chart/AlRunsRecord.cs, main/HSSF/Record/Chart/ChartTitleFormatRecord.cs. 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 main/HSSF/Record/BlankRecord.cs:150— `(this.Row == loc.Row) && (this.Column == loc.Column)` appears character-identically in 3 files — main/HSSF/Record/BlankRecord.cs, main/HSSF/Record/CellRecord.cs, main/HSSF/Record/FormulaRecord.cs. 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 main/HSSF/UserModel/HSSFRow.cs:773— `(this.RowNum == other.RowNum) && (this.Sheet == other.Sheet)` appears character-identically in 2 files — main/HSSF/UserModel/HSSFRow.cs, ooxml/XSSF/Streaming/SXSSFRow.cs. 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 main/HSSF/UserModel/HSSFCell.cs:866— `CellType != CellType.Numeric && CellType != CellType.Formula` appears character-identically in 3 files — main/HSSF/UserModel/HSSFCell.cs, ooxml/XSSF/Streaming/SXSSFCell.cs, ooxml/XSSF/UserModel/XSSFCell.cs. 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 main/SS/Formula/Eval/TwoOperandNumeric/TwoOperandNumericOperation.cs:41— `Double.IsNaN(result) || Double.IsInfinity(result)` appears character-identically in 7 files — main/SS/Formula/Eval/TwoOperandNumeric/TwoOperandNumericOperation.cs, main/SS/Formula/Functions/Dollar.cs, main/SS/Formula/Functions/LinearRegressionFunction.cs, main/SS/Formula/Functions/NumberValueFunction.cs. 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 main/HSSF/UserModel/HSSFSheet.cs:758— `arrayRange.NumberOfCells > 1 && region.Intersects(arrayRange)` appears character-identically in 2 files — main/HSSF/UserModel/HSSFSheet.cs, ooxml/XSSF/UserModel/XSSFSheet.cs. 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 main/HSSF/UserModel/HSSFRow.cs:465— `cell != null && cell.CellType == CellType.Blank` appears character-identically in 4 files — main/HSSF/UserModel/HSSFRow.cs, ooxml/XSSF/Streaming/SXSSFRow.cs, ooxml/XSSF/UserModel/XSSFColumn.cs, ooxml/XSSF/UserModel/XSSFRow.cs. 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 main/HSSF/UserModel/HSSFName.cs:178— `char.IsLetter(c) || allowedSymbols.Contains(c)` appears character-identically in 2 files — main/HSSF/UserModel/HSSFName.cs, ooxml/XSSF/UserModel/XSSFName.cs. 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 main/HSSF/UserModel/HSSFName.cs:188— `char.IsLetterOrDigit(ch) || allowedSymbols.Contains(ch)` appears character-identically in 2 files — main/HSSF/UserModel/HSSFName.cs, ooxml/XSSF/UserModel/XSSFName.cs. 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 ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs:27— `chart.axId == null || chart.axId.Count == 0` appears character-identically in 5 files — ooxml/XDDF/UserModel/Chart/XDDFArea3DChartData.cs, ooxml/XDDF/UserModel/Chart/XDDFBar3DChartData.cs, ooxml/XDDF/UserModel/Chart/XDDFLine3DChartData.cs, ooxml/XDDF/UserModel/Chart/XDDFSurface3DChartData.cs. 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 ooxml/XSSF/UserModel/XSSFClientAnchor.cs:233— `col.min <= iCol + 1 && iCol + 1 <= col.max` appears character-identically in 2 files — ooxml/XSSF/UserModel/XSSFClientAnchor.cs, ooxml/XSSF/UserModel/XSSFSheet.cs. 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 main/HSSF/Record/AbstractEscherHolderRecord.cs:129— `escherRecords.Count == 0 && rawData != null` appears character-identically in 2 files — main/HSSF/Record/AbstractEscherHolderRecord.cs, main/HSSF/Record/DrawingGroupRecord.cs. 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 scratchpad/HWPF/Model/CHPBinTable.cs:257— `existing.Start == startInclusive && existing.End == endExclusive` appears character-identically in 2 files — scratchpad/HWPF/Model/CHPBinTable.cs, scratchpad/HWPF/Model/PAPBinTable.cs. 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 scratchpad/HWPF/SPRM/SprmBuffer.cs:80— `i.Operation == operation && i.Type == type` appears character-identically in 2 files — scratchpad/HWPF/SPRM/SprmBuffer.cs, scratchpad/HWPF/SPRM/SprmOperation.cs. 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 scratchpad/HWPF/Model/CHPBinTable.cs:127— `igrpprl < 0 || igrpprl >= sprmBuffers.Length` appears character-identically in 2 files — scratchpad/HWPF/Model/CHPBinTable.cs, scratchpad/HWPF/Model/PAPBinTable.cs. 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 main/HSSF/UserModel/HSSFName.cs:170— `name.Equals("R", StringComparison.OrdinalIgnoreCase) || name.Equals("C", StringComparison.OrdinalIgnoreCase)` appears character-identically in 2 files — main/HSSF/UserModel/HSSFName.cs, ooxml/XSSF/UserModel/XSSFName.cs. 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 main/POIFS/FileSystem/NDocumentInputStream.cs:162— `off < 0 || len < 0 || b.Length < off + len` appears character-identically in 2 files — main/POIFS/FileSystem/NDocumentInputStream.cs, main/POIFS/FileSystem/ODocumentInputStream.cs. 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 main/Util/ByteArrayInputStream.cs:50— `off < 0 || len < 0 || len > b.Length - off` appears character-identically in 4 files — main/Util/ByteArrayInputStream.cs, main/Util/InputStream.cs, main/Util/PushbackInputStream.cs, main/Util/ReplacingInputStream.cs. 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 main/HSSF/UserModel/HSSFSheet.cs:2452— `range.FirstColumn <= mergedRegion.FirstColumn && range.LastColumn >= mergedRegion.LastColumn && range.FirstRow <= mergedRegion.FirstRow && r…` appears character-identically in 2 files — main/HSSF/UserModel/HSSFSheet.cs, ooxml/XSSF/UserModel/XSSFSheet.cs. 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 ooxml/XSSF/EventUserModel/ReadOnlySharedStringsTable.cs:181— `reader.NodeType == XmlNodeType.Text || reader.NodeType == XmlNodeType.SignificantWhitespace || reader.NodeType == XmlNodeType.Whitespace` appears character-identically in 2 files — ooxml/XSSF/EventUserModel/ReadOnlySharedStringsTable.cs, ooxml/XSSF/Extractor/XSSFEventBasedExcelExtractor.cs. 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 main/HSSF/Record/FormatRecord.cs:161— `requestedLength < 0 || requestedLength > 0x100000` appears character-identically in 2 files — main/HSSF/Record/FormatRecord.cs, main/HSSF/Record/RecordInputStream.cs. 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.
Silent fallback default in catch main/HSSF/Util/RangeAddress.cs:328— `GetYPosition` swallows every exception and sets `result = WRONG_POS;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Atp/XLookupFunction.cs:72— `_evaluate` swallows every exception into `return ErrorEval.VALUE_INVALID;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Atp/XMatchFunction.cs:47— `_evaluate` swallows every exception into `return ErrorEval.VALUE_INVALID;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Functions/Areas.cs:27— `Evaluate` swallows every exception into `return ErrorEval.VALUE_INVALID;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Functions/Complex.cs:66— `Evaluate` swallows `EvaluationException` into `return ErrorEval.VALUE_INVALID;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Functions/DateValue.cs:80— `Evaluate` swallows `FormatException` into `return ErrorEval.VALUE_INVALID;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Functions/FactDouble.cs:61— `Evaluate` swallows `EvaluationException` into `return ErrorEval.VALUE_INVALID;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Functions/Hex2Dec.cs:64— `Evaluate` swallows `ArgumentException` into `return ErrorEval.NUM_ERROR;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Functions/Matrix/MatrixFunction.cs:239— `Evaluate` swallows `ArgumentException` into `return ErrorEval.VALUE_INVALID;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Functions/Oct2Dec.cs:56— `Evaluate` swallows `ArgumentException` into `return ErrorEval.NUM_ERROR;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Functions/Quotient.cs:34— `Evaluate` swallows `EvaluationException` into `return ErrorEval.VALUE_INVALID;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Functions/Rept.cs:47— `Evaluate` swallows `EvaluationException` into `return ErrorEval.VALUE_INVALID;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Functions/Roman.cs:58— `Evaluate` swallows `EvaluationException` into `return ErrorEval.VALUE_INVALID;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch main/SS/Formula/Functions/WeekNum.cs:61— `Evaluate` swallows `EvaluationException` into `return ErrorEval.VALUE_INVALID;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch REDACTED:772— `HasOleLink` swallows every exception into `return false;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Silent fallback default in catch scratchpad/HWPF/UserModel/BookmarksImpl.cs:204— `Name` swallows `IndexOutOfRangeException` into `return "";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
Fat interface: IEvaluationWorkbook (16 members) main/SS/Formula/EvaluationWorkbook.cs:84— `IEvaluationWorkbook` declares 16 members under just 12 distinct name(s): `GetSheetName`, `GetSheetIndex`, `GetSheetIndex`, `GetSheet`, `GetExternalSheet`, `GetExternalSheet`, `ConvertFromExternSheetIndex`, `GetExternalName`, `GetExternalName`, `GetName`, `GetName`, `ResolveNameXText`, `GetFormulaTokens`, `GetUDFFinder`, `ClearAllCachedResultValues`, `GetSpreadsheetVersion`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. That is an OVERLOAD SET, not 16 separate responsibilities: a caller binds to 12 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller's side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER's — all 16 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface.
Fat interface: IBorderFormatting (21 members) main/SS/UserModel/BorderFormatting.cs:26— `IBorderFormatting` declares 21 members: `BorderBottom`, `BorderDiagonal`, `BorderLeft`, `BorderRight`, `BorderTop`, `BorderVertical`, `BorderHorizontal`, `BottomBorderColor`, `DiagonalBorderColor`, `LeftBorderColor`, `RightBorderColor`, `TopBorderColor`, `BottomBorderColorColor`, `DiagonalBorderColorColor`, `LeftBorderColorColor`, `RightBorderColorColor`, `TopBorderColorColor`, `VerticalBorderColor`, `VerticalBorderColorColor`, `HorizontalBorderColor`, `HorizontalBorderColorColor`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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: ICell (36 members) main/SS/UserModel/Cell.cs:53— `ICell` declares 36 members: `ColumnIndex`, `RowIndex`, `Sheet`, `Row`, `CellType`, `SetCellType`, `SetBlank`, `CachedFormulaResultType`, `SetCellValue`, `SetCellErrorValue`, `SetCellValue`, `SetCellValue`, `SetCellValue`, `CopyCellTo`, `CellFormula`, `RemoveFormula`, `SetCellFormula`, `NumericCellValue`, `DateCellValue`, `RichStringCellValue`, `ErrorCellValue`, `StringCellValue`, `SetCellValue`, `BooleanCellValue`, `CellStyle`, `Style`, `SetAsActiveCell`, `Address`, `CellComment`, `RemoveCellComment`, `Hyperlink`, `RemoveHyperlink`, `ArrayFormulaRange`, `IsPartOfArrayFormulaGroup`, `IsMergedCell`, `GetCachedFormulaResultTypeEnum`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 36 declarations carry 32 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 32 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ICellStyle (34 members) main/SS/UserModel/CellStyle.cs:24— `ICellStyle` declares 34 members: `ShrinkToFit`, `Index`, `DataFormat`, `GetDataFormatString`, `FormatString`, `SetFont`, `FontIndex`, `IsHidden`, `IsLocked`, `IsQuotePrefixed`, `Alignment`, `WrapText`, `VerticalAlignment`, `Rotation`, `Indention`, `BorderLeft`, `BorderRight`, `BorderTop`, `BorderBottom`, `LeftBorderColor`, `RightBorderColor`, `TopBorderColor`, `BottomBorderColor`, `FillPattern`, `FillBackgroundColor`, `FillForegroundColor`, `CloneStyleFrom`, `GetFont`, `BorderDiagonalColor`, `BorderDiagonalLineStyle`, `BorderDiagonal`, `FillBackgroundColorColor`, `FillForegroundColorColor`, `ReadingOrder`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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: IColumn (22 members) main/SS/UserModel/Column.cs:25— `IColumn` declares 22 members: `CreateCell`, `CreateCell`, `RemoveCell`, `ColumnNum`, `GetCell`, `GetCell`, `FirstCellNum`, `LastCellNum`, `PhysicalNumberOfCells`, `ZeroWidth`, `Width`, `IsFormatted`, `IsBestFit`, `Sheet`, `ColumnStyle`, `MoveCell`, `CopyColumnTo`, `CopyCell`, `Cells`, `OutlineLevel`, `Hidden`, `Collapsed`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 22 declarations carry 20 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 20 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IConditionalFormattingRule (19 members) main/SS/UserModel/ConditionalFormattingRule.cs:27— `IConditionalFormattingRule` declares 19 members: `CreateBorderFormatting`, `BorderFormatting`, `CreateFontFormatting`, `FontFormatting`, `CreatePatternFormatting`, `PatternFormatting`, `DataBarFormatting`, `MultiStateFormatting`, `ColorScaleFormatting`, `ConditionType`, `ComparisonOperation`, `Formula1`, `Formula2`, `Text`, `Priority`, `StopIfTrue`, `NumberFormat`, `ConditionFilterType`, `FilterConfiguration`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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: IPrintSetup (20 members) main/SS/UserModel/PrintSetup.cs:33— `IPrintSetup` declares 20 members: `PaperSize`, `Scale`, `PageStart`, `FitWidth`, `FitHeight`, `LeftToRight`, `Landscape`, `ValidSettings`, `NoColor`, `Draft`, `Notes`, `NoOrientation`, `UsePage`, `HResolution`, `VResolution`, `HeaderMargin`, `FooterMargin`, `Copies`, `EndNote`, `CellError`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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: IRow (23 members) main/SS/UserModel/Row.cs:37— `IRow` declares 23 members: `CreateCell`, `CreateCell`, `RemoveCell`, `RowNum`, `GetCell`, `GetCell`, `FirstCellNum`, `LastCellNum`, `PhysicalNumberOfCells`, `ZeroHeight`, `Height`, `HeightInPoints`, `IsFormatted`, `Sheet`, `RowStyle`, `MoveCell`, `CopyRowTo`, `CopyCell`, `Cells`, `OutlineLevel`, `HasCustomHeight`, `Hidden`, `Collapsed`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 23 declarations carry 21 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 21 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ISheet (115 members) main/SS/UserModel/Sheet.cs:88— `ISheet` declares 115 members: `CreateRow`, `RemoveRow`, `GetRow`, `PhysicalNumberOfRows`, `FirstRowNum`, `LastRowNum`, `ForceFormulaRecalculation`, `SetColumnHidden`, `IsColumnHidden`, `CopyRow`, `CopyComment`, `SetColumnWidth`, `GetColumnWidth`, `GetColumnWidthInPixels`, `DefaultColumnWidth`, `DefaultRowHeight`, `DefaultRowHeightInPoints`, `GetColumnStyle`, `AddMergedRegion`, `AddMergedRegionUnsafe`, `ValidateMergedRegions`, `HorizontallyCenter`, `VerticallyCenter`, `RemoveMergedRegion`, `RemoveMergedRegions`, `NumMergedRegions`, `GetMergedRegion`, `MergedRegions`, `GetRowEnumerator`, `DisplayZeros`, `Autobreaks`, `DisplayGuts`, `FitToPage`, `RowSumsBelow`, `RowSumsRight`, `IsPrintGridlines`, `IsPrintRowAndColumnHeadings`, `PrintSetup`, `Header`, `Footer`, and 75 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 115 declarations carry 107 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 107 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IWorkbook (59 members) main/SS/UserModel/Workbook.cs:35— `IWorkbook` declares 59 members: `ActiveSheetIndex`, `FirstVisibleTab`, `SetSheetOrder`, `SetSelectedTab`, `SetActiveSheet`, `GetSheetName`, `SetSheetName`, `GetSheetIndex`, `GetSheetIndex`, `CreateSheet`, `CreateSheet`, `CloneSheet`, `NumberOfSheets`, `GetSheetAt`, `GetSheet`, `RemoveSheetAt`, `GetEnumerator`, `CreateFont`, `FindFont`, `NumberOfFonts`, `GetFontAt`, `CreateCellStyle`, `NumCellStyles`, `GetCellStyleAt`, `Write`, `NumberOfNames`, `GetName`, `GetNames`, `GetAllNames`, `GetNameAt`, `CreateName`, `GetNameIndex`, `RemoveName`, `RemoveName`, `RemoveName`, `LinkExternalWorkbook`, `SetPrintArea`, `SetPrintArea`, `GetPrintArea`, `RemovePrintArea`, and 19 more. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 59 declarations carry 53 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 53 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: ICell (39 members) main/SS/UserModel/Cell.cs:53— `ICell` declares 39 members: `ColumnIndex`, `RowIndex`, `Sheet`, `Row`, `CellType`, `SetCellType`, `SetBlank`, `CachedFormulaResultType`, `SetCellValue`, `SetCellErrorValue`, `SetCellValue`, `SetCellValue`, `SetCellValue`, `SetCellValue`, `CopyCellTo`, `CellFormula`, `RemoveFormula`, `SetCellFormula`, `NumericCellValue`, `DateCellValue`, `DateOnlyCellValue`, `TimeOnlyCellValue`, `RichStringCellValue`, `ErrorCellValue`, `StringCellValue`, `SetCellValue`, `BooleanCellValue`, `CellStyle`, `Style`, `SetAsActiveCell`, `Address`, `CellComment`, `RemoveCellComment`, `Hyperlink`, `RemoveHyperlink`, `ArrayFormulaRange`, `IsPartOfArrayFormulaGroup`, `IsMergedCell`, `GetCachedFormulaResultTypeEnum`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 39 declarations carry 34 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 34 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: IPackageProperties (35 members) REDACTED:14— `IPackageProperties` declares 35 members: `GetCategoryProperty`, `SetCategoryProperty`, `GetContentStatusProperty`, `SetContentStatusProperty`, `GetContentTypeProperty`, `SetContentTypeProperty`, `GetCreatedProperty`, `SetCreatedProperty`, `SetCreatedProperty`, `GetCreatorProperty`, `SetCreatorProperty`, `GetDescriptionProperty`, `SetDescriptionProperty`, `GetIdentifierProperty`, `SetIdentifierProperty`, `GetKeywordsProperty`, `SetKeywordsProperty`, `GetLanguageProperty`, `SetLanguageProperty`, `GetLastModifiedByProperty`, `SetLastModifiedByProperty`, `GetLastPrintedProperty`, `SetLastPrintedProperty`, `SetLastPrintedProperty`, `GetModifiedProperty`, `SetModifiedProperty`, `SetModifiedProperty`, `GetRevisionProperty`, `SetRevisionProperty`, `GetSubjectProperty`, `SetSubjectProperty`, `GetTitleProperty`, `SetTitleProperty`, `GetVersionProperty`, `SetVersionProperty`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. Those 35 declarations carry 32 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 32 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
Fat interface: Field (19 members) scratchpad/HWPF/UserModel/Field.cs:24— `Field` declares 19 members: `FirstSubrange`, `GetFieldEndOffset`, `GetFieldStartOffset`, `GetMarkEndCharacterRun`, `GetMarkEndOffset`, `GetMarkSeparatorCharacterRun`, `GetMarkSeparatorOffset`, `GetMarkStartCharacterRun`, `GetMarkStartOffset`, `Type`, `HasSeparator`, `IsHasSep`, `IsLocked`, `IsNested`, `IsPrivateResult`, `IsResultDirty`, `IsResultEdited`, `IsZombieEmbed`, `SecondSubrange`. Counted as the author wrote them — a property is ONE member and its get/set accessors are not counted separately, and an event counts once. 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.
Pass-through layer main/HSSF/Record/RecordInputStream.cs:55— SimpleHeaderInput: all 3 public methods forward their arguments unchanged to _lei and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call _lei directly, or give the layer a job.
Pass-through layer main/HSSF/Util/HSSFRegionUtil.cs:29— HSSFRegionUtil: all 8 public methods forward their arguments unchanged to RegionUtil and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call RegionUtil directly, or give the layer a job.
Pass-through layer ooxml/XSSF/Streaming/SXSSFWorkbook.cs:1036— SheetEnumerator: all 3 public methods forward their arguments unchanged to it and add no behaviour — an extra hop (and usually an extra interface) to trace through. Call it directly, or give the layer a job.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 16 significant file(s) lose their only recent owner: main/SS/Formula/WorkbookEvaluator.cs, main/SS/UserModel/DateUtil.cs, main/SS/Util/CellReference.cs, ooxml/XSSF/EventUserModel/XSSFSheetXMLHandler.cs, main/Util/IOUtils.cs, ooxml/XSSF/UserModel/XSSFFont.cs, ooxml/XSSF/EventUserModel/XSSFReader.cs, ooxml/XSSF/Extractor/XSSFEventBasedExcelExtractor.cs (+8 more). Pair on, review, or document these before any departure.
Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 9 significant file(s) lose their only recent owner: ooxml/XWPF/Usermodel/XWPFTableCell.cs, main/SS/UserModel/Workbook.cs, ooxml/XDDF/UserModel/Chart/XDDFChartAxis.cs, ooxml/POIXMLPropertiesTextExtractor.cs, ooxml/XWPF/Usermodel/XWPFChart.cs, main/SS/UserModel/CellStyle.cs, ooxml/XWPF/Usermodel/XWPFTheme.cs, main/SS/UserModel/NRowRange.cs (+1 more). Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 6 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (40 single-owned of 966 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 966 of the 2117 production source files in this repository met that bar). They are anonymized user #3 (2 file(s)), anonymized user #4 (2 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: main/SS/Util/AreaReference.cs, openxml4Net/OPC/Internal/MemoryPackagePart.cs, main/SS/Formula/LazyAreaEval.cs, main/SS/Formula/SheetRefEvaluator.cs, main/HSSF/Record/Crypto/Biff8DecryptingStream.cs, openxml4Net/Util/ZipThresholdStreams.cs, main/SS/Formula/Functions/Text/Replace.cs, main/Util/Number.cs.
Thin analysable surface across projects: HSSF scratchpad/HSSF/HSSF.csproj— 1 project(s) carry only a thin slice of real code; `HSSF` has 15 significant line(s). The mean analysable-surface weight is 88 %; this project lowers Solution Shape by about 1.0 point(s). Consolidate it or grow it into a substantial, well-scoped assembly.
No ADRs found — 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/`.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 4 of 17 project(s) overshoot their size bounds, lowering Project Cohesion to 5.3/10. The most over is `NPOI.Core(net472)` (213427 LoC, 1495 public types across 64 namespaces). Review these for cohesion — split a project that spans unrelated responsibilities.
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 268 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: ooxml/XSSF/EventUserModel/XSSFReader.cs, ooxml/POIFS/Crypt/Dsig/Facets/OOXMLSignatureFacet.cs, ooxml/POIFS/Crypt/Agile/AgileDecryptor.cs, ooxml/XSSF/Extractor/EmbeddedExtractor.cs, ooxml/POIFS/Crypt/Dsig/Facets/XAdESXLSignatureFacet.cs, main/POIFS/Macros/VBAMacroReader.cs, main/Util/InputStream.cs, main/POIFS/Crypt/DataSpaceMapUtils.cs (and 260 more) (289 orphaned of 1395 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated and example/demo trees and test files identified by path convention, largest first; 1395 of the 2117 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
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.)
Nullable reference types not enabled everywhere — 0/2 NRT-eligible project(s) enable <Nullable>enable</Nullable> (projects targeting a pre-C#-8 framework are excluded — NRTs aren't available there). NRTs catch a whole class of null-deref bugs at compile time.
Silent fallback default on parse failure ooxml/XSSF/Binary/XSSFBRecordType.cs:118— `Lookup` falls back to `XSSFBRecordType.Unimplemented` when `TYPE_MAP.TryGetValue(id, out XSSFBRecordType value)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Skipped (documented): TestInPlaceNPOIFSWrite testcases/main/HPSF/Basic/TestWrite.cs:556— Skipped with a documented reason — a deferral, not lazy debt: TODO FIX CI TESTS
Skipped (documented): TestWriteWellKnown1 testcases/main/HPSF/Basic/TestWriteWellKnown.cs:168— Skipped with a documented reason — a deferral, not lazy debt: should re-implement NPOIFSFileSystem
Skipped (documented): TestMainUsage testcases/main/HSSF/Extractor/TestOldExcelExtractor.cs:344— Skipped with a documented reason — a deferral, not lazy debt: Calls System.exit()
Skipped (documented): DISABLED_TestIndexPi1 testcases/main/HSSF/Model/TestOperandClassTransformer.cs:62— Skipped with a documented reason — a deferral, not lazy debt: this test is disabled in poi.
Skipped (documented): Test22568 REDACTED:217— Skipped with a documented reason — a deferral, not lazy debt: this test was not found in poi 3.8beta4
Skipped (documented): Test18800 REDACTED:336— Skipped with a documented reason — a deferral, not lazy debt: not found in poi 3.8beat4
Skipped (documented): Test22720 REDACTED:356— Skipped with a documented reason — a deferral, not lazy debt: this test was not found in poi 3.8beta4
Skipped (documented): Test28031 REDACTED:497— Skipped with a documented reason — a deferral, not lazy debt: not found in poi
Skipped (documented): DISABLED_Test43623 REDACTED:1435— Skipped with a documented reason — a deferral, not lazy debt: this test is disabled in poi.
Skipped (documented): Test50833 REDACTED:2642— Skipped with a documented reason — a deferral, not lazy debt: TODO NOT IMPLEMENTED
Skipped (documented): Test51832 REDACTED:2762— Skipped with a documented reason — a deferral, not lazy debt: TODO NOT IMPLEMENTED
Skipped (documented): Bug35897 REDACTED:2951— Skipped with a documented reason — a deferral, not lazy debt: TODO NOT IMPLEMENTED
Skipped (documented): Bug47245 testcases/main/HSSF/UserModel/TestHSSFWorkbook.cs:1157— Skipped with a documented reason — a deferral, not lazy debt: not found in poi 3.14
Skipped (documented): TestRewriteFileBug58480 testcases/main/HSSF/UserModel/TestHSSFWorkbook.cs:1164— Skipped with a documented reason — a deferral, not lazy debt: TODO FIX CI TESTS
Skipped (documented): InPlaceWrite testcases/main/HSSF/UserModel/TestHSSFWorkbook.cs:1325— Skipped with a documented reason — a deferral, not lazy debt: TODO FIX CI TESTS
Skipped (documented): TestWriteToNewFile testcases/main/HSSF/UserModel/TestHSSFWorkbook.cs:1369— Skipped with a documented reason — a deferral, not lazy debt: TODO FIX CI TESTS
Skipped (documented): TestCheckRecordOrder testcases/main/HSSF/UserModel/TestSanityChecker.cs:40— Skipped with a documented reason — a deferral, not lazy debt: TODO FIX CI TESTS
Skipped (documented): TestReadSingleByte testcases/main/POIFS/FileSystem/TestDocumentInputStream.cs:308— Skipped with a documented reason — a deferral, not lazy debt: TODO FIX CI TESTS
Skipped (documented): TestBufferRead testcases/main/POIFS/FileSystem/TestDocumentInputStream.cs:354— Skipped with a documented reason — a deferral, not lazy debt: TODO FIX CI TESTS
Skipped (documented): TestComplexBufferRead testcases/main/POIFS/FileSystem/TestDocumentInputStream.cs:428— Skipped with a documented reason — a deferral, not lazy debt: TODO FIX CI TESTS
Skipped (documented): CreateWriteRead testcases/main/POIFS/FileSystem/TestNPOIFSFileSystem.cs:975— Skipped with a documented reason — a deferral, not lazy debt: TODO FIX CI TESTS
Skipped (documented): CreationAndExtensionPast2GB testcases/main/POIFS/FileSystem/TestNPOIFSFileSystem.cs:1604— Skipped with a documented reason — a deferral, not lazy debt: Work in progress test for #60670
Skipped (documented): testPerformance testcases/main/POIFS/FileSystem/TestNPOIFSFileSystem.cs:1765— Skipped with a documented reason — a deferral, not lazy debt: Takes a long time to run
Skipped (documented): HSLFfromStream testcases/main/POIFS/Macros/TestVBAMacroReader.cs:98— Skipped with a documented reason — a deferral, not lazy debt: bug 59302: Found 0 macros
Skipped (documented): XSLFfromStream testcases/main/POIFS/Macros/TestVBAMacroReader.cs:105— Skipped with a documented reason — a deferral, not lazy debt: not support XSLF
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.
nuget: not applicable — nuget: the solution did not restore on the analyzer's .NET SDK (an SDK/target-framework/restore mismatch, common for an older codebase), so there was no restored dependency graph to scan
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 26 file(s) — `main/SS/Formula/Functions/Forecast.cs`, `scratchpad/HSLF/Model/ActiveXShape.cs`, `scratchpad/HSLF/Model/AutoShape.cs`, `scratchpad/HSLF/Model/AutoShapes.cs`, `scratchpad/HSLF/Model/Fill.cs`, … (+21 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
none (no readable dependency manifest): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Swift Package.swift/Package.resolved, a Cargo manifest, a Go module (go.mod/go.sum), a Gradle version catalogue, a Maven POM, an sbt build (build.sbt), composer.json, package.json, a Dart pubspec.yaml, an Elixir mix.exs/mix.lock (Hex), a rebar.config / erlang.mk DEPS (Hex), a Ruby Gemfile/Gemfile.lock or .gemspec (Bundler/RubyGems) — not scanned yet).
0
—
Run 01a168f6-310f-793f-a11f-cbdb051003c9 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 423 · Warnings: 3003 · Recommendations: 350 · Info: 124 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 23-10-2026 @ 13:32 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.