Public report of nissl-lab/npoi, published 12 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.3). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 12 November 2026, 05:27 UTC · Survey ID cd_505750d2dc0042b1b2a49df0bdaa2e22

nissl-lab/npoi

Measured 12 November 2026, 05:24 UTC, at code version 8c696a1

Code coverage is not measured: No coverage collector is wired up.

Boundary Type-Coupling is not measured: Bounded contexts not declared.

CAI score 49out of 100 Provisional Up 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: 525,236 lines of product code in 40 projects, tests not counted · Estimated rebuild effort: about 8.5 person-years · Weakest lens: Security and Compliance, 42

Findings by how serious they are

420 critical 3220 serious 646 minor

7 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
12 November 2026, 05:24 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

The code didn't build, so the score is provisional
We 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. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

61of 61 dimensions measured by tools.
4270of 4286 findings point to an exact file and line, so you can open each one in the code. The other 16 concern the repository as a whole, such as missing documentation.
61dimensions across 6 lenses, read from 525,236 lines of product code in 40 projects.
Chapters

Executive summary

nissl-lab/npoi has a provisional result, because the code didn't build. Its score is held back in part because it has pipeline tools referenced by a changeable name. It scores 49 out of 100, and the ratings may change once the code builds. 26 of its 420 critical findings are security problems.

Security and Compliance, at 42, is the weakest lens and counts most in the score. The best first steps are keeping the encryption keys in a vault and handling the discarded errors, each worth about 5 points. Raising Security and Compliance to 70 would lift the score to about 54.

Eighteen pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Two pipeline steps run downloads nobody checks, and thirty-one errors are caught and ignored, so failures can go unnoticed. Pinning each tool to an exact version, checking each download against a checksum and handling or logging the ignored errors would close these risks. Hashing passwords with a password-hashing function such as Argon2, bcrypt or PBKDF2 would fix the two places where passwords are scrambled with a fast general-purpose hash, and the check for vulnerable packages switched off needs switching back on. The 230 data fields that are written but never read need removing.

The product code is 525,236 lines, about €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 for The 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.
Security and Compliance 42 · counts for 46%Code Health 43 · counts for 25%Maturity 60 · counts for 14%Production Readiness 60 · counts for 8%Architecture 70 · counts for 4%Performance 97 · counts for 2%

If Security and Compliance rose from 42 to 70, the lowest score rated Strong, the score would rise from 49 to about 54.

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: 346 findings

These 346 critical or serious findings weren't in the previous survey, on 23 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · XMLSlideShow.CreateSlide (cyclomatic 16) ooxml/XSLF/UserModel/XMLSlideShow.cs
  • Cognitive Complexity · PresentationXmlContent.Merge (cognitive 22) OpenXmlFormats/Presentation/PresentationXmlContent.cs
  • Cognitive Complexity · XMLSlideShow.CreateSlide (cognitive 17) ooxml/XSLF/UserModel/XMLSlideShow.cs
  • Cognitive Complexity · XMLSlideShow.OnDocumentRead (cognitive 17) ooxml/XSLF/UserModel/XMLSlideShow.cs
  • Code Duplication · Near-duplicate member family (6 members, 26 shared lines) OpenXmlFormats/Wordprocessing/CustomXml.cs
  • Code Duplication · Near-duplicate member family (6 members, 24 shared lines) OpenXmlFormats/Wordprocessing/CustomXml.cs
  • Code Duplication · Near-duplicate member family (5 members, 24 shared lines) OpenXmlFormats/Wordprocessing/HdrFtr.cs
  • Code Duplication · Near-duplicate member family (4 members, 26 shared lines) OpenXmlFormats/Wordprocessing/HdrFtr.cs
  • Code Duplication · Near-duplicate member family (4 members, 22 shared lines) OpenXmlFormats/Wordprocessing/CustomXml.cs
  • Code Duplication · Near-duplicate member family (4 members, 21 shared lines) OpenXmlFormats/Wordprocessing/CustomXml.cs
  • Code Duplication · Near-duplicate member family (4 members, 21 shared lines) OpenXmlFormats/Wordprocessing/CustomXml.cs
  • Code Duplication · Near-duplicate member family (4 members, 21 shared lines) OpenXmlFormats/Wordprocessing/CustomXml.cs
  • Code Duplication · Near-duplicate member pair (196 shared lines) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Near-duplicate member pair (72 shared lines) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Members sharing a duplicated core (14 members, 50+ identical tokens) OpenXmlFormats/Vml/Main.cs
  • Code Duplication · Members sharing a duplicated core (11 members, 50+ identical tokens) OpenXmlFormats/Drawing/Chart/AreaChart.cs
  • Code Duplication · Members sharing a duplicated core (11 members, 50+ identical tokens) OpenXmlFormats/Drawing/Chart/AreaChart.cs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) OpenXmlFormats/Drawing/Chart/AreaChart.cs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) OpenXmlFormats/Drawing/Chart/AreaChart.cs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) OpenXmlFormats/Drawing/ShapeEffects.cs
  • Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) OpenXmlFormats/Drawing/ShapeEffects.cs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) OpenXmlFormats/Wordprocessing/PageSetup.cs
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) OpenXmlFormats/Drawing/Chart/AreaChart.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) OpenXmlFormats/Drawing/ShapeProperties.cs
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) OpenXmlFormats/Drawing/Chart/BubbleChart.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) OpenXmlFormats/Drawing/ShapeEffects.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) OpenXmlFormats/Wordprocessing/HdrFtr.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) OpenXmlFormats/Wordprocessing/HdrFtr.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) OpenXmlFormats/Wordprocessing/PageSetup.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) OpenXmlFormats/Wordprocessing/Table.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) OpenXmlFormats/Wordprocessing/Table.cs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) scratchpad/HWPF/Model/CHPBinTable.cs
  • Code Duplication · Edited copy of a member (94 corresponding lines) scratchpad/HWPF/Converter/WordToFoConverter.cs
  • Code Duplication · Edited copy of a member (48 corresponding lines) scratchpad/HWPF/Model/CHPBinTable.cs
  • Code Duplication · Edited copy of a member (20 corresponding lines) scratchpad/HWPF/UserModel/Range.cs
  • Code Duplication · Edited copy of a member (29 corresponding lines) scratchpad/HWPF/Converter/WordToFoConverter.cs
  • Code Duplication · Edited copy of a member (16 corresponding lines) scratchpad/HWPF/UserModel/Range.cs
  • Code Duplication · Edited copy of a member (38 corresponding lines) scratchpad/HWPF/Model/CHPBinTable.cs
  • Code Duplication · Edited copy of a member (23 corresponding lines) scratchpad/HWPF/Model/ListTables.cs
  • Code Duplication · Edited copy of a member (29 corresponding lines) main/SS/UserModel/DateUtil.cs
  • Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) main/SS/HtmlDocumentFacade.cs
  • Code Duplication · Edited copy of a member (27 corresponding lines) scratchpad/HWPF/UserModel/Range.cs
  • Code Duplication · Edited copy of a member (17 corresponding lines) main/SS/HtmlDocumentFacade.cs
  • Code Duplication · Edited copy of a member (21 corresponding lines) scratchpad/HWPF/Converter/WordToFoConverter.cs
  • Code Duplication · Edited copy of a member (17 corresponding lines) main/SS/HtmlDocumentFacade.cs
  • Code Duplication · Edited copy of a member (16 corresponding lines) scratchpad/HWPF/Model/CHPFormattedDiskPage.cs
  • Code Duplication · Edited copy of a member (13 corresponding lines) scratchpad/HWPF/UserModel/Range.cs
  • Code Duplication · Edited copy of a member (18 corresponding lines) scratchpad/HWPF/UserModel/OfficeDrawingsImpl.cs
  • Code Duplication · Edited copy of a member (14 corresponding lines) scratchpad/HWPF/Model/CHPFormattedDiskPage.cs
  • Code Duplication · Edited copy of a member (19 corresponding lines) scratchpad/HWPF/Extractor/WordExtractor.cs
  • Code Duplication · Edited copy of a member (14 corresponding lines) scratchpad/HWPF/Model/ListData.cs
  • Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) scratchpad/HWPF/Model/CHPBinTable.cs
  • Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) scratchpad/HWPF/Model/EscherRecordHolder.cs
  • Code Duplication · Edited copy of a member (12 corresponding lines) scratchpad/HWPF/Model/FSPATable.cs
  • Code Duplication · Edited copy of a member (12 corresponding lines) scratchpad/HWPF/UserModel/BookmarksImpl.cs
  • Code Duplication · Edited copy of a member (19 corresponding lines) scratchpad/HWPF/SPRM/ParagraphSprmUncompressor.cs
  • Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) scratchpad/HWPF/Model/BookmarkFirstDescriptor.cs
  • Code Duplication · Edited copy of a member (7 corresponding lines) main/SS/HtmlDocumentFacade.cs
  • Code Duplication · Edited copy of a member (8 corresponding lines) scratchpad/HSLF/Record/TextBytesAtom.cs
  • Code Duplication · Edited copy of a member (11 corresponding lines) main/HSSF/Record/AbstractEscherHolderRecord.cs
  • Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) scratchpad/HSLF/Record/AnimationInfo.cs
  • Code Duplication · Edited copy of a member (13 corresponding lines) ooxml/SS/Converter/ExcelToHtmlUtils.cs
  • Code Duplication · Edited copy of a member (7 corresponding lines) scratchpad/HSLF/Record/SoundData.cs
  • Code Duplication · Edited copy of a member (6 corresponding lines) scratchpad/HSLF/Record/TextBytesAtom.cs
  • Code Duplication · Edited copy of a member (8 corresponding lines) scratchpad/HSLF/Record/CString.cs
  • Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) scratchpad/HSLF/Record/CString.cs
  • Code Duplication · Edited copies of one member (5 members, 4+ corresponding lines) scratchpad/HSLF/Record/Comment2000Atom.cs
  • Code Duplication · Edited copy of a member (6 corresponding lines) main/SS/HtmlDocumentFacade.cs
  • Code Duplication · Edited copy of a member (6 corresponding lines) main/SS/HtmlDocumentFacade.cs
  • Code Duplication · Edited copy of a member (7 corresponding lines) scratchpad/HWPF/Converter/WordToFoConverter.cs
  • Code Duplication · Edited copy of a member (7 corresponding lines) scratchpad/HWPF/Converter/WordToFoConverter.cs
  • Code Duplication · Edited copy of a member (6 corresponding lines) scratchpad/HWPF/Converter/WordToFoConverter.cs
  • Code Duplication · Edited copy of a member (5 corresponding lines) scratchpad/HWPF/Converter/WordToFoUtils.cs
  • Code Duplication · Duplicated block (115 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Duplicated block (112 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Duplicated block (96 lines × 4) OpenXmlFormats/Wordprocessing/CustomXml.cs
  • Code Duplication · Duplicated block (90–92 lines × 4) OpenXmlFormats/Wordprocessing/Document.cs
  • Code Duplication · Duplicated block (87 lines × 2) OpenXmlFormats/Wordprocessing/CustomXml.cs
  • Code Duplication · Duplicated block (86 lines × 5) OpenXmlFormats/Wordprocessing/Document.cs
  • Code Duplication · Duplicated block (81 lines × 6) OpenXmlFormats/Wordprocessing/CustomXml.cs
  • Code Duplication · Duplicated block (82 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Duplicated block (77 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Duplicated block (53 lines × 5) OpenXmlFormats/Vml/Main.cs
  • Code Duplication · Duplicated block (78 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Duplicated block (42 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Duplicated block (43 lines × 2) OpenXmlFormats/Wordprocessing/Table.cs
  • Code Duplication · Duplicated block (40–41 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Duplicated block (40 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Duplicated block (73 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Duplicated block (38 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Duplicated block (33 lines × 4) OpenXmlFormats/Vml/Main.cs
  • Code Duplication · Duplicated block (36–37 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Code Duplication · Duplicated block (34 lines × 2) OpenXmlFormats/Drawing/ShapeProperties.cs
  • Code Duplication · Duplicated block (34 lines × 2) OpenXmlFormats/Wordprocessing/Table.cs
  • Code Duplication · Duplicated block (34 lines × 2) OpenXmlFormats/Wordprocessing/Table.cs
  • Code Duplication · Duplicated block (30 lines × 5) OpenXmlFormats/Vml/Main.cs

We compare 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: 312 findings

These 312 critical or serious findings were in the previous survey, on 23 October 2026, and are gone from this one. The first 100 are listed here.

  • Code Duplication · Duplicated block (6 lines × 2) main/HPSF/ClassID.cs
  • Code Duplication · Duplicated block (5 lines × 2) main/SS/Formula/Atp/WorkdayCalculator.cs
  • Code Duplication · Duplicated block (5 lines × 2) main/Util/LittleEndian.cs
  • Cohesion (LCOM4) · Low cohesion: CT_RPr (LCOM4 27) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Cohesion (LCOM4) · Low cohesion: CT_Worksheet (LCOM4 23) OpenXmlFormats/Spreadsheet/Sheet/CT_Worksheet.cs
  • Cohesion (LCOM4) · Low cohesion: CT_RPrElt (LCOM4 16) OpenXmlFormats/Spreadsheet/SharedString/CT_RPrElt.cs
  • Cohesion (LCOM4) · Low cohesion: CT_TextListStyle (LCOM4 11) OpenXmlFormats/Drawing/Text.cs
  • Cohesion (LCOM4) · Low cohesion: CT_PPrBase (LCOM4 11) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Cohesion (LCOM4) · Low cohesion: CT_LineSer (LCOM4 10) OpenXmlFormats/Drawing/Chart/LineChart.cs
  • Cohesion (LCOM4) · Low cohesion: CT_ScatterSer (LCOM4 10) OpenXmlFormats/Drawing/Chart/ScatterChart.cs
  • Cohesion (LCOM4) · Low cohesion: CT_PieSer (LCOM4 9) OpenXmlFormats/Drawing/Chart/PieChart.cs
  • Cohesion (LCOM4) · Low cohesion: CT_TextBodyProperties (LCOM4 9) OpenXmlFormats/Drawing/Text.cs
  • Cohesion (LCOM4) · Low cohesion: CT_AreaSer (LCOM4 8) OpenXmlFormats/Drawing/Chart/AreaChart.cs
  • Cohesion (LCOM4) · Low cohesion: CT_BarSer (LCOM4 8) OpenXmlFormats/Drawing/Chart/BarChart.cs
  • Cohesion (LCOM4) · Low cohesion: CT_RadarSer (LCOM4 8) OpenXmlFormats/Drawing/Chart/RadarChart.cs
  • Cohesion (LCOM4) · Low cohesion: CT_ShapeProperties (LCOM4 8) OpenXmlFormats/Drawing/SpreadsheetDrawing.cs
  • Cohesion (LCOM4) · Low cohesion: CT_PivotTableDefinition (LCOM4 8) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs
  • Cohesion (LCOM4) · Low cohesion: CT_ClientData (LCOM4 8) OpenXmlFormats/Vml/SpreadsheetDrawing.cs
  • Cohesion (LCOM4) · Low cohesion: CT_BarChart (LCOM4 7) OpenXmlFormats/Drawing/Chart/BarChart.cs
  • Cohesion (LCOM4) · Low cohesion: CT_SolidColorFillProperties (LCOM4 7) OpenXmlFormats/Drawing/ShapeEffects.cs
  • Cohesion (LCOM4) · Low cohesion: CT_Workbook (LCOM4 7) OpenXmlFormats/Spreadsheet/Workbook/CT_Workbook.cs
  • Cohesion (LCOM4) · Low cohesion: CT_Shape (LCOM4 7) OpenXmlFormats/Vml/Main.cs
  • Cohesion (LCOM4) · Low cohesion: CT_Shapetype (LCOM4 7) OpenXmlFormats/Vml/Main.cs
  • Cohesion (LCOM4) · Low cohesion: CT_PPr (LCOM4 7) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Cohesion (LCOM4) · Low cohesion: CT_TblPrBase (LCOM4 7) OpenXmlFormats/Wordprocessing/Table.cs
  • Cohesion (LCOM4) · Low cohesion: CT_TblBorders (LCOM4 7) OpenXmlFormats/Wordprocessing/Table.cs
  • Cohesion (LCOM4) · Low cohesion: CT_PBdr (LCOM4 6) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Cohesion (LCOM4) · Low cohesion: XWPFChart (LCOM4 6) ooxml/XWPF/Usermodel/XWPFChart.cs
  • Cohesion (LCOM4) · Low cohesion: CT_AreaChart (LCOM4 5) OpenXmlFormats/Drawing/Chart/AreaChart.cs
  • Cohesion (LCOM4) · Low cohesion: CT_LineChart (LCOM4 5) OpenXmlFormats/Drawing/Chart/LineChart.cs
  • Cohesion (LCOM4) · Low cohesion: CT_RadarChart (LCOM4 5) OpenXmlFormats/Drawing/Chart/RadarChart.cs
  • Cohesion (LCOM4) · Low cohesion: CT_GradientFillProperties (LCOM4 5) OpenXmlFormats/Drawing/ShapeEffects.cs
  • Cohesion (LCOM4) · Low cohesion: CT_ShapeStyle (LCOM4 5) OpenXmlFormats/Drawing/ShapeStyle.cs
  • Cohesion (LCOM4) · Low cohesion: CT_TwoCellAnchor (LCOM4 5) OpenXmlFormats/Drawing/SpreadsheetDrawing.cs
  • Cohesion (LCOM4) · Low cohesion: CT_ShapeStyle (LCOM4 5) OpenXmlFormats/Drawing/spreadsheetShape.cs
  • Cohesion (LCOM4) · Low cohesion: CT_Font (LCOM4 5) OpenXmlFormats/Spreadsheet/Styles/CT_Font.cs
  • Cohesion (LCOM4) · Low cohesion: CT_SectPr (LCOM4 5) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Cohesion (LCOM4) · Low cohesion: CT_Spacing (LCOM4 5) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Cohesion (LCOM4) · Low cohesion: CT_TblCellMar (LCOM4 5) OpenXmlFormats/Wordprocessing/Table.cs
  • Cohesion (LCOM4) · Low cohesion: XSSFClientAnchor (LCOM4 5) ooxml/XSSF/UserModel/XSSFClientAnchor.cs
  • Cohesion (LCOM4) · Low cohesion: CT_ScatterChart (LCOM4 4) OpenXmlFormats/Drawing/Chart/ScatterChart.cs
  • Cohesion (LCOM4) · Low cohesion: CT_BlipFillProperties (LCOM4 4) OpenXmlFormats/Drawing/ShapeEffects.cs
  • Cohesion (LCOM4) · Low cohesion: CT_Picture (LCOM4 4) OpenXmlFormats/Drawing/SpreadsheetPicture.cs
  • Cohesion (LCOM4) · Low cohesion: CT_TextBody (LCOM4 4) OpenXmlFormats/Drawing/Text.cs
  • Cohesion (LCOM4) · Low cohesion: CT_Stylesheet (LCOM4 4) OpenXmlFormats/Spreadsheet/Styles.cs
  • Cohesion (LCOM4) · Low cohesion: CT_PatternFill (LCOM4 4) OpenXmlFormats/Spreadsheet/Styles/CT_PatternFill.cs
  • Cohesion (LCOM4) · Low cohesion: CT_Fonts (LCOM4 4) OpenXmlFormats/Wordprocessing/Font.cs
  • Cohesion (LCOM4) · Low cohesion: CT_Ind (LCOM4 4) OpenXmlFormats/Wordprocessing/Paragraph.cs
  • Cohesion (LCOM4) · Low cohesion: CT_SdtBlock (LCOM4 4) OpenXmlFormats/Wordprocessing/Sdt.cs
  • Cohesion (LCOM4) · Low cohesion: XSSFComment (LCOM4 4) ooxml/XSSF/UserModel/XSSFComment.cs
  • Code Coverage · Coverage not measured — no coverage collector is wired up
  • Test Quality · No assertions: TestProblemMetadata testcases/scratchpad/HWPF/Extractor/TestWordExtractorBugs.cs
  • Test Quality · No assertions: TestOpen testcases/scratchpad/HWPF/TestHWPFPictures.cs
  • Test Quality · No assertions: TestUtf testcases/scratchpad/HWPF/UserModel/TestBug46610.cs
  • Test Quality · No assertions: TestUtf2 testcases/scratchpad/HWPF/UserModel/TestBug46610.cs
  • Test Quality · No assertions: TestFastSaved testcases/scratchpad/HWPF/UserModel/TestPictures.cs
  • Test Quality · No assertions: TestFastSaved2 testcases/scratchpad/HWPF/UserModel/TestPictures.cs
  • Test Quality · No assertions: TestFastSaved3 testcases/scratchpad/HWPF/UserModel/TestPictures.cs
  • Test Quality · No assertions: TestListEntryNoListTable testcases/scratchpad/HWPF/UserModel/TestProblems.cs
  • Test Quality · No assertions: TestSprmAIOOB testcases/scratchpad/HWPF/UserModel/TestProblems.cs
  • Test Quality · No assertions: TestOpen testcases/scratchpad/HWPF/UserModel/TestRangeDelete.cs
  • Test Quality · No assertions: TestOpen testcases/scratchpad/HWPF/UserModel/TestRangeInsertion.cs
  • Test Quality · No assertions: TestOpen testcases/scratchpad/HWPF/UserModel/TestRangeReplacement.cs
  • Test Quality · No assertions: Test61300Extractor testcases/main/HPSF/Extractor/TestHPSFPropertiesExtractor.cs
  • Test Quality · No assertions: TestInputStreamNPOIHeader testcases/main/HSSF/Extractor/TestOldExcelExtractor.cs
  • Test Quality · No assertions: TestNPOIFSFileSystem testcases/main/HSSF/Extractor/TestOldExcelExtractor.cs
  • Test Quality · No assertions: TestDirectoryNode testcases/main/HSSF/Extractor/TestOldExcelExtractor.cs
  • Test Quality · No assertions: TestBOFRecord1 testcases/main/HSSF/Record/TestBOFRecord.cs
  • Test Quality · No assertions: TestNPOIBug6177 testcases/main/HSSF/Record/TestRecordFactory.cs
  • Test Quality · No assertions: TestReadBook testcases/main/HSSF/Record/TestUnicodeNameRecord.cs
  • Test Quality · No assertions: Test14460 REDACTED
  • Test Quality · No assertions: Test14330 REDACTED
  • Test Quality · No assertions: Test22742 REDACTED
  • Test Quality · No assertions: Test12561_1 REDACTED
  • Test Quality · No assertions: Test12561_2 REDACTED
  • Test Quality · No assertions: Test12843_1 REDACTED
  • Test Quality · No assertions: Test12843_2 REDACTED
  • Test Quality · No assertions: Test13224 REDACTED
  • Test Quality · No assertions: Test19599 REDACTED
  • Test Quality · No assertions: Test32822 REDACTED
  • Test Quality · No assertions: Test15573 REDACTED
  • Test Quality · No assertions: Test27852 REDACTED
  • Test Quality · No assertions: Test33082 REDACTED
  • Test Quality · No assertions: Test34775 REDACTED
  • Test Quality · No assertions: Test45322 REDACTED
  • Test Quality · No assertions: Test47701 REDACTED
  • Test Quality · No assertions: TestNPOIBug5010 REDACTED
  • Test Quality · No assertions: TestNPOIBug5139 REDACTED
  • Test Quality · No assertions: Test47251 REDACTED
  • Test Quality · No assertions: Test48026 REDACTED
  • Test Quality · No assertions: Test57163 REDACTED
  • Test Quality · No assertions: Test57925 REDACTED
  • Test Quality · No assertions: Test45353a REDACTED
  • Test Quality · No assertions: Test45353b REDACTED
  • Test Quality · No assertions: TestClassCast_bug44861 testcases/main/HSSF/UserModel/TestFormulaEvaluatorBugs.cs
  • Test Quality · No assertions: Test51378 testcases/main/HSSF/UserModel/TestHSSFDataFormat.cs
  • Test Quality · No assertions: ExtraDataAfterEOFRecord testcases/main/HSSF/UserModel/TestHSSFWorkbook.cs
  • Test Quality · No assertions: TestEmbeding testcases/main/HSSF/UserModel/TestOLE2Embeding.cs
  • Test Quality · No assertions: TestNPOIBug6341 testcases/main/HSSF/UserModel/TestWorkbook.cs
  • Test Quality · No assertions: TestShortLastBlock testcases/main/POIFS/FileSystem/TestPOIFSFileSystem.cs
Rebuild cost: about €1,200,000 · Estimate
Cost to rebuild€410,000 to €2,100,000, for 6,770 to 21,920 hours of work, about 8.5 person-years for 5 to 17 engineers
Difficulty of the problemStandard, 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 49. 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.
SizeVery large: 525,236 lines of product code
Comment linesThe estimate prices 409,492 lines. Comment lines count towards the size of 525,236 lines but aren't priced as work.
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
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 5 points · Medium effort · Data Protection
2
Resolve the 31 EmptyCatchBlock finding(s) in Explicit Debt — start with Property.cs (3), XDDFChart.cs (2), REDACTED (2).
Raises the score by about 5 points · Medium effort · Explicit Debt
3
Resolve the 77 NoWarnInCsproj finding(s) in Explicit Debt — start with Directory.Build.props (73), _build.csproj (3), NPOI.Benchmarks.csproj.
Raises the score by about 5 points · Medium effort · Explicit Debt

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.5 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.

arch DocPartViewer DocPartViewer HSLF HSLF HSSF HSSF HWPF HWPF HSSF->HWPF NPOI.Core Core NPOI.OOXML.Core Core NPOI.OOXML.Core->NPOI.Core NPOI.OpenXml4Net.Core Core NPOI.OOXML.Core->NPOI.OpenXml4Net.Core NPOI.OpenXmlFormats.Core Core NPOI.OOXML.Core->NPOI.OpenXmlFormats.Core NPOI.OpenXml4Net.Core->NPOI.Core NPOI.OpenXmlFormats.Core->NPOI.Core NPOI.OpenXmlFormats.Core->NPOI.OpenXml4Net.Core NPOI.Pack Pack NPOI.Pack->NPOI.Core NPOI.Pack->NPOI.OOXML.Core NPOI.Pack->NPOI.OpenXml4Net.Core NPOI.Pack->NPOI.OpenXmlFormats.Core NPOI.StyleViewer StyleViewer XmlSerializationCodeGenerator XmlSerializationCodeGenerator _build _build

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.

133 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; 93 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.
uses →1 HWPF.UserModel2 OpenXmlFormats.Dml3 OpenXmlFormats.Spreadsheet4 OpenXmlFormats.Vml5 SS6 OpenXml4Net.OPC7 OpenXmlFormats.Wordprocessing8 POIFS.Crypt.Standard9 SS.Formula.Functions10 SS.Util11 POIFS.Crypt12 SS.Formula.PTG13 SS.Formula.UDF14 XDDF.UserModel.Text15 SS.Formula.Eval16 SS.Formula17 HSSF.Record.Aggregates18 HSSF.Record.CF19 HSSF.Record.Chart20 HSSF.UserModel21 HSSF.Model22 HSSF.Record23 HSSF.Util24 SS.UserModel25 XSSF.UserModel.Helpers26 XSSF.UserModel.Extensions27 XSSF.Model28 XSSF.UserModel29 XDDF.UserModel.Chart30 XSSF.EventUserModel31 XWPF.UserModel32 Util33 POIFS.Properties34 XSSF.Streaming35 POIFS.FileSystem36 HPSF37 NPOI38 HSSF.Extractor39 XSSF.Binary40 XSSF.Extractor
1 HWPF.UserModel
2 OpenXmlFormats.Dml
3 OpenXmlFormats.Spreadsheet
4 OpenXmlFormats.Vml
5 SS
6 OpenXml4Net.OPC4
7 OpenXmlFormats.Wordprocessing21
8 POIFS.Crypt.Standard29123
9 SS.Formula.Functions2424512
10 SS.Util3134710
11 POIFS.Crypt72314
12 SS.Formula.PTG11017276
13 SS.Formula.UDF4
14 XDDF.UserModel.Text721
15 SS.Formula.Eval21481
16 SS.Formula561731327313
17 HSSF.Record.Aggregates61412592
18 HSSF.Record.CF113521
19 HSSF.Record.Chart1110763
20 HSSF.UserModel2120111311977786131724511
21 HSSF.Model3515145311252
22 HSSF.Record15316964128187
23 HSSF.Util14123
24 SS.UserModel112713123
25 XSSF.UserModel.Helpers41113718
26 XSSF.UserModel.Extensions65112
27 XSSF.Model1916181288
28 XSSF.UserModel2482232291642242314842210120
29 XDDF.UserModel.Chart21268553
30 XSSF.EventUserModel611514
31 XWPF.UserModel22383211138
32 Util311131
33 POIFS.Properties441
34 XSSF.Streaming1191298131417
35 POIFS.FileSystem151131
36 HPSF2951
37 NPOI111655
38 HSSF.Extractor2411422
39 XSSF.Binary36413221
40 XSSF.Extractor3327463
Uses a module listed above itPart of a loopThe module itself
1 HWPF.UserModel2 OpenXmlFormats.Dml3 OpenXmlFormats.Spreadsheet4 OpenXmlFormats.Vml5 SS6 OpenXml4Net.OPC7 OpenXmlFormats.Wordprocessing8 POIFS.Crypt.Standard9 SS.Formula.Functions10 SS.Util11 POIFS.Crypt12 SS.Formula.PTG13 SS.Formula.UDF14 XDDF.UserModel.Text15 SS.Formula.Eval16 SS.Formula17 HSSF.Record.Aggregates18 HSSF.Record.CF19 HSSF.Record.Chart20 HSSF.UserModel21 HSSF.Model22 HSSF.Record23 HSSF.Util24 SS.UserModel25 XSSF.UserModel.Helpers26 XSSF.UserModel.Extensions27 XSSF.Model28 XSSF.UserModel29 XDDF.UserModel.Chart30 XSSF.EventUserModel31 XWPF.UserModel32 Util33 POIFS.Properties34 XSSF.Streaming35 POIFS.FileSystem36 HPSF37 NPOI38 HSSF.Extractor39 XSSF.Binary40 XSSF.ExtractorHWPF.UserModel1OpenXmlFormats.Dml2OpenXmlFormats.Spreadsheet3OpenXmlFormats.Vml4SS5OpenXml4Net.OPC6OpenXmlFormats.Wordprocessing7POIFS.Crypt.Standard8SS.Formula.Functions9SS.Util10POIFS.Crypt11SS.Formula.PTG12SS.Formula.UDF13XDDF.UserModel.Text14SS.Formula.Eval15SS.Formula16HSSF.Record.Aggregates17HSSF.Record.CF18HSSF.Record.Chart19HSSF.UserModel20HSSF.Model21HSSF.Record22HSSF.Util23SS.UserModel24XSSF.UserModel.Helpers25XSSF.UserModel.Extensions26XSSF.Model27XSSF.UserModel28XDDF.UserModel.Chart29XSSF.EventUserModel30XWPF.UserModel31Util32POIFS.Properties33XSSF.Streaming34POIFS.FileSystem35HPSF36NPOI37HSSF.Extractor38XSSF.Binary39XSSF.Extractor40421291232424512313471072314110172764721214815617313273136141259211352111107632120111311977786131724511351514531125215316964128187141231127131234111371865112191618128824822322916422423148422101202126855361151422383211138311131441119129813141715113129511116552411422364132213327463+93 more modules (most-connected shown)

At a glance — Code Health · 43% · Weak · gated by D18, X5, IC1 ·

At a glance — Architecture · 70% · Adequate · gated by AX2 ·

At a glance — Maturity · 60% · Adequate · gated by M2 ·

At a glance — Readiness · 60% · Adequate ·

At a glance — Security · 42% · Weak · gated by D29, D36, C1 ·

At a glance — Performance · 97% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection181High / Critical
A03:2025 — Software Supply Chain Failures7Medium
A07:2025 — Authentication Failures2High / Critical

Roadmap

Top priorities: 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; Resolve the 230 WriteOnlyPrivateField finding(s) in Explicit Debt — start with SpreadsheetDrawing.cs (60), InternalChart.cs (8), StyleDescription.cs (8); Resolve the 31 EmptyCatchBlock finding(s) in Explicit Debt — start with Property.cs (3), XDDFChart.cs (2), REDACTED (2).

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

Do thisHelpsEffortDimension
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.+4.7 ptsMediumData Protection
Resolve the 31 EmptyCatchBlock finding(s) in Explicit Debt — start with Property.cs (3), XDDFChart.cs (2), REDACTED (2).+4.5 ptsMediumExplicit Debt
Resolve the 77 NoWarnInCsproj finding(s) in Explicit Debt — start with Directory.Build.props (73), _build.csproj (3), NPOI.Benchmarks.csproj.+4.5 ptsMediumExplicit Debt
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`.+4.3 ptsMediumCryptographic Hygiene
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 `?.`.+4.1 ptsMediumNullable reference types
Resolve the 1 No ADRs found finding(s) in ADR Quality.+1.8 ptsLowADR Quality
Finish or delete the unfinished stubs (NotImplementedException / empty / constant-returning bodies) — they are dead surface that looks live.+2.8 ptsMediumIncompleteness & stubs
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.+1.4 ptsLowSecret Scanning

File quality

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

FileScoreBandWorst signal
OpenXmlFormats/Wordprocessing/Settings.cs1.0SlopExplicit Debt: WriteOnlyPrivateField
ooxml/XWPF/Usermodel/XWPFDocument.cs1.0SlopExplicit Debt: EmptyCatchBlock
main/HSSF/Model/InternalChart.cs1.0SlopExplicit Debt: WriteOnlyPrivateField
main/HSSF/Record/EscherAggregate.cs1.0SlopExplicit Debt: WriteOnlyPrivateField
main/HPSF/Property.cs1.2SlopExplicit Debt: EmptyCatchBlock
ooxml/XSSF/EventUserModel/XSSFSheetXMLHandler.cs1.3SlopExplicit Debt: EmptyCatchBlock
REDACTED1.3SlopExplicit Debt: WriteOnlyPrivateField
ooxml/XSSF/Streaming/SXSSFWorkbook.cs1.4SlopExplicit Debt: EmptyCatchBlock
main/SS/UserModel/DataFormatter.cs1.5SlopExplicit Debt: WriteOnlyPrivateField
main/SS/Format/CellDateFormatter.cs1.5SlopExplicit Debt: WriteOnlyPrivateField
main/HSSF/Record/HyperlinkRecord.cs1.6SlopExplicit Debt: WriteOnlyPrivateField
testcases/main/DDF/TestEscherDump.cs1.8SlopExplicit Debt: WriteOnlyPrivateField
REDACTED1.9SlopExplicit Debt: WriteOnlyPrivateField
main/HSSF/UserModel/HSSFChart.cs1.9SlopExplicit Debt: WriteOnlyPrivateField
testcases/main/HPSF/Basic/TestWrite.cs2.0SlopExplicit Debt: WriteOnlyPrivateField
REDACTED2.1SlopExplicit Debt: EmptyCatchBlock
ooxml/XDDF/UserModel/Chart/XDDFChart.cs2.4SlopExplicit Debt: EmptyCatchBlock
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
ooxml/XSSF/UserModel/BaseXSSFEvaluationWorkbook.cs2.5SlopExplicit Debt: EmptyCatchBlock

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 — 420

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 — 3220

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 — 646

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

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 61 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

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

What we checked — 61 dimensions across the health lenses
D1D2D3D4D5D6D10D13D14D15D16D17D18D19D20D24D26D27D28D29D34D35D36D37D43D44AX10AX2AX3AX4AX5AX6AX8C1GD1IC1M1M2M3M4P1P10P3P4P6PF1PF3S1X12X16X17X18X20X24X25X27X28X29X3X30X5

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

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1ce36-ce51-795e-8bd7-4214a40536d0.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — 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. 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. You can widen what we reach: add the `coverlet.collector` package to the test projects to enable coverage (or commit the Cobertura/OpenCover/lcov report your CI produces).
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability not included — no test tier completed within its budget.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 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: ''.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — evaluation did not complete — Naming Consistency not included (check did not complete) — excluded from the score.
  • 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Large codebase (525,196 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `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.
  • AX2 Stateful singletons — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 17 further occurrence(s) are not listed individually; the score already reflects all 57.
  • GD1 Unfinished & placeholder code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 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 — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 13 further occurrence(s) are not listed individually; the score already reflects all 53.
  • X7 Silent fallback defaults — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 10 further occurrence(s) are not listed individually; the score already reflects all 50.
  • 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

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • 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 publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • 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.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity5.7 / 10Adequate✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 5.7 / 10 · rule-coverage 100% · ceiling Prevented

259 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.

CT_ShapeProperties.Parse (cyclomatic 19) · ×2OpenXmlFormats/Drawing/ShapeProperties.cs:2086
CT_ShapeProperties.Write (cyclomatic 17) · ×2OpenXmlFormats/Drawing/ShapeProperties.cs:2131
CharacterSprmUncompressor.UncompressCHPOperation (cyclomatic 131)scratchpad/HWPF/SPRM/CharacterSprmUncompressor.cs:63
CT_Settings.Write (cyclomatic 102)OpenXmlFormats/Wordprocessing/Settings.cs:234
CT_Settings.Parse (cyclomatic 100)OpenXmlFormats/Wordprocessing/Settings.cs:19

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

What to do

  1. 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.

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

D2 · Cognitive Complexity5.7 / 10Adequate✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 5.7 / 10 · rule-coverage 100% · ceiling Prevented

436 method(s) exceeded the cognitive complexity threshold of 15; the worst was Form1.button2_Click at 134.

CT_ShapeProperties.Parse (cognitive 19) · ×2OpenXmlFormats/Drawing/ShapeProperties.cs:2086
CT_ShapeProperties.Write (cognitive 16) · ×2OpenXmlFormats/Drawing/ShapeProperties.cs:2131
Form1.button2_Click (cognitive 134)tools/XmlSerializationCodeGenerator/Form1.cs:111
CT_ParaRPrOriginal.Write (cognitive 121)OpenXmlFormats/Wordprocessing/Paragraph.cs:5654
SharedStringsTable.ReadFromStreamViaXmlReader (cognitive 117)ooxml/XSSF/Model/SharedStringsTable.cs:249

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

What to do

  1. 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.

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

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.

Maturity: Documented → Verified → Prevented · effective 8.9 / 10 · rule-coverage 100% · ceiling Prevented

184 god class(es) detected.

TooManyMethods: CT_P · ×64OpenXmlFormats/Wordprocessing/Paragraph.cs
FileTooLong: PivotTable/CT_PivotCacheDefinition.cs · ×62OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs
MethodTooLong: FunctionEval.ProduceFunctions · ×36main/SS/Formula/Eval/FunctionEval.cs:97
ClassTooLong: CT_Settings · ×22OpenXmlFormats/Wordprocessing/Settings.cs

What to do

  1. 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).
  2. 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).
  3. 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).

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

D4 · Code Duplication9.6 / 10Stronggated by 548 serious findings✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Verified

462 duplicated block group(s) detected. A further 87 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 2 of the 549 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (9 lines × 2) · ×39main/HSSF/Record/Aggregates/Chart/DropBarAggregate.cs:38
Duplicated block (8 lines × 2) · ×30ooxml/XDDF/UserModel/Text/XDDFRunProperties.cs:200
Duplicated block (6 lines × 2) · ×24OpenXmlFormats/Drawing/ShapeProperties.cs:1097
Duplicated block (7 lines × 2) · ×23main/SS/Formula/Atp/TextJoinFunction.cs:128
Duplicated block (10 lines × 2) · ×22scratchpad/HWPF/UserModel/Range.cs:456

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

What to do

  1. Resolve the 39 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with InternalChart.cs (4), HdrFtr.cs (3), CustomXml.cs (2). — One of this dimension's main actionable groups (39 warning-level).
  2. Resolve the 30 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with BarChart.cs (3), InternalChart.cs (3), CrtLayout12ARecord.cs (2). — One of this dimension's main actionable groups (30 warning-level).
  3. Resolve the 24 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with Paragraph.cs (4), ShapeProperties.cs (2), BubbleChart.cs (2). — One of this dimension's main actionable groups (24 warning-level).

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

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.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Prevented

40 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).

Off the main sequence: NPOI.Core(net472)main/NPOI.Core.csproj:1

What to do

  1. 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).

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

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 6 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Verified

6 of 1272 classes have LCOM4 above 3.

Low cohesion: SignatureConfig (LCOM4 24) · ×6REDACTED:37

What to do

  1. Resolve the 6 Low cohesion finding(s) in Cohesion (LCOM4) — start with REDACTED, InternalSheet.cs, XSSFExcelExtractor.cs. — One of this dimension's main actionable groups (6 warning-level).

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

D10 · Test Quality9.7 / 10Adequategated by 12 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.

Maturity: Documented → Verified → Prevented · effective 9.7 / 10 · rule-coverage 100% · ceiling Prevented

144 skipped (112 with a documented reason), 29 zero-assertion, 1 excluded from compilation in 1 file(s), 9 whose failure is swallowed by a catch-all, 1 mock references across 4381 tests.

No assertions (empty test): TestKthSmallest · ×8testcases/main/SS/Formula/Functions/TestStatsLib.cs:109
Assertions commented out: TestApplyObjectDate · ×3testcases/main/SS/Format/TestCellFormat.cs:651
Tests excluded from compilation: testcases/ooxml/XSSF/UserModel/Charts/TestXSSFNumberCache.cstestcases/ooxml/XSSF/UserModel/Charts/TestXSSFNumberCache.cs:32
Skipped test: TestSimple · ×32testcases/main/DDF/TestEscherDump.cs:34
No assertions: ReadDocumentSummaryInformation · ×17testcases/main/HPSF/Basic/TestReadAllFiles.cs:166

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

What to do

  1. 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).
  2. Resolve the 3 Assertions commented out finding(s) in Test Quality — start with TestCellFormat.cs, TestHexDump.cs, VmlDrawingDocumentTest.cs. — One of this dimension's main actionable groups (3 issue-level).
  3. 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).

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

D13 · Secret Scanning5.0 / 10Adequate✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Prevented

1 secret(s) detected. 2 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.

REDACTED

What to do

  1. Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

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.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.9 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: ooxml/XSLF/UserModel/XMLSlideShow.cs (4×16=64)

Hotspot: ooxml/XSLF/UserModel/XMLSlideShow.csooxml/XSLF/UserModel/XMLSlideShow.cs:88

What to do

  1. Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with XMLSlideShow.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.

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.

Maturity: Documented → Verified → Prevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Documented

37 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 976 of the 2131 production source files in this repository: 730 are under the ~2,400-byte size floor this dimension measures over, and the remaining 425 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.

D17 · Explicit Debt7.7 / 10Adequategated by 340 critical findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 7.7 / 10 · rule-coverage 100% · ceiling Prevented

1769 deducted debt markers + unmeasured dead symbols across 525196 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.

WriteOnlyPrivateField · ×230OpenXmlFormats/Vml/SpreadsheetDrawing.cs:22
NoWarnInCsproj · ×77build/_build.csproj:7
EmptyCatchBlock · ×31main/Common/UserModel/Fonts/FontCharset.cs:178
DiscardedPureResult · ×2scratchpad/HWPF/Extractor/Word6Extractor.cs:103
CommentedOutCode · ×827OpenXmlFormats/Drawing/Chart/AreaChart.cs:345

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

What to do

  1. 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).
  2. 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).
  3. 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).

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

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.

Maturity: Documented → Verified → Prevented · effective 3.0 / 10 · rule-coverage 100% · ceiling Documented

40 projects, 11876 source files, 683738 hand-written lines of code (525196 production / 158542 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

  1. Resolve the 1 Build failed finding(s) in Solution Shape. — One of this dimension's main actionable groups (1 warning-level).
  2. 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).
  3. 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.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

2 of 2 documentation facets pass in full. 3 document(s) read across 13 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

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

D24 · Comment Value8.1 7.8 / 10Strong✓ Tool-verified

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 7.8 / 10 · rule-coverage 97% · ceiling Documented

177 of 9102 judged comments only repeat the code they sit on (1.9 %). 479 comment(s) in another language or script were not judged.

redundant comment · ×150benchmarks/NPOI.Benchmarks/AssemblyInfo.cs:9
doc comments repeat the names · ×7scratchpad/HWPF/HWPFDocument.cs:174

What to do

  1. Resolve the 150 redundant comment finding(s) in Comment Value — start with AssemblyInfo.cs (26), RowRecordsAggregate.cs (4), HSSFSheet.cs (4). — One of this dimension's main actionable groups (150 recommendation-level).

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

D26 · Project Cohesion5.3 / 10Adequate✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

Maturity: Documented → Verified → Prevented · effective 5.3 / 10 · rule-coverage 100% · ceiling Documented

4 of 17 projects flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×4main/NPOI.Core.csproj:1
Split NPOI.OOXML.Core(net472)ooxml/NPOI.OOXML.Core.csproj:1
Split NPOI.OpenXmlFormats.Core(net472)OpenXmlFormats/NPOI.OpenXmlFormats.Core.csproj:1

What to do

  1. Resolve the 4 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with NPOI.Core.csproj, NPOI.OpenXmlFormats.Core.csproj, NPOI.OOXML.Core.csproj. — One of this dimension's main actionable groups (4 recommendation-level).
  2. Resolve the 1 Split NPOI.OOXML.Core(net472) finding(s) in Project Cohesion — start with NPOI.OOXML.Core.csproj. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 Split NPOI.OpenXmlFormats.Core(net472) finding(s) in Project Cohesion — start with NPOI.OpenXmlFormats.Core.csproj. — 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.

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.

Maturity: Documented → Verified → Prevented · effective 6.7 / 10 · rule-coverage 100% · ceiling Documented

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.

Pass-through layer · ×2main/HSSF/Record/RecordInputStream.cs:55

What to do

  1. Resolve the 2 Pass-through layer finding(s) in Navigability — start with RecordInputStream.cs, SXSSFWorkbook.cs. — One of this dimension's main actionable groups (2 recommendation-level).

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

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 1 high, 0 medium, 0 low.

REDACTED

What to do

  1. Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

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

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

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

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

181 finding(s): 0 critical, 21 high, 160 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

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. 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.

D34 · Knowledge Freshness8.0 / 10Adequategated by 21 critical findings✓ Tool-verified

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

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

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

289 of 1401 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 1401 of the 2131 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledge · ×21OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1
Orphaned file · ×268ooxml/XSSF/EventUserModel/XSSFReader.cs:1
Further orphaned files (smaller)

What to do

  1. 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).
  2. 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).
  3. 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.

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

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

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

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. 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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. 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).
  3. 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.

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

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

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

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

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.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

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.
AX2 · Stateful singletons1.0 / 10Critical✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

  • `ClassID` keeps one instance of itself in the static `OLE10_PACKAGE`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (bytes; e.g. `bytes` at line 141). — main/HPSF/ClassID.cs:31
  • `PropertyIDMap` keeps one instance of itself in the static `summaryInformationProperties`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (idMap; e.g. `idMap` at line 486). — main/HPSF/Wellknown/PropertyIDMap.cs:47
  • `UnicodeString` is not registered, but `DVRecord` creates it and keeps it in the static `NULL_TEXT_STRING`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (field_1_charCount, field_2_optionflags, field_3_string, field_4_format_runs, field_5_ext_rst; e.g. `field_1_charCount` at line 558). — main/HSSF/Record/Common/UnicodeString.cs:34
  • `SharedValueManager` keeps one instance of itself in the static `EMPTY`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_groupsCache, _groupsBySharedFormulaRecord, _arrayRecords; e.g. `_groupsCache` at line 193). — main/HSSF/Record/Aggregates/SharedValueManager.cs:33
  • `StartBlockStack` is not registered, but `ChartRecordAggregate` creates it and keeps it in the static `blocks`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (blockList; e.g. `blockList` at line 527). — main/HSSF/Record/Aggregates/Chart/ChartRecordAggregate.cs:522
  • `Fields` keeps one instance of itself in the static `instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (allFields; e.g. `allFields` at line 605). — main/HSSF/UserModel/HeaderFooter.cs:470
  • `BigInteger` keeps one instance of itself in the static `posConst`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (bitLength, bitCount, firstNonzeroIntNum; e.g. `bitLength` at line 505). — main/Util/BigInteger.cs:8
  • `MutableBigInteger` keeps one instance of itself in the static `One`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (offset, intLen, _value; e.g. `offset` at line 1920). — main/Util/BigInteger.cs:1744
  • `CollaboratingWorkbooksEnvironment` keeps one instance of itself in the static `EMPTY`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_unhooked; e.g. `_unhooked` at line 193). — main/SS/Formula/CollaboratingWorkbooksEnvironment.cs:42
  • `NumberEval` keeps one instance of itself in the static `ZERO`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_stringValue; e.g. `_stringValue` at line 70). — main/SS/Formula/Eval/NumberEval.cs:33
  • `DataFormatter` is not registered, but `Text` creates it and keeps it in the static `Formatter`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (formats, defaultNumFormat, locale, generalNumberFormat; e.g. `formats` at line 413). — main/SS/UserModel/DataFormatter.cs:99
  • `AttrPtg` keeps one instance of itself in the static `SUM`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (field_1_options, field_2_data; e.g. `field_1_options` at line 153). — main/SS/Formula/PTG/AttrPtg.cs:33
  • `DecimalFormat` is not registered, but `ExcelStyleDateFormatter` creates it and keeps it in the static `format1digit`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_pattern; e.g. `_pattern` at line 217). — main/SS/Util/Format.cs:183
  • `IconSet` keeps one instance of itself in the static `GYR_3_ARROW`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (name; e.g. `name` at line 119). — main/SS/UserModel/IconMultiStateFormatting.cs:45
  • `ExtendedPropertiesDocument` is not registered, but `POIXMLProperties` creates it and keeps it in the static `NEW_EXT_INSTANCE`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_props; e.g. `_props` at line 35). — OpenXmlFormats/ExtendedPropertiesDocument.cs:10
  • `CustomPropertiesDocument` is not registered, but `POIXMLProperties` creates it and keeps it in the static `NEW_CUST_INSTANCE`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_props; e.g. `_props` at line 33). — OpenXmlFormats/CustomPropertiesDocument.cs:7
  • `ClassID` is not registered, but `PdfExtractor` creates it and keeps it in the static `PdfClassID`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (bytes; e.g. `bytes` at line 141). — main/HPSF/ClassID.cs:31
  • `CT_Marker` is not registered, but `XSSFClientAnchor` creates it and keeps it in the static `EMPTY_MARKER`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_col, _colOff, _row, _rowOff; e.g. `_col` at line 1168). — OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1151
  • `CT_Connector` is not registered, but `XSSFConnector` creates it and keeps it in the static `prototype`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (nvCxnSpPrField, macroField, fPublishedField, spPrField, styleField; e.g. `nvCxnSpPrField` at line 2029). — OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:2017
  • `CT_Shape` is not registered, but `XSSFFreeform` creates it and keeps it in the static `prototype`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (macroField, textlinkField, fLocksTextField, fPublishedField, nvSpPrField, spPrField; e.g. `macroField` at line 36). — OpenXmlFormats/Drawing/spreadsheetShape.cs:20
  • `CT_GraphicalObjectFrame` is not registered, but `XSSFGraphicFrame` creates it and keeps it in the static `prototype`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (xfrmField, graphicField, nvGraphicFramePrField, macroField, fPublishedField; e.g. `xfrmField` at line 986). — OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:974
  • `CT_Picture` is not registered, but `XSSFPicture` creates it and keeps it in the static `prototype`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (nvPicPrField, blipFillField, spPrField, styleField, styleSpecifiedField, macroField; e.g. `nvPicPrField` at line 68). — OpenXmlFormats/Drawing/SpreadsheetPicture.cs:11
  • `CT_GroupShape` is not registered, but `XSSFShapeGroup` creates it and keeps it in the static `prototype`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (grpSpPrField, nvGrpSpPrField, connectors, shapes, pictures, groups; e.g. `grpSpPrField` at line 485). — OpenXmlFormats/Drawing/spreadsheetShape.cs:464
  • `ParagraphProperties` is not registered, but `StyleSheet` creates it and keeps it in the static `NIL_PAP`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (jcLogical; e.g. `jcLogical` at line 254). — scratchpad/HWPF/UserModel/ParagraphProperties.cs:24
  • `CharacterProperties` is not registered, but `StyleSheet` creates it and keeps it in the static `NIL_CHP`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_ico24; e.g. `_ico24` at line 375). — scratchpad/HWPF/UserModel/CharacterProperties.cs:28
  • `XSSFWorkbook` is not registered, but `LargeExcelFileBenchmark` creates it and keeps it in the static `_loadedWorkBook`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (pivotTables, pivotCaches, doc, workbook, sharedStringSource, stylesSource; e.g. `pivotTables` at line 308). — ooxml/XSSF/UserModel/XSSFWorkbook.cs:49
  • `EscherProperties` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (properties; e.g. `properties` at line 346). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/DDF/EscherProperties.cs:29
  • `VariantSupport` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (unsupportedMessage; e.g. `unsupportedMessage` at line 89). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/HPSF/VariantSupport.cs:45
  • `RecordFactory` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (NUM_RECORDS, _allKnownRecordSIDs; e.g. `NUM_RECORDS` at line 444). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/HSSF/Record/RecordFactory.cs:50
  • `HSSFColor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (indexHash; e.g. `indexHash` at line 64). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/HSSF/Util/HSSFColor.cs:40
  • `BitFieldFactory` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (instances; e.g. `instances` at line 52). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/Util/BitFieldFactory.cs:36
  • `IOUtils` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (BYTE_ARRAY_MAX_OVERRIDE, SKIP_BYTE_BUFFER; e.g. `BYTE_ARRAY_MAX_OVERRIDE` at line 73). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/Util/IOUtils.cs:35
  • `POILogFactory` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_loggerClassName; e.g. `_loggerClassName` at line 88). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/Util/POILogFactory.cs:35
  • `RecyclableMemory` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_dataInitialized, _memoryManager; e.g. `_dataInitialized` at line 25). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/Util/RecyclableMemory.cs:9
  • `StringUtil` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (msCodepointToUnicode; e.g. `msCodepointToUnicode` at line 637). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/Util/StringUtil.cs:46
  • `TempFile` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (dir; e.g. `dir` at line 24). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/Util/TempFile.cs:8
  • `CellFormat` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (formatCache; e.g. `formatCache` at line 152). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/SS/Format/CellFormat.cs:73
  • `AnalysisToolPak` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_functionsByName; e.g. `_functionsByName` at line 297). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/SS/Formula/Atp/AnalysisToolPak.cs:46
  • `FunctionEval` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_instance, functions; e.g. `_instance` at line 71). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/SS/Formula/Eval/FunctionEval.cs:38
  • `FunctionMetadataRegistry` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_instance; e.g. `_instance` at line 50). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt. — main/SS/Formula/Function/FunctionMetadataRegistry.cs:29

What to do

  • Keep singletons stateless or back their state with thread-safe types (Concurrent*/Immutable*); otherwise concurrent callers race.
  • A `static` field is one slot for the whole process, however its type is created: back it with a thread-safe type (ConcurrentDictionary, Interlocked), take a lock around every write, or move it into a registered singleton that does.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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.
AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

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.

AX6 · Interface segregation9.8 / 10Exemplary✓ Tool-verified

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.
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.

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.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary✓ Tool-verified

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.
IC1 · Incompleteness & stubs3.5 / 10Weak✓ Tool-verified

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.
M1 · Documentation (README)6.2 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

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

What to do

  • 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.
  • Describe the projects a newcomer cannot place from the root README: 11 of 12 have no README of their own, in their folder or in their family's project (`main`, `ooxml`, `openxml4Net`, `OpenXmlFormats`, `scratchpad/HWPF` and 6 more).
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no 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.
M3 · Folder & project structure8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

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

  • Tests aren't grouped in a dedicated test folder — the test surface isn't separable from production code at a glance.

What to do

  • 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.
M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

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

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

  • `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
  • `Directory.Packages.props` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — Directory.Packages.props: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.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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 we 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.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

  • 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.
PF1 · Benchmark discipline9.5 / 10Exemplary✓ Tool-verified

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.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

S1 · Cryptographic Hygiene4.0 / 10Weak✓ Tool-verified

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.
X12 · Unreachable branch8.0 / 10Strong✓ Tool-verified

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.

  • `colArgWasEmpty` can never be true where it stands: the arm on line 242 (`colArgWasEmpty`) was false. No value of `colArgWasEmpty` satisfies all of that, so the true arm of this conditional expression never runs. Reorder the tests, drop the dead branch, or fix the bound that was meant. — main/SS/Formula/Functions/Index.cs:248
  • `anchor.sp != null` can never be true where it stands: the arm on line 700 (`anchor.sp != null`) was false. No value of `anchor.sp` satisfies all of that, so this arm never runs. Reorder the tests, drop the dead branch, or fix the bound that was meant. — REDACTED:747
  • `case FontSuperScript.None:` can never be true where it stands: the arm on line 385 (`value == (short)FontSuperScript.None`) was false. No value of `value` satisfies all of that, so this case label never runs. Reorder the tests, drop the dead branch, or fix the bound that was meant. — ooxml/XSSF/UserModel/XSSFFont.cs:394

What to do

  • Each finding names the span that makes the branch dead and the span it is dead because of. Confirm from the two, then delete the dead arm or fix the predicate that was meant to be reachable.
X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

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.

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.
X18 · Disposal-pattern correctness5.6 / 10Adequate✓ Tool-verified

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
  • `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
  • `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
  • `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
  • `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 1831), `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 `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
  • `openFileDialog` (line 290) is a component the designer creates for `MainForm` with no container: it is not built with `new T(components)`, not added to `components`, and not added to a parent control's `Controls` or to a component's own child collection — the only routes by which the framework would release it for you. And the type's disposal never names it: searched `Dispose` (MainForm.Designer.cs line 14), plus every method those call by name. So `MainForm` owns it and never releases it; whatever it holds (a dialog's window handle, a file-system watch, a process handle) stays until finalization, once per instance. Release it in `Dispose(bool)` (`openFileDialog?.Dispose();` under `disposing`) — that method may be edited, or moved to the hand-written partial; only `InitializeComponent` belongs to the designer — or register it with the container so `components.Dispose()` releases it. — tools/DocPartViewer/DocPartViewer/MainForm.Designer.cs:290

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.
X20 · Mistyped argument guard7.0 / 10Adequate✓ Tool-verified

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 this 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` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, 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.
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.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

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.

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.
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.

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.

X3 · Exception handling5.9 / 10Adequate✓ Tool-verified

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)
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.

X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

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 224 assigns it with `as ZipEntry`, which hands back null rather than throwing when the value is not a `ZipEntry`, but line 225 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:225
  • 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 `!`.

Reference — by lens

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

LensScoreRatingImpact
Code Health43%Weak — gated by D18, X5, IC1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture70%Adequate — gated by AX2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity60%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness60%AdequateAcceptable, with room to improve.
Security42%Weak — gated by D29, D36, C1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance97%ExemplaryStrongest area.
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 — 40 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 — 51 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — no DI registrations 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
  • D21 Naming Consistency — Naming Consistency not included (check did not complete)
  • 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
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — no coverage collector is wired up
  • 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
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no async method does work a token could cancel
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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.

Critical — 420 finding(s)
D17 · Explicit Debt · WriteOnlyPrivateField · ×230
  • 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.
  • + 205 more in this group — see findings.md.
D17 · Explicit Debt · NoWarnInCsproj · ×77
  • 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.
  • + 52 more in this group — see findings.md.
D17 · Explicit Debt · EmptyCatchBlock · ×31
  • 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.
  • + 6 more in this group — see findings.md.
D34 · Knowledge Freshness · Orphaned knowledge · ×21
  • 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/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.
  • 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Unfinished stub · ×15
  • 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.
AX3 · Project dependency cycles · Namespace dependency cycle · ×6
  • 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.
D10 · Test Quality · Assertions commented out · ×3
  • 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: 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.
D17 · Explicit Debt · DiscardedPureResult · ×2
  • 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.
D13 · Secret Scanning · Leaked secret · ×1
  • REDACTED
D28 · Secrets (history) · High secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
P3 · Security & performance tooling · NuGet vulnerability audit suppressed via NoWarn · ×1
  • 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.
Serious — 3220 finding(s)
D17 · Explicit Debt · CommentedOutCode · ×827
  • CommentedOutCode OpenXmlFormats/Drawing/Chart/AreaChart.cs:345 — 11 consecutive commented-code lines
  • CommentedOutCode OpenXmlFormats/Drawing/ShapeEffects.cs:3870 — 11 consecutive commented-code lines
  • CommentedOutCode OpenXmlFormats/Drawing/ShapeEffects.cs:3884 — 11 consecutive commented-code lines
  • CommentedOutCode OpenXmlFormats/Drawing/ShapeEffects.cs:3898 — 11 consecutive commented-code lines
  • CommentedOutCode OpenXmlFormats/Drawing/ShapeEffects.cs:3912 — 11 consecutive commented-code lines
  • CommentedOutCode OpenXmlFormats/Drawing/ShapeEffects.cs:3926 — 11 consecutive commented-code lines
  • CommentedOutCode OpenXmlFormats/Drawing/ShapeEffects.cs:3940 — 11 consecutive commented-code lines
  • CommentedOutCode OpenXmlFormats/Drawing/ShapeGeometry.cs:2274 — 11 consecutive commented-code lines
  • CommentedOutCode OpenXmlFormats/Drawing/ShapeGeometry.cs:2289 — 11 consecutive commented-code lines
  • CommentedOutCode OpenXmlFormats/Drawing/ShapeProperties.cs:2272 — 11 consecutive commented-code lines
  • CommentedOutCode OpenXmlFormats/Spreadsheet/Sheet/CT_Cell.cs:102 — 11 consecutive commented-code lines
  • CommentedOutCode main/DDF/EscherDgRecord.cs:118 — 11 consecutive commented-code lines
  • CommentedOutCode main/DDF/EscherDggRecord.cs:420 — 11 consecutive commented-code lines
  • CommentedOutCode main/DDF/EscherSpgrRecord.cs:126 — 11 consecutive commented-code lines
  • CommentedOutCode main/DDF/EscherSplitMenuColorsRecord.cs:129 — 11 consecutive commented-code lines
  • CommentedOutCode main/HSSF/Record/Aggregates/SharedValueManager.cs:234 — 11 consecutive commented-code lines
  • CommentedOutCode main/HSSF/Record/EscherAggregate.cs:1168 — 11 consecutive commented-code lines
  • CommentedOutCode main/HSSF/Record/HyperlinkRecord.cs:242 — 11 consecutive commented-code lines
  • CommentedOutCode main/HSSF/UserModel/HSSFRow.cs:394 — 11 consecutive commented-code lines
  • CommentedOutCode main/HSSF/UserModel/HSSFSheet.cs:221 — 11 consecutive commented-code lines
  • CommentedOutCode main/POIFS/FileSystem/DirectoryNode.cs:407 — 11 consecutive commented-code lines
  • CommentedOutCode main/SS/Formula/Eval/OperandResolver.cs:290 — 11 consecutive commented-code lines
  • CommentedOutCode main/SS/Formula/Functions/Index.cs:47 — 11 consecutive commented-code lines
  • CommentedOutCode main/SS/Formula/Functions/Index.cs:91 — 11 consecutive commented-code lines
  • CommentedOutCode main/SS/Formula/PTG/AreaPtgBase.cs:65 — 11 consecutive commented-code lines
  • + 802 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×429
  • TodoComment OpenXmlFormats/Drawing/ShapeEffects.cs:50 — //TODO: implement http://www.schemacentral.com/sc/ooxml/t-a_CT_Blip.html
  • 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.
  • + 404 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 119 more in this group — see findings.md.
D17 · Explicit Debt · FixmeComment · ×70
  • 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:98 — //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.
  • + 45 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×64
  • 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.
  • + 39 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×62
  • 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.
  • + 37 more in this group — see findings.md.
GD1 · Unfinished & placeholder code · Unfinished stub · ×40
  • 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.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×39
  • 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) OpenXmlFormats/Drawing/ShapeStyle.cs:387 — OpenXmlFormats/Drawing/ShapeStyle.cs:387-395 | OpenXmlFormats/Drawing/spreadsheetShape.cs:224-232 — 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) OpenXmlFormats/Wordprocessing/CustomXml.cs:196 — OpenXmlFormats/Wordprocessing/CustomXml.cs:196-204 | OpenXmlFormats/Wordprocessing/CustomXml.cs:2301-2309 — 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 `OpenXmlFormats/Wordprocessing/CustomXml.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.
  • 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) OpenXmlFormats/Drawing/Chart/BarChart.cs:541 — OpenXmlFormats/Drawing/Chart/BarChart.cs:541-549 | OpenXmlFormats/Drawing/Chart/LineChart.cs:80-88 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/BarChart.cs` and `OpenXmlFormats/Drawing/Chart/LineChart.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 136 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 `OpenXmlFormats/Drawing/Chart/BarChart.cs:541` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) OpenXmlFormats/Drawing/ShapeEffects.cs:2940 — OpenXmlFormats/Drawing/ShapeEffects.cs:2940-2948 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:462-470 — 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) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:8257 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:8257-8265 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:5075-5083 — 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 `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:8257` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:8256` calls `ReadString` and `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:5074` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) OpenXmlFormats/Spreadsheet/Styles/CT_CellStyleXfs.cs:26 — OpenXmlFormats/Spreadsheet/Styles/CT_CellStyleXfs.cs:26-34 | OpenXmlFormats/Spreadsheet/Styles/CT_CellXfs.cs:26-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Spreadsheet/Styles/CT_CellStyleXfs.cs:26` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) OpenXmlFormats/Wordprocessing/CustomXml.cs:2359 — OpenXmlFormats/Wordprocessing/CustomXml.cs:2359-2367 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:261-269 — 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 `OpenXmlFormats/Wordprocessing/CustomXml.cs:2359` 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, `OpenXmlFormats/Wordprocessing/CustomXml.cs:2369` calls `XmlElement` and `OpenXmlFormats/Wordprocessing/HdrFtr.cs:271` 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 (9 lines × 2) OpenXmlFormats/Wordprocessing/HdrFtr.cs:640 — OpenXmlFormats/Wordprocessing/HdrFtr.cs:640-648 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1506-1514 — 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 `OpenXmlFormats/Wordprocessing/HdrFtr.cs:640` 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, `OpenXmlFormats/Wordprocessing/HdrFtr.cs:1517` calls `Add`, `Parse` and `OpenXmlFormats/Wordprocessing/HdrFtr.cs:650` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) OpenXmlFormats/Wordprocessing/HdrFtr.cs:1627 — OpenXmlFormats/Wordprocessing/HdrFtr.cs:1627-1635 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1780-1788 — 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 `OpenXmlFormats/Wordprocessing/HdrFtr.cs:1627` 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, `OpenXmlFormats/Wordprocessing/HdrFtr.cs:1791` calls `Add`, `Parse` and `OpenXmlFormats/Wordprocessing/HdrFtr.cs:1637` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:7885 — OpenXmlFormats/Wordprocessing/Paragraph.cs:7885-7893 | OpenXmlFormats/Wordprocessing/Styles.cs:745-753 — 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, `OpenXmlFormats/Wordprocessing/Styles.cs:755` calls `Add`, `Parse` and `OpenXmlFormats/Wordprocessing/Paragraph.cs:7894` 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 × 2) OpenXmlFormats/Wordprocessing/Sdt.cs:740 — OpenXmlFormats/Wordprocessing/Sdt.cs:740-748 | OpenXmlFormats/Wordprocessing/Sdt.cs:923-931 — 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 `OpenXmlFormats/Wordprocessing/Sdt.cs:740` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) scratchpad/HWPF/Model/CHPBinTable.cs:65 — scratchpad/HWPF/Model/CHPBinTable.cs:65-73 | scratchpad/HWPF/Model/PAPBinTable.cs:61-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `scratchpad/HWPF/Model/CHPBinTable.cs:65` 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) scratchpad/HWPF/Model/OldCHPBinTable.cs:46 — scratchpad/HWPF/Model/OldCHPBinTable.cs:46-54 | scratchpad/HWPF/Model/OldPAPBinTable.cs:38-46 — 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 `scratchpad/HWPF/Model/OldCHPBinTable.cs:46` 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.
  • + 14 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×36
  • 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.
  • + 8 more in this group — see findings.md.
D10 · Test Quality · Skipped test · ×32
  • Skipped test: TestSimple testcases/main/DDF/TestEscherDump.cs:34 — Skipped — Not Implemented
  • Skipped test: TestWithData testcases/main/DDF/TestEscherDump.cs:46 — Skipped — Not Implemented
  • Skipped test: TestWithSamplefile testcases/main/DDF/TestEscherDump.cs:52 — Skipped — Not Implemented
  • Skipped test: TestAllTestSamples testcases/main/HSSF/Model/TestDrawingAggregate.cs:176 — Skipped — refactor it
  • Skipped test: TestUserFile testcases/main/HSSF/Record/Crypto/TestXorEncryption.cs:60 — Skipped — not implemented
  • Skipped test: TestCalendarConversion testcases/main/HSSF/UserModel/TestHSSFDateUtil.cs:202 — Skipped — always fail
  • Skipped test: CreateDrawing testcases/main/HSSF/UserModel/TestHSSFWorkbook.cs:1387 — Skipped — poi
  • Skipped test: Test43493 testcases/main/HSSF/UserModel/TestUnfixedBugs.cs:43 — Skipped — WON'T FIX
  • Skipped test: Test49612 testcases/main/HSSF/UserModel/TestUnfixedBugs.cs:63 — Skipped — TestUnfixedBugs
  • Skipped test: HDGFfromStream testcases/main/POIFS/Macros/TestVBAMacroReader.cs:124 — Skipped — Found 0 macros
  • Skipped test: HDGFfromFile testcases/main/POIFS/Macros/TestVBAMacroReader.cs:177 — Skipped — Found 0 macros
  • Skipped test: HDGFfromNPOIFS testcases/main/POIFS/Macros/TestVBAMacroReader.cs:211 — Skipped — Found 0 macros
  • Skipped test: TestCoverage testcases/main/SS/Formula/Functions/TestMathX.cs:1054 — Skipped — not implement
  • Skipped test: Bug59393_commentsCanHaveSameAnchor REDACTED:1503 — Skipped — bug 59393
  • Skipped test: Test57929 REDACTED:1579 — Skipped —
  • Skipped test: GetFieldValue testcases/main/TestPOITestCase.cs:93 — Skipped — poi
  • Skipped test: CallMethod testcases/main/TestPOITestCase.cs:113 — Skipped — poi
  • Skipped test: AssertReflectEquals testcases/main/TestPOITestCase.cs:135 — Skipped — poi
  • Skipped test: InPlaceReWrite testcases/ooxml/POIFS/Crypt/TestEncryptor.cs:326 — Skipped — poi
  • Skipped test: ProtectedTempZip testcases/ooxml/POIFS/Crypt/TestSecureTempZip.cs:40 — Skipped — not implemented
  • Skipped test: TestSignEnvelopingDocument testcases/ooxml/POIFS/Crypt/TestSignatureInfo.cs:270 — Skipped — not implemented
  • Skipped test: TestNonSha1 testcases/ooxml/POIFS/Crypt/TestSignatureInfo.cs:508 — Skipped — not implemented
  • Skipped test: TestDocumentProperties testcases/ooxml/TestPOIXMLProperties.cs:175 — Skipped — test
  • Skipped test: IfWorkbookIsSetToUseCompressionShouldUseGZIPDataWriter testcases/ooxml/XSSF/Streaming/SXSSFWorkbookTests.cs:407 — Skipped — consume memory
  • Skipped test: IfWriting20WorksheetsWith10000x100CellsShouldNotThrowOutOfMemoryException testcases/ooxml/XSSF/Streaming/SXSSFWorkbookTests.cs:424 — Skipped — consume memory
  • + 7 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×30
  • 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) OpenXmlFormats/Drawing/Chart/BarChart.cs:85 — OpenXmlFormats/Drawing/Chart/BarChart.cs:85-92 | OpenXmlFormats/Drawing/Chart/BarChart.cs:1064-1071 — 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) OpenXmlFormats/Drawing/Chart/BarChart.cs:531 — OpenXmlFormats/Drawing/Chart/BarChart.cs:531-538 | OpenXmlFormats/Drawing/Chart/LineChart.cs:70-77 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/BarChart.cs` and `OpenXmlFormats/Drawing/Chart/LineChart.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 136 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 `OpenXmlFormats/Drawing/Chart/BarChart.cs:531` 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) OpenXmlFormats/Drawing/Chart/BarChart.cs:569 — OpenXmlFormats/Drawing/Chart/BarChart.cs:569-576 | OpenXmlFormats/Drawing/Chart/LineChart.cs:106-113 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/BarChart.cs` and `OpenXmlFormats/Drawing/Chart/LineChart.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) OpenXmlFormats/Drawing/Chart/PieChart.cs:188 — OpenXmlFormats/Drawing/Chart/PieChart.cs:188-195 | OpenXmlFormats/Drawing/Chart/PieChart.cs:769-776 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `OpenXmlFormats/Drawing/Chart/PieChart.cs:778` calls `Write` and `OpenXmlFormats/Drawing/Chart/PieChart.cs:197` 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/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) OpenXmlFormats/Drawing/Chart/LineChart.cs:841 — OpenXmlFormats/Drawing/Chart/LineChart.cs:841-848 | OpenXmlFormats/Drawing/Chart/LineChart.cs:1056-1063 — 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) OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:2042 — OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:2042-2049 | OpenXmlFormats/Drawing/SpreadsheetPicture.cs:35-42 — 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 `OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:2042` 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 `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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OpenXmlFormats/Drawing/SpreadsheetPicture.cs:32` calls `Parse` and `OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:2040` 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) OpenXmlFormats/Wordprocessing/FormField.cs:810 — OpenXmlFormats/Wordprocessing/FormField.cs:810-817 | OpenXmlFormats/Wordprocessing/FormField.cs:902-909 — 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 `OpenXmlFormats/Wordprocessing/FormField.cs:810` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:1929 — OpenXmlFormats/Wordprocessing/Paragraph.cs:1929-1936 | OpenXmlFormats/Wordprocessing/Paragraph.cs:5560-5567 — 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 `OpenXmlFormats/Wordprocessing/Paragraph.cs:1929` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) OpenXmlFormats/Wordprocessing/Table.cs:2635 — OpenXmlFormats/Wordprocessing/Table.cs:2635-2642 | OpenXmlFormats/Wordprocessing/Table.cs:4653-4660 — 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 `OpenXmlFormats/Wordprocessing/Table.cs:2635` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) OpenXmlFormats/Wordprocessing/Markup.cs:67 — OpenXmlFormats/Wordprocessing/Markup.cs:67-74 | OpenXmlFormats/Wordprocessing/Markup.cs:124-131 — 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 `OpenXmlFormats/Wordprocessing/Markup.cs:67` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) OpenXmlFormats/Wordprocessing/Table.cs:298 — OpenXmlFormats/Wordprocessing/Table.cs:298-305 | OpenXmlFormats/Wordprocessing/Table.cs:5739-5746 — 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 `OpenXmlFormats/Wordprocessing/Table.cs:298` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (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.
  • + 5 more in this group — see findings.md.
AX2 · Stateful singletons · Stateful shared instance · ×26
  • Stateful shared instance: ClassID main/HPSF/ClassID.cs:31 — `ClassID` keeps one instance of itself in the static `OLE10_PACKAGE`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (bytes; e.g. `bytes` at line 141).
  • Stateful shared instance: PropertyIDMap main/HPSF/Wellknown/PropertyIDMap.cs:47 — `PropertyIDMap` keeps one instance of itself in the static `summaryInformationProperties`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (idMap; e.g. `idMap` at line 486).
  • Stateful shared instance: UnicodeString main/HSSF/Record/Common/UnicodeString.cs:34 — `UnicodeString` is not registered, but `DVRecord` creates it and keeps it in the static `NULL_TEXT_STRING`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (field_1_charCount, field_2_optionflags, field_3_string, field_4_format_runs, field_5_ext_rst; e.g. `field_1_charCount` at line 558).
  • Stateful shared instance: SharedValueManager main/HSSF/Record/Aggregates/SharedValueManager.cs:33 — `SharedValueManager` keeps one instance of itself in the static `EMPTY`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_groupsCache, _groupsBySharedFormulaRecord, _arrayRecords; e.g. `_groupsCache` at line 193).
  • Stateful shared instance: StartBlockStack main/HSSF/Record/Aggregates/Chart/ChartRecordAggregate.cs:522 — `StartBlockStack` is not registered, but `ChartRecordAggregate` creates it and keeps it in the static `blocks`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (blockList; e.g. `blockList` at line 527).
  • Stateful shared instance: Fields main/HSSF/UserModel/HeaderFooter.cs:470 — `Fields` keeps one instance of itself in the static `instance`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (allFields; e.g. `allFields` at line 605).
  • Stateful shared instance: BigInteger main/Util/BigInteger.cs:8 — `BigInteger` keeps one instance of itself in the static `posConst`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (bitLength, bitCount, firstNonzeroIntNum; e.g. `bitLength` at line 505).
  • Stateful shared instance: MutableBigInteger main/Util/BigInteger.cs:1744 — `MutableBigInteger` keeps one instance of itself in the static `One`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (offset, intLen, _value; e.g. `offset` at line 1920).
  • Stateful shared instance: CollaboratingWorkbooksEnvironment main/SS/Formula/CollaboratingWorkbooksEnvironment.cs:42 — `CollaboratingWorkbooksEnvironment` keeps one instance of itself in the static `EMPTY`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_unhooked; e.g. `_unhooked` at line 193).
  • Stateful shared instance: NumberEval main/SS/Formula/Eval/NumberEval.cs:33 — `NumberEval` keeps one instance of itself in the static `ZERO`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_stringValue; e.g. `_stringValue` at line 70).
  • Stateful shared instance: DataFormatter main/SS/UserModel/DataFormatter.cs:99 — `DataFormatter` is not registered, but `Text` creates it and keeps it in the static `Formatter`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (formats, defaultNumFormat, locale, generalNumberFormat; e.g. `formats` at line 413).
  • Stateful shared instance: AttrPtg main/SS/Formula/PTG/AttrPtg.cs:33 — `AttrPtg` keeps one instance of itself in the static `SUM`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (field_1_options, field_2_data; e.g. `field_1_options` at line 153).
  • Stateful shared instance: DecimalFormat main/SS/Util/Format.cs:183 — `DecimalFormat` is not registered, but `ExcelStyleDateFormatter` creates it and keeps it in the static `format1digit`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_pattern; e.g. `_pattern` at line 217).
  • Stateful shared instance: IconSet main/SS/UserModel/IconMultiStateFormatting.cs:45 — `IconSet` keeps one instance of itself in the static `GYR_3_ARROW`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (name; e.g. `name` at line 119).
  • Stateful shared instance: ExtendedPropertiesDocument OpenXmlFormats/ExtendedPropertiesDocument.cs:10 — `ExtendedPropertiesDocument` is not registered, but `POIXMLProperties` creates it and keeps it in the static `NEW_EXT_INSTANCE`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_props; e.g. `_props` at line 35).
  • Stateful shared instance: CustomPropertiesDocument OpenXmlFormats/CustomPropertiesDocument.cs:7 — `CustomPropertiesDocument` is not registered, but `POIXMLProperties` creates it and keeps it in the static `NEW_CUST_INSTANCE`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_props; e.g. `_props` at line 33).
  • Stateful shared instance: ClassID main/HPSF/ClassID.cs:31 — `ClassID` is not registered, but `PdfExtractor` creates it and keeps it in the static `PdfClassID`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (bytes; e.g. `bytes` at line 141).
  • Stateful shared instance: CT_Marker OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1151 — `CT_Marker` is not registered, but `XSSFClientAnchor` creates it and keeps it in the static `EMPTY_MARKER`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_col, _colOff, _row, _rowOff; e.g. `_col` at line 1168).
  • Stateful shared instance: CT_Connector OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:2017 — `CT_Connector` is not registered, but `XSSFConnector` creates it and keeps it in the static `prototype`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (nvCxnSpPrField, macroField, fPublishedField, spPrField, styleField; e.g. `nvCxnSpPrField` at line 2029).
  • Stateful shared instance: CT_Shape OpenXmlFormats/Drawing/spreadsheetShape.cs:20 — `CT_Shape` is not registered, but `XSSFFreeform` creates it and keeps it in the static `prototype`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (macroField, textlinkField, fLocksTextField, fPublishedField, nvSpPrField, spPrField; e.g. `macroField` at line 36).
  • Stateful shared instance: CT_GraphicalObjectFrame OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:974 — `CT_GraphicalObjectFrame` is not registered, but `XSSFGraphicFrame` creates it and keeps it in the static `prototype`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (xfrmField, graphicField, nvGraphicFramePrField, macroField, fPublishedField; e.g. `xfrmField` at line 986).
  • Stateful shared instance: CT_Picture OpenXmlFormats/Drawing/SpreadsheetPicture.cs:11 — `CT_Picture` is not registered, but `XSSFPicture` creates it and keeps it in the static `prototype`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (nvPicPrField, blipFillField, spPrField, styleField, styleSpecifiedField, macroField; e.g. `nvPicPrField` at line 68).
  • Stateful shared instance: CT_GroupShape OpenXmlFormats/Drawing/spreadsheetShape.cs:464 — `CT_GroupShape` is not registered, but `XSSFShapeGroup` creates it and keeps it in the static `prototype`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (grpSpPrField, nvGrpSpPrField, connectors, shapes, pictures, groups; e.g. `grpSpPrField` at line 485).
  • Stateful shared instance: ParagraphProperties scratchpad/HWPF/UserModel/ParagraphProperties.cs:24 — `ParagraphProperties` is not registered, but `StyleSheet` creates it and keeps it in the static `NIL_PAP`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (jcLogical; e.g. `jcLogical` at line 254).
  • Stateful shared instance: CharacterProperties scratchpad/HWPF/UserModel/CharacterProperties.cs:28 — `CharacterProperties` is not registered, but `StyleSheet` creates it and keeps it in the static `NIL_CHP`, so that one instance serves the whole process and is shared by every thread that reaches it — and it mutates instance state outside any lock (_ico24; e.g. `_ico24` at line 375).
  • + 1 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×25
  • 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.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×24
  • Duplicated block (6 lines × 2) OpenXmlFormats/Drawing/ShapeProperties.cs:1097 — OpenXmlFormats/Drawing/ShapeProperties.cs:1097-1102 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:336-341 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (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) OpenXmlFormats/Drawing/Chart/BarChart.cs:1070 — OpenXmlFormats/Drawing/Chart/BarChart.cs:1070-1075 | OpenXmlFormats/Drawing/Chart/PieChart.cs:1023-1028 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/BarChart.cs` and `OpenXmlFormats/Drawing/Chart/PieChart.cs` as WHOLE FILES: this scan already matched 5 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 (6 lines × 2) OpenXmlFormats/Drawing/Chart/BubbleChart.cs:182 — OpenXmlFormats/Drawing/Chart/BubbleChart.cs:182-187 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:74-79 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/BubbleChart.cs` and `OpenXmlFormats/Drawing/Chart/ScatterChart.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 134 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 `OpenXmlFormats/Drawing/Chart/BubbleChart.cs:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) OpenXmlFormats/Drawing/Chart/BubbleChart.cs:220 — OpenXmlFormats/Drawing/Chart/BubbleChart.cs:220-225 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:110-115 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/BubbleChart.cs` and `OpenXmlFormats/Drawing/Chart/ScatterChart.cs` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 134 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) OpenXmlFormats/Drawing/ShapeProperties.cs:904 — OpenXmlFormats/Drawing/ShapeProperties.cs:904-909 | OpenXmlFormats/Drawing/spreadsheetShape.cs:413-418 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:1146 — OpenXmlFormats/Wordprocessing/Paragraph.cs:1146-1151 | OpenXmlFormats/Wordprocessing/Paragraph.cs:6397-6402 — 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) OpenXmlFormats/Wordprocessing/Paragraph.cs:5542 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5542-5547 | OpenXmlFormats/Wordprocessing/Paragraph.cs:7317-7322 — 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) OpenXmlFormats/Drawing/Chart/LineChart.cs:78 — OpenXmlFormats/Drawing/Chart/LineChart.cs:78-83 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:80-85 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/LineChart.cs` and `OpenXmlFormats/Drawing/Chart/ScatterChart.cs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 82 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 `OpenXmlFormats/Drawing/Chart/LineChart.cs:78` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1093 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1093-1098 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1404-1409 — 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 `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1093` 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/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) OpenXmlFormats/Wordprocessing/Paragraph.cs:68 — OpenXmlFormats/Wordprocessing/Paragraph.cs:68-73 | OpenXmlFormats/Wordprocessing/Table.cs:5565-5570 — 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, `OpenXmlFormats/Wordprocessing/Paragraph.cs:75` calls `ReadBytes` and `OpenXmlFormats/Wordprocessing/Table.cs:5573` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:5639 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5639-5644 | OpenXmlFormats/Wordprocessing/Paragraph.cs:7386-7391 — 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/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 (6 lines × 2) OpenXmlFormats/CustomPropertiesDocument.cs:57 — OpenXmlFormats/CustomPropertiesDocument.cs:57-62 | OpenXmlFormats/ExtendedPropertiesDocument.cs:59-64 — 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) OpenXmlFormats/Spreadsheet/Styles/CT_CellStyleXfs.cs:59 — OpenXmlFormats/Spreadsheet/Styles/CT_CellStyleXfs.cs:59-64 | OpenXmlFormats/Spreadsheet/Styles/CT_CellXfs.cs:59-64 — 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) scratchpad/HSLF/Record/SoundData.cs:48 — scratchpad/HSLF/Record/SoundData.cs:48-53 | scratchpad/HSLF/Record/TextRulerAtom.cs:54-59 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from 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.
IC1 · Incompleteness & stubs · Unfinished stub · ×24
  • 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×23
  • 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) scratchpad/HSLF/Record/StyleTextPropAtom.cs:452 — scratchpad/HSLF/Record/StyleTextPropAtom.cs:452-458 | scratchpad/HSLF/Record/StyleTextPropAtom.cs:472-478 — 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/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) OpenXmlFormats/Drawing/Chart/LineChart.cs:818 — OpenXmlFormats/Drawing/Chart/LineChart.cs:818-824 | OpenXmlFormats/Drawing/Chart/LineChart.cs:1018-1024 — 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) OpenXmlFormats/Drawing/ShapeProperties.cs:741 — OpenXmlFormats/Drawing/ShapeProperties.cs:741-747 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:50-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • 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) OpenXmlFormats/Drawing/ShapeEffects.cs:471 — OpenXmlFormats/Drawing/ShapeEffects.cs:471-477 | OpenXmlFormats/Drawing/ShapeEffects.cs:1034-1040 — 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) OpenXmlFormats/Wordprocessing/Styles.cs:1390 — OpenXmlFormats/Wordprocessing/Styles.cs:1390-1396 | OpenXmlFormats/Wordprocessing/Styles.cs:1947-1953 — 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/Record/EscherAggregate.cs:618 — main/HSSF/Record/EscherAggregate.cs:618-624 | main/HSSF/Record/EscherAggregate.cs:638-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:618` 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/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.
  • Duplicated block (7 lines × 2) scratchpad/HSLF/Record/Comment2000Atom.cs:47 — scratchpad/HSLF/Record/Comment2000Atom.cs:47-55 | scratchpad/HSLF/Record/TxInteractiveInfoAtom.cs:46-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.
  • Duplicated block (7 lines × 2) scratchpad/HSLF/Record/CString.cs:48 — scratchpad/HSLF/Record/CString.cs:48-54 | scratchpad/HSLF/Record/TextCharsAtom.cs:49-55 — 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.
D3 · God Classes · ClassTooLong · ×22
  • 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: XWPFTable ooxml/XWPF/Usermodel/XWPFTable.cs — ClassTooLong — 461 significant lines (blank, comment-only and punctuation-only lines excluded), 27 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: 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: 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×22
  • Duplicated block (10 lines × 2) scratchpad/HWPF/UserModel/Range.cs:456 — scratchpad/HWPF/UserModel/Range.cs:456-465 | scratchpad/HWPF/UserModel/Range.cs:507-516 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:2027 — OpenXmlFormats/Wordprocessing/Paragraph.cs:2027-2036 | OpenXmlFormats/Wordprocessing/Paragraph.cs:5656-5665 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) 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) OpenXmlFormats/Drawing/ShapeProperties.cs:569 — OpenXmlFormats/Drawing/ShapeProperties.cs:569-578 | OpenXmlFormats/Drawing/ShapeProperties.cs:1619-1628 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Drawing/ShapeProperties.cs:569` 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) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:3756 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:3756-3765 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:4130-4139 — 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 `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:3756` 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) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:3905 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:3905-3914 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:4232-4241 — 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 `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:3905` 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) OpenXmlFormats/Wordprocessing/Paragraph.cs:7905 — OpenXmlFormats/Wordprocessing/Paragraph.cs:7905-7914 | OpenXmlFormats/Wordprocessing/Styles.cs:804-813 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) OpenXmlFormats/Wordprocessing/Settings.cs:2183 — OpenXmlFormats/Wordprocessing/Settings.cs:2183-2192 | OpenXmlFormats/Wordprocessing/Settings.cs:4249-4258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `OpenXmlFormats/Wordprocessing/Settings.cs:2194` calls `WriteEndW` and `OpenXmlFormats/Wordprocessing/Settings.cs:4260` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) 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) OpenXmlFormats/Wordprocessing/Sdt.cs:253 — OpenXmlFormats/Wordprocessing/Sdt.cs:253-262 | OpenXmlFormats/Wordprocessing/Table.cs:374-383 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Wordprocessing/Sdt.cs:253` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `OpenXmlFormats/Wordprocessing/Sdt.cs:264` calls `XmlElement` and `OpenXmlFormats/Wordprocessing/Table.cs:385` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) scratchpad/HWPF/Model/OldSectionTable.cs:45 — scratchpad/HWPF/Model/OldSectionTable.cs:45-54 | scratchpad/HWPF/Model/SectionTable.cs:53-64 — 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 `scratchpad/HWPF/Model/OldSectionTable.cs:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) 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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×21
  • 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) OpenXmlFormats/Presentation/CT_Slide.cs:38 — OpenXmlFormats/Presentation/CT_Slide.cs:38-42 | OpenXmlFormats/Presentation/CT_SlideLayout.cs:41-45 — before extracting anything, compare `OpenXmlFormats/Presentation/CT_Slide.cs` and `OpenXmlFormats/Presentation/CT_SlideLayout.cs` as WHOLE FILES: 87% 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. 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/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) 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) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1076 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1076-1080 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:1391-1395 — 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) OpenXmlFormats/Wordprocessing/Paragraph.cs:2244 — OpenXmlFormats/Wordprocessing/Paragraph.cs:2244-2248 | OpenXmlFormats/Wordprocessing/Paragraph.cs:3129-3133 — 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) main/SS/HtmlDocumentFacade.cs:62 — main/SS/HtmlDocumentFacade.cs:62-66 | scratchpad/HWPF/Converter/HtmlDocumentFacade.cs:63-67 — before extracting anything, compare `main/SS/HtmlDocumentFacade.cs` and `scratchpad/HWPF/Converter/HtmlDocumentFacade.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 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 (5 lines × 2) main/SS/HtmlDocumentFacade.cs:83 — main/SS/HtmlDocumentFacade.cs:83-87 | scratchpad/HWPF/Converter/HtmlDocumentFacade.cs:84-88 — before extracting anything, compare `main/SS/HtmlDocumentFacade.cs` and `scratchpad/HWPF/Converter/HtmlDocumentFacade.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 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 (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) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:5656 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:5656-5660 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:3871-3875 — 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) 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.
X18 · Disposal-pattern correctness · Disposable created and abandoned in the method that made it · ×19
  • 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/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/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 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/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 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.
D10 · Test Quality · No assertions · ×17
  • 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestNormalConstructor testcases/main/POIFS/Storage/TestRawDataBlockList.cs:65 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestEmptyConstructor testcases/main/POIFS/Storage/TestRawDataBlockList.cs:82 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestSome testcases/main/SS/Format/TestCellFormat.cs:42 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: Add testcases/main/SS/Formula/UDF/TestAggregatingUDFFinder.cs:40 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestSkipFullyBug61294 testcases/main/Util/TestIOUtils.cs:159 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: ExceedNumberFormatLimit testcases/ooxml/XSSF/Model/TestStylesTable.cs:180 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestSetErrorValeFormula testcases/ooxml/XSSF/Streaming/TestSXSSFCell.cs:87 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestUpdateCachedFormulaResultFromErrorToNumber_bug46479 testcases/ooxml/XSSF/Streaming/TestSXSSFFormulaEvaluation.cs:193 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestSetSheetName testcases/ooxml/XSSF/Streaming/TestSXSSFWorkbook.cs:86 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestCanComputeWidthInvalidFont testcases/ooxml/XSSF/UserModel/TestXSSFFont.cs:319 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestInnerPproduct testcases/ooxml/XSSF/UserModel/TestXSSFShapes.cs:386 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestLanguages testcases/ooxml/XWPF/UserModel/TestXWPFStyles.cs:100 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestCorePropertiesPart testcases/openxml4net/OPC/Compliance/TestOPCComplianceCoreProperties.cs:66 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestContentTypeValidation testcases/openxml4net/TestContentType.cs:45 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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: TestContentTypeParam testcases/openxml4net/TestContentType.cs:102 — 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×16
  • 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) scratchpad/HWPF/Converter/WordToFoConverter.cs:456 — scratchpad/HWPF/Converter/WordToFoConverter.cs:456-467 | scratchpad/HWPF/Converter/WordToHtmlConverter.cs:476-487 — 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 `scratchpad/HWPF/Converter/WordToFoConverter.cs:456` 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/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) ooxml/SS/Converter/ExcelToHtmlConverter.cs:280 — ooxml/SS/Converter/ExcelToHtmlConverter.cs:280-291 | scratchpad/HWPF/Converter/WordToHtmlConverter.cs:181-192 — 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 (12 lines × 2) OpenXmlFormats/Drawing/ShapeProperties.cs:1255 — OpenXmlFormats/Drawing/ShapeProperties.cs:1255-1266 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:200-211 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:1080 — OpenXmlFormats/Wordprocessing/Paragraph.cs:1080-1091 | OpenXmlFormats/Wordprocessing/Paragraph.cs:6347-6358 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:5612 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5612-5623 | OpenXmlFormats/Wordprocessing/Paragraph.cs:7365-7376 — 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 `OpenXmlFormats/Wordprocessing/Paragraph.cs:5612` 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) OpenXmlFormats/Wordprocessing/Sdt.cs:754 — OpenXmlFormats/Wordprocessing/Sdt.cs:754-765 | OpenXmlFormats/Wordprocessing/Sdt.cs:937-948 — 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 (12 lines × 2) scratchpad/HWPF/SPRM/SprmBuffer.cs:73 — scratchpad/HWPF/SPRM/SprmBuffer.cs:73-84 | scratchpad/HWPF/SPRM/SprmOperation.cs:80-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) 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) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2757 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2757-2768 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3006-3017 — 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 `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2757` 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 (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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×15
  • 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.
AX2 · Stateful singletons · Process-global static state · ×14
  • Process-global static state: EscherProperties main/DDF/EscherProperties.cs:29 — `EscherProperties` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (properties; e.g. `properties` at line 346). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: VariantSupport main/HPSF/VariantSupport.cs:45 — `VariantSupport` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (unsupportedMessage; e.g. `unsupportedMessage` at line 89). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: RecordFactory main/HSSF/Record/RecordFactory.cs:50 — `RecordFactory` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (NUM_RECORDS, _allKnownRecordSIDs; e.g. `NUM_RECORDS` at line 444). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: HSSFColor main/HSSF/Util/HSSFColor.cs:40 — `HSSFColor` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (indexHash; e.g. `indexHash` at line 64). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: BitFieldFactory main/Util/BitFieldFactory.cs:36 — `BitFieldFactory` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (instances; e.g. `instances` at line 52). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: IOUtils main/Util/IOUtils.cs:35 — `IOUtils` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (BYTE_ARRAY_MAX_OVERRIDE, SKIP_BYTE_BUFFER; e.g. `BYTE_ARRAY_MAX_OVERRIDE` at line 73). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: POILogFactory main/Util/POILogFactory.cs:35 — `POILogFactory` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_loggerClassName; e.g. `_loggerClassName` at line 88). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: RecyclableMemory main/Util/RecyclableMemory.cs:9 — `RecyclableMemory` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_dataInitialized, _memoryManager; e.g. `_dataInitialized` at line 25). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: StringUtil main/Util/StringUtil.cs:46 — `StringUtil` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (msCodepointToUnicode; e.g. `msCodepointToUnicode` at line 637). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: TempFile main/Util/TempFile.cs:8 — `TempFile` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (dir; e.g. `dir` at line 24). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: CellFormat main/SS/Format/CellFormat.cs:73 — `CellFormat` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (formatCache; e.g. `formatCache` at line 152). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: AnalysisToolPak main/SS/Formula/Atp/AnalysisToolPak.cs:46 — `AnalysisToolPak` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_functionsByName; e.g. `_functionsByName` at line 297). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: FunctionEval main/SS/Formula/Eval/FunctionEval.cs:38 — `FunctionEval` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_instance, functions; e.g. `_instance` at line 71). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
  • Process-global static state: FunctionMetadataRegistry main/SS/Formula/Function/FunctionMetadataRegistry.cs:29 — `FunctionMetadataRegistry` keeps mutable `static` state — one slot for the whole process, shared by every thread that reaches the type however its instances are created — and mutates it outside any lock (_instance; e.g. `_instance` at line 50). Concurrent callers lose updates, and a collection that is not built for concurrent writers can corrupt.
D29 · Static Analysis (SAST) · REDACTED · ×14
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×14
  • Duplicated block (14 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:5897 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5897-5910 | OpenXmlFormats/Wordprocessing/Paragraph.cs:7544-7557 — 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 (14 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:5911 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5911-5924 | OpenXmlFormats/Wordprocessing/Paragraph.cs:7565-7578 — 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 (14 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:5925 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5925-5938 | OpenXmlFormats/Wordprocessing/Paragraph.cs:7446-7459 — 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 (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.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×12
  • 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.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) OpenXmlFormats/Drawing/Chart/BubbleChart.cs:474 — OpenXmlFormats/Drawing/Chart/BubbleChart.cs:474-503 | OpenXmlFormats/Drawing/Chart/PieChart.cs:34-52 | OpenXmlFormats/Drawing/Chart/PieChart.cs:162-182 | OpenXmlFormats/Drawing/Chart/PieChart.cs:741-763 — 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) OpenXmlFormats/Drawing/ShapeEffects.cs:1826 — OpenXmlFormats/Drawing/ShapeEffects.cs:1826-1848 | OpenXmlFormats/Drawing/ShapeProperties.cs:2087-2127 | OpenXmlFormats/Drawing/ShapeProperties.cs:2203-2235 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:888-928 — 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) OpenXmlFormats/Wordprocessing/HdrFtr.cs:636 — OpenXmlFormats/Wordprocessing/HdrFtr.cs:636-652 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1501-1520 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1623-1639 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1775-1794 — 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) OpenXmlFormats/Wordprocessing/HdrFtr.cs:657 — OpenXmlFormats/Wordprocessing/HdrFtr.cs:657-669 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1525-1544 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1644-1656 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1799-1818 — 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) OpenXmlFormats/Wordprocessing/PageSetup.cs:399 — OpenXmlFormats/Wordprocessing/PageSetup.cs:399-421 | OpenXmlFormats/Wordprocessing/Paragraph.cs:3279-3299 | OpenXmlFormats/Wordprocessing/Table.cs:2371-2391 | OpenXmlFormats/Wordprocessing/Table.cs:4464-4488 — 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) OpenXmlFormats/Wordprocessing/Table.cs:1191 — OpenXmlFormats/Wordprocessing/Table.cs:1191-1233 | OpenXmlFormats/Wordprocessing/Table.cs:2075-2101 | OpenXmlFormats/Wordprocessing/Table.cs:2271-2299 | OpenXmlFormats/Wordprocessing/Table.cs:2783-2827 — 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) OpenXmlFormats/Wordprocessing/Table.cs:1238 — OpenXmlFormats/Wordprocessing/Table.cs:1238-1276 | OpenXmlFormats/Wordprocessing/Table.cs:2106-2128 | OpenXmlFormats/Wordprocessing/Table.cs:2304-2328 | OpenXmlFormats/Wordprocessing/Table.cs:2832-2872 — 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) scratchpad/HWPF/Model/CHPBinTable.cs:64 — scratchpad/HWPF/Model/CHPBinTable.cs:64-87 | scratchpad/HWPF/Model/OldCHPBinTable.cs:45-66 | scratchpad/HWPF/Model/OldPAPBinTable.cs:37-60 | scratchpad/HWPF/Model/PAPBinTable.cs:60-83 — 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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×11
  • 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) OpenXmlFormats/Drawing/ShapeProperties.cs:2151 — OpenXmlFormats/Drawing/ShapeProperties.cs:2151-2166 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:952-967 — 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 (16 lines × 2) scratchpad/HWPF/Converter/WordToFoConverter.cs:318 — scratchpad/HWPF/Converter/WordToFoConverter.cs:318-333 | scratchpad/HWPF/Converter/WordToHtmlConverter.cs:284-299 — 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 (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) main/SS/HtmlDocumentFacade.cs:42 — main/SS/HtmlDocumentFacade.cs:42-57 | scratchpad/HWPF/Converter/HtmlDocumentFacade.cs:43-58 — before extracting anything, compare `main/SS/HtmlDocumentFacade.cs` and `scratchpad/HWPF/Converter/HtmlDocumentFacade.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 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) 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) OpenXmlFormats/Drawing/ShapeStyle.cs:365 — OpenXmlFormats/Drawing/ShapeStyle.cs:365-380 | OpenXmlFormats/Drawing/spreadsheetShape.cs:202-217 — 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 (16 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:5522 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5522-5537 | OpenXmlFormats/Wordprocessing/Paragraph.cs:7333-7348 — 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.
  • Duplicated block (16 lines × 2) scratchpad/HWPF/Converter/WordToFoUtils.cs:291 — scratchpad/HWPF/Converter/WordToFoUtils.cs:291-306 | scratchpad/HWPF/Converter/WordToHtmlUtils.cs:184-199 — 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.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×11
  • 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) OpenXmlFormats/Wordprocessing/Settings.cs:2157 — OpenXmlFormats/Wordprocessing/Settings.cs:2157-2169 | OpenXmlFormats/Wordprocessing/Settings.cs:4218-4230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) 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) OpenXmlFormats/Drawing/Chart/BarChart.cs:53 — OpenXmlFormats/Drawing/Chart/BarChart.cs:53-65 | OpenXmlFormats/Drawing/Chart/BarChart.cs:1032-1044 — 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 `OpenXmlFormats/Drawing/Chart/BarChart.cs:53` 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 (13 lines × 2) OpenXmlFormats/Drawing/ShapeProperties.cs:885 — OpenXmlFormats/Drawing/ShapeProperties.cs:885-897 | OpenXmlFormats/Drawing/spreadsheetShape.cs:394-406 — 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 (13 lines × 2) OpenXmlFormats/Drawing/ShapeProperties.cs:1077 — OpenXmlFormats/Drawing/ShapeProperties.cs:1077-1089 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:316-328 — 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 (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 (13 lines × 2) OpenXmlFormats/Drawing/ShapeEffects.cs:2916 — OpenXmlFormats/Drawing/ShapeEffects.cs:2916-2928 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:440-452 — 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 `OpenXmlFormats/Drawing/ShapeEffects.cs:2916` 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.
D17 · Explicit Debt · HackComment · ×10
  • 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.
D10 · Test Quality · Test cannot fail · ×9
  • 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: 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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×9
  • Duplicated block (6 lines × 3) OpenXmlFormats/Wordprocessing/CustomXml.cs:1547 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1547-1552 | OpenXmlFormats/Wordprocessing/Run.cs:2395-2400 | OpenXmlFormats/Wordprocessing/Sdt.cs:2435-2440 — 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 `OpenXmlFormats/Wordprocessing/CustomXml.cs:1547` 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) OpenXmlFormats/Wordprocessing/HdrFtr.cs:245 — OpenXmlFormats/Wordprocessing/HdrFtr.cs:245-250 | OpenXmlFormats/Wordprocessing/Markup.cs:505-510 | OpenXmlFormats/Wordprocessing/Table.cs:3564-3569 — 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 `OpenXmlFormats/Wordprocessing/HdrFtr.cs:245` 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) 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) OpenXmlFormats/Drawing/Chart/AreaChart.cs:75 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:75-80 | OpenXmlFormats/Drawing/Chart/BarChart.cs:1068-1073 | OpenXmlFormats/Drawing/Chart/LineChart.cs:579-584 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/BarChart.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 102 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, `OpenXmlFormats/Drawing/Chart/BarChart.cs:1067` calls `Write` and `OpenXmlFormats/Drawing/Chart/AreaChart.cs:74` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) OpenXmlFormats/Drawing/Chart/BarChart.cs:61 — OpenXmlFormats/Drawing/Chart/BarChart.cs:61-66 | OpenXmlFormats/Drawing/Chart/BarChart.cs:1040-1045 | OpenXmlFormats/Drawing/Chart/PieChart.cs:991-996 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/BarChart.cs` and `OpenXmlFormats/Drawing/Chart/PieChart.cs` as WHOLE FILES: this scan already matched 5 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 `OpenXmlFormats/Drawing/Chart/BarChart.cs:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OpenXmlFormats/Drawing/Chart/BarChart.cs:58` calls `Parse` and `OpenXmlFormats/Drawing/Chart/PieChart.cs:989` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) OpenXmlFormats/Drawing/ShapeProperties.cs:2115 — OpenXmlFormats/Drawing/ShapeProperties.cs:2115-2120 | OpenXmlFormats/Drawing/ShapeProperties.cs:2225-2230 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:916-921 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Drawing/ShapeProperties.cs:2115` 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) OpenXmlFormats/Drawing/ShapeProperties.cs:2157 — OpenXmlFormats/Drawing/ShapeProperties.cs:2157-2162 | OpenXmlFormats/Drawing/ShapeProperties.cs:2259-2264 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:958-963 — 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 (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 (6 lines × 3) scratchpad/HSLF/Record/CString.cs:116 — scratchpad/HSLF/Record/CString.cs:116-121 | scratchpad/HSLF/Record/TextBytesAtom.cs:107-112 | scratchpad/HSLF/Record/TextCharsAtom.cs:103-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 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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×8
  • 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/SS/HtmlDocumentFacade.cs:296 — main/SS/HtmlDocumentFacade.cs:296-310 | scratchpad/HWPF/Converter/HtmlDocumentFacade.cs:297-311 — before extracting anything, compare `main/SS/HtmlDocumentFacade.cs` and `scratchpad/HWPF/Converter/HtmlDocumentFacade.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 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/SS/HtmlDocumentFacade.cs:296` 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) OpenXmlFormats/Drawing/ShapeProperties.cs:2135 — OpenXmlFormats/Drawing/ShapeProperties.cs:2135-2149 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:936-950 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (15 lines × 2) 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.
D17 · Explicit Debt · XxxComment · ×7
  • 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×7
  • 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 (11 lines × 2) OpenXmlFormats/Drawing/ShapeProperties.cs:2144 — OpenXmlFormats/Drawing/ShapeProperties.cs:2144-2154 | OpenXmlFormats/Drawing/ShapeProperties.cs:2248-2258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) scratchpad/HWPF/Model/OldPAPBinTable.cs:46 — scratchpad/HWPF/Model/OldPAPBinTable.cs:46-56 | scratchpad/HWPF/Model/PAPBinTable.cs:69-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 `scratchpad/HWPF/Model/OldPAPBinTable.cs:46` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×7
  • 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) OpenXmlFormats/Drawing/Chart/LineChart.cs:589 — OpenXmlFormats/Drawing/Chart/LineChart.cs:589-605 | OpenXmlFormats/Drawing/Chart/LineChart.cs:849-865 — 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 `OpenXmlFormats/Drawing/Chart/LineChart.cs:589` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (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.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×6
  • 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.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2748 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2748-2768 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2997-3017 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3482-3515 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4045-4078 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4417-4452 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4786-4820 — 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) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2773 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2773-2797 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3022-3046 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3520-3553 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4083-4120 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4455-4493 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4825-4863 — 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) OpenXmlFormats/Wordprocessing/PageSetup.cs:426 — OpenXmlFormats/Wordprocessing/PageSetup.cs:426-441 | OpenXmlFormats/Wordprocessing/Paragraph.cs:3304-3320 | OpenXmlFormats/Wordprocessing/Table.cs:2396-2412 | OpenXmlFormats/Wordprocessing/Table.cs:2652-2664 | OpenXmlFormats/Wordprocessing/Table.cs:4493-4513 | OpenXmlFormats/Wordprocessing/Table.cs:4670-4682 — 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) OpenXmlFormats/Wordprocessing/Paragraph.cs:2140 — OpenXmlFormats/Wordprocessing/Paragraph.cs:2140-2153 | OpenXmlFormats/Wordprocessing/Paragraph.cs:6083-6096 | OpenXmlFormats/Wordprocessing/Paragraph.cs:6975-6988 | OpenXmlFormats/Wordprocessing/Table.cs:1094-1107 | OpenXmlFormats/Wordprocessing/Table.cs:2936-2949 | OpenXmlFormats/Wordprocessing/Table.cs:4136-4149 — 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 · Duplicated block (18 lines × 2) · ×6
  • 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) OpenXmlFormats/Drawing/ShapeProperties.cs:712 — OpenXmlFormats/Drawing/ShapeProperties.cs:712-729 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:22-39 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from 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 (18 lines × 2) OpenXmlFormats/Wordprocessing/Markup.cs:1042 — OpenXmlFormats/Wordprocessing/Markup.cs:1042-1059 | OpenXmlFormats/Wordprocessing/Markup.cs:1139-1156 — 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 (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.
D6 · Cohesion (LCOM4) · Low cohesion · ×6
  • 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: InternalSheet (LCOM4 11) main/HSSF/Model/InternalSheet.cs:49 — InternalSheet'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: XSSFExcelExtractor (LCOM4 7) ooxml/XSSF/Extractor/XSSFExcelExtractor.cs:31 — XSSFExcelExtractor'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_TcPrBase (LCOM4 6) OpenXmlFormats/Wordprocessing/Table.cs:4860 — CT_TcPrBase's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AgileEncryptionVerifier (LCOM4 5) ooxml/POIFS/Crypt/Agile/AgileEncryptionVerifier.cs:30 — AgileEncryptionVerifier's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: EscherRecord (LCOM4 4) main/DDF/EscherRecord.cs:30 — EscherRecord's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×5
  • 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.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) OpenXmlFormats/Drawing/Chart/AreaChart.cs:72 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:72-107 | OpenXmlFormats/Drawing/Chart/BarChart.cs:84-128 | OpenXmlFormats/Drawing/Chart/BarChart.cs:1063-1102 | OpenXmlFormats/Drawing/Chart/LineChart.cs:576-611 | OpenXmlFormats/Drawing/Chart/PieChart.cs:1018-1064 — 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) OpenXmlFormats/Drawing/ShapeProperties.cs:40 — OpenXmlFormats/Drawing/ShapeProperties.cs:40-60 | OpenXmlFormats/Drawing/ShapeProperties.cs:302-323 | OpenXmlFormats/Drawing/ShapeProperties.cs:562-578 | OpenXmlFormats/Drawing/ShapeProperties.cs:1340-1361 | OpenXmlFormats/Drawing/ShapeProperties.cs:1611-1628 — 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) REDACTED:251 — REDACTED:251-262 | OpenXmlFormats/Wordprocessing/Styles.cs:1367-1384 | OpenXmlFormats/Wordprocessing/Styles.cs:1800-1810 | OpenXmlFormats/Wordprocessing/Styles.cs:1929-1941 | OpenXmlFormats/Wordprocessing/Styles.cs:2286-2306 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×5
  • 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 (19 lines × 2) OpenXmlFormats/Drawing/Chart/PieChart.cs:390 — OpenXmlFormats/Drawing/Chart/PieChart.cs:390-408 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:98-116 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/PieChart.cs` and `OpenXmlFormats/Drawing/Chart/RadarChart.cs` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 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 `OpenXmlFormats/Drawing/Chart/PieChart.cs:390` 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.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×5
  • Duplicated block (11 lines × 3) OpenXmlFormats/Wordprocessing/Document.cs:421 — OpenXmlFormats/Wordprocessing/Document.cs:421-431 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:232-242 | OpenXmlFormats/Wordprocessing/Sdt.cs:1202-1212 — 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 lines × 3) OpenXmlFormats/Drawing/Chart/AreaChart.cs:278 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:278-288 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:192-202 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:82-92 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/BubbleChart.cs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 117 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 `OpenXmlFormats/Drawing/Chart/AreaChart.cs:278` 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 3) OpenXmlFormats/Drawing/ShapeProperties.cs:85 — OpenXmlFormats/Drawing/ShapeProperties.cs:85-95 | OpenXmlFormats/Drawing/ShapeProperties.cs:288-298 | OpenXmlFormats/Drawing/ShapeProperties.cs:1393-1403 — 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. 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 (11 lines × 3) OpenXmlFormats/Wordprocessing/CustomXml.cs:1517 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1517-1527 | OpenXmlFormats/Wordprocessing/Paragraph.cs:356-366 | OpenXmlFormats/Wordprocessing/Run.cs:2427-2437 — 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 `OpenXmlFormats/Wordprocessing/CustomXml.cs:1517` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) scratchpad/HSLF/Record/CString.cs:80 — scratchpad/HSLF/Record/CString.cs:80-90 | scratchpad/HSLF/Record/TextBytesAtom.cs:65-75 | scratchpad/HSLF/Record/TextCharsAtom.cs:64-74 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×5
  • Duplicated block (5 lines × 4) OpenXmlFormats/Drawing/ShapeProperties.cs:45 — OpenXmlFormats/Drawing/ShapeProperties.cs:45-49 | OpenXmlFormats/Drawing/ShapeProperties.cs:307-311 | OpenXmlFormats/Drawing/ShapeProperties.cs:1345-1349 | OpenXmlFormats/Drawing/ShapeProperties.cs:1617-1621 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 4) REDACTED:255 — REDACTED:255-259 | OpenXmlFormats/Wordprocessing/Styles.cs:1373-1377 | OpenXmlFormats/Wordprocessing/Styles.cs:1935-1939 | OpenXmlFormats/Wordprocessing/Styles.cs:2292-2296 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • 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.
  • Duplicated block (5 lines × 4) OpenXmlFormats/Wordprocessing/BaseTypes.cs:261 — OpenXmlFormats/Wordprocessing/BaseTypes.cs:261-265 | OpenXmlFormats/Wordprocessing/BaseTypes.cs:427-431 | OpenXmlFormats/Wordprocessing/BaseTypes.cs:532-536 | OpenXmlFormats/Wordprocessing/FormField.cs:109-113 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (5 lines × 4) OpenXmlFormats/Wordprocessing/BaseTypes.cs:354 — OpenXmlFormats/Wordprocessing/BaseTypes.cs:354-358 | OpenXmlFormats/Wordprocessing/BaseTypes.cs:473-477 | OpenXmlFormats/Wordprocessing/BaseTypes.cs:605-609 | OpenXmlFormats/Wordprocessing/Styles.cs:1704-1708 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. 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.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (8 members, 50+ identical tokens) OpenXmlFormats/Drawing/Chart/AreaChart.cs:252 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:252-288 | OpenXmlFormats/Drawing/Chart/BarChart.cs:510-549 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:162-202 | OpenXmlFormats/Drawing/Chart/LineChart.cs:51-88 | OpenXmlFormats/Drawing/Chart/PieChart.cs:339-369 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:47-77 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:54-92 | OpenXmlFormats/Drawing/Chart/SurfaceChart.cs:316-339 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) OpenXmlFormats/Drawing/Chart/AreaChart.cs:293 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:293-341 | OpenXmlFormats/Drawing/Chart/BarChart.cs:554-601 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:207-259 | OpenXmlFormats/Drawing/Chart/LineChart.cs:93-138 | OpenXmlFormats/Drawing/Chart/PieChart.cs:374-408 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:82-116 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:97-147 | OpenXmlFormats/Drawing/Chart/SurfaceChart.cs:344-367 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) OpenXmlFormats/Drawing/ShapeEffects.cs:743 — OpenXmlFormats/Drawing/ShapeEffects.cs:743-767 | OpenXmlFormats/Drawing/ShapeEffects.cs:1027-1057 | OpenXmlFormats/Drawing/ShapeEffects.cs:1383-1406 | OpenXmlFormats/Drawing/ShapeEffects.cs:1656-1677 | OpenXmlFormats/Drawing/ShapeEffects.cs:2011-2031 | OpenXmlFormats/Drawing/ShapeEffects.cs:2447-2468 | OpenXmlFormats/Drawing/ShapeStyle.cs:36-57 | OpenXmlFormats/Drawing/ShapeStyle.cs:203-225 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
  • Members sharing a duplicated core (8 members, 50+ identical tokens) OpenXmlFormats/Drawing/ShapeEffects.cs:772 — OpenXmlFormats/Drawing/ShapeEffects.cs:772-791 | OpenXmlFormats/Drawing/ShapeEffects.cs:1062-1088 | OpenXmlFormats/Drawing/ShapeEffects.cs:1411-1430 | OpenXmlFormats/Drawing/ShapeEffects.cs:1682-1699 | OpenXmlFormats/Drawing/ShapeEffects.cs:2034-2050 | OpenXmlFormats/Drawing/ShapeEffects.cs:2473-2490 | OpenXmlFormats/Drawing/ShapeStyle.cs:62-79 | OpenXmlFormats/Drawing/ShapeStyle.cs:230-247 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×4
  • Edited copy of a member (7 corresponding lines) main/SS/HtmlDocumentFacade.cs:90 — main/SS/HtmlDocumentFacade.cs:90-96 | scratchpad/HWPF/Converter/HtmlDocumentFacade.cs:91-97 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) scratchpad/HSLF/Record/SoundData.cs:47 — scratchpad/HSLF/Record/SoundData.cs:47-53 | scratchpad/HSLF/Record/TextRulerAtom.cs:53-59 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) scratchpad/HWPF/Converter/WordToFoConverter.cs:381 — scratchpad/HWPF/Converter/WordToFoConverter.cs:381-389 | scratchpad/HWPF/Converter/WordToHtmlConverter.cs:391-397 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) scratchpad/HWPF/Converter/WordToFoConverter.cs:287 — scratchpad/HWPF/Converter/WordToFoConverter.cs:287-294 | scratchpad/HWPF/Converter/WordToHtmlConverter.cs:260-266 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×4
  • Edited copy of a member (6 corresponding lines) scratchpad/HSLF/Record/TextBytesAtom.cs:119 — scratchpad/HSLF/Record/TextBytesAtom.cs:119-124 | scratchpad/HSLF/Record/TextCharsAtom.cs:115-120 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) main/SS/HtmlDocumentFacade.cs:61 — main/SS/HtmlDocumentFacade.cs:61-66 | scratchpad/HWPF/Converter/HtmlDocumentFacade.cs:62-67 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) main/SS/HtmlDocumentFacade.cs:82 — main/SS/HtmlDocumentFacade.cs:82-87 | scratchpad/HWPF/Converter/HtmlDocumentFacade.cs:83-88 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) scratchpad/HWPF/Converter/WordToFoConverter.cs:39 — scratchpad/HWPF/Converter/WordToFoConverter.cs:39-44 | scratchpad/HWPF/Converter/WordToTextConverter.cs:59-65 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×4
  • Duplicated block (34 lines × 2) OpenXmlFormats/Drawing/ShapeProperties.cs:1768 — OpenXmlFormats/Drawing/ShapeProperties.cs:1768-1801 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:585-618 — 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 `OpenXmlFormats/Drawing/ShapeProperties.cs:1768` 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, `OpenXmlFormats/Drawing/ShapeProperties.cs:1767` calls `XmlRoot` and `OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:584` 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 (34 lines × 2) OpenXmlFormats/Wordprocessing/Table.cs:4213 — OpenXmlFormats/Wordprocessing/Table.cs:4213-4246 | OpenXmlFormats/Wordprocessing/Table.cs:4756-4789 — 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 `OpenXmlFormats/Wordprocessing/Table.cs:4213` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OpenXmlFormats/Wordprocessing/Table.cs:4754` calls `Parse` and `OpenXmlFormats/Wordprocessing/Table.cs:4212` 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 (34 lines × 2) OpenXmlFormats/Wordprocessing/Table.cs:4254 — OpenXmlFormats/Wordprocessing/Table.cs:4254-4287 | OpenXmlFormats/Wordprocessing/Table.cs:4803-4836 — 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 `OpenXmlFormats/Wordprocessing/Table.cs:4254` 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 (34 lines × 2) scratchpad/HWPF/Model/CHPBinTable.cs:336 — scratchpad/HWPF/Model/CHPBinTable.cs:336-369 | scratchpad/HWPF/Model/PAPBinTable.cs:317-350 — 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 `scratchpad/HWPF/Model/CHPBinTable.cs:336` 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.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×4
  • 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.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×4
  • Duplicated block (11 lines × 4) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3523 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3523-3533 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4085-4095 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4458-4468 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4828-4838 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3522` calls `WriteAttribute` and `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4084` 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 (11 lines × 4) OpenXmlFormats/Drawing/ShapeEffects.cs:1835 — OpenXmlFormats/Drawing/ShapeEffects.cs:1835-1845 | OpenXmlFormats/Drawing/ShapeProperties.cs:2102-2112 | OpenXmlFormats/Drawing/ShapeProperties.cs:2214-2224 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:903-913 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OpenXmlFormats/Drawing/ShapeProperties.cs:2212` calls `Parse` and `OpenXmlFormats/Drawing/ShapeEffects.cs:1834` 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 (11 lines × 4) OpenXmlFormats/Wordprocessing/CustomXml.cs:1883 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1883-1893 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:256-266 | OpenXmlFormats/Wordprocessing/Sdt.cs:1164-1174 | OpenXmlFormats/Wordprocessing/Table.cs:3575-3585 — 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 (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.
D4 · Code Duplication · Duplicated block (10 lines × 7) · ×4
  • Duplicated block (10 lines × 7) OpenXmlFormats/Wordprocessing/CustomXml.cs:1013 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1013-1022 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1547-1556 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1888-1897 | OpenXmlFormats/Wordprocessing/Sdt.cs:1169-1178 | OpenXmlFormats/Wordprocessing/Sdt.cs:1665-1674 | OpenXmlFormats/Wordprocessing/Sdt.cs:2435-2444 | OpenXmlFormats/Wordprocessing/Table.cs:3580-3589 — there are 7 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 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Wordprocessing/CustomXml.cs:1013` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 7) OpenXmlFormats/Wordprocessing/CustomXml.cs:233 — OpenXmlFormats/Wordprocessing/CustomXml.cs:233-242 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1044-1053 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1512-1521 | OpenXmlFormats/Wordprocessing/Run.cs:2422-2431 | OpenXmlFormats/Wordprocessing/Sdt.cs:1692-1701 | OpenXmlFormats/Wordprocessing/Table.cs:352-361 | OpenXmlFormats/Wordprocessing/Table.cs:5780-5789 — there are 7 copies across 4 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 7 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (10 lines × 7) OpenXmlFormats/Wordprocessing/CustomXml.cs:249 — OpenXmlFormats/Wordprocessing/CustomXml.cs:249-258 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1536-1545 | OpenXmlFormats/Wordprocessing/CustomXml.cs:2348-2357 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:250-259 | OpenXmlFormats/Wordprocessing/Run.cs:2384-2393 | OpenXmlFormats/Wordprocessing/Sdt.cs:1654-1663 | OpenXmlFormats/Wordprocessing/Table.cs:295-304 — there are 7 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (10 lines × 7) OpenXmlFormats/Wordprocessing/CustomXml.cs:2320 — OpenXmlFormats/Wordprocessing/CustomXml.cs:2320-2329 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:214-223 | OpenXmlFormats/Wordprocessing/Run.cs:2410-2419 | OpenXmlFormats/Wordprocessing/Sdt.cs:1184-1193 | OpenXmlFormats/Wordprocessing/Sdt.cs:1680-1689 | OpenXmlFormats/Wordprocessing/Table.cs:340-349 | OpenXmlFormats/Wordprocessing/Table.cs:3595-3604 — there are 7 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×4
  • 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) main/HSSF/UserModel/HSSFCell.cs:895 — main/HSSF/UserModel/HSSFCell.cs:895-903 | ooxml/XSSF/Streaming/SXSSFCell.cs:288-296 | ooxml/XSSF/UserModel/XSSFCell.cs:941-949 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (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.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×4
  • Duplicated block (7 lines × 3) OpenXmlFormats/Drawing/ShapeProperties.cs:2143 — OpenXmlFormats/Drawing/ShapeProperties.cs:2143-2149 | OpenXmlFormats/Drawing/ShapeProperties.cs:2247-2253 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:944-950 — 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 (7 lines × 3) OpenXmlFormats/Drawing/Chart/PieChart.cs:46 — OpenXmlFormats/Drawing/Chart/PieChart.cs:46-52 | OpenXmlFormats/Drawing/Chart/PieChart.cs:176-182 | OpenXmlFormats/Drawing/Chart/PieChart.cs:757-763 — 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 `OpenXmlFormats/Drawing/Chart/PieChart.cs:46` 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 `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 × 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.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×4
  • Duplicated block (6 lines × 4) OpenXmlFormats/Wordprocessing/HdrFtr.cs:245 — OpenXmlFormats/Wordprocessing/HdrFtr.cs:245-250 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1100-1105 | OpenXmlFormats/Wordprocessing/Markup.cs:505-510 | OpenXmlFormats/Wordprocessing/Table.cs:3564-3569 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Wordprocessing/HdrFtr.cs:245` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OpenXmlFormats/Wordprocessing/HdrFtr.cs:1097` calls `Write` and `OpenXmlFormats/Wordprocessing/HdrFtr.cs:243` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 4) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2774 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2774-2779 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3521-3526 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4456-4461 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4826-4831 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (6 lines × 4) OpenXmlFormats/Wordprocessing/HdrFtr.cs:644 — OpenXmlFormats/Wordprocessing/HdrFtr.cs:644-649 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1510-1515 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1631-1636 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1784-1789 — 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 `OpenXmlFormats/Wordprocessing/HdrFtr.cs:644` 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, `OpenXmlFormats/Wordprocessing/HdrFtr.cs:1517` calls `Add`, `Parse` and `OpenXmlFormats/Wordprocessing/HdrFtr.cs:650` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 4) OpenXmlFormats/Drawing/Chart/AreaChart.cs:773 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:773-778 | OpenXmlFormats/Drawing/Chart/BarChart.cs:290-295 | OpenXmlFormats/Drawing/Chart/LineChart.cs:1257-1262 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:473-478 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/BarChart.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 102 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.
D17 · Explicit Debt · BarePragmaDisable · ×3
  • 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.
D4 · Code Duplication · Near-duplicate member family (4 members, 21 shared lines) · ×3
  • Near-duplicate member family (4 members, 21 shared lines) OpenXmlFormats/Wordprocessing/CustomXml.cs:998 — OpenXmlFormats/Wordprocessing/CustomXml.cs:998-1071 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1483-1563 | OpenXmlFormats/Wordprocessing/Sdt.cs:1646-1709 | OpenXmlFormats/Wordprocessing/Table.cs:280-383 — These 4 members are variants of one another: a block of 21 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.
  • Near-duplicate member family (4 members, 21 shared lines) OpenXmlFormats/Wordprocessing/CustomXml.cs:1483 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1483-1563 | OpenXmlFormats/Wordprocessing/CustomXml.cs:2300-2367 | OpenXmlFormats/Wordprocessing/Sdt.cs:199-262 | OpenXmlFormats/Wordprocessing/Sdt.cs:1646-1709 — These 4 members are variants of one another: a block of 21 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.
  • Near-duplicate member family (4 members, 21 shared lines) OpenXmlFormats/Wordprocessing/CustomXml.cs:1869 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1869-1936 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:190-269 | OpenXmlFormats/Wordprocessing/Sdt.cs:1150-1215 | OpenXmlFormats/Wordprocessing/Table.cs:3555-3624 — These 4 members are variants of one another: a block of 21 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 · Duplicated block (32 lines × 2) · ×3
  • 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 (32 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:5572 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5572-5603 | OpenXmlFormats/Wordprocessing/Paragraph.cs:7397-7428 — 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 `OpenXmlFormats/Wordprocessing/Paragraph.cs:5572` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×3
  • 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 (27 lines × 2) main/HSSF/Record/AbstractEscherHolderRecord.cs:260 — main/HSSF/Record/AbstractEscherHolderRecord.cs:260-286 | scratchpad/HWPF/Model/EscherRecordHolder.cs:102-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `records` to `List<EscherRecord>` in one and `IList` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×3
  • 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) scratchpad/HWPF/Model/CHPBinTable.cs:112 — scratchpad/HWPF/Model/CHPBinTable.cs:112-135 | scratchpad/HWPF/Model/PAPBinTable.cs:149-172 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `scratchpad/HWPF/Model/CHPBinTable.cs:112` 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 (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.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×3
  • 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 (23 lines × 2) OpenXmlFormats/Drawing/Chart/BarChart.cs:579 — OpenXmlFormats/Drawing/Chart/BarChart.cs:579-601 | OpenXmlFormats/Drawing/Chart/LineChart.cs:116-138 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/BarChart.cs` and `OpenXmlFormats/Drawing/Chart/LineChart.cs` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 136 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 `OpenXmlFormats/Drawing/Chart/BarChart.cs:579` 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.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×3
  • 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 (20–21 lines × 2) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:3770 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:3770-3789 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:4144-4164 — 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–21 lines × 2) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:3919 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:3919-3938 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:4246-4266 — 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.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×3
  • Duplicated block (14 lines × 3) main/SS/HtmlDocumentFacade.cs:241 — main/SS/HtmlDocumentFacade.cs:241-254 | scratchpad/HWPF/Converter/HtmlDocumentFacade.cs:242-255 | scratchpad/HWPF/Converter/TextDocumentFacade.cs:170-183 — before extracting anything, compare `main/SS/HtmlDocumentFacade.cs` and `scratchpad/HWPF/Converter/HtmlDocumentFacade.cs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 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 (14 lines × 3) OpenXmlFormats/Drawing/Chart/AreaChart.cs:650 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:650-663 | OpenXmlFormats/Drawing/Chart/BarChart.cs:111-124 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:441-454 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/BarChart.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 102 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 `OpenXmlFormats/Drawing/Chart/AreaChart.cs:650` 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.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×3
  • Duplicated block (15 lines × 3) OpenXmlFormats/Wordprocessing/Sdt.cs:573 — OpenXmlFormats/Wordprocessing/Sdt.cs:573-587 | OpenXmlFormats/Wordprocessing/Sdt.cs:672-686 | OpenXmlFormats/Wordprocessing/Sdt.cs:3178-3192 — 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 (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 (15 lines × 3) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4064 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4064-4078 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4438-4452 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4806-4820 — 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 `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4064` 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.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×3
  • 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 (10 lines × 4) OpenXmlFormats/Wordprocessing/HdrFtr.cs:658 — OpenXmlFormats/Wordprocessing/HdrFtr.cs:658-667 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1526-1535 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1645-1654 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1800-1809 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 4) OpenXmlFormats/Wordprocessing/CustomXml.cs:1913 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1913-1922 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:226-235 | OpenXmlFormats/Wordprocessing/Sdt.cs:1196-1205 | OpenXmlFormats/Wordprocessing/Table.cs:3607-3616 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 8) · ×3
  • Duplicated block (10 lines × 8) OpenXmlFormats/Drawing/Chart/AreaChart.cs:294 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:294-303 | OpenXmlFormats/Drawing/Chart/BarChart.cs:555-564 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:208-217 | OpenXmlFormats/Drawing/Chart/LineChart.cs:94-103 | OpenXmlFormats/Drawing/Chart/PieChart.cs:375-384 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:83-92 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:98-107 | OpenXmlFormats/Drawing/Chart/SurfaceChart.cs:345-354 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/BarChart.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 102 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 (10 lines × 8) OpenXmlFormats/Wordprocessing/CustomXml.cs:223 — OpenXmlFormats/Wordprocessing/CustomXml.cs:223-232 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1502-1511 | OpenXmlFormats/Wordprocessing/CustomXml.cs:2322-2331 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:216-225 | OpenXmlFormats/Wordprocessing/Run.cs:2412-2421 | OpenXmlFormats/Wordprocessing/Sdt.cs:1186-1195 | OpenXmlFormats/Wordprocessing/Sdt.cs:1682-1691 | OpenXmlFormats/Wordprocessing/Table.cs:5770-5779 — there are 8 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (10 lines × 8) OpenXmlFormats/Wordprocessing/CustomXml.cs:1020 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1020-1029 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1895-1904 | OpenXmlFormats/Wordprocessing/Run.cs:2402-2411 | OpenXmlFormats/Wordprocessing/Sdt.cs:1176-1185 | OpenXmlFormats/Wordprocessing/Sdt.cs:1672-1681 | OpenXmlFormats/Wordprocessing/Sdt.cs:2442-2451 | OpenXmlFormats/Wordprocessing/Table.cs:332-341 | OpenXmlFormats/Wordprocessing/Table.cs:3587-3596 — there are 8 copies across 4 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 8 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×3
  • Duplicated block (8 lines × 4) OpenXmlFormats/Wordprocessing/CustomXml.cs:1055 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1055-1062 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1523-1530 | OpenXmlFormats/Wordprocessing/Paragraph.cs:362-369 | OpenXmlFormats/Wordprocessing/Sdt.cs:2473-2480 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Wordprocessing/CustomXml.cs:1055` 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 × 4) OpenXmlFormats/Wordprocessing/CustomXml.cs:1521 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1521-1528 | OpenXmlFormats/Wordprocessing/Paragraph.cs:360-367 | OpenXmlFormats/Wordprocessing/Run.cs:2431-2438 | OpenXmlFormats/Wordprocessing/Sdt.cs:2471-2478 — 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 `OpenXmlFormats/Wordprocessing/CustomXml.cs:1521` 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, `OpenXmlFormats/Wordprocessing/Paragraph.cs:369` calls `Write` and `OpenXmlFormats/Wordprocessing/Run.cs:2439` 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 × 4) OpenXmlFormats/Wordprocessing/PageSetup.cs:409 — OpenXmlFormats/Wordprocessing/PageSetup.cs:409-416 | OpenXmlFormats/Wordprocessing/Paragraph.cs:3283-3290 | OpenXmlFormats/Wordprocessing/Table.cs:2375-2382 | OpenXmlFormats/Wordprocessing/Table.cs:4468-4475 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Wordprocessing/PageSetup.cs:409` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×3
  • Duplicated block (5 lines × 6) OpenXmlFormats/Wordprocessing/Paragraph.cs:2144 — OpenXmlFormats/Wordprocessing/Paragraph.cs:2144-2148 | OpenXmlFormats/Wordprocessing/Paragraph.cs:6087-6091 | OpenXmlFormats/Wordprocessing/Paragraph.cs:6979-6983 | OpenXmlFormats/Wordprocessing/Table.cs:1098-1102 | OpenXmlFormats/Wordprocessing/Table.cs:2940-2944 | OpenXmlFormats/Wordprocessing/Table.cs:4140-4144 — there are 6 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Wordprocessing/Paragraph.cs:2144` 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 × 6) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2775 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2775-2779 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3024-3028 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3522-3526 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4084-4088 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4457-4461 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4827-4831 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2775` calls `WriteAttribute` and `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4084` does not — after which the two agree again for 5 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 × 6) OpenXmlFormats/Drawing/Chart/BarChart.cs:366 — OpenXmlFormats/Drawing/Chart/BarChart.cs:366-370 | OpenXmlFormats/Drawing/Chart/BarChart.cs:429-433 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:41-45 | OpenXmlFormats/Drawing/Chart/PieChart.cs:909-913 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:337-341 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:427-431 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/BarChart.cs` and `OpenXmlFormats/Drawing/Chart/BubbleChart.cs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 81 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×3
  • Duplicated block (5 lines × 3) OpenXmlFormats/Drawing/ShapeProperties.cs:2091 — OpenXmlFormats/Drawing/ShapeProperties.cs:2091-2095 | OpenXmlFormats/Drawing/ShapeProperties.cs:2207-2211 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:892-896 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Drawing/ShapeProperties.cs:2091` 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 × 3) OpenXmlFormats/Wordprocessing/Styles.cs:1392 — OpenXmlFormats/Wordprocessing/Styles.cs:1392-1396 | OpenXmlFormats/Wordprocessing/Styles.cs:1949-1953 | OpenXmlFormats/Wordprocessing/Styles.cs:2318-2322 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `OpenXmlFormats/Wordprocessing/Styles.cs:1397` calls `WriteAttribute` and `OpenXmlFormats/Wordprocessing/Styles.cs:2323` 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 × 3) OpenXmlFormats/Drawing/Chart/BubbleChart.cs:101 — OpenXmlFormats/Drawing/Chart/BubbleChart.cs:101-105 | OpenXmlFormats/Drawing/Chart/PieChart.cs:645-649 | OpenXmlFormats/Drawing/Chart/PieChart.cs:695-699 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/BubbleChart.cs` and `OpenXmlFormats/Drawing/Chart/PieChart.cs` as WHOLE FILES: this scan already matched 5 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. 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.
S1 · Cryptographic Hygiene · Weak hash algorithm · ×3
  • 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.
X12 · Unreachable branch · Branch is unreachable · ×3
  • Branch is unreachable — its condition cannot hold here main/SS/Formula/Functions/Index.cs:248 — `colArgWasEmpty` can never be true where it stands: the arm on line 242 (`colArgWasEmpty`) was false. No value of `colArgWasEmpty` satisfies all of that, so the true arm of this conditional expression never runs. Reorder the tests, drop the dead branch, or fix the bound that was meant.
  • Branch is unreachable — its condition cannot hold here REDACTED:747 — `anchor.sp != null` can never be true where it stands: the arm on line 700 (`anchor.sp != null`) was false. No value of `anchor.sp` satisfies all of that, so this arm never runs. Reorder the tests, drop the dead branch, or fix the bound that was meant.
  • Branch is unreachable — its condition cannot hold here ooxml/XSSF/UserModel/XSSFFont.cs:394 — `case FontSuperScript.None:` can never be true where it stands: the arm on line 385 (`value == (short)FontSuperScript.None`) was false. No value of `value` satisfies all of that, so this case label never runs. Reorder the tests, drop the dead branch, or fix the bound that was meant.
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.
D1 · Cyclomatic Complexity · CT_ShapeProperties.Parse (cyclomatic 19) · ×2
  • 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.
D1 · Cyclomatic Complexity · CT_ShapeProperties.Write (cyclomatic 17) · ×2
  • 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.
D2 · Cognitive Complexity · CT_ShapeProperties.Parse (cognitive 19) · ×2
  • 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.
D2 · Cognitive Complexity · CT_ShapeProperties.Write (cognitive 16) · ×2
  • 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 · Edited copy of a member (20 corresponding lines) · ×2
  • 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.
  • Edited copy of a member (20 corresponding lines) scratchpad/HWPF/UserModel/Range.cs:580 — scratchpad/HWPF/UserModel/Range.cs:580-599 | scratchpad/HWPF/UserModel/Range.cs:611-636 — 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) · ×2
  • 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.
  • Edited copy of a member (21 corresponding lines) scratchpad/HWPF/Converter/WordToFoConverter.cs:317 — scratchpad/HWPF/Converter/WordToFoConverter.cs:317-337 | scratchpad/HWPF/Converter/WordToHtmlConverter.cs:283-303 — 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 (11 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (11 members, 50+ identical tokens) OpenXmlFormats/Drawing/Chart/AreaChart.cs:40 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:40-67 | OpenXmlFormats/Drawing/Chart/AreaChart.cs:604-629 | OpenXmlFormats/Drawing/Chart/BarChart.cs:47-79 | OpenXmlFormats/Drawing/Chart/BarChart.cs:1027-1058 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:474-503 | OpenXmlFormats/Drawing/Chart/LineChart.cs:544-571 | OpenXmlFormats/Drawing/Chart/LineChart.cs:808-833 | OpenXmlFormats/Drawing/Chart/LineChart.cs:1004-1037 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:399-422 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:508-531 | OpenXmlFormats/Drawing/Chart/SurfaceChart.cs:153-175 — These 11 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 11 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 11 times.
  • Members sharing a duplicated core (11 members, 50+ identical tokens) OpenXmlFormats/Drawing/Chart/AreaChart.cs:72 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:72-107 | OpenXmlFormats/Drawing/Chart/AreaChart.cs:634-667 | OpenXmlFormats/Drawing/Chart/BarChart.cs:84-128 | OpenXmlFormats/Drawing/Chart/BarChart.cs:1063-1102 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:508-545 | OpenXmlFormats/Drawing/Chart/LineChart.cs:576-611 | OpenXmlFormats/Drawing/Chart/LineChart.cs:838-871 | OpenXmlFormats/Drawing/Chart/LineChart.cs:1042-1084 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:427-458 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:536-567 | OpenXmlFormats/Drawing/Chart/SurfaceChart.cs:180-214 — These 11 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 11 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 11 times.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×2
  • Edited copy of a member (29 corresponding lines) scratchpad/HWPF/Converter/WordToFoConverter.cs:215 — scratchpad/HWPF/Converter/WordToFoConverter.cs:215-243 | scratchpad/HWPF/Converter/WordToFoConverter.cs:247-282 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (29 corresponding lines) main/SS/UserModel/DateUtil.cs:217 — main/SS/UserModel/DateUtil.cs:217-245 | main/SS/UserModel/DateUtil.cs:256-284 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) scratchpad/HWPF/UserModel/Range.cs:455 — scratchpad/HWPF/UserModel/Range.cs:455-470 | scratchpad/HWPF/UserModel/Range.cs:506-522 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) scratchpad/HWPF/Model/CHPFormattedDiskPage.cs:110 — scratchpad/HWPF/Model/CHPFormattedDiskPage.cs:110-125 | scratchpad/HWPF/Model/PAPFormattedDiskPage.cs:133-148 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×2
  • Edited copy of a member (17 corresponding lines) main/SS/HtmlDocumentFacade.cs:294 — main/SS/HtmlDocumentFacade.cs:294-310 | scratchpad/HWPF/Converter/HtmlDocumentFacade.cs:295-311 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) main/SS/HtmlDocumentFacade.cs:213 — main/SS/HtmlDocumentFacade.cs:213-229 | scratchpad/HWPF/Converter/HtmlDocumentFacade.cs:214-230 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×2
  • Edited copy of a member (13 corresponding lines) scratchpad/HWPF/UserModel/Range.cs:379 — scratchpad/HWPF/UserModel/Range.cs:379-391 | scratchpad/HWPF/UserModel/Range.cs:407-419 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) ooxml/SS/Converter/ExcelToHtmlUtils.cs:250 — ooxml/SS/Converter/ExcelToHtmlUtils.cs:250-264 | scratchpad/HWPF/Converter/AbstractWordUtils.cs:425-437 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×2
  • Edited copy of a member (14 corresponding lines) scratchpad/HWPF/Model/CHPFormattedDiskPage.cs:70 — scratchpad/HWPF/Model/CHPFormattedDiskPage.cs:70-83 | scratchpad/HWPF/Model/PAPFormattedDiskPage.cs:74-87 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) scratchpad/HWPF/Model/ListData.cs:140 — scratchpad/HWPF/Model/ListData.cs:140-155 | scratchpad/HWPF/Model/ListFormatOverride.cs:106-119 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) scratchpad/HWPF/Extractor/WordExtractor.cs:193 — scratchpad/HWPF/Extractor/WordExtractor.cs:193-211 | scratchpad/HWPF/Extractor/WordExtractor.cs:219-237 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) scratchpad/HWPF/SPRM/ParagraphSprmUncompressor.cs:37 — scratchpad/HWPF/SPRM/ParagraphSprmUncompressor.cs:37-56 | scratchpad/HWPF/SPRM/TableSprmUncompressor.cs:34-52 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 12+ corresponding lines) scratchpad/HWPF/Model/CHPBinTable.cs:412 — scratchpad/HWPF/Model/CHPBinTable.cs:412-423 | scratchpad/HWPF/Model/PAPBinTable.cs:354-365 | scratchpad/HWPF/Model/SectionTable.cs:117-128 | scratchpad/HWPF/Model/TextPieceTable.cs:185-203 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 12+ corresponding lines) scratchpad/HWPF/Model/BookmarkFirstDescriptor.cs:37 — scratchpad/HWPF/Model/BookmarkFirstDescriptor.cs:37-50 | scratchpad/HWPF/Model/FootnoteReferenceDescriptor.cs:36-47 | scratchpad/HWPF/Model/PropertyModifier.cs:61-72 | scratchpad/HWPF/UserModel/TableAutoformatLookSpecifier.cs:39-52 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×2
  • Edited copy of a member (12 corresponding lines) scratchpad/HWPF/Model/FSPATable.cs:37 — scratchpad/HWPF/Model/FSPATable.cs:37-48 | scratchpad/HWPF/Model/FSPATable.cs:53-64 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) scratchpad/HWPF/UserModel/BookmarksImpl.cs:57 — scratchpad/HWPF/UserModel/BookmarksImpl.cs:57-70 | scratchpad/HWPF/UserModel/FieldsImpl.cs:105-116 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×2
  • Edited copy of a member (8 corresponding lines) scratchpad/HSLF/Record/TextBytesAtom.cs:81 — scratchpad/HSLF/Record/TextBytesAtom.cs:81-88 | scratchpad/HSLF/Record/TextHeaderAtom.cs:91-98 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) scratchpad/HSLF/Record/CString.cs:47 — scratchpad/HSLF/Record/CString.cs:47-54 | scratchpad/HSLF/Record/TextCharsAtom.cs:48-55 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×2
  • Duplicated block (40 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:2249 — OpenXmlFormats/Wordprocessing/Paragraph.cs:2249-2288 | OpenXmlFormats/Wordprocessing/Paragraph.cs:3136-3175 — 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 `OpenXmlFormats/Wordprocessing/Paragraph.cs:2249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (40 lines × 2) OpenXmlFormats/Drawing/ShapeProperties.cs:2088 — OpenXmlFormats/Drawing/ShapeProperties.cs:2088-2127 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:889-928 — 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.
D4 · Code Duplication · Duplicated block (38 lines × 2) · ×2
  • 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 (38 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:2303 — OpenXmlFormats/Wordprocessing/Paragraph.cs:2303-2340 | OpenXmlFormats/Wordprocessing/Paragraph.cs:3210-3247 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `OpenXmlFormats/Wordprocessing/Paragraph.cs:3249` calls `Write` and `OpenXmlFormats/Wordprocessing/Paragraph.cs:2341` 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.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×2
  • Duplicated block (16 lines × 3) OpenXmlFormats/Drawing/Chart/PieChart.cs:64 — OpenXmlFormats/Drawing/Chart/PieChart.cs:64-79 | OpenXmlFormats/Drawing/Chart/PieChart.cs:196-211 | OpenXmlFormats/Drawing/Chart/PieChart.cs:779-794 — 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 `OpenXmlFormats/Drawing/Chart/PieChart.cs:64` 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 (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.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×2
  • 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–17 lines × 2) scratchpad/HWPF/Converter/WordToFoConverter.cs:470 — scratchpad/HWPF/Converter/WordToFoConverter.cs:470-486 | scratchpad/HWPF/Converter/WordToHtmlConverter.cs:491-506 — 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 `scratchpad/HWPF/Converter/WordToFoConverter.cs:470` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×2
  • Duplicated block (12 lines × 4) OpenXmlFormats/Drawing/Chart/AreaChart.cs:45 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:45-56 | OpenXmlFormats/Drawing/Chart/AreaChart.cs:609-620 | OpenXmlFormats/Drawing/Chart/LineChart.cs:549-560 | OpenXmlFormats/Drawing/Chart/LineChart.cs:1009-1020 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/LineChart.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 100 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 `OpenXmlFormats/Drawing/Chart/AreaChart.cs:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `OpenXmlFormats/Drawing/Chart/AreaChart.cs:58` calls `Parse` and `OpenXmlFormats/Drawing/Chart/AreaChart.cs:622` 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 (12 lines × 4) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3490 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3490-3501 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4052-4063 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4426-4437 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4794-4805 — 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.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×2
  • 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.
D4 · Code Duplication · Duplicated block (11 lines × 8) · ×2
  • Duplicated block (11 lines × 8) OpenXmlFormats/Drawing/Chart/AreaChart.cs:259 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:259-269 | OpenXmlFormats/Drawing/Chart/BarChart.cs:516-526 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:169-179 | OpenXmlFormats/Drawing/Chart/LineChart.cs:57-67 | OpenXmlFormats/Drawing/Chart/PieChart.cs:344-354 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:52-62 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:61-71 | OpenXmlFormats/Drawing/Chart/SurfaceChart.cs:320-330 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/BarChart.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 102 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 `OpenXmlFormats/Drawing/Chart/AreaChart.cs:259` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 8) OpenXmlFormats/Wordprocessing/CustomXml.cs:1016 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1016-1026 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1550-1560 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1891-1901 | OpenXmlFormats/Wordprocessing/Sdt.cs:1172-1182 | OpenXmlFormats/Wordprocessing/Sdt.cs:1668-1678 | OpenXmlFormats/Wordprocessing/Sdt.cs:2438-2448 | OpenXmlFormats/Wordprocessing/Table.cs:328-338 | OpenXmlFormats/Wordprocessing/Table.cs:3583-3593 — there are 8 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 8 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×2
  • Duplicated block (7 lines × 4) OpenXmlFormats/Wordprocessing/Document.cs:421 — OpenXmlFormats/Wordprocessing/Document.cs:421-427 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:232-238 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1083-1089 | OpenXmlFormats/Wordprocessing/Sdt.cs:1202-1208 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (7 lines × 4) OpenXmlFormats/Drawing/Chart/BubbleChart.cs:480 — OpenXmlFormats/Drawing/Chart/BubbleChart.cs:480-486 | OpenXmlFormats/Drawing/Chart/PieChart.cs:39-45 | OpenXmlFormats/Drawing/Chart/PieChart.cs:167-173 | OpenXmlFormats/Drawing/Chart/PieChart.cs:746-752 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/BubbleChart.cs` and `OpenXmlFormats/Drawing/Chart/PieChart.cs` as WHOLE FILES: this scan already matched 5 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 `OpenXmlFormats/Drawing/Chart/BubbleChart.cs:480` 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, `OpenXmlFormats/Drawing/Chart/PieChart.cs:175` calls `Parse` and `OpenXmlFormats/Drawing/Chart/PieChart.cs:47` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) OpenXmlFormats/Drawing/ShapeProperties.cs:44 — OpenXmlFormats/Drawing/ShapeProperties.cs:44-53 | OpenXmlFormats/Drawing/ShapeProperties.cs:306-315 | OpenXmlFormats/Drawing/ShapeProperties.cs:1344-1353 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `OpenXmlFormats/Drawing/ShapeProperties.cs:316` calls `ReadBool` and `OpenXmlFormats/Drawing/ShapeProperties.cs:54` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) OpenXmlFormats/Wordprocessing/CustomXml.cs:1032 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1032-1041 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1498-1507 | OpenXmlFormats/Wordprocessing/Sdt.cs:2452-2461 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×2
  • 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 (9 lines × 6) OpenXmlFormats/Wordprocessing/PageSetup.cs:431 — OpenXmlFormats/Wordprocessing/PageSetup.cs:431-439 | OpenXmlFormats/Wordprocessing/Paragraph.cs:3306-3314 | OpenXmlFormats/Wordprocessing/Table.cs:2398-2406 | OpenXmlFormats/Wordprocessing/Table.cs:2654-2662 | OpenXmlFormats/Wordprocessing/Table.cs:4495-4503 | OpenXmlFormats/Wordprocessing/Table.cs:4672-4680 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OpenXmlFormats/Wordprocessing/PageSetup.cs:428` calls `WriteAttribute`, `ToString` and `OpenXmlFormats/Wordprocessing/Paragraph.cs:3305` 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.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) OpenXmlFormats/Drawing/Chart/AreaChart.cs:272 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:272-279 | OpenXmlFormats/Drawing/Chart/PieChart.cs:357-364 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:65-72 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/PieChart.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 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 `OpenXmlFormats/Drawing/Chart/AreaChart.cs:272` 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 × 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.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×2
  • Duplicated block (7 lines × 6) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2754 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2754-2760 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3003-3009 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3487-3493 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4049-4055 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4423-4429 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4791-4797 — 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.
  • 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.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×2
  • 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 (9 lines × 4) scratchpad/HSLF/Record/Comment2000Atom.cs:65 — scratchpad/HSLF/Record/Comment2000Atom.cs:65-73 | scratchpad/HSLF/Record/SoundData.cs:64-72 | scratchpad/HSLF/Record/TextSpecInfoAtom.cs:53-62 | scratchpad/HSLF/Record/TxInteractiveInfoAtom.cs:63-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 all 4 call sites, so a change lands once.
X18 · Disposal-pattern correctness · Owned disposable field is never released · ×2
  • 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 1831), `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.
  • Owned disposable field is never released tools/DocPartViewer/DocPartViewer/MainForm.Designer.cs:290 — `openFileDialog` (line 290) is a component the designer creates for `MainForm` with no container: it is not built with `new T(components)`, not added to `components`, and not added to a parent control's `Controls` or to a component's own child collection — the only routes by which the framework would release it for you. And the type's disposal never names it: searched `Dispose` (MainForm.Designer.cs line 14), plus every method those call by name. So `MainForm` owns it and never releases it; whatever it holds (a dialog's window handle, a file-system watch, a process handle) stays until finalization, once per instance. Release it in `Dispose(bool)` (`openFileDialog?.Dispose();` under `disposing`) — that method may be edited, or moved to the hand-written partial; only `InitializeComponent` belongs to the designer — or register it with the container so `components.Dispose()` releases 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.
D1 · Cyclomatic Complexity · CharacterSprmUncompressor.UncompressCHPOperation (cyclomatic 131) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Settings.Write (cyclomatic 102) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Settings.Parse (cyclomatic 100) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_ParaRPrOriginal.Write (cyclomatic 83) · ×1
  • 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.
D1 · Cyclomatic Complexity · ParagraphSprmUncompressor.UncompressPAPOperation (cyclomatic 81) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_RPrOriginal.Write (cyclomatic 79) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_PivotTableDefinition.Parse (cyclomatic 77) · ×1
  • 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.
D1 · Cyclomatic Complexity · ParagraphSprmCompressor.CompressParagraphProperty (cyclomatic 74) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Compat.Parse (cyclomatic 68) · ×1
  • 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.
D1 · Cyclomatic Complexity · Form1.button2_Click (cyclomatic 68) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Compat.Write (cyclomatic 66) · ×1
  • 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.
D1 · Cyclomatic Complexity · EscherDump.DumpOld (cyclomatic 65) · ×1
  • 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.
D1 · Cyclomatic Complexity · FormulaParser.ParseStructuredReference (cyclomatic 61) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_R.Write (cyclomatic 61) · ×1
  • 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.
D1 · Cyclomatic Complexity · CharacterSprmCompressor.CompressCharacterProperty (cyclomatic 59) · ×1
  • 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.
D1 · Cyclomatic Complexity · SharedStringsTable.ReadFromStreamViaXmlReader (cyclomatic 58) · ×1
  • 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.
D1 · Cyclomatic Complexity · AbstractWordConverter.ProcessCharacters (cyclomatic 58) · ×1
  • 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.
D1 · Cyclomatic Complexity · SectionSprmCompressor.CompressSectionProperty (cyclomatic 58) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_P.Write (cyclomatic 56) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Body.Write (cyclomatic 53) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_FtnEdn.Write (cyclomatic 52) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_RunTrackChange.Parse (cyclomatic 52) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_PivotField.Parse (cyclomatic 51) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_RunTrackChange.Write (cyclomatic 51) · ×1
  • 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.
D1 · Cyclomatic Complexity · OperatorEnumHelper.IsValid (cyclomatic 50) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Tbl.Parse (cyclomatic 49) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Tbl.Write (cyclomatic 49) · ×1
  • 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.
D1 · Cyclomatic Complexity · EvaluationConditionalFormatRule.CheckFilter (cyclomatic 48) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_ParaRPr.Parse (cyclomatic 47) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_RubyContent.Write (cyclomatic 47) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_ParaRPrOriginal.Parse (cyclomatic 46) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_ParaRPr.Write (cyclomatic 45) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_RPr.Parse (cyclomatic 43) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Worksheet.Parse (cyclomatic 42) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Worksheet.Write (cyclomatic 42) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_RPrOriginal.Parse (cyclomatic 42) · ×1
  • 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.
D1 · Cyclomatic Complexity · ChartRecordAggregate.WriteStartBlock (cyclomatic 41) · ×1
  • 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.
D1 · Cyclomatic Complexity · WorkbookEvaluator.EvaluateFormula (cyclomatic 41) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_RPr.Write (cyclomatic 41) · ×1
  • 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.
D1 · Cyclomatic Complexity · InternalSheet.InternalSheet.ctor (cyclomatic 40) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_PPr.Parse (cyclomatic 40) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_PPr.Write (cyclomatic 39) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_R.Parse (cyclomatic 39) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_P.Parse (cyclomatic 38) · ×1
  • 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.
D1 · Cyclomatic Complexity · HSSFOptimiser.OptimiseCellStyles (cyclomatic 37) · ×1
  • 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.
D1 · Cyclomatic Complexity · Value.ConvertTextToNumber (cyclomatic 37) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_PPrBase.Parse (cyclomatic 37) · ×1
  • 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.
D1 · Cyclomatic Complexity · VariantSupport.Write (cyclomatic 36) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SmartTagRun.Parse (cyclomatic 36) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SmartTagRun.Write (cyclomatic 36) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_PPrBase.Write (cyclomatic 36) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SdtPr.Write (cyclomatic 36) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Row.Parse (cyclomatic 36) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_CustomXmlRun.Parse (cyclomatic 35) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SdtContentRun.Parse (cyclomatic 35) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Tc.Parse (cyclomatic 35) · ×1
  • 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.
D1 · Cyclomatic Complexity · DataFormatter.CreateDateFormat (cyclomatic 34) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Shapetype.Write (cyclomatic 34) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_CustomXmlRun.Write (cyclomatic 34) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Body.Parse (cyclomatic 34) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_FtnEdn.Parse (cyclomatic 34) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SdtContentRun.Write (cyclomatic 34) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_HdrFtr.Parse (cyclomatic 33) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Comment.Parse (cyclomatic 33) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Tc.Write (cyclomatic 33) · ×1
  • 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.
D1 · Cyclomatic Complexity · TableSprmUncompressor.UncompressTAPOperation (cyclomatic 33) · ×1
  • 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.
D1 · Cyclomatic Complexity · PackagePartName.CheckPCharCompliance (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_CustomXmlRow.Parse (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_CustomXmlBlock.Parse (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_CustomXmlCell.Parse (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_HdrFtr.Write (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Comment.Write (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SdtContentBlock.Parse (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Row.Write (cyclomatic 32) · ×1
  • 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.
D1 · Cyclomatic Complexity · MissingRecordAwareHSSFListener.ProcessRecord (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · ExcelExtractor.Text.get (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · FormulaParser.ParseRangeable (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · FormulaShifter.RowMoveAreaPtg (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · FormulaShifter.ColumnMoveAreaPtg (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · Properties.LoadConvert (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_PivotCacheDefinition.Parse (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_CustomXmlRow.Write (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_CustomXmlBlock.Write (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_CustomXmlCell.Write (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SdtContentCell.Parse (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SdtContentBlock.Write (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SdtContentRow.Parse (cyclomatic 31) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFSheetXMLHandler.StartElement (cyclomatic 30) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SdtContentCell.Write (cyclomatic 30) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SdtContentRow.Write (cyclomatic 30) · ×1
  • 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.
D1 · Cyclomatic Complexity · EvaluationConditionalFormatRule.CheckValue (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · PackagingUriHelper.RelativizeUri (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_RubyContent.Parse (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TrPr.Write (cyclomatic 29) · ×1
  • 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.
D1 · Cyclomatic Complexity · ChartRecordAggregate.WriteEndBlock (cyclomatic 28) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFSheetXMLHandler.EndElement (cyclomatic 28) · ×1
  • 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.
D1 · Cyclomatic Complexity · SharedStringsTable.ParseRPrChild (cyclomatic 28) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Style.Parse (cyclomatic 28) · ×1
  • 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.
D1 · Cyclomatic Complexity · HSSFChart.CreateSeries (cyclomatic 27) · ×1
  • 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.
D1 · Cyclomatic Complexity · CellFormatPart.formatType (cyclomatic 27) · ×1
  • 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.
D1 · Cyclomatic Complexity · CellNumberFormatter.FormatValue (cyclomatic 27) · ×1
  • 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.
D1 · Cyclomatic Complexity · DStarRunner.Evaluate (cyclomatic 27) · ×1
  • 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.
D1 · Cyclomatic Complexity · DateUtil.GetExcelDate (cyclomatic 27) · ×1
  • 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.
D1 · Cyclomatic Complexity · ExcelToHtmlConverter.ProcessCell (cyclomatic 27) · ×1
  • 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.
D1 · Cyclomatic Complexity · CHPBinTable.Rebuild (cyclomatic 27) · ×1
  • 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.
D1 · Cyclomatic Complexity · HSSFSheet.SetRepeatingRowsAndColumns (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · CellNumberFormatter.CellNumberFormatter.ctor (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · SheetUtil.ToDataTable (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Rst.XmlText.get (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Font.Write (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Font.Clone (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Style.Write (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TrPrBase.Write (cyclomatic 26) · ×1
  • 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.
D1 · Cyclomatic Complexity · InternalWorkbook.CreateWorkbook (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Shapetype.Parse (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SectPr.Parse (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SectPr.Write (cyclomatic 25) · ×1
  • 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.
D1 · Cyclomatic Complexity · CellNumberFormatter.Writeint (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · ZipPackage.GetPartsImpl (cyclomatic 24) · ×1
  • ZipPackage.GetPartsImpl (cyclomatic 24) openxml4Net/OPC/ZipPackage.cs:178 — 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.
D1 · Cyclomatic Complexity · CT_Shape.Parse (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SdtPr.Parse (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · TableRow.initCells (cyclomatic 24) · ×1
  • 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.
D1 · Cyclomatic Complexity · HSSFOptimiser.OptimiseFonts (cyclomatic 23) · ×1
  • 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.
D1 · Cyclomatic Complexity · DatePartHandler.HandlePart (cyclomatic 23) · ×1
  • 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.
D1 · Cyclomatic Complexity · Index.GetValueFromArea (cyclomatic 23) · ×1
  • 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.
D1 · Cyclomatic Complexity · WorkbookEvaluator.GetEvalForPtg (cyclomatic 23) · ×1
  • 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.
D1 · Cyclomatic Complexity · DataFormatter.cleanFormatForNumber (cyclomatic 23) · ×1
  • 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.
D1 · Cyclomatic Complexity · Properties.Load (cyclomatic 23) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SharedItems.Parse (cyclomatic 23) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Table.Parse (cyclomatic 23) · ×1
  • 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.
D1 · Cyclomatic Complexity · PAPBinTable.Rebuild (cyclomatic 23) · ×1
  • 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.
D1 · Cyclomatic Complexity · HSSFCell.SetCellType (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · CellFormat.GetApplicableFormatPart (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · WorkbookEvaluator.EvaluateAny (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · TableStyleTypeExtension.GetRange (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · ExcelToHtmlConverter.ProcessRow (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFExcelExtractor.Text.get (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFRichTextString.ToCTFont (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFSimpleShape.GetBulletPrefix (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · XWPFDocument.OnDocumentRead (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Workbook.Parse (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SectPrBase.Parse (cyclomatic 22) · ×1
  • 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.
D1 · Cyclomatic Complexity · InternalChart.InternalChart.ctor (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · DateUtil.IsADateFormat (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFRichTextString.SetRunAttributes (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Workbook.Write (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Shape.Write (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TblPr.Parse (cyclomatic 21) · ×1
  • 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.
D1 · Cyclomatic Complexity · TextListener.ProcessRecord (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · InternalWorkbook.FindDrawingGroup (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · CellUtil.CopyCell (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFSheet.SetRepeatingRowsAndColumns (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_CacheHierarchy.Parse (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SectPrBase.Write (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TblPrBase.Parse (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TcPr.Parse (cyclomatic 20) · ×1
  • 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.
D1 · Cyclomatic Complexity · RecordFactoryInputStream.ReadNextRecord (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · HSSFShapeFactory.CreateShapeTree (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · HSSFSheet.ShiftRows (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · CellNumberFormatter.WriteFraction (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · FormulaRenderer.ToFormulaString (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · LinearRegressionFunction.EvaluateInternal (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · DataFormatter.GetFormat (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · Arrays.DeepEquals0 (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · XDDFTextBody.RetrieveProperties (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFSheetXMLHandler.CheckForEmptyCellComments (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · StylesTable.WriteTo (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFWorkbook.OnDocumentRead (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_BubbleSer.Write (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TextBodyProperties.Write (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_MailMerge.Parse (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TblPr.Write (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TcPrInner.Parse (cyclomatic 19) · ×1
  • 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.
D1 · Cyclomatic Complexity · HSSFCellUtil.CopyCell (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · ArrayFunction._evaluateTwoArrayArgs (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · Complex.Evaluate (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · DStarRunner.testNormalCondition (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · OperationEvaluationContext.GetDynamicReference (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · SheetUtil.CopyRow (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · EmbeddedExtractor.ExtractAll (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFSimpleShape.ProcessAutoNumGroup (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_BarSer.Write (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_ScatterSer.Write (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_PivotTableDefinition.Write (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_RPrElt.Parse (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Font.Parse (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TblPrBase.Write (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TrPr.Parse (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TcPr.Write (cyclomatic 18) · ×1
  • 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.
D1 · Cyclomatic Complexity · Section.Section.ctor (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · OldExcelExtractor.Text.get (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · ChartFormatsAggregate.ChartFormatsAggregate.ctor (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · HSSFChart.GetSheetCharts (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · CellNumberPartHandler.HandlePart (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · FormulaParser.ParseSimpleRangePart (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · PercentRank.calculateRank (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · OperandClassTransformer.TransformNode (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · DataFormatter.CreateFormat (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · CellReferenceParser.TryParse (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · SheetUtil.CopyRow (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFExportToXml.ExportToXML (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · StylesTable.ReadFrom (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFSheet.CopyColumn (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFSimpleShape.ApplyAttributes (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFTextParagraph.IsBullet.set (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFTextParagraph.SetBullet (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · XWPFRun._getText (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_AreaSer.Write (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_BarSer.Parse (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_BubbleSer.Parse (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_LineSer.Write (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Stroke.Parse (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_MailMerge.Write (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TcPrInner.Write (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · TextRulerAtom.Read (cyclomatic 17) · ×1
  • 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.
D1 · Cyclomatic Complexity · Property.ToString (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · HSSFChart.RemoveSeries (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · DocumentFactoryHelper.ScanForPassword (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · CellGeneralFormatter.FormatValue (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · RelationalOperationEval.DoCompare (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · StringMatcher.GetWildCardPattern (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · Indirect.ParseWorkbookAndSheetName (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · LookupUtils.BinarySearchIndexOfValue (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · WorkbookUtil.CreateSafeSheetName (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · Arrays.DeepToString (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · BigInteger.BigInteger.ctor (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · BigInteger.ShiftRight (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · IdentifierManager.Reserve (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · IdentifierManager.Release (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · XMLSlideShow.CreateSlide (cyclomatic 16) · ×1
  • XMLSlideShow.CreateSlide (cyclomatic 16) ooxml/XSLF/UserModel/XMLSlideShow.cs:88 — XMLSlideShow.CreateSlide 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.
D1 · Cyclomatic Complexity · SheetDataWriter.OutputQuotedString (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFCellBorder.GetBorder (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFCell.SetCellType (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFDataValidationHelper.CreateValidation (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFSheet.Write (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · XSSFSheet.CopyCell (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · XWPFParagraph.NumLevelText.get (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · XWPFPictureData.Equals (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · XWPFSettings.SetEnforcementEditValue (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_LineSer.Parse (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_OfPieChart.Write (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_ScatterSer.Parse (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_TextBodyProperties.Parse (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_SharedItems.Write (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_CacheField.Parse (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_PivotHierarchy.Parse (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_RPrElt.Write (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Lvl.Parse (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · CT_Lvl.Write (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · WordToFoUtils.SetCharactersProperties (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · WordToHtmlConverter.ProcessTable (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · HWPFDocument.HWPFDocument.ctor (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · Form1.RecursiveRun (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · Form1.GetXmlAttributePrefix (cyclomatic 16) · ×1
  • 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.
D1 · Cyclomatic Complexity · Form1.GetXmlPrefix (cyclomatic 16) · ×1
  • 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×1
  • Hotspot: ooxml/XSLF/UserModel/XMLSlideShow.cs ooxml/XSLF/UserModel/XMLSlideShow.cs:88 — ooxml/XSLF/UserModel/XMLSlideShow.cs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in XMLSlideShow.CreateSlide at line 88. 1 of those changes was a fix/bug commit, and the other 3 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-08-12..2026-11-10, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-12 16:15:52 +08:00' --until='2026-11-10 16:15:52 +08:00' --full-history --no-merges -- ooxml/XSLF/UserModel/XMLSlideShow.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.)
D18 · Solution Shape · Build failed · ×1
  • 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.
D2 · Cognitive Complexity · Form1.button2_Click (cognitive 134) · ×1
  • 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.
D2 · Cognitive Complexity · CT_ParaRPrOriginal.Write (cognitive 121) · ×1
  • 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.
D2 · Cognitive Complexity · SharedStringsTable.ReadFromStreamViaXmlReader (cognitive 117) · ×1
  • 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.
D2 · Cognitive Complexity · CT_RPrOriginal.Write (cognitive 117) · ×1
  • 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.
D2 · Cognitive Complexity · AbstractWordConverter.ProcessCharacters (cognitive 116) · ×1
  • 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.
D2 · Cognitive Complexity · WorkbookEvaluator.EvaluateFormula (cognitive 110) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Settings.Write (cognitive 105) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Settings.Parse (cognitive 100) · ×1
  • 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.
D2 · Cognitive Complexity · FormulaParser.ParseStructuredReference (cognitive 96) · ×1
  • 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.
D2 · Cognitive Complexity · OperatorEnumHelper.IsValid (cognitive 83) · ×1
  • 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.
D2 · Cognitive Complexity · Properties.Load (cognitive 80) · ×1
  • 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.
D2 · Cognitive Complexity · ExcelExtractor.Text.get (cognitive 78) · ×1
  • 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.
D2 · Cognitive Complexity · CT_PivotTableDefinition.Parse (cognitive 77) · ×1
  • 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.
D2 · Cognitive Complexity · CharacterSprmCompressor.CompressCharacterProperty (cognitive 77) · ×1
  • 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.
D2 · Cognitive Complexity · ParagraphSprmCompressor.CompressParagraphProperty (cognitive 75) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFOptimiser.OptimiseCellStyles (cognitive 72) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFExcelExtractor.Text.get (cognitive 72) · ×1
  • 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.
D2 · Cognitive Complexity · EscherDump.DumpOld (cognitive 68) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Compat.Parse (cognitive 68) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Rst.XmlText.get (cognitive 67) · ×1
  • 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.
D2 · Cognitive Complexity · InternalSheet.InternalSheet.ctor (cognitive 66) · ×1
  • 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.
D2 · Cognitive Complexity · CellNumberFormatter.FormatValue (cognitive 65) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Compat.Write (cognitive 65) · ×1
  • 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.
D2 · Cognitive Complexity · SectionSprmCompressor.CompressSectionProperty (cognitive 65) · ×1
  • 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.
D2 · Cognitive Complexity · CT_R.Write (cognitive 62) · ×1
  • 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.
D2 · Cognitive Complexity · PackagePartName.CheckPCharCompliance (cognitive 61) · ×1
  • 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.
D2 · Cognitive Complexity · FormulaParser.ParseRangeable (cognitive 59) · ×1
  • 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.
D2 · Cognitive Complexity · DataFormatter.CreateDateFormat (cognitive 59) · ×1
  • 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.
D2 · Cognitive Complexity · CellNumberFormatter.CellNumberFormatter.ctor (cognitive 58) · ×1
  • 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.
D2 · Cognitive Complexity · EvaluationConditionalFormatRule.CheckFilter (cognitive 58) · ×1
  • 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.
D2 · Cognitive Complexity · ChartRecordAggregate.WriteStartBlock (cognitive 57) · ×1
  • 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.
D2 · Cognitive Complexity · CT_P.Write (cognitive 56) · ×1
  • 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.
D2 · Cognitive Complexity · InternalWorkbook.FindDrawingGroup (cognitive 54) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFOptimiser.OptimiseFonts (cognitive 54) · ×1
  • 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.
D2 · Cognitive Complexity · Value.ConvertTextToNumber (cognitive 53) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Body.Write (cognitive 53) · ×1
  • 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.
D2 · Cognitive Complexity · CT_FtnEdn.Write (cognitive 52) · ×1
  • 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.
D2 · Cognitive Complexity · CT_RunTrackChange.Parse (cognitive 52) · ×1
  • 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.
D2 · Cognitive Complexity · CHPBinTable.Rebuild (cognitive 52) · ×1
  • 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.
D2 · Cognitive Complexity · SheetUtil.ToDataTable (cognitive 51) · ×1
  • 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.
D2 · Cognitive Complexity · CT_PivotField.Parse (cognitive 51) · ×1
  • 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.
D2 · Cognitive Complexity · CT_RunTrackChange.Write (cognitive 51) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Tbl.Write (cognitive 50) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Tbl.Parse (cognitive 49) · ×1
  • 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.
D2 · Cognitive Complexity · VariantSupport.Write (cognitive 48) · ×1
  • 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.
D2 · Cognitive Complexity · DStarRunner.testNormalCondition (cognitive 48) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheetXMLHandler.StartElement (cognitive 48) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFExportToXml.ExportToXML (cognitive 48) · ×1
  • 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.
D2 · Cognitive Complexity · SXSSFWorkbook.CopyStreamAndInjectWorksheet (cognitive 48) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFParagraph.XWPFParagraph.ctor (cognitive 48) · ×1
  • 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.
D2 · Cognitive Complexity · PackagingUriHelper.RelativizeUri (cognitive 48) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Shapetype.Write (cognitive 48) · ×1
  • 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.
D2 · Cognitive Complexity · CT_ParaRPr.Parse (cognitive 47) · ×1
  • 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.
D2 · Cognitive Complexity · CT_RubyContent.Write (cognitive 47) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFChart.CreateSeries (cognitive 46) · ×1
  • 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.
D2 · Cognitive Complexity · Index.GetValueFromArea (cognitive 46) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFParagraph.SearchText (cognitive 46) · ×1
  • XWPFParagraph.SearchText (cognitive 46) ooxml/XWPF/Usermodel/XWPFParagraph.cs:1423 — 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.
D2 · Cognitive Complexity · CT_ParaRPrOriginal.Parse (cognitive 46) · ×1
  • 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.
D2 · Cognitive Complexity · PAPBinTable.Rebuild (cognitive 46) · ×1
  • 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.
D2 · Cognitive Complexity · DataFormatter.cleanFormatForNumber (cognitive 45) · ×1
  • 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.
D2 · Cognitive Complexity · ExcelToHtmlConverter.ProcessRow (cognitive 45) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.ShiftCommentsAndRows (cognitive 44) · ×1
  • 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.
D2 · Cognitive Complexity · CT_ParaRPr.Write (cognitive 44) · ×1
  • 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.
D2 · Cognitive Complexity · CT_R.Parse (cognitive 44) · ×1
  • 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.
D2 · Cognitive Complexity · ArrayFunction._evaluateTwoArrayArgs (cognitive 43) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Worksheet.Write (cognitive 43) · ×1
  • 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.
D2 · Cognitive Complexity · CT_RPr.Parse (cognitive 43) · ×1
  • 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.
D2 · Cognitive Complexity · Ffn.Equals (cognitive 43) · ×1
  • 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.
D2 · Cognitive Complexity · OPCPackage.GetParts (cognitive 42) · ×1
  • OPCPackage.GetParts (cognitive 42) openxml4Net/OPC/OPCPackage.cs:788 — 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.
D2 · Cognitive Complexity · ZipPackage.GetPartsImpl (cognitive 42) · ×1
  • ZipPackage.GetPartsImpl (cognitive 42) openxml4Net/OPC/ZipPackage.cs:178 — 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.
D2 · Cognitive Complexity · CT_Worksheet.Parse (cognitive 42) · ×1
  • 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.
D2 · Cognitive Complexity · CT_PPr.Parse (cognitive 42) · ×1
  • 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.
D2 · Cognitive Complexity · CT_RPrOriginal.Parse (cognitive 42) · ×1
  • 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.
D2 · Cognitive Complexity · LookupUtils.BinarySearchIndexOfValue (cognitive 41) · ×1
  • 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.
D2 · Cognitive Complexity · MissingRecordAwareHSSFListener.ProcessRecord (cognitive 40) · ×1
  • 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.
D2 · Cognitive Complexity · CellGeneralFormatter.FormatValue (cognitive 40) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheetXMLHandler.EndElement (cognitive 40) · ×1
  • 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.
D2 · Cognitive Complexity · CT_RPr.Write (cognitive 40) · ×1
  • 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.
D2 · Cognitive Complexity · EvaluationCache.NotifyUpdateCell (cognitive 39) · ×1
  • 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.
D2 · Cognitive Complexity · FormulaShifter.RowMoveAreaPtg (cognitive 39) · ×1
  • 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.
D2 · Cognitive Complexity · FormulaShifter.ColumnMoveAreaPtg (cognitive 39) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheetXMLHandler.CheckForEmptyCellComments (cognitive 39) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.ShiftCommentsAndColumns (cognitive 39) · ×1
  • 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.
D2 · Cognitive Complexity · CT_PPr.Write (cognitive 39) · ×1
  • 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.
D2 · Cognitive Complexity · CT_PPrBase.Parse (cognitive 39) · ×1
  • 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.
D2 · Cognitive Complexity · RLEDecompressingInputStream.ReadChunk (cognitive 38) · ×1
  • 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.
D2 · Cognitive Complexity · ExcelToHtmlConverter.BuildStyle (cognitive 38) · ×1
  • 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.
D2 · Cognitive Complexity · CT_P.Parse (cognitive 38) · ×1
  • 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.
D2 · Cognitive Complexity · CellNumberFormatter.Writeint (cognitive 37) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SmartTagRun.Write (cognitive 37) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFCell.SetCellType (cognitive 36) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFShape.Anchor.set (cognitive 36) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFCellUtil.CopyCell (cognitive 36) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.OnDeleteFormula (cognitive 36) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SmartTagRun.Parse (cognitive 36) · ×1
  • 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.
D2 · Cognitive Complexity · CT_PPrBase.Write (cognitive 36) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SdtPr.Write (cognitive 36) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Row.Parse (cognitive 36) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFChart.GetSheetCharts (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFChart.RemoveSeries (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · LinearRegressionFunction.EvaluateInternal (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · XDDFRunProperties.SetFonts (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Font.Write (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Font.Clone (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · CT_CustomXmlRun.Parse (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SdtContentRun.Parse (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Tc.Parse (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · WordToHtmlConverter.ProcessTable (cognitive 35) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFExportToXml.GetComplexTypeNodeFromSchemaChildren (cognitive 34) · ×1
  • 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.
D2 · Cognitive Complexity · CT_CustomXmlRun.Write (cognitive 34) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Body.Parse (cognitive 34) · ×1
  • 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.
D2 · Cognitive Complexity · CT_FtnEdn.Parse (cognitive 34) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SdtContentRun.Write (cognitive 34) · ×1
  • 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.
D2 · Cognitive Complexity · TableRow.initCells (cognitive 34) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFRecordStream.GetNextRecord (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · InternalWorkbook.CloneDrawings (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · CellFormat.GetApplicableFormatPart (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · ExcelToHtmlConverter.ProcessCell (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFRowColShifter.UpdateConditionalFormatting (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFParagraph.BuildRunsInOrderFromXml (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · CT_HdrFtr.Parse (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Comment.Parse (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Tc.Write (cognitive 33) · ×1
  • 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.
D2 · Cognitive Complexity · LookupUtils.LookupIndexOfValue (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSimpleShape.ProcessAutoNumGroup (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFRun._getText (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · CT_PivotCacheDefinition.Parse (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · CT_CustomXmlRow.Parse (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · CT_CustomXmlBlock.Parse (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · CT_CustomXmlCell.Parse (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · CT_HdrFtr.Write (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Comment.Write (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SdtContentBlock.Parse (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Row.Write (cognitive 32) · ×1
  • 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.
D2 · Cognitive Complexity · NPOIFSFileSystem.GetFreeBlock (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · LookupUtils.LookupFirstIndexOfValue (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · LookupUtils.LookupLastIndexOfValue (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · HexDump.Dump (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.RemoveOverwrittenRows (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFParagraph.NumLevelText.get (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · CT_CustomXmlRow.Write (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · CT_CustomXmlBlock.Write (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · CT_CustomXmlCell.Write (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SdtContentCell.Parse (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SdtContentBlock.Write (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SdtContentRow.Parse (cognitive 31) · ×1
  • 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.
D2 · Cognitive Complexity · CellNumberFormatter.WriteFraction (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · BooleanFunction.Calculate (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · MultiOperandNumericFunction.CollectValues (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · WorkbookEvaluator.EvaluateAny (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · Arrays.DeepToString (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · MutableBigInteger.divideMagnitude (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · EmbeddedExtractor.ExtractAll (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFColumn.CopyColumnFrom (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFRow.CopyRowFrom (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.CopySheetImages (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.CopyCell (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFTextParagraph.IsBullet.set (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFTextParagraph.SetBullet (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFDocument.OnDocumentRead (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SdtContentCell.Write (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SdtContentRow.Write (cognitive 30) · ×1
  • 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.
D2 · Cognitive Complexity · EventRecordFactory.ProcessRecords (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · ValidationEnum_LIST.IsValidValue (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · EvaluationConditionalFormatRule.CheckValue (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · FormulaRenderer.ToFormulaString (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · CellUtil.CopyCell (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFTable.GetCommonXpath (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Stroke.Parse (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · CT_RubyContent.Parse (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TrPr.Write (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · WordToFoConverter.ProcessTable (cognitive 29) · ×1
  • 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.
D2 · Cognitive Complexity · TextListener.ProcessRecord (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFSheet.ShiftRows (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · IdentifierManager.Release (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · XDDFTextBody.RetrieveProperties (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFWorkbook.OnDocumentRead (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Style.Parse (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · BaseObject.Clone (cognitive 28) · ×1
  • 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.
D2 · Cognitive Complexity · RecordFactoryInputStream.ReadNextRecord (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFShapeFactory.CreateShapeTree (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · VBAMacroReader.ReadMacros (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · Indirect.ParseWorkbookAndSheetName (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · PercentRank.calculateRank (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · IdentifierManager.Reserve (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.Write (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSimpleShape.ApplyAttributes (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · Form1.RecursiveRun (cognitive 27) · ×1
  • 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.
D2 · Cognitive Complexity · Section.Section.ctor (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · InternalChart.InternalChart.ctor (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · ChartRecordAggregate.WriteEndBlock (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · RecordInputStream.ReadStringCommon (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · Complex.Evaluate (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · DStarRunner.FullFillsConditions (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · DataFormatter.GetFormat (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · SheetUtil.CopyRow (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · BigInteger.ShiftRight (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFRichTextString.ToCTFont (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFSettings.SetEnforcementEditValue (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SectPr.Write (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Style.Write (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TrPrBase.Write (cognitive 26) · ×1
  • 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.
D2 · Cognitive Complexity · EntryUtils.AreDirectoriesIdentical (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · XLookupFunction.evaluate (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · DateUtil.GetExcelDate (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · LZWDecompresser.decompress (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFRichTextString.SetRunAttributes (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Shapetype.Parse (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SectPr.Parse (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · MainForm.ShowDocPartTree (cognitive 25) · ×1
  • 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.
D2 · Cognitive Complexity · InternalWorkbook.Serialize (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFSheet.recomputeFirstAndLastRowsForRowShift (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFSheet.SetRepeatingRowsAndColumns (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · DocumentFactoryHelper.ScanForPassword (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · RelationalOperationEval.DoCompare (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · FormulaParser.ParseSheetName (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · Baseifs.AggregateMatchingCells (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · NCellRange.ForEachCell (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · Properties.LoadConvert (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · ExcelToHtmlConverter.ProcessDocumentInformation (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · StylesTable.WriteTo (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Shape.Parse (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SdtPr.Parse (cognitive 24) · ×1
  • 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.
D2 · Cognitive Complexity · HeaderFooter.SplitParts (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFSheet.CopyTo (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · FormulaParser.ParseSimpleRangePart (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · Match.FindIndexOfValue (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · OperandClassTransformer.TransformFunctionNode (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · DataFormatter.CreateFormat (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · StylesTable.ReadFrom (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSimpleShape.Text.get (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFTextRun.SetFontFamily (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFTableCell.AppendBodyElementText (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · EncryptionDocument.WriteKeyEncryptorChild (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SharedItems.Parse (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SharedItems.Write (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Table.Parse (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Dxfs.Parse (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · PAPFormattedDiskPage.ToByteArray (cognitive 23) · ×1
  • 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.
D2 · Cognitive Complexity · POIFSReader.ProcessProperties (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · CellFormatPart.formatType (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · ReplacingInputStream.Read (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · ExcelToHtmlConverter.BuildStyle_Font (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFRowColShifter.UpdateColumnFormulas (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.CopyRow (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · ContentTypeManager.RemoveContentType (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · ZipPackage.SaveImpl (cognitive 22) · ×1
  • ZipPackage.SaveImpl (cognitive 22) openxml4Net/OPC/ZipPackage.cs:523 — 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.
D2 · Cognitive Complexity · CT_BubbleSer.Write (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · PresentationXmlContent.Merge (cognitive 22) · ×1
  • PresentationXmlContent.Merge (cognitive 22) OpenXmlFormats/Presentation/PresentationXmlContent.cs:8 — PresentationXmlContent.Merge 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.
D2 · Cognitive Complexity · CT_Workbook.Parse (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SectPrBase.Parse (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · DefaultFontReplacer.Update (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · CharacterSprmUncompressor.UncompressCHPOperation (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · FieldsImpl.ParseFieldStructureImpl (cognitive 22) · ×1
  • 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.
D2 · Cognitive Complexity · Property.ToString (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · CFRecordsAggregate.UpdateFormulasAfterCellShift (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · FontFormatting.ToString (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · ExtendedFormatRecord.Equals (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · HyperlinkRecord.HyperlinkRecord.ctor (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · HyperlinkRecord.DataSize.get (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · TextJoinFunction.Evaluate (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · RelationalOperationEval.EvaluateArray (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · ArrayFunction._evaluateOneArrayArg (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · DStarRunner.Evaluate (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · DateUtil.IsADateFormat (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · BigInteger.BigInteger.ctor (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · POIXMLDocumentPart.Read (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFCellStyle.CloneStyleFrom (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFRun.XWPFRun.ctor (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · PackagePropertiesUnmarshaller.CheckElementForOPCCompliance (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · PackagePartName.Compare (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · CT_ScatterSer.Write (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Workbook.Write (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Shape.Write (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TblPr.Parse (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · AbstractWordConverter.TryDeadField (cognitive 21) · ×1
  • 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.
D2 · Cognitive Complexity · InternalSheet.VisitContainedRecords (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · EmbeddedObjectRefSubRecord.EmbeddedObjectRefSubRecord.ctor (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · HyperlinkRecord.Serialize (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFSheet.GetSheetImageIds (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFSheet.ApplyEscherRemap (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFSheet.CopyRow (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · FormulaShifter.AdjustPtgDueToRowMove (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · FormulaShifter.AdjustPtgDueToColumnMove (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · WorkbookEvaluator.GetEvalForPtg (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · AreaReference.SeparateAreaRefs (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · ImageUtils.SetPreferredSize (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · ExcelToHtmlConverter.BuildStyle_Border (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · SharedStringsTable.ParseRPrChild (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFCell.RichStringCellValue.get (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · CT_AreaSer.Write (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · CT_BarSer.Write (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · CT_CacheHierarchy.Parse (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TblPrBase.Parse (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TcPr.Parse (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · Form1.button5_Click (cognitive 20) · ×1
  • 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.
D2 · Cognitive Complexity · EscherPropertyFactory.CreateProperties (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · EscherAggregate.CreateAggregate (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFSheet.GetRepeatingRowsOrColums (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · DocumentBlock.Convert (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · CellFormatPart.ParseFormat (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · CellNumberFormatter.interpretIntegerCommas (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · FormulaParser.ParseErrorLiteral (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · BaseNumberUtils.ConvertToDecimal (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · CountUtils.CountMatchingCellsInArea (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · OperandClassTransformer.TransformNode (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · WorkbookEvaluator.AdjustRegionRelativeReference (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · CellReferenceParser.TryParse (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · Arrays.DeepEquals0 (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · MutableBigInteger.binaryGCD (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.CopyRows (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.GetRepeatingRowsOrColums (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.SetRepeatingRowsAndColumns (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFWorkbook.CloneSheet (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFWordExtractor.AppendParagraphText (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFParagraph.GetNumStartOverride (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFParagraph.RemoveRun (cognitive 19) · ×1
  • XWPFParagraph.RemoveRun (cognitive 19) ooxml/XWPF/Usermodel/XWPFParagraph.cs:1616 — 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.
D2 · Cognitive Complexity · XWPFPictureData.Equals (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · CT_LineSer.Write (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · CT_OfPieChart.Write (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · CT_SectPrBase.Write (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · CT_MailMerge.Parse (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TcPrInner.Parse (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · TableSprmUncompressor.UncompressTAPOperation (cognitive 19) · ×1
  • 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.
D2 · Cognitive Complexity · Property.ReadDictionary (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · Property.Equals (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · ContinuableRecordOutput.WriteCharacterData (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · EmbeddedObjectRefSubRecord.Serialize (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · DatePartHandler.HandlePart (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · AverageIfs.GetAvgFromMatchingCells (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · LookupUtils.XlookupIndexOfValue (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · StatsLib.mode (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · XYNumericFunction.EvaluateInternal (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · DataFormatter.FormatCellValue (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · ImageUtils.GetJpegDpi (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · ExcelToHtmlConverter.ProcessSheet (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFExportToXml.Compare (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · SXSSFFormulaEvaluator.EvaluateAllFormulaCells (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · CT_BarChart.Write (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TextBodyProperties.Write (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · CT_CacheField.Write (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · CT_RPrElt.Parse (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Font.Parse (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TblPr.Write (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TrPr.Parse (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · AbstractWordConverter.ProcessField (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · AbstractWordConverter.ProcessParagraphes (cognitive 18) · ×1
  • 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.
D2 · Cognitive Complexity · ChartFormatsAggregate.ChartFormatsAggregate.ctor (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · SeriesFormatAggregate.SeriesFormatAggregate.ctor (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · NPOIFSMiniStore.GetFreeBlock (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · POIFSDocumentPath.Equals (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · CellNumberFormatter.WriteScientific (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · CellNumberFormatter.WriteFractional (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · ConditionalFormattingEvaluator.GetMatchingCells (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · FormulaCellCacheEntrySet.Remove (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · FloorCeilingMathBase.Evaluate (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · Imaginary.Evaluate (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · TwoArrayArg.Evaluate (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · OperationEvaluationContext.GetDynamicReference (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · NCellRange.Cells.get (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · TableStyleTypeExtension.GetRange (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · NumberComparer.Compare (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · SheetUtil.CopyRow (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · SheetUtil.GetColumnWidth (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · BigInteger.BitLength (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · MutableBigInteger.leftShift (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · HexDump.Dump (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · XMLSlideShow.CreateSlide (cognitive 17) · ×1
  • XMLSlideShow.CreateSlide (cognitive 17) ooxml/XSLF/UserModel/XMLSlideShow.cs:88 — XMLSlideShow.CreateSlide 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.
D2 · Cognitive Complexity · XMLSlideShow.OnDocumentRead (cognitive 17) · ×1
  • XMLSlideShow.OnDocumentRead (cognitive 17) ooxml/XSLF/UserModel/XMLSlideShow.cs:172 — XMLSlideShow.OnDocumentRead 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.
D2 · Cognitive Complexity · XSSFSheet.CopyColumn (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · ZipPackage.ZipPackage.ctor (cognitive 17) · ×1
  • ZipPackage.ZipPackage.ctor (cognitive 17) openxml4Net/OPC/ZipPackage.cs:89 — 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.
D2 · Cognitive Complexity · CT_BarSer.Parse (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · CT_BubbleSer.Parse (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · CT_LineChart.Write (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Missing.Write (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Number.Write (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · CT_String.Write (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · CT_PivotTableDefinition.Write (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TblPrBase.Write (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TcPr.Write (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · WordToFoUtils.SetCharactersProperties (cognitive 17) · ×1
  • 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.
D2 · Cognitive Complexity · DrawingManager.AllocateShapeId (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · ColumnInfoRecordsAggregate.SetColumn (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · LbsDataSubRecord.Serialize (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · StreamEncryptionInfo.StreamEncryptionInfo.ctor (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFSheet.ValidateArrayFormulas (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · HSSFSheet.GetHyperlink (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · SimpleFraction.BuildFractionMaxDenominator (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · XLookupFunction._evaluate (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · FormulaParser.Function (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · Address.Evaluate (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · Dec2Bin.Evaluate (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · ImReal.Evaluate (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · PercentRank.Evaluate (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · OperationEvaluationContext.CreateExternSheetRefEvaluator (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · ExternSheetNameResolver.PrependSheetName (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · ExcelStyleDateFormatter.Format (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CellRangeUtil.MergeCellRanges (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CellUtil.SetCellStyleProperties (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · SheetUtil.MeasureCellWidth (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · MutableBigInteger.compareHalf (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · HexRead.ReadData (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · ExcelToHtmlUtils.BuildMergedRangesMap (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · SheetDataWriter.WriteCell (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFCellBorder.GetBorder (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · ColumnHelper.GetColumn1Based (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFName.ValidateName (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFRichTextString.ApplyFont (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.CreateFreezePane (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.RemoveColumn (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFSheet.ValidateArrayFormulas (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · XSSFVMLDrawing.FindCommentShape (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · XWPFRun.handleRubyContent (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · PackagePropertiesPart.SetDateValue (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · PackagingUriHelper.ResolvePartUri (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Bar3DChart.Write (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CT_LineSer.Parse (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CT_ScatterSer.Parse (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TextBodyProperties.Parse (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CT_CacheField.Parse (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CT_PivotHierarchy.Parse (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Comments.FindExtraNamespace (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Lvl.Parse (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CT_Lvl.Write (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CT_MailMerge.Write (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · CT_TcPrInner.Write (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · WordToFoUtils.SetTableCellProperties (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · WordToHtmlUtils.AddTableCellProperties (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · HWPFDocument.HWPFDocument.ctor (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · ListTables.Equals (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · StyleSheet.Equals (cognitive 16) · ×1
  • 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.
D2 · Cognitive Complexity · Range.FindRange (cognitive 16) · ×1
  • 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (6 members, 26 shared lines) · ×1
  • Near-duplicate member family (6 members, 26 shared lines) OpenXmlFormats/Wordprocessing/CustomXml.cs:195 — OpenXmlFormats/Wordprocessing/CustomXml.cs:195-262 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1483-1563 | OpenXmlFormats/Wordprocessing/CustomXml.cs:2300-2367 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:190-269 | OpenXmlFormats/Wordprocessing/Run.cs:2336-2441 | OpenXmlFormats/Wordprocessing/Sdt.cs:1646-1709 — These 6 members are variants of one another: a block of 26 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 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 · Near-duplicate member family (6 members, 24 shared lines) · ×1
  • Near-duplicate member family (6 members, 24 shared lines) OpenXmlFormats/Wordprocessing/CustomXml.cs:1483 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1483-1563 | OpenXmlFormats/Wordprocessing/CustomXml.cs:2300-2367 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:190-269 | OpenXmlFormats/Wordprocessing/Run.cs:2336-2441 | OpenXmlFormats/Wordprocessing/Sdt.cs:1150-1215 | OpenXmlFormats/Wordprocessing/Sdt.cs:1646-1709 — These 6 members are variants of one another: a block of 24 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 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 · Near-duplicate member family (5 members, 24 shared lines) · ×1
  • Near-duplicate member family (5 members, 24 shared lines) OpenXmlFormats/Wordprocessing/HdrFtr.cs:190 — OpenXmlFormats/Wordprocessing/HdrFtr.cs:190-269 | OpenXmlFormats/Wordprocessing/Run.cs:2336-2441 | OpenXmlFormats/Wordprocessing/Sdt.cs:1150-1215 | OpenXmlFormats/Wordprocessing/Sdt.cs:1646-1709 | OpenXmlFormats/Wordprocessing/Table.cs:3555-3624 — These 5 members are variants of one another: a block of 24 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 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · 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 · Near-duplicate member family (4 members, 26 shared lines) · ×1
  • Near-duplicate member family (4 members, 26 shared lines) OpenXmlFormats/Wordprocessing/HdrFtr.cs:190 — OpenXmlFormats/Wordprocessing/HdrFtr.cs:190-269 | OpenXmlFormats/Wordprocessing/Run.cs:2336-2441 | OpenXmlFormats/Wordprocessing/Sdt.cs:1646-1709 | OpenXmlFormats/Wordprocessing/Table.cs:280-383 — These 4 members are variants of one another: a block of 26 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 · Near-duplicate member family (4 members, 22 shared lines) · ×1
  • Near-duplicate member family (4 members, 22 shared lines) OpenXmlFormats/Wordprocessing/CustomXml.cs:998 — OpenXmlFormats/Wordprocessing/CustomXml.cs:998-1071 | OpenXmlFormats/Wordprocessing/Run.cs:2336-2441 | OpenXmlFormats/Wordprocessing/Sdt.cs:1646-1709 | OpenXmlFormats/Wordprocessing/Table.cs:280-383 — These 4 members are variants of one another: a block of 22 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 · Near-duplicate member pair (196 shared lines) · ×1
  • Near-duplicate member pair (196 shared lines) OpenXmlFormats/Wordprocessing/Paragraph.cs:5655 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5655-5940 | OpenXmlFormats/Wordprocessing/Paragraph.cs:7436-7713 — These two members are variants of one another: 196 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (72 shared lines) · ×1
  • Near-duplicate member pair (72 shared lines) OpenXmlFormats/Wordprocessing/Paragraph.cs:5517 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5517-5650 | OpenXmlFormats/Wordprocessing/Paragraph.cs:7306-7431 — These two members are variants of one another: 72 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (14 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (14 members, 50+ identical tokens) OpenXmlFormats/Vml/Main.cs:4581 — OpenXmlFormats/Vml/Main.cs:4581-4593 | OpenXmlFormats/Wordprocessing/Document.cs:645-657 | OpenXmlFormats/Wordprocessing/FormField.cs:491-503 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:370-382 | OpenXmlFormats/Wordprocessing/Markup.cs:681-693 | OpenXmlFormats/Wordprocessing/Paragraph.cs:568-580 | OpenXmlFormats/Wordprocessing/Run.cs:252-264 | OpenXmlFormats/Wordprocessing/Run.cs:2586-2598 | OpenXmlFormats/Wordprocessing/Sdt.cs:1337-1349 | OpenXmlFormats/Wordprocessing/Sdt.cs:2079-2091 | OpenXmlFormats/Wordprocessing/Sdt.cs:2614-2626 | OpenXmlFormats/Wordprocessing/Table.cs:3304-3316 | OpenXmlFormats/Wordprocessing/Table.cs:3756-3768 | OpenXmlFormats/Wordprocessing/Table.cs:6039-6051 — These 14 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 14 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 14 times.
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.
D4 · Code Duplication · Edited copy of a member (94 corresponding lines) · ×1
  • Edited copy of a member (94 corresponding lines) scratchpad/HWPF/Converter/WordToFoConverter.cs:452 — scratchpad/HWPF/Converter/WordToFoConverter.cs:452-545 | scratchpad/HWPF/Converter/WordToHtmlConverter.cs:472-573 — These two members are one piece of code written twice and then edited apart: 94 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) scratchpad/HWPF/Model/CHPBinTable.cs:431 — scratchpad/HWPF/Model/CHPBinTable.cs:431-483 | scratchpad/HWPF/Model/PAPBinTable.cs:384-431 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) scratchpad/HWPF/Model/CHPBinTable.cs:372 — scratchpad/HWPF/Model/CHPBinTable.cs:372-409 | scratchpad/HWPF/Model/PAPBinTable.cs:86-128 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) scratchpad/HWPF/Model/ListTables.cs:103 — scratchpad/HWPF/Model/ListTables.cs:103-125 | scratchpad/HWPF/Model/ListTables.cs:128-152 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 18+ corresponding lines) main/SS/HtmlDocumentFacade.cs:240 — main/SS/HtmlDocumentFacade.cs:240-257 | scratchpad/HWPF/Converter/HtmlDocumentFacade.cs:241-258 | scratchpad/HWPF/Converter/TextDocumentFacade.cs:169-186 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×1
  • Edited copy of a member (27 corresponding lines) scratchpad/HWPF/UserModel/Range.cs:968 — scratchpad/HWPF/UserModel/Range.cs:968-994 | scratchpad/HWPF/UserModel/Range.cs:997-1023 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×1
  • Edited copy of a member (18 corresponding lines) scratchpad/HWPF/UserModel/OfficeDrawingsImpl.cs:187 — scratchpad/HWPF/UserModel/OfficeDrawingsImpl.cs:187-208 | scratchpad/HWPF/UserModel/OfficeDrawingsImpl.cs:237-254 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) scratchpad/HWPF/Model/EscherRecordHolder.cs:165 — scratchpad/HWPF/Model/EscherRecordHolder.cs:165-179 | scratchpad/HWPF/Model/EscherRecordHolder.cs:182-196 | scratchpad/HWPF/Model/EscherRecordHolder.cs:199-213 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×1
  • Edited copy of a member (11 corresponding lines) main/HSSF/Record/AbstractEscherHolderRecord.cs:235 — main/HSSF/Record/AbstractEscherHolderRecord.cs:235-245 | scratchpad/HWPF/Model/EscherRecordHolder.cs:77-87 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) scratchpad/HSLF/Record/AnimationInfo.cs:40 — scratchpad/HSLF/Record/AnimationInfo.cs:40-48 | scratchpad/HSLF/Record/Comment2000.cs:108-116 | scratchpad/HSLF/Record/DummyPositionSensitiveRecordWithChildren.cs:47-55 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) scratchpad/HSLF/Record/CString.cs:115 — scratchpad/HSLF/Record/CString.cs:115-121 | scratchpad/HSLF/Record/TextBytesAtom.cs:106-112 | scratchpad/HSLF/Record/TextCharsAtom.cs:102-108 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 4+ corresponding lines) scratchpad/HSLF/Record/Comment2000Atom.cs:155 — scratchpad/HSLF/Record/Comment2000Atom.cs:155-158 | scratchpad/HSLF/Record/SoundData.cs:108-111 | scratchpad/HSLF/Record/TextRulerAtom.cs:103-106 | scratchpad/HSLF/Record/TextSpecInfoAtom.cs:80-84 | scratchpad/HSLF/Record/TxInteractiveInfoAtom.cs:130-133 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×1
  • Edited copy of a member (5 corresponding lines) scratchpad/HWPF/Converter/WordToFoUtils.cs:181 — scratchpad/HWPF/Converter/WordToFoUtils.cs:181-185 | scratchpad/HWPF/Converter/WordToHtmlUtils.cs:141-145 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (115 lines × 2) · ×1
  • Duplicated block (115 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:5951 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5951-6065 | OpenXmlFormats/Wordprocessing/Run.cs:1947-2061 — 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.
D4 · Code Duplication · Duplicated block (112 lines × 2) · ×1
  • Duplicated block (112 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:5673 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5673-5784 | OpenXmlFormats/Wordprocessing/Paragraph.cs:7600-7711 — 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.
D4 · Code Duplication · Duplicated block (96 lines × 4) · ×1
  • Duplicated block (96 lines × 4) OpenXmlFormats/Wordprocessing/CustomXml.cs:1082 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1082-1177 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1574-1669 | OpenXmlFormats/Wordprocessing/Paragraph.cs:853-948 | OpenXmlFormats/Wordprocessing/Sdt.cs:2666-2761 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (90–92 lines × 4) · ×1
  • Duplicated block (90–92 lines × 4) OpenXmlFormats/Wordprocessing/Document.cs:703 — OpenXmlFormats/Wordprocessing/Document.cs:703-794 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:446-535 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1322-1411 | OpenXmlFormats/Wordprocessing/Table.cs:3843-3932 — there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Wordprocessing/Document.cs:703` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (87 lines × 2) · ×1
  • Duplicated block (87 lines × 2) OpenXmlFormats/Wordprocessing/CustomXml.cs:2028 — OpenXmlFormats/Wordprocessing/CustomXml.cs:2028-2114 | OpenXmlFormats/Wordprocessing/Sdt.cs:1389-1475 — 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.
D4 · Code Duplication · Duplicated block (86 lines × 5) · ×1
  • Duplicated block (86 lines × 5) OpenXmlFormats/Wordprocessing/Document.cs:710 — OpenXmlFormats/Wordprocessing/Document.cs:710-797 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:453-538 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1329-1414 | OpenXmlFormats/Wordprocessing/Markup.cs:955-1040 | OpenXmlFormats/Wordprocessing/Table.cs:3850-3935 — there are 5 copies across 4 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 5 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (81 lines × 6) · ×1
  • Duplicated block (81 lines × 6) OpenXmlFormats/Wordprocessing/CustomXml.cs:521 — OpenXmlFormats/Wordprocessing/CustomXml.cs:521-601 | OpenXmlFormats/Wordprocessing/CustomXml.cs:613-693 | OpenXmlFormats/Wordprocessing/CustomXml.cs:2471-2551 | OpenXmlFormats/Wordprocessing/CustomXml.cs:2593-2673 | OpenXmlFormats/Wordprocessing/Sdt.cs:326-406 | OpenXmlFormats/Wordprocessing/Table.cs:6092-6172 — 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.
D4 · Code Duplication · Duplicated block (82 lines × 2) · ×1
  • Duplicated block (82 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:2037 — OpenXmlFormats/Wordprocessing/Paragraph.cs:2037-2118 | OpenXmlFormats/Wordprocessing/Paragraph.cs:4162-4243 — 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 `OpenXmlFormats/Wordprocessing/Paragraph.cs:2037` 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.
D4 · Code Duplication · Duplicated block (77 lines × 2) · ×1
  • Duplicated block (77 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:1260 — OpenXmlFormats/Wordprocessing/Paragraph.cs:1260-1336 | OpenXmlFormats/Wordprocessing/Paragraph.cs:3982-4058 — 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.
D4 · Code Duplication · Duplicated block (53 lines × 5) · ×1
  • Duplicated block (53 lines × 5) OpenXmlFormats/Vml/Main.cs:3645 — OpenXmlFormats/Vml/Main.cs:3645-3697 | OpenXmlFormats/Vml/Main.cs:5911-5963 | OpenXmlFormats/Vml/Main.cs:6048-6100 | OpenXmlFormats/Vml/Main.cs:6166-6218 | OpenXmlFormats/Vml/Main.cs:6297-6349 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (52 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (78 lines × 2) · ×1
  • Duplicated block (78 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:1940 — OpenXmlFormats/Wordprocessing/Paragraph.cs:1940-2017 | OpenXmlFormats/Wordprocessing/Paragraph.cs:4073-4150 — 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.
D4 · Code Duplication · Duplicated block (35–47 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×1
  • Duplicated block (42 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:5813 — OpenXmlFormats/Wordprocessing/Paragraph.cs:5813-5854 | OpenXmlFormats/Wordprocessing/Paragraph.cs:7488-7529 — 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.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) OpenXmlFormats/Wordprocessing/Table.cs:3071 — OpenXmlFormats/Wordprocessing/Table.cs:3071-3113 | OpenXmlFormats/Wordprocessing/Table.cs:4044-4086 — 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 `OpenXmlFormats/Wordprocessing/Table.cs:3071` 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.
D4 · Code Duplication · Duplicated block (40–41 lines × 2) · ×1
  • Duplicated block (40–41 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:2189 — OpenXmlFormats/Wordprocessing/Paragraph.cs:2189-2229 | OpenXmlFormats/Wordprocessing/Paragraph.cs:2650-2689 — 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 `OpenXmlFormats/Wordprocessing/Paragraph.cs:2189` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (38–40 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (73 lines × 2) · ×1
  • Duplicated block (73 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:996 — OpenXmlFormats/Wordprocessing/Paragraph.cs:996-1068 | OpenXmlFormats/Wordprocessing/Paragraph.cs:6256-6328 — 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 `OpenXmlFormats/Wordprocessing/Paragraph.cs:996` 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.
D4 · Code Duplication · Duplicated block (27–38 lines × 4) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (33 lines × 4) · ×1
  • Duplicated block (33 lines × 4) OpenXmlFormats/Vml/Main.cs:4641 — OpenXmlFormats/Vml/Main.cs:4641-4673 | OpenXmlFormats/Vml/Main.cs:4923-4955 | OpenXmlFormats/Vml/Main.cs:5205-5237 | OpenXmlFormats/Vml/Main.cs:5591-5623 — 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.
D4 · Code Duplication · Duplicated block (36–37 lines × 2) · ×1
  • Duplicated block (36–37 lines × 2) OpenXmlFormats/Wordprocessing/Paragraph.cs:1104 — OpenXmlFormats/Wordprocessing/Paragraph.cs:1104-1140 | OpenXmlFormats/Wordprocessing/Paragraph.cs:6362-6397 — 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.
D4 · Code Duplication · Duplicated block (33–34 lines × 2) · ×1
  • Duplicated block (33–34 lines × 2) ooxml/SS/UserModel/WorkbookFactory.cs:301 — ooxml/SS/UserModel/WorkbookFactory.cs:301-334 | ooxml/SS/UserModel/WorkbookFactory.cs:339-371 — 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:301` 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.
D4 · Code Duplication · Duplicated block (30 lines × 5) · ×1
  • Duplicated block (30 lines × 5) OpenXmlFormats/Vml/Main.cs:5907 — OpenXmlFormats/Vml/Main.cs:5907-5936 | OpenXmlFormats/Vml/Main.cs:6044-6073 | OpenXmlFormats/Vml/Main.cs:6162-6191 | OpenXmlFormats/Vml/Main.cs:6293-6322 | OpenXmlFormats/Vml/Main.cs:6358-6387 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3199 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3199-3229 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4503-4533 — 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.
D4 · Code Duplication · Duplicated block (29 lines × 4) · ×1
  • Duplicated block (29 lines × 4) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3203 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3203-3231 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3779-3807 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4138-4166 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4507-4535 — 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.
D4 · Code Duplication · Duplicated block (30 lines × 3) · ×1
  • Duplicated block (30 lines × 3) OpenXmlFormats/Drawing/Chart/AreaChart.cs:312 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:312-341 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:230-259 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:118-147 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/BubbleChart.cs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 117 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 `OpenXmlFormats/Drawing/Chart/AreaChart.cs:312` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `OpenXmlFormats/Drawing/Chart/AreaChart.cs:343` calls `CT_AreaSer` and `OpenXmlFormats/Drawing/Chart/BubbleChart.cs:262` 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.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (29 lines × 3) · ×1
  • Duplicated block (29 lines × 3) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4092 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4092-4120 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4465-4493 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4835-4863 — 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 `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:4092` 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.
D4 · Code Duplication · Duplicated block (26–29 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (28–29 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (19–27 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (26–27 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (23–27 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (20–27 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) REDACTED:124 — REDACTED:124-149 | ooxml/POIXMLDocumentPart.cs:261-287 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (23–26 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (25–26 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (22 lines × 4) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (23 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (20–24 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (19–22 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (20 lines × 5) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (20 lines × 3) · ×1
  • Duplicated block (20 lines × 3) OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1621 — OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1621-1640 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1687-1706 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1984-2003 — 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 `OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1621` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) OpenXmlFormats/Wordprocessing/Table.cs:1253 — OpenXmlFormats/Wordprocessing/Table.cs:1253-1270 | OpenXmlFormats/Wordprocessing/Table.cs:2109-2126 | OpenXmlFormats/Wordprocessing/Table.cs:2309-2326 | OpenXmlFormats/Wordprocessing/Table.cs:2849-2866 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OpenXmlFormats/Wordprocessing/Table.cs:2308` calls `Write` and `OpenXmlFormats/Wordprocessing/Table.cs:2108` 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.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2781 — OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2781-2797 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:3030-3046 | OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotTableDefinition.cs:4028-4044 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Spreadsheet/PivotTable/CT_PivotCacheDefinition.cs:2781` 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.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (11–19 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (17 lines × 8) · ×1
  • Duplicated block (17 lines × 8) OpenXmlFormats/Drawing/ShapeEffects.cs:751 — OpenXmlFormats/Drawing/ShapeEffects.cs:751-767 | OpenXmlFormats/Drawing/ShapeEffects.cs:1041-1057 | OpenXmlFormats/Drawing/ShapeEffects.cs:1390-1406 | OpenXmlFormats/Drawing/ShapeEffects.cs:1661-1677 | OpenXmlFormats/Drawing/ShapeEffects.cs:2015-2031 | OpenXmlFormats/Drawing/ShapeEffects.cs:2452-2468 | OpenXmlFormats/Drawing/ShapeStyle.cs:41-57 | OpenXmlFormats/Drawing/ShapeStyle.cs:209-225 — there are 8 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 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Drawing/ShapeEffects.cs:751` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OpenXmlFormats/Drawing/ShapeEffects.cs:749` calls `ReadLong`, `ReadInt` and `OpenXmlFormats/Drawing/ShapeStyle.cs:208` 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.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) OpenXmlFormats/Wordprocessing/Table.cs:1210 — OpenXmlFormats/Wordprocessing/Table.cs:1210-1226 | OpenXmlFormats/Wordprocessing/Table.cs:2082-2098 | OpenXmlFormats/Wordprocessing/Table.cs:2280-2296 | OpenXmlFormats/Wordprocessing/Table.cs:2804-2820 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `OpenXmlFormats/Wordprocessing/Table.cs:2278` calls `Parse` and `OpenXmlFormats/Wordprocessing/Table.cs:2081` 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.
D4 · Code Duplication · Duplicated block (15–17 lines × 6) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) OpenXmlFormats/Drawing/Chart/AreaChart.cs:92 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:92-103 | OpenXmlFormats/Drawing/Chart/BarChart.cs:1087-1098 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:530-541 | OpenXmlFormats/Drawing/Chart/LineChart.cs:596-607 | OpenXmlFormats/Drawing/Chart/LineChart.cs:856-867 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:552-563 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/BarChart.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 102 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 `OpenXmlFormats/Drawing/Chart/AreaChart.cs:92` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–17 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (16 lines × 11) · ×1
  • Duplicated block (16 lines × 11) OpenXmlFormats/Drawing/Chart/AreaChart.cs:92 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:92-107 | OpenXmlFormats/Drawing/Chart/AreaChart.cs:652-667 | OpenXmlFormats/Drawing/Chart/BarChart.cs:113-128 | OpenXmlFormats/Drawing/Chart/BarChart.cs:1087-1102 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:530-545 | OpenXmlFormats/Drawing/Chart/LineChart.cs:596-611 | OpenXmlFormats/Drawing/Chart/LineChart.cs:856-871 | OpenXmlFormats/Drawing/Chart/LineChart.cs:1069-1084 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:443-458 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:552-567 | OpenXmlFormats/Drawing/Chart/SurfaceChart.cs:199-214 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/BarChart.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 102 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 `OpenXmlFormats/Drawing/Chart/AreaChart.cs:92` 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, `OpenXmlFormats/Drawing/Chart/AreaChart.cs:651` calls `Write` and `OpenXmlFormats/Drawing/Chart/AreaChart.cs:91` 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.
D4 · Code Duplication · Duplicated block (15 lines × 8) · ×1
  • Duplicated block (15 lines × 8) OpenXmlFormats/Drawing/ShapeEffects.cs:777 — OpenXmlFormats/Drawing/ShapeEffects.cs:777-791 | OpenXmlFormats/Drawing/ShapeEffects.cs:1074-1088 | OpenXmlFormats/Drawing/ShapeEffects.cs:1416-1430 | OpenXmlFormats/Drawing/ShapeEffects.cs:1685-1699 | OpenXmlFormats/Drawing/ShapeEffects.cs:2036-2050 | OpenXmlFormats/Drawing/ShapeEffects.cs:2476-2490 | OpenXmlFormats/Drawing/ShapeStyle.cs:65-79 | OpenXmlFormats/Drawing/ShapeStyle.cs:233-247 — there are 8 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 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Drawing/ShapeEffects.cs:777` 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, `OpenXmlFormats/Drawing/ShapeEffects.cs:774` calls `WriteAttribute`, `ToString` and `OpenXmlFormats/Drawing/ShapeEffects.cs:1683` 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.
D4 · Code Duplication · Duplicated block (14 lines × 5) · ×1
  • Duplicated block (14 lines × 5) OpenXmlFormats/Drawing/Chart/AreaChart.cs:312 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:312-325 | OpenXmlFormats/Drawing/Chart/BarChart.cs:579-592 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:230-243 | OpenXmlFormats/Drawing/Chart/LineChart.cs:116-129 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:118-131 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/BarChart.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 102 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.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (14–15 lines × 6) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) OpenXmlFormats/Drawing/Chart/AreaChart.cs:306 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:306-318 | OpenXmlFormats/Drawing/Chart/PieChart.cs:387-399 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:95-107 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/PieChart.cs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 42 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.
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 6) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (10–13 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×1
  • Duplicated block (12–13 lines × 3) OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1588 — OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1588-1599 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1777-1789 | OpenXmlFormats/Drawing/SpreadsheetDrawing.cs:1946-1957 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (11–12 lines × 25) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (12 lines × 8) · ×1
  • Duplicated block (12 lines × 8) OpenXmlFormats/Wordprocessing/CustomXml.cs:227 — OpenXmlFormats/Wordprocessing/CustomXml.cs:227-238 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1506-1517 | OpenXmlFormats/Wordprocessing/CustomXml.cs:2326-2337 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:220-231 | OpenXmlFormats/Wordprocessing/Run.cs:2416-2427 | OpenXmlFormats/Wordprocessing/Sdt.cs:213-224 | OpenXmlFormats/Wordprocessing/Sdt.cs:1190-1201 | OpenXmlFormats/Wordprocessing/Sdt.cs:1686-1697 — there are 8 copies across 4 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 8 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×1
  • Duplicated block (11 lines × 6) OpenXmlFormats/Wordprocessing/HdrFtr.cs:211 — OpenXmlFormats/Wordprocessing/HdrFtr.cs:211-221 | OpenXmlFormats/Wordprocessing/Run.cs:2407-2417 | OpenXmlFormats/Wordprocessing/Sdt.cs:1181-1191 | OpenXmlFormats/Wordprocessing/Sdt.cs:1677-1687 | OpenXmlFormats/Wordprocessing/Table.cs:337-347 | OpenXmlFormats/Wordprocessing/Table.cs:3592-3602 — there are 6 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Wordprocessing/HdrFtr.cs:211` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (4–11 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (10 lines × 9) · ×1
  • Duplicated block (10 lines × 9) OpenXmlFormats/Wordprocessing/CustomXml.cs:1022 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1022-1031 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:208-217 | OpenXmlFormats/Wordprocessing/Run.cs:2404-2413 | OpenXmlFormats/Wordprocessing/Sdt.cs:1178-1187 | OpenXmlFormats/Wordprocessing/Sdt.cs:1674-1683 | OpenXmlFormats/Wordprocessing/Sdt.cs:2444-2453 | OpenXmlFormats/Wordprocessing/Table.cs:334-343 | OpenXmlFormats/Wordprocessing/Table.cs:3589-3598 | OpenXmlFormats/Wordprocessing/Table.cs:5746-5755 — there are 9 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (7 lines × 7) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (6 lines × 7) · ×1
  • Duplicated block (6 lines × 7) OpenXmlFormats/Wordprocessing/CustomXml.cs:238 — OpenXmlFormats/Wordprocessing/CustomXml.cs:238-243 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1517-1522 | OpenXmlFormats/Wordprocessing/Paragraph.cs:356-361 | OpenXmlFormats/Wordprocessing/Run.cs:2427-2432 | OpenXmlFormats/Wordprocessing/Sdt.cs:1697-1702 | OpenXmlFormats/Wordprocessing/Table.cs:357-362 | OpenXmlFormats/Wordprocessing/Table.cs:5785-5790 — there are 7 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 7 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Wordprocessing/CustomXml.cs:238` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) OpenXmlFormats/Wordprocessing/CustomXml.cs:1534 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1534-1542 | OpenXmlFormats/Wordprocessing/CustomXml.cs:2346-2354 | OpenXmlFormats/Wordprocessing/Sdt.cs:251-259 | OpenXmlFormats/Wordprocessing/Sdt.cs:1652-1660 | OpenXmlFormats/Wordprocessing/Table.cs:372-380 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (8–9 lines × 4) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (7 lines × 14) · ×1
  • Duplicated block (7 lines × 14) OpenXmlFormats/Vml/Main.cs:4586 — OpenXmlFormats/Vml/Main.cs:4586-4592 | OpenXmlFormats/Wordprocessing/Document.cs:650-656 | OpenXmlFormats/Wordprocessing/FormField.cs:496-502 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:375-381 | OpenXmlFormats/Wordprocessing/Markup.cs:686-692 | OpenXmlFormats/Wordprocessing/Paragraph.cs:573-579 | OpenXmlFormats/Wordprocessing/Run.cs:257-263 | OpenXmlFormats/Wordprocessing/Run.cs:2591-2597 | OpenXmlFormats/Wordprocessing/Sdt.cs:1342-1348 | OpenXmlFormats/Wordprocessing/Sdt.cs:2084-2090 | OpenXmlFormats/Wordprocessing/Sdt.cs:2619-2625 | OpenXmlFormats/Wordprocessing/Table.cs:3309-3315 | OpenXmlFormats/Wordprocessing/Table.cs:3761-3767 | OpenXmlFormats/Wordprocessing/Table.cs:6044-6050 — there are 14 copies across 9 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 14 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Vml/Main.cs:4586` 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.
D4 · Code Duplication · Duplicated block (7 lines × 11) · ×1
  • Duplicated block (7 lines × 11) OpenXmlFormats/Drawing/Chart/AreaChart.cs:61 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:61-67 | OpenXmlFormats/Drawing/Chart/AreaChart.cs:623-629 | OpenXmlFormats/Drawing/Chart/BarChart.cs:73-79 | OpenXmlFormats/Drawing/Chart/BarChart.cs:1052-1058 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:497-503 | OpenXmlFormats/Drawing/Chart/LineChart.cs:565-571 | OpenXmlFormats/Drawing/Chart/LineChart.cs:827-833 | OpenXmlFormats/Drawing/Chart/LineChart.cs:1031-1037 | OpenXmlFormats/Drawing/Chart/RadarChart.cs:416-422 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:525-531 | OpenXmlFormats/Drawing/Chart/SurfaceChart.cs:169-175 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/BarChart.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 102 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 `OpenXmlFormats/Drawing/Chart/AreaChart.cs:61` 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 `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.
D4 · Code Duplication · Duplicated block (8 lines × 9) · ×1
  • Duplicated block (8 lines × 9) OpenXmlFormats/Wordprocessing/CustomXml.cs:1545 — OpenXmlFormats/Wordprocessing/CustomXml.cs:1545-1552 | OpenXmlFormats/Wordprocessing/CustomXml.cs:1886-1893 | OpenXmlFormats/Wordprocessing/CustomXml.cs:2357-2364 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:259-266 | OpenXmlFormats/Wordprocessing/Run.cs:2393-2400 | OpenXmlFormats/Wordprocessing/Sdt.cs:1167-1174 | OpenXmlFormats/Wordprocessing/Sdt.cs:1663-1670 | OpenXmlFormats/Wordprocessing/Sdt.cs:2433-2440 | OpenXmlFormats/Wordprocessing/Table.cs:3578-3585 — there are 9 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 9 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `OpenXmlFormats/Wordprocessing/CustomXml.cs:1545` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (6–7 lines × 3) · ×1
  • Duplicated block (6–7 lines × 3) REDACTED:256 — REDACTED:256-262 | OpenXmlFormats/Wordprocessing/Styles.cs:1805-1810 | OpenXmlFormats/Wordprocessing/Styles.cs:1936-1941 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:256` 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.
D4 · Code Duplication · Duplicated block (4–7 lines × 5) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) OpenXmlFormats/Drawing/Chart/AreaChart.cs:277 — OpenXmlFormats/Drawing/Chart/AreaChart.cs:277-282 | OpenXmlFormats/Drawing/Chart/BarChart.cs:540-545 | OpenXmlFormats/Drawing/Chart/BubbleChart.cs:191-196 | OpenXmlFormats/Drawing/Chart/LineChart.cs:79-84 | OpenXmlFormats/Drawing/Chart/ScatterChart.cs:81-86 — before extracting anything, compare `OpenXmlFormats/Drawing/Chart/AreaChart.cs` and `OpenXmlFormats/Drawing/Chart/BarChart.cs` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 102 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `OpenXmlFormats/Drawing/Chart/AreaChart.cs:285` calls `Add`, `Parse` and `OpenXmlFormats/Drawing/Chart/BarChart.cs:547` 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.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×1
  • Duplicated block (5 lines × 5) REDACTED:255 — REDACTED:255-259 | OpenXmlFormats/Wordprocessing/Styles.cs:1373-1377 | OpenXmlFormats/Wordprocessing/Styles.cs:1804-1808 | OpenXmlFormats/Wordprocessing/Styles.cs:1935-1939 | OpenXmlFormats/Wordprocessing/Styles.cs:2292-2296 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (4–5 lines × 4) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (3–5 lines × 3) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (6–10 lines × 2) · ×1
  • Duplicated block (6–10 lines × 2) main/Util/LittleEndian.cs:541 — main/Util/LittleEndian.cs:541-546 | main/Util/LittleEndian.cs:589-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.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (54 lines × 2) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (5 lines × 10) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (13 lines × 6) · ×1
  • 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.
D4 · Code Duplication · Duplicated block (5 lines × 21) · ×1
  • Duplicated block (5 lines × 21) OpenXmlFormats/Wordprocessing/HdrFtr.cs:745 — OpenXmlFormats/Wordprocessing/HdrFtr.cs:745-749 | OpenXmlFormats/Wordprocessing/HdrFtr.cs:1732-1736 | OpenXmlFormats/Wordprocessing/Numbering.cs:727-731 | OpenXmlFormats/Wordprocessing/PageSetup.cs:765-769 | OpenXmlFormats/Wordprocessing/Run.cs:942-946 | OpenXmlFormats/Wordprocessing/Run.cs:1833-1837 | OpenXmlFormats/Wordprocessing/Run.cs:1899-1903 | OpenXmlFormats/Wordprocessing/Sdt.cs:2847-2851 | OpenXmlFormats/Wordprocessing/Sdt.cs:2922-2926 | OpenXmlFormats/Wordprocessing/Sdt.cs:3311-3315 | OpenXmlFormats/Wordprocessing/Settings.cs:2475-2479 | OpenXmlFormats/Wordprocessing/Settings.cs:2889-2893 | OpenXmlFormats/Wordprocessing/Settings.cs:3300-3304 | OpenXmlFormats/Wordprocessing/Settings.cs:3368-3372 | OpenXmlFormats/Wordprocessing/Settings.cs:3436-3440 | OpenXmlFormats/Wordprocessing/Settings.cs:3703-3707 | OpenXmlFormats/Wordprocessing/Settings.cs:3932-3936 | OpenXmlFormats/Wordprocessing/Styles.cs:1226-1230 | OpenXmlFormats/Wordprocessing/Styles.cs:1751-1755 | OpenXmlFormats/Wordprocessing/Table.cs:958-962 | OpenXmlFormats/Wordprocessing/Table.cs:5132-5136 — there are 21 copies across 8 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 21 sites; resolving a subset leaves the remainder to drift apart. 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.
D4 · Code Duplication · Duplicated block (5 lines × 8) · ×1
  • Duplicated block (5 lines × 8) OpenXmlFormats/Wordprocessing/Numbering.cs:495 — OpenXmlFormats/Wordprocessing/Numbering.cs:495-499 | OpenXmlFormats/Wordprocessing/Numbering.cs:1212-1216 | OpenXmlFormats/Wordprocessing/Numbering.cs:1629-1633 | OpenXmlFormats/Wordprocessing/Run.cs:1615-1619 | OpenXmlFormats/Wordprocessing/Run.cs:1699-1703 | OpenXmlFormats/Wordprocessing/Run.cs:1767-1771 | OpenXmlFormats/Wordprocessing/Settings.cs:4600-4604 | OpenXmlFormats/Wordprocessing/Styles.cs:2181-2185 — there are 8 copies across 4 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 8 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Edited copy of a member (63 corresponding lines) · ×1
  • Edited copy of a member (63 corresponding lines) tools/XmlSerializationCodeGenerator/Form1.cs:447 — tools/XmlSerializationCodeGenerator/Form1.cs:447-510 | tools/XmlSerializationCodeGenerator/Form1.cs:512-574 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D5 · Coupling · Off the main sequence · ×1
  • 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.
IC1 · Incompleteness & stubs · Skeleton type · ×1
  • 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.
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 this 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` (or `ArgumentOutOfRangeException` for a bound) for what the condition actually tests, 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.
Minor — 526 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×268
  • 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.
  • + 243 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×150
  • redundant comment benchmarks/NPOI.Benchmarks/AssemblyInfo.cs:9 — "Setting ComVisible to false makes the types in this assembly not visible to COM components. If you need to access a type in this assembly from COM, set the ComV …" is Visual Studio AssemblyInfo template text, left in place. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment benchmarks/NPOI.Benchmarks/AssemblyInfo.cs:15 — "The following GUID is for the ID of the typelib if this project is exposed to COM." is Visual Studio AssemblyInfo template text, left in place. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment benchmarks/NPOI.Benchmarks/GenerateHugeStylesWorkbook.cs:127 — "adds <shadow val="..."/>" repeats the code it sits on: 3 of its 3 words (adds, shadow, val) are already in `ctFont.AddNewShadow().val = (i % 2 == 0); // adds <shadow val="..."/>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment benchmarks/NPOI.Benchmarks/GenerateHugeStylesWorkbook.cs:128 — "adds <condense val="..."/>" repeats the code it sits on: 3 of its 3 words (adds, condense, val) are already in `ctFont.AddNewCondense().val = (i % 3 == 0); // adds <condense val="..."/>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment benchmarks/NPOI.Benchmarks/GenerateHugeStylesWorkbook.cs:129 — "adds <extend val="..."/>" repeats the code it sits on: 3 of its 3 words (adds, extend, val) are already in `ctFont.AddNewExtend().val = (i % 5 == 0); // adds <extend val="..."/>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HPSF/Section.cs:884 — "Write the property list:" repeats the code it sits on: 3 of its 3 words (write, property, list) are already in `propertyListStream.WriteTo(out1);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/EventUserModel/HSSFEventFactory.cs:117 — "Create a new RecordStream and use that" repeats the code it sits on: 4 of its 5 words (create, new, record, stream) are already in `HSSFRecordStream recordStream = new HSSFRecordStream(in1);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/EventUserModel/HSSFRecordStream.cs:200 — "You can have Obj records between a DrawingRecord and its continue!" repeats the code it sits on: 4 of its 5 words (records, drawing, record, continue) are already in `lastDrawingRecord.ProcessContinueRecord(crec.Data);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/Model/DrawingManager.cs:102 — "Is the new shape id >= max shape id for dgg?" repeats the code it sits on: 5 of its 5 words (new, shape, id, max, dgg) are already in `if (newShapeId >= dgg.ShapeIdMax)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/Model/InternalChart.cs:684 — "Chart3DBarShape" repeats the code it sits on: 3 of its 3 words (chart, bar, shape) are already in `records.Add(CreateChart3DBarShapeRecord());`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/Model/InternalSheet.cs:509 — "'Page Settings Block'" repeats the code it sits on: 3 of its 3 words (page, settings, block) are already in `_psBlock = new PageSettingsBlock();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/Model/InternalWorkbook.cs:126 — "EscherBSERecord" repeats the code it sits on: 3 of its 3 words (escher, bse, record) are already in `private IList escherBSERecords ; // EscherBSERecord`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/Model/LinkTable.cs:484 — "create a ExternalNameRecord that will describe this name" repeats the code it sits on: 4 of its 5 words (create, external, name, record) are already in `ExternalNameRecord extNameRecord = new ExternalNameRecord();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/Record/Aggregates/ColumnInfoRecordsAggregate.cs:215 — 5 comments in this file only repeat the code they sit on (lines 215, 246, 356, 381, 385), for example "Find the start of the Group.". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/Record/Aggregates/RowRecordsAggregate.cs:391 — "Find the start of the Group." repeats the code it sits on: 3 of its 3 words (find, start, group) are already in `RowRecord rowRecord = this.GetRow(row);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/Record/Aggregates/RowRecordsAggregate.cs:436 — "Find the start of the Group." repeats the code it sits on: 3 of its 3 words (find, start, group) are already in `int startRow = FindStartOfRowOutlineGroup(rowNumber);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/Record/Aggregates/RowRecordsAggregate.cs:535 — "Find the start of the Group." repeats the code it sits on: 3 of its 3 words (find, start, group) are already in `int startIdx = FindStartOfRowOutlineGroup(rowNumber);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/Record/Aggregates/RowRecordsAggregate.cs:539 — "Find the end of the Group." repeats the code it sits on: 3 of its 3 words (find, end, group) are already in `int endIdx = FindEndOfRowOutlineGroup(rowNumber);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/Record/GutsRecord.cs:38 — "size of the row gutter to the left of the rows" repeats the code it sits on: 4 of its 5 words (row, gutter, left, rows) are already in `private short field_1_left_row_gutter; // size of the row gutter to the left of the rows`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/UserModel/HSSFAutoFilter.cs:63 — "look for the AutoFilterInfo Record" repeats the code it sits on: 4 of its 5 words (auto, filter, info, record) are already in `NPOI.HSSF.Record.Record record = sheet.Sheet.FindFirstRecordBySid(AutoFilterInfoRecord.sid);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/UserModel/HSSFSheet.cs:1579 — "Shift Merged Regions" repeats the code it sits on: 3 of its 3 words (shift, merged, regions) are already in `rowShifter.ShiftMergedRegions(startRow, endRow, n);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/UserModel/HSSFSheet.cs:1582 — "Shift Row Breaks" repeats the code it sits on: 3 of its 3 words (shift, row, breaks) are already in `_sheet.PageSettings.ShiftRowBreaks(startRow, endRow, n);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/UserModel/HSSFSheet.cs:3194 — "This is the picture ID property" repeats the code it sits on: 3 of its 3 words (picture, id, property) are already in `int pictureId = ((EscherSimpleProperty) eprop).PropertyValue;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/UserModel/HSSFSheet.cs:3224 — "This is the picture ID property" repeats the code it sits on: 3 of its 3 words (picture, id, property) are already in `int pictureId = ((EscherSimpleProperty)eprop).PropertyValue;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment main/HSSF/UserModel/HSSFWorkbook.cs:325 — "Convert all LabelRecord records to LabelSSTRecord" repeats the code it sits on: 4 of its 5 words (convert, label, record, records) are already in `ConvertLabelRecords(records, recOffset);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • + 125 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×40
  • Silent fallback default in catch main/DDF/DefaultEscherRecordFactory.cs:115 — `CreateRecord` swallows every exception into `return new UnknownEscherRecord();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch main/DDF/EscherTextboxRecord.cs:178 — `ToString` swallows every exception and sets `theDumpHex = "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/DDF/UnknownEscherRecord.cs:210 — `ToString` swallows every exception and sets `theDumpHex = "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/HPSF/PropertySet.cs:678 — `GetPropertyStringValue` swallows `UnsupportedEncodingException` into `return "";` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch main/HSSF/UserModel/HSSFShape.cs:412 — `RotationDegree` swallows `IOException` into `return 0;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • 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/POIFS/Crypt/Standard/StandardDecryptor.cs:206 — `EnsurePlainData` swallows every exception and sets `finalPlain = Array.Empty<byte>();` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • Silent fallback default in catch main/POIFS/FileSystem/EntryUtils.cs:265 — `AreDirectoriesIdentical` swallows `FileNotFoundException` 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 main/POIFS/FileSystem/NPOIFSStream.cs:363 — `MoveNext` swallows `IOException` 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 main/POIFS/Storage/BlockAllocationTableReader.cs:234 — `IsUsed` swallows `IndexOutOfRangeException` and returns `rval` still holding `false` — 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/Format/CellNumberStringMod.cs:84 — `Equals` 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 main/SS/Formula/Atp/NetworkdaysFunction.cs:82 — `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/Atp/RandBetween.cs:75 — `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/Atp/Switch.cs:26 — `Evaluate` swallows every exception into `return ErrorEval.NA;` — 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/WorkdayFunction.cs:76 — `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/Atp/WorkdayIntlFunction.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/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/DataValidationEvaluator.cs:488 — `IsValidNumericValue` swallows `FormatException` 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 main/SS/Formula/Eval/OperandResolver.cs:282 — `ParseDouble` swallows every exception into `return Double.NaN;` — 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/EvaluationConditionalFormatRule.cs:723 — `CheckFilter` 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 main/SS/Formula/Functions/AggregateFunction.cs:218 — `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/AggregateFunction.cs:279 — `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/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/Bin2Dec.cs:104 — `Evaluate` swallows `FormatException` into `return ErrorEval.NUM_ERROR;` — a data error becomes a silent behavior change with no trail. Log the failure or let validation throw.
  • + 15 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • 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 OpenXmlFormats/Presentation/CT_Slide.cs:47 — `element.LocalName == "cSld" && element.NamespaceURI == CT_Presentation.Namespace` appears character-identically in 2 files — OpenXmlFormats/Presentation/CT_Slide.cs, OpenXmlFormats/Presentation/CT_SlideLayout.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.
AX6 · Interface segregation · Fat interface · ×13
  • 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.
D17 · Explicit Debt · ObsoleteWithoutCallers · ×7
  • ObsoleteWithoutCallers main/HSSF/Record/RecordFactory.cs:474 — [Obsolete] AddAll
  • ObsoleteWithoutCallers main/HSSF/Record/RecordFactory.cs:629 — [Obsolete] CheckZeros
  • ObsoleteWithoutCallers main/HSSF/UserModel/HSSFRow.cs:664 — [Obsolete] FindFirstCell
  • ObsoleteWithoutCallers main/SS/Formula/Functions/Index.cs:196 — [Obsolete] GetValueFromArea
  • ObsoleteWithoutCallers main/SS/Util/CellRangeUtil.cs:297 — [Obsolete] ToArray
  • ObsoleteWithoutCallers ooxml/XSSF/Model/StylesTable.cs:770 — [Obsolete] NumberFormatSize
  • ObsoleteWithoutCallers ooxml/XSSF/UserModel/XSSFPictureData.cs:79 — [Obsolete] .ctor
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×4
  • Projects may be oversized for their cohesion main/NPOI.Core.csproj:1 — `NPOI.Core(net472)` overshoots its size bounds (213420 LoC, 1495 public types across 64 namespaces). 4 of 17 project(s) overshoot their size bounds, lowering Project Cohesion to 5.3/10. Size alone is no reason to split a project: where its type references show a separable part, a Split row names it.
  • Projects may be oversized for their cohesion OpenXmlFormats/NPOI.OpenXmlFormats.Core.csproj:1 — `NPOI.OpenXmlFormats.Core(net472)` overshoots its size bounds (164554 LoC, 1681 public types across 20 namespaces). 4 of 17 project(s) overshoot their size bounds, lowering Project Cohesion to 5.3/10. Size alone is no reason to split a project: where its type references show a separable part, a Split row names it.
  • Projects may be oversized for their cohesion ooxml/NPOI.OOXML.Core.csproj:1 — `NPOI.OOXML.Core(net472)` overshoots its size bounds (96004 LoC, 555 public types across 31 namespaces). 4 of 17 project(s) overshoot their size bounds, lowering Project Cohesion to 5.3/10. Size alone is no reason to split a project: where its type references show a separable part, a Split row names it.
  • Projects may be oversized for their cohesion scratchpad/HWPF/HWPF.csproj:1 — `HWPF` overshoots its size bounds (33213 LoC, 163 public types across 8 namespaces). 4 of 17 project(s) overshoot their size bounds, lowering Project Cohesion to 5.3/10. Size alone is no reason to split a project: where its type references show a separable part, a Split row names it.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 14 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 (+6 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.
D27 · Navigability · Pass-through layer · ×2
  • 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 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.
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 (37 single-owned of 976 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 976 of the 2131 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.
D18 · Solution Shape · Thin analysable surface across projects · ×1
  • 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.
D20 · ADR Quality · No ADRs found · ×1
  • 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 · Split NPOI.OOXML.Core(net472) · ×1
  • Split NPOI.OOXML.Core(net472) ooxml/NPOI.OOXML.Core.csproj:1 — `NPOI.OOXML.Core(net472)` overshoots its size bounds (96004 LoC, 555 public types across 31 namespaces). These parts reach the rest of the project only through its shared core (`(root)`), so they are the cleanest seams: `NPOI.POIFS` (45 types in 29 files): 0 of 212 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 0 times; `NPOI.XSLF` (9 types in 9 files): 1 of 210 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 96 times. Extract each into its own project.
D26 · Project Cohesion · Split NPOI.OpenXmlFormats.Core(net472) · ×1
  • Split NPOI.OpenXmlFormats.Core(net472) OpenXmlFormats/NPOI.OpenXmlFormats.Core.csproj:1 — `NPOI.OpenXmlFormats.Core(net472)` overshoots its size bounds (164554 LoC, 1681 public types across 20 namespaces). These parts reach the rest of the project only through its shared core (`(root)`), so they are the cleanest seams: `NPOI.OpenXmlFormats.Presentation` (7 types in 5 files): 0 of 24 of its type references cross into a sibling namespace, and the rest of the project uses it 0 times and it uses the rest 0 times. Extract each into its own project.
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 1401 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 1401 of the 2131 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • 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.
M3 · Folder & project structure · No tests/ separation · ×1
  • No tests/ separation — Tests aren't grouped in a dedicated test folder — the test surface isn't separable from production code at a glance.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation Directory.Packages.props:7 — `Directory.Packages.props` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
P6 · Release Hygiene · No changelog · ×1
  • 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.)
X5 · Nullable reference types · Nullable reference types not enabled everywhere · ×1
  • 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.
Minor — 120 finding(s)
D10 · Test Quality · Skipped (documented) · ×112
  • 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
  • + 87 more in this group — see findings.md.
D24 · Comment Value · doc comments repeat the names · ×7
  • doc comments repeat the names scratchpad/HWPF/HWPFDocument.cs:174 — 1 of 5 documented parameters and 0 of 14 summaries in `HWPF` only repeat the member or parameter name (e.g. "The directory." for `directory`). 2 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names main/Common/UserModel/Fonts/FontInfo.cs:83 — 407 of 2302 documented parameters and 407 of 3303 summaries in `NPOI.Core(net472)` only repeat the member or parameter name (e.g. "Sets the charset" for `SetCharset`). 206 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names ooxml/XDDF/UserModel/Chart/XDDFChart.cs:698 — 14 of 509 documented parameters and 32 of 968 summaries in `NPOI.OOXML.Core(net472)` only repeat the member or parameter name (e.g. "ChartFactory object" for `chartFactory`). 234 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names testcases/ooxml/SS/Formula/Functions/TestFloorCeilingMath.cs:31 — 0 of 2 documented parameters and 6 of 51 summaries in `NPOI.OOXML.TestCases.Core(net472)` only repeat the member or parameter name (e.g. "Testing FLOOR.MATH CEILING.MATH" for `TestFloorCeilingMath`). 2 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names openxml4Net/OPC/OPCPackage.cs:523 — 0 of 10 documented parameters and 0 of 11 summaries in `NPOI.OpenXml4Net.Core(net472)` only repeat the member or parameter name (e.g. "" for `filename`). 2 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names OpenXmlFormats/Wordprocessing/BaseTypes.cs:113 — 0 of 4 documented parameters and 5 of 309 summaries in `NPOI.OpenXmlFormats.Core(net472)` only repeat the member or parameter name (e.g. "True" for `True`). 3 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names REDACTED:389 — 2 of 24 documented parameters and 19 of 108 summaries in `NPOI.TestCases.Core(net472)` only repeat the member or parameter name (e.g. "Tests the exponential in sheet." for `TestExponentialInSheet`). 7 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
D10 · Test Quality · Mock framework · ×1
  • Mock framework: NSubstitute — NPOI.OOXML.TestCases.Core(net472) references NSubstitute.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-d2877fe4b57c455785e36aa82731674a/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-d2877fe4b57c455785e36aa82731674a/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude scratchpad/HWPF/Model/Types .181artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnuget—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 scan0—
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—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.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm . /tmp/codehealth-osv-sbom-6d0c722c5d2740ce8e8fb2cb5bb5de0c0artifacts/raw/osv-scanner.json

Run 01a1ce36-ce51-795e-8bd7-4214a40536d0 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md