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

antlr/antlr4

Measured 24 October 2026, 05:29 UTC, at code version 7d57703

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

Code coverage is not measured: .NET and JavaScript/TypeScript suite (CouldNotMeasureNoCollector, CouldNotMeasureNoRunner).

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 58out of 100 Adequate
CriticalWeakAdequateStrongExemplary
No change since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 172,173 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 1.5 person-years · Weakest lens: Production Readiness, 52

Findings by how serious they are

52 critical 767 serious 162 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 October 2026, 05:29 UTC

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

The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

74of 79 dimensions measured by tools. The other 5 are advisory notes from an AI model, which explain the code but don't count towards the score.
961of 981 findings point to an exact file and line, so you can open each one in the code. The other 20 concern the repository as a whole, such as missing documentation.
79dimensions across 6 lenses, read from 172,173 lines of product code in 1 project.
Chapters

Executive summary

antlr/antlr4 scores 58 out of 100 and is rated Adequate, while four of its six lenses score higher still: Architecture at 92, Maturity at 73, Performance at 70 and Security and Compliance at 63, all rated Adequate.

The score is lower than those four because the weakest lens counts most, and here that is Production Readiness, which scores 52 and is rated Adequate. Its Security & performance tooling dimension scores 0 out of 10, and until that reaches 4, Production Readiness can't be rated higher than Adequate. The first actions are to resolve the 1 Leaked secret finding(s) in REDACTED Scanning and to resolve the 3 FileScopedPragmaDisable finding(s) in Explicit Debt, and if Production Readiness rose to 70, the score would rise from 58 to about 63.

52 findings are critical: 19 in Static Analysis (SAST), 14 in Explicit Debt, 11 in Dependency Vulnerabilities, four in Secrets (history), two in IaC & Container Security, one in Project dependency cycles and one in REDACTED Scanning.

Watchdog couldn't measure 6 dimensions in this code, among them Test Reliability, Dependency Hygiene and Solution Shape, so they are left out of the score. The product code is 172,173 lines, which would take an estimated 1.5 person-years, around €220,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.
Production Readiness 52 · counts for 46%Code Health 58 · counts for 25%Security and Compliance 63 · counts for 14%Performance 70 · counts for 8%Maturity 73 · counts for 4%Architecture 92 · counts for 2%

If Production Readiness rose from 52 to 70, the lowest score rated Strong, the score would rise from 58 to about 63.

Code composition: what the lines of code are
Business logic 17%Supporting code 20%Tests 63%
New since the last survey: 7 findings

These 7 critical or serious findings weren't in the previous survey, on 10 October 2026.

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 190 findings

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

  • Test Quality · No assertions: testCharSet tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testCharSetRange tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testCharSetUnicodeBMPEscape tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testCharSetUnicodeBMPEscapeRange tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testCharSetUnicodeMultiplePropertyEscape tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testCharSetUnicodePropertyEscape tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testCharSetUnicodePropertyInvertEscape tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testCharSetUnicodePropertyOverlap tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testCharSetUnicodeSMPEscape tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testCharSetUnicodeSMPEscapeRange tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testDefaultMode tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testLexerIsntSetMultiCharString tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testMode tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testRange tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: testRangeOrRange tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java
  • Test Quality · No assertions: test2ModesInLexer tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: test3Alts tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testEOF tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testEOFInSet tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testLastValidBMPCharInSet tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testLexerEOF tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testLexerEOFInSet tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testLexerLoops tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testLexerNotSet tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testLexerNotSetWithRange tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testLexerNotSetWithRange2 tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testLexerRange tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testLexerTwoRules tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testNot tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testPEGAchillesHeel tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testRuleRef tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testSimpleLoop tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testSimpleNoBlock tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testWildcard tool-testsuite/test/org/antlr/v4/test/tool/TestATNDeserialization.java
  • Test Quality · No assertions: testAmbigAltChooseFirst tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testAmbigAltChooseFirst2 tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testAmbigAltChooseFirstWithFollowingToken tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testAmbigAltChooseFirstWithFollowingToken2 tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testArbitraryLeftPrefix tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testCommonLeftPrefix tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testMustTrackPreviousGoodAlt tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testMustTrackPreviousGoodAlt2 tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testMustTrackPreviousGoodAlt3 tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testPEGAchillesHeel tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testRecursiveLeftPrefix tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testSet tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testSimpleLoop tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testSimpleNoBlock tool-testsuite/test/org/antlr/v4/test/tool/TestATNInterpreter.java
  • Test Quality · No assertions: testCaseInsensitiveInLexerRule tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testEOFAtEndOfLineComment tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testEOFAtEndOfLineComment2 tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testEOFByItself tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testEOFInSetAtEndOfLineComment tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testEOFSuffixInFirstRule tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testEOFSuffixInSecondRule tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testGreedyBetweenRules tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerCaseInsensitive tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerCaseInsensitiveFragments tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerCaseInsensitiveWithDifferentCultures tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerEscapeInString tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerGreedyOptionalShouldWorkAsWeExpect tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerKeywordIDAmbiguity tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerLoops tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerNotBMPSetMatchesBMP tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerNotBMPSetMatchesSMP tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerNotBMPSetMatchesUnicodeSMP tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerNotSMPSetMatchesBMP tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerNotSMPSetMatchesSMP tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerNotSet tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerNotSetUnicodeBMP tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerNotSetUnicodeBMPMatchesSMP tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerRangeUnicodeBMPToSMP tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerRangeUnicodeSMP tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerRuleRef tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerSetUnicodeBMP tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerSetUnicodeSMP tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerTwoRules tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerWildcardExplicitNonGreedyPlusLoop tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerWildcardGreedyLoopByDefault tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerWildcardGreedyPlusLoopByDefault tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testLexerWildcardLoopExplicitNonGreedy tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testNonGreedyBetweenRules tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testNotImpliedCharactersWithEnabledCaseInsensitiveOption tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testRecursiveLexerRuleRef tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testRecursiveLexerRuleRefWithWildcard tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testShortLongRule tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testShortLongRule2 tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testWildOnEndFirstAlt tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testWildOnEndLastAlt tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testWildcardNonQuirkWhenSplitBetweenTwoRules tool-testsuite/test/org/antlr/v4/test/tool/TestATNLexerInterpreter.java
  • Test Quality · No assertions: testAorB tool-testsuite/test/org/antlr/v4/test/tool/TestATNParserPrediction.java
  • Test Quality · No assertions: testContinuePrediction tool-testsuite/test/org/antlr/v4/test/tool/TestATNParserPrediction.java
  • Test Quality · No assertions: testContinuePrediction2 tool-testsuite/test/org/antlr/v4/test/tool/TestATNParserPrediction.java
  • Test Quality · No assertions: testEmptyInput tool-testsuite/test/org/antlr/v4/test/tool/TestATNParserPrediction.java
  • Test Quality · No assertions: testLL1Ambig tool-testsuite/test/org/antlr/v4/test/tool/TestATNParserPrediction.java
  • Test Quality · No assertions: testLL2Ambig tool-testsuite/test/org/antlr/v4/test/tool/TestATNParserPrediction.java
  • Test Quality · No assertions: testOptionalRuleChasesGlobalFollow tool-testsuite/test/org/antlr/v4/test/tool/TestATNParserPrediction.java
  • Test Quality · No assertions: testPEGAchillesHeel tool-testsuite/test/org/antlr/v4/test/tool/TestATNParserPrediction.java
  • Test Quality · No assertions: testRecursiveLeftPrefix tool-testsuite/test/org/antlr/v4/test/tool/TestATNParserPrediction.java
  • Test Quality · No assertions: testRecursiveLeftPrefixWithAorABIssue tool-testsuite/test/org/antlr/v4/test/tool/TestATNParserPrediction.java
Rebuild cost: about €220,000 · Estimate
Cost to rebuild€74,000 to €370,000, for 1,231 to 3,924 hours of work, about 1.5 person-years for 1 to 3 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.8 at a score of 58. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 172,173 lines of product code
Comment linesThe estimate prices 161,593 lines. Comment lines count towards the size of 172,173 lines but aren't priced as work.

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

Top priorities

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

1
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Raises the score by about 5 points · Low effort · REDACTED Scanning
2
Resolve the 3 FileScopedPragmaDisable finding(s) in Explicit Debt — start with ArrayPredictionContext.cs, EmptyPredictionContext.cs, SingletonPredictionContext.cs.
Raises the score by about 3 points · Low effort · Explicit Debt
3
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Raises the score by about 5 points · Medium effort · Security & performance tooling

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €220,000 to build again, about 1.5 person-years of work. Its weakest lens is Production Readiness, at 52 (Adequate). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for low effort, because it clears the 1 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.

arch Antlr4 Antlr4

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.

223 modules, with 293 dependencies between them. 3 loops run through 21 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 183 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 runtime.JavaScript.src.antlr4.action.LexerAction2 runtime.JavaScript.src.antlr4.state.ATNState3 runtime.JavaScript.src.antlr4.transition.Transition4 runtime.Python3.src.antlr4.InputStream5 runtime.Python3.src.antlr4.PredictionContext6 runtime.Python3.src.antlr4.Token7 runtime.Python3.src.antlr4.atn.ATNState8 Antlr4.Runtime.Misc9 org.antlr.v4.runtime.dfa10 org.antlr.v4.runtime.tree11 runtime.JavaScript.src.antlr4.state.DecisionState12 runtime.Python3.src.antlr4.atn.ATNConfig13 runtime.Python3.src.antlr4.tree.Tree14 Antlr4.Runtime.Atn15 Antlr4.Runtime.Tree16 org.antlr.v4.runtime.atn17 runtime.Python3.src.antlr4.RuleContext18 runtime.Python3.src.antlr4.atn.ATNConfigSet19 Antlr4.Runtime20 org.antlr.v4.runtime21 runtime.Python3.src.antlr4.ParserRuleContext22 runtime.Python3.src.antlr4.Recognizer23 runtime.Python3.src.antlr4.atn.ATN24 runtime.Python3.src.antlr4.dfa.DFAState25 org.antlr.v4.runtime.misc26 runtime.Python3.src.antlr4.atn.LexerATNSimulator27 runtime.Python3.src.antlr4.error.Errors28 org.antlr.v4.codegen.model.decl29 org.antlr.v4.misc30 org.antlr.v4.tool.ast31 runtime.Python3.src.antlr4.Lexer32 org.antlr.v4.analysis33 org.antlr.v4.codegen.model34 org.antlr.v4.parse35 runtime.Python3.src.antlr4.Parser36 org.antlr.v4.codegen37 runtime.Python3.src.antlr4.atn.ParserATNSimulator38 org.antlr.v4.tool39 org.antlr.v440 org.antlr.v4.automata
1 runtime.JavaScript.src.antlr4.action.LexerAction
2 runtime.JavaScript.src.antlr4.state.ATNState
3 runtime.JavaScript.src.antlr4.transition.Transition
4 runtime.Python3.src.antlr4.InputStream
5 runtime.Python3.src.antlr4.PredictionContext
6 runtime.Python3.src.antlr4.Token
7 runtime.Python3.src.antlr4.atn.ATNState
8 Antlr4.Runtime.Misc3
9 org.antlr.v4.runtime.dfa42
10 org.antlr.v4.runtime.tree113
11 runtime.JavaScript.src.antlr4.state.DecisionState1
12 runtime.Python3.src.antlr4.atn.ATNConfig22
13 runtime.Python3.src.antlr4.tree.Tree2
14 Antlr4.Runtime.Atn1147
15 Antlr4.Runtime.Tree28
16 org.antlr.v4.runtime.atn94521
17 runtime.Python3.src.antlr4.RuleContext2
18 runtime.Python3.src.antlr4.atn.ATNConfigSet1
19 Antlr4.Runtime121515
20 org.antlr.v4.runtime6161622
21 runtime.Python3.src.antlr4.ParserRuleContext121
22 runtime.Python3.src.antlr4.Recognizer11
23 runtime.Python3.src.antlr4.atn.ATN21
24 runtime.Python3.src.antlr4.dfa.DFAState1
25 org.antlr.v4.runtime.misc12
26 runtime.Python3.src.antlr4.atn.LexerATNSimulator1111111
27 runtime.Python3.src.antlr4.error.Errors211
28 org.antlr.v4.codegen.model.decl24184
29 org.antlr.v4.misc3
30 org.antlr.v4.tool.ast1113
31 runtime.Python3.src.antlr4.Lexer1112
32 org.antlr.v4.analysis32562
33 org.antlr.v4.codegen.model31012238559
34 org.antlr.v4.parse1172
35 runtime.Python3.src.antlr4.Parser11211111
36 org.antlr.v4.codegen3615571182
37 runtime.Python3.src.antlr4.atn.ParserATNSimulator1211111111
38 org.antlr.v4.tool37177223116
39 org.antlr.v4157
40 org.antlr.v4.automata1531316
Uses a module listed above itPart of a loopThe module itself
1 runtime.JavaScript.src.antlr4.action.LexerAction2 runtime.JavaScript.src.antlr4.state.ATNState3 runtime.JavaScript.src.antlr4.transition.Transition4 runtime.Python3.src.antlr4.InputStream5 runtime.Python3.src.antlr4.PredictionContext6 runtime.Python3.src.antlr4.Token7 runtime.Python3.src.antlr4.atn.ATNState8 Antlr4.Runtime.Misc9 org.antlr.v4.runtime.dfa10 org.antlr.v4.runtime.tree11 runtime.JavaScript.src.antlr4.state.DecisionState12 runtime.Python3.src.antlr4.atn.ATNConfig13 runtime.Python3.src.antlr4.tree.Tree14 Antlr4.Runtime.Atn15 Antlr4.Runtime.Tree16 org.antlr.v4.runtime.atn17 runtime.Python3.src.antlr4.RuleContext18 runtime.Python3.src.antlr4.atn.ATNConfigSet19 Antlr4.Runtime20 org.antlr.v4.runtime21 runtime.Python3.src.antlr4.ParserRuleContext22 runtime.Python3.src.antlr4.Recognizer23 runtime.Python3.src.antlr4.atn.ATN24 runtime.Python3.src.antlr4.dfa.DFAState25 org.antlr.v4.runtime.misc26 runtime.Python3.src.antlr4.atn.LexerATNSimulator27 runtime.Python3.src.antlr4.error.Errors28 org.antlr.v4.codegen.model.decl29 org.antlr.v4.misc30 org.antlr.v4.tool.ast31 runtime.Python3.src.antlr4.Lexer32 org.antlr.v4.analysis33 org.antlr.v4.codegen.model34 org.antlr.v4.parse35 runtime.Python3.src.antlr4.Parser36 org.antlr.v4.codegen37 runtime.Python3.src.antlr4.atn.ParserATNSimulator38 org.antlr.v4.tool39 org.antlr.v440 org.antlr.v4.automataruntime.JavaScript.src.antlr4.action.LexerAction1runtime.JavaScript.src.antlr4.state.ATNState2runtime.JavaScript.src.antlr4.transition.Transition3runtime.Python3.src.antlr4.InputStream4runtime.Python3.src.antlr4.PredictionContext5runtime.Python3.src.antlr4.Token6runtime.Python3.src.antlr4.atn.ATNState7Antlr4.Runtime.Misc8org.antlr.v4.runtime.dfa9org.antlr.v4.runtime.tree10runtime.JavaScript.src.antlr4.state.DecisionState11runtime.Python3.src.antlr4.atn.ATNConfig12runtime.Python3.src.antlr4.tree.Tree13Antlr4.Runtime.Atn14Antlr4.Runtime.Tree15org.antlr.v4.runtime.atn16runtime.Python3.src.antlr4.RuleContext17runtime.Python3.src.antlr4.atn.ATNConfigSet18Antlr4.Runtime19org.antlr.v4.runtime20runtime.Python3.src.antlr4.ParserRuleContext21runtime.Python3.src.antlr4.Recognizer22runtime.Python3.src.antlr4.atn.ATN23runtime.Python3.src.antlr4.dfa.DFAState24org.antlr.v4.runtime.misc25runtime.Python3.src.antlr4.atn.LexerATNSimulator26runtime.Python3.src.antlr4.error.Errors27org.antlr.v4.codegen.model.decl28org.antlr.v4.misc29org.antlr.v4.tool.ast30runtime.Python3.src.antlr4.Lexer31org.antlr.v4.analysis32org.antlr.v4.codegen.model33org.antlr.v4.parse34runtime.Python3.src.antlr4.Parser35org.antlr.v4.codegen36runtime.Python3.src.antlr4.atn.ParserATNSimulator37org.antlr.v4.tool38org.antlr.v439org.antlr.v4.automata403421131222114728945212112151561616221211121112111111121124184311131112325623101223855911721121111136155711821211111111371772231161571531316+183 more modules (most-connected shown)

At a glance — Code Health · 58% · Adequate · gated by R1 ·

At a glance — Architecture · 92% · Adequate · gated by D26 ·

At a glance — Maturity · 73% · Adequate · gated by D34 ·

At a glance — Readiness · 52% · Adequate · gated by P3 ·

At a glance — Security · 63% · Adequate · gated by D30 ·

At a glance — Performance · 70% · Adequate ·

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 — Injection29High / Critical
A03:2025 — Software Supply Chain Failures19High / Critical
A07:2025 — Authentication Failures6High / Critical
A02:2025 — Security Misconfiguration6High / Critical

Roadmap

Immediately resolve the leaked REDACTED secret and address the 116 test cases lacking assertions, prioritizing files with syntax errors and high issue counts. Strengthen the build pipeline by integrating a SAST tool like SpotBugs or Semgrep to block security regressions, and migrate the remaining JavaScript files to TypeScript to improve type safety. Finally, clean up explicit project debt by resolving the NoWarnInCsproj findings in the test and core project files.

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

Do thisHelpsEffortDimension
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.+5.5 ptsLowREDACTED Scanning
Resolve the 3 FileScopedPragmaDisable finding(s) in Explicit Debt — start with ArrayPredictionContext.cs, EmptyPredictionContext.cs, SingletonPredictionContext.cs.+2.6 ptsLowExplicit Debt
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+5.1 ptsMediumSecurity & performance tooling
Migrate the remaining .js/.jsx files to TypeScript.+2.6 ptsMediumType Safety
Resolve the 11 NoWarnInCsproj finding(s) in Explicit Debt — start with Test.csproj (6), Antlr4.csproj (5).+2.6 ptsMediumExplicit Debt
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.+2.6 ptsMediumDeployment & Rollback
Resolve the 116 No assertions finding(s) in Test Quality — start with TestToolSyntaxErrors.java (45), TestSymbolIssues.java (25), TestATNConstruction.java (22).+4.1 ptsHighTest Quality
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with Test.csproj.+0.9 ptsLowPlatform End-of-Life

File quality

Per-file score 0–10 — a quality signature. Of 191 files carrying findings, judged against the Production bar: 3% slop · 64% mixed · 33% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopSecrets (history): High secret: REDACTED
REDACTED0.2SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.9SlopIaC & Container Security: High IaC: REDACTED
runtime/CSharp/tests/issue-3079/Test.csproj3.7SlopExplicit Debt: NoWarnInCsproj
runtime/CSharp/src/Antlr4.csproj3.9SlopExplicit Debt: NoWarnInCsproj
REDACTED4.4MixedREDACTED Scanning: Leaked secret: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): High: REDACTED
runtime/CSharp/src/Atn/ArrayPredictionContext.cs5.8MixedExplicit Debt: FileScopedPragmaDisable
runtime/CSharp/tests/issue-2693/Test.csproj5.8MixedExplicit Debt: NoWarnInCsproj
REDACTED5.8MixedSecrets (history): REDACTED: REDACTED
runtime/CSharp/src/Atn/ATNDeserializer.cs6.0MixedExplicit Debt: TodoComment
runtime/CSharp/src/Atn/PredictionContext.cs6.0MixedExplicit Debt: TodoComment
runtime/CSharp/src/Misc/RuleDependencyChecker.cs6.0MixedExplicit Debt: DeadPreprocessorBranch
runtime/CSharp/src/Atn/ParserATNSimulator.cs6.0MixedExplicit Debt: CommentedOutCode
runtime/CSharp/src/Atn/LexerATNSimulator.cs6.0MixedExplicit Debt: TodoComment
runtime/CSharp/src/Parser.cs6.0MixedExplicit Debt: TodoComment
runtime/Java/src/org/antlr/v4/runtime/Parser.java6.3MixedCognitive Complexity: Parser.consume (cognitive 21)
REDACTED6.4MixedStatic Analysis (SAST): Medium: REDACTED
runtime/CSharp/src/Lexer.cs6.7MixedExplicit Debt: TodoComment
runtime/CSharp/src/Atn/ATNConfig.cs6.7MixedExplicit Debt: CommentedOutCode

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

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

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

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 7

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 74 of 79 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 79 dimensions across the health lenses
D1D2D3D4D5D6D9D10D13D14D15D16D17D19D21D22D24D26D28D29D30D31D34D35D43D44AX10AX3AX4AX5AX6AX9GD1IC1M1M2M3M4P1P10P3P4P6PF1PF2PF3R1R10R2R3R4R5R6R7R8R9X1X12X13X14X15X16X17X18X19X20X21X22X23X24X25X26X27X28X29X3X30X32X4

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, 961 of 981 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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
Watchdog 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 · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a16c62-55e0-772a-9c8a-6c2a3fcd76eb.

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.

  • D4 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 67 duplicated block group(s) on this row were found in the languages this pass could tokenize, and they do NOT cover all of this repository's production source: .cpp (25,431 lines, 16% of production source) went unread, because no language model this pass could load exposed a clone-unit token stream for those file kinds. Duplication in that source is UNMEASURED — its absence from the count above is a gap in this analyzer's language coverage, not a finding that the code is free of duplication.
  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 783 test(s) behind this row are the ones the code-model census could read, and this repository also carries at least 27 test source file(s) (.py, .swift) that it cannot: it reads the test types the .java frontend declared, so a suite in any other language is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the jasmine run in runtime/JavaScript/ produced no per-test report (Error: Cannot find module 'runtime/JavaScript/dist/antlr4.node.cjs'). This is OUR limitation, not a defect in the repo — it is excluded from the score.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability for the jasmine suite in runtime/JavaScript/ was NOT MEASURED: the jasmine run in runtime/JavaScript/ produced no per-test report (Error: Cannot find module 'runtime/JavaScript/dist/antlr4.node.cjs'). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `dotnet list package` did not return usable output (restore or query failed); no outdated/vulnerable/deprecated data to assess. The tool said: `dotnet list package` exited 1 with no output.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Swift Package.swift/Package.resolved, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its SwiftPM dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Maven POM, but the licence verdict published here was taken over its NuGet package dependencies. Nothing was read about its Maven dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Cannot open project 'runtime/Cpp/runtime/antlr4cpp-vs2022.vcxproj' because the file extension '.vcxproj' is not associated with a language.
  • D17 Explicit Debt — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 39 deducted marker(s) and the 0.6/KLoC density on this row were taken over this repository's .NET projects ALONE: .java (45,438 lines, 28% of production source), .cpp (25,431 lines, 16% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 53 task marker(s) (TODO/FIXME/HACK/XXX) across 33 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
  • D18 Solution Shape — evaluation did not complete — Dimension evaluation failed — excluded from the score.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `runtime/Swift/Sources/Antlr4/atn/PredictionContext.swift` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • D39 IL Efficiency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. IL NOT MEASURED: the analyzer's own build of this repository failed for an ENVIRONMENT reason (exit 1) — MSBuild's engine or the CLR gave up, or our image does not carry the SDK band/targeting pack this repository needs. This is OUR limitation, not a defect in the repo, and it is not a statement that this repository fails to build. D18 owns the question of whether this repository builds; it was not answered here.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped.
  • 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.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
  • D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample — it is advisory and cannot weigh a comment against the precise code change it was written to explain.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • 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 REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (REDACTED, 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.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (5): D19, D21, D22, D24, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity6.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 6.7 / 10 · rule-coverage 100% · ceiling Prevented

128 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ATNDeserializer.deserialize at 54.

LL1Analyzer._LOOK (cyclomatic 22) · ×5runtime/Java/src/org/antlr/v4/runtime/atn/LL1Analyzer.java:137
ParserATNSimulator.closure_ (cyclomatic 17) · ×5runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1504
ParserATNSimulator.computeReachSet (cyclomatic 24) · ×4runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:747
ParseTreePatternMatcher.split (cyclomatic 21) · ×4runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePatternMatcher.java:412
LexerATNSimulator.closure (cyclomatic 18) · ×4runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java:403

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

What to do

  1. Bring the 8 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with ATNDeserializer.deserialize (cyclomatic 54), antlr.reduceToSingleOperationPerIndex (cyclomatic 40), GrammarTransformPipeline.integrateImportedGrammars (cyclomatic 39). — 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 8 together lifts Cyclomatic Complexity from 6.7 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity5.0 / 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.0 / 10 · rule-coverage 100% · ceiling Prevented

308 method(s) exceeded the cognitive complexity threshold of 15; the worst was GrammarTransformPipeline.integrateImportedGrammars at 125.

ParserATNSimulator.evalSemanticContext (cognitive 18) · ×6runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1353
LexerATNSimulator.getReachableConfigSet (cognitive 19) · ×5runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java:317
LexerATNSimulator.execATN (cognitive 16) · ×4runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java:165
RuleContext.toString (cognitive 16) · ×4runtime/Java/src/org/antlr/v4/runtime/RuleContext.java:224
ParserATNSimulator.closure_ (cognitive 44) · ×3runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1504

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

What to do

  1. Bring the 9 bodies over 60 down to 60 or less in Cognitive Complexity — start with GrammarTransformPipeline.integrateImportedGrammars (cognitive 125), ATNDeserializer.deserialize (cognitive 125), CodeGenPipeline.process (cognitive 85). — 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 9 together lifts Cognitive Complexity from 5.0 to about 6.1/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes8.5 / 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.5 / 10 · rule-coverage 100% · ceiling Prevented

61 god class(es) detected.

TooManyMethods: Grammar · ×38tool/src/org/antlr/v4/tool/Grammar.java:52
FileTooLong: src/parser_atn_simulator.dart · ×12runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart
ClassTooLong: ParserATNSimulator · ×8runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:250
MethodTooLong: ATNDeserializer.deserialize · ×3runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializer.java:51

What to do

  1. Resolve the 38 TooManyMethods finding(s) in God Classes — start with Grammar.java, Parser.java, Parser.swift. — One of this dimension's main actionable groups (38 warning-level).
  2. Resolve the 12 FileTooLong finding(s) in God Classes — start with parser_atn_simulator.dart, ParserATNSimulator.java, ParserATNSimulator.cs. — One of this dimension's main actionable groups (12 warning-level).
  3. Resolve the 8 ClassTooLong finding(s) in God Classes — start with ParserATNSimulator.java, parser_atn_simulator.go, Grammar.java. — One of this dimension's main actionable groups (8 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.8 / 10Stronggated by 67 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.8 / 10 · rule-coverage 100% · ceiling Verified

67 duplicated block group(s) detected. Measured on part of this repository only: .cpp (16% of production source) was not exposed to the token comparison, so duplication there is unmeasured and is not in this count.

Duplicated block (5 lines × 2) · ×11runtime/CSharp/src/Atn/ATNConfig.cs:198
Duplicated block (6 lines × 2) · ×8tool/src/org/antlr/v4/tool/GrammarTransformPipeline.java:306
Duplicated block (12 lines × 2) · ×6tool/src/org/antlr/v4/automata/ParserATNFactory.java:567
Duplicated block (7 lines × 2) · ×5runtime/CSharp/src/Atn/ParserATNSimulator.cs:1957
Duplicated block (9 lines × 2) · ×5runtime/Java/src/org/antlr/v4/runtime/misc/Array2DHashSet.java:423

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

What to do

  1. Resolve the 11 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with parser_atn_simulator.go (2), ATNConfig.cs, ATNConfig.java. — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 8 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with Alternative.java (2), GrammarTransformPipeline.java, UnbufferedCharStream.java. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 6 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with ParserATNFactory.java, deploy_to_website.py, semantic_context.go. — One of this dimension's main actionable groups (6 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

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

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

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 2 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.8 / 10 · rule-coverage 100% · ceiling Verified

2 of 160 classes have LCOM4 above 3.

Low cohesion: Parser (LCOM4 8) · ×2runtime/Java/src/org/antlr/v4/runtime/Parser.java:38

What to do

  1. Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with Parser.java, Parser.cs. — One of this dimension's main actionable groups (2 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

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

898 test methods: 898 unit, 0 integration, 0 BDD, 0 e2e. The Python suite contributes 54 test function(s) across 5 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality7.8 / 10Strong✓ 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 7.8 / 10 · rule-coverage 100% · ceiling Prevented

5 skipped (5 with a documented reason), 116 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 783 tests. Measured on the .java suite only — at least 27 test source file(s) (.py, .swift) went unread, so its test quality is unmeasured and is not in these counts.

No assertions: processWhenDependencyRemoved · ×116antlr4-maven-plugin/src/test/java/org/antlr/mojo/antlr4/Antlr4MojoTest.java:316
Skipped (documented): test_aex_bfx · ×5tool-testsuite/test/org/antlr/v4/test/tool/TestGraphNodes.java:396

What to do

  1. Resolve the 116 No assertions finding(s) in Test Quality — start with TestToolSyntaxErrors.java (45), TestSymbolIssues.java (25), TestATNConstruction.java (22). — One of this dimension's main actionable groups (116 warning-level).
  2. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D13 · REDACTED 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.

REDACTED

What to do

  1. Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Enforce REDACTED Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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 85 packages use a banned license. ★ DEPTH: this repository's MSBuild projects declare 1 direct `PackageReference`(s), and 83 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. ★ COVERAGE OF THIS VERDICT: it grades this repository's NuGet package dependencies and nothing else. The repository also declares a Swift Package.swift/Package.resolved and a Maven POM, and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Documented

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D16 · Bus Factor9.7 / 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.7 / 10 · rule-coverage 100% · ceiling Documented

1 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is runtime/CSharp/src/IVocabulary.cs. Counted over 30 of the 179 production source files in this repository: 83 are under the ~2,400-byte size floor this dimension measures over, and the remaining 66 have no attributable history left to measure.

Off-boarding risk: anonymized user #1

✓ On the Gold path — maintain.

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

D17 · Explicit Debt8.9 / 10Adequategated by 14 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 8.9 / 10 · rule-coverage 100% · ceiling Prevented

39 deducted debt markers + unmeasured dead symbols across 28476 LoC in the .NET projects (0.6/KLoC) → score 8.9. Dead code not measured: the solution did not load cleanly, so the reference search was skipped. Measured on the .NET source only: .java, .cpp (44% of production source) was not read, and carries at least 53 uncounted task marker(s) in 33 file(s).

NoWarnInCsproj · ×11runtime/CSharp/src/Antlr4.csproj:8
FileScopedPragmaDisable · ×3runtime/CSharp/src/Atn/ArrayPredictionContext.cs:13
TodoComment · ×15runtime/CSharp/src/Atn/ATNConfigSet.cs:35
CommentedOutCode · ×6runtime/CSharp/src/AntlrInputStream.cs:280
DeadPreprocessorBranch · ×4runtime/CSharp/src/Misc/RuleDependencyChecker.cs:234

What to do

  1. Resolve the 11 NoWarnInCsproj finding(s) in Explicit Debt — start with Test.csproj (6), Antlr4.csproj (5). — One of this dimension's main actionable groups (11 issue-level).
  2. Resolve the 3 FileScopedPragmaDisable finding(s) in Explicit Debt — start with ArrayPredictionContext.cs, EmptyPredictionContext.cs, SingletonPredictionContext.cs. — One of this dimension's main actionable groups (3 issue-level).
  3. Resolve the 15 TodoComment finding(s) in Explicit Debt — start with ParserATNSimulator.cs (3), ATNConfigSet.cs (2), ATNDeserializer.cs. — One of this dimension's main actionable groups (15 warning-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation QualityStronggated by 1 serious finding◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

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

The repository's README is a single root-level document that describes ANTLR v4 as the project (its purpose, versioning philosophy, and an overview of its features), while the directory READMEs describe their own directories rather than the repository. The architecture/design docs are separate markdown files at 46 entries, covering topics such as build systems, runtime targets, and integration with IDEs like ACE editors. XML-doc coverage is low (548/1546) but not itself a defect; it reflects documentation quality of the project's source rather than its own. The documentation is comprehensive and well-structured for a project that includes READMEs covering each language target (C++, C#, Dart, Go), architecture/design docs, and XML-doc coverage of antlr4-runtime tests. The READMEs are focused on their own directories: the ANTLR unit-test README describes what it contains and how to run its runtime test suite; the building-antlr README gives installation/build steps for each target language with a full build outline; the C++/C#/Dart/go-target docs describe getting started, usage examples, and cross-language testing. The architecture/design docs are separate and cover code-generation aspects, module relocation, and runtime-test-suite templates. All four ANTLR4 runtime test suite architecture docs appear in the XML coverage.

Low XML-doc coverage: Antlr4runtime/CSharp/src/Antlr4.csproj

What to do

  1. Resolve the 1 Low XML-doc coverage finding(s) in Documentation Quality — start with Antlr4.csproj. — One of this dimension's main actionable groups (1 warning-level).

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

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

0 naming inconsistencies across 200 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D22 · Internal API ConsistencyStronggated by 3 serious findings◐ Sampled · advisory

What it measures: Whether the internal API surface is consistent and coherent.

Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.

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

3 API inconsistencies across a 400-member sample of 190 exposed types.

Inconsistent naming convention for text accessors compared to other stream types. While `ANTLRInputStream` and `BufferedTokenStream` use `getText(Interval)` or similar explicit range-based methods, `Lexer` uses simple `getText()` and `setText()` which implies getting/setting the *current* token's text or internal buffer state without explicit context. This is a minor domain difference (Lexer state vs Stream content), but the lack of `getCharIndex`/`setCharIndex` symmetry with `getLine`/`setLine` is also notable. However, the most glaring inconsistency is between `Lexer.getText()` and `ANTLRInputStream.getText(Interval)`. `Lexer.getText()` likely returns the text of the *current* token being built, whereas `ANTLRInputStream` returns text from a range. This is a semantic difference, not a naming redundancy.
Inconsistent naming for string-to-ID lookup operations. `Parser` uses `getRuleIndex` to map a rule name string to an integer ID, while `Recognizer` uses `getTokenType` to map a token name string to an integer ID. While the return types are both `Int`, the method names suggest different domains (Rule vs Token). A more consistent pattern would be `getRuleIndex` vs `getTokenTypeIndex` or `getTokenType` vs `getRuleIndex` -> `getRuleIndex` vs `getTokenType` is acceptable if the domain is distinct, but `Recognizer` is the base class. `Parser` inherits from `Recognizer`. It is confusing that `Parser` overrides/defines `getRuleIndex` while the base `Recognizer` defines `getTokenType`. A user might expect `getRuleIndex` to be on `Recognizer` or `getTokenType` to be on `Parser` if they were symmetric. However, since Rules and Tokens are distinct concepts, this is likely intentional.
Excessive and confusingly similar overloads for string representation. `toStringTree` has 3 overloads with different parameter types (Parser, List<String?>, None). `toString` has 2 overloads (Recognizer, List<String>). This creates a high cognitive load for users trying to get a debug string. Specifically, `toStringTree()` vs `toStringTree([String]?)` vs `toStringTree(Parser)` are very similar in intent (debugging tree structure) but differ in how they resolve symbol names. Similarly, `toString(Recognizer)` vs `toString([String])` are ambiguous.

What to do

  1. Resolve the 1 Inconsistent naming convention for text accessors compared to other… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Inconsistent naming for string-to-ID lookup operations. `Parser` uses… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Excessive and confusingly similar overloads for string representation.… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).

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

D24 · Comment ValueExemplary◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on deterministically sampled inline comments with surrounding code; findings verified back to sampled comments by substring match. Advisory, sampled.

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

65 valuable / 0 redundant across 200 sampled comments.

✓ On the Gold path — maintain.

Detailed fixes: d24_recommendation.md.

D26 · Project Cohesion0.0 / 10Critical✓ 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, LLM-independent.

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

1 of 1 projects flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

D28 · Secrets (history)6.0 / 10Adequate✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

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

4 finding(s): 0 critical, 4 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED
REDACTED

What to do

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

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

D29 · Static Analysis (SAST)5.0 / 10Adequate✓ 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 5.0 / 10 · rule-coverage 100% · ceiling Documented

29 finding(s): 0 critical, 19 high, 10 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 6 file(s) — `runtime/Cpp/runtime/src/DefaultErrorStrategy.h` (line 24, line 28, line 40, …), `runtime/Cpp/runtime/src/Parser.h` (line 26, line 29, line 32, …), `runtime/Cpp/runtime/src/Vocabulary.h` (line 19, line 174), `runtime/Cpp/runtime/src/atn/ATNConfig.h` (lines 31–34, line 95, line 96, …), `runtime/Cpp/runtime/src/atn/ArrayPredictionContext.h` (line 20, lines 36–38, line 50), … (+1 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. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

D30 · Dependency Vulnerabilities1.8 / 10Critical✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

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

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

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 10 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (9), REDACTED. — One of this dimension's main actionable groups (10 issue-level).
  2. Resolve the 7 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6), REDACTED. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 1 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D31 · IaC & Container Security8.9 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

6 finding(s): 0 critical, 2 high, 4 medium, 0 low.

REDACTED
REDACTED

What to do

  1. Resolve the 2 High IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 4 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (4). — One of this dimension's main actionable groups (4 warning-level).

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

D34 · Knowledge Freshness0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

96 of 96 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is runtime/CSharp/src/Atn/ParserATNSimulator.cs. Counted over 96 of the 179 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×93runtime/CSharp/src/DefaultErrorStrategy.cs:1
Most significant orphaned file · ×3runtime/CSharp/src/Atn/ParserATNSimulator.cs:1
Dormant codebase

What to do

  1. Resolve the 93 Orphaned file finding(s) in Knowledge Freshness — start with DefaultErrorStrategy.cs, PredictionMode.cs, IntervalSet.cs. — One of this dimension's main actionable groups (93 recommendation-level).
  2. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with ParserATNSimulator.cs, Parser.cs, ATNDeserializer.cs. — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Dormant codebase finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

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.

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. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

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

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-Life6.0 / 10Adequate✓ 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 6.0 / 10 · rule-coverage 100% · ceiling Documented

1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 4 platform declaration(s) and 35 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.

End-of-life runtime: .NET net5.0runtime/CSharp/tests/issue-3079/Test.csproj:4

What to do

  1. Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with Test.csproj. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.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.
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 Antlr4.Runtime ↔ Antlr4.Runtime.Atn ↔ Antlr4.Runtime.Dfa ↔ Antlr4.Runtime.Misc ↔ Antlr4.Runtime.Tree ↔ Antlr4.Runtime.Tree.Pattern depend on each other. The lightest dependency in the cycle is Antlr4.Runtime → Antlr4.Runtime.Tree.Pattern (Antlr4.Runtime.Parser → Antlr4.Runtime.Tree.Pattern.ParseTreePattern, 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. — runtime/CSharp/src/Parser.cs:14

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

  • `ATNFactory` declares 26 abstract methods: `action`, `action`, `alt`, `block`, `charSetLiteral`, `createATN`, `epsilon`, `label`, `lexerAltCommands`, `lexerCallCommand`, `lexerCommand`, `listLabel`, `newState`, `optional`, `plus`, `range`, `rule`, `ruleRef`, `sempred`, `set`, `setCurrentOuterAlt`, `setCurrentRuleName`, `star`, `stringLiteral`, `tokenRef`, `wildcard`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 26 declarations carry 25 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 25 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. — tool/src/org/antlr/v4/automata/ATNFactory.java:19
  • `OutputModelFactory` declares 35 abstract methods: `action`, `alternative`, `epsilon`, `finishAlternative`, `getChoiceBlock`, `getCodeBlockLevel`, `getComplexChoiceBlock`, `getComplexEBNFBlock`, `getController`, `getCurrentBlock`, `getCurrentOuterMostAlt`, `getCurrentOuterMostAlternativeBlock`, `getCurrentRuleFunction`, `getEBNFBlock`, `getGenerator`, `getGrammar`, `getLL1ChoiceBlock`, `getLL1EBNFBlock`, `getLL1Test`, `getRoot`, `getTreeLevel`, `lexer`, `lexerFile`, `needsImplicitLabel`, `parser`, `parserFile`, `rule`, `rulePostamble`, `ruleRef`, `sempred`, `set`, `setController`, `stringRef`, `tokenRef`, `wildcard`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — tool/src/org/antlr/v4/codegen/OutputModelFactory.java:31

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

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.

IC1 · Incompleteness & stubs7.8 / 10Strong✓ 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.

  • Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored. (×4) — runtime/CSharp/src/Misc/RuleDependencyChecker.cs:234, runtime/CSharp/src/Misc/RuleDependencyChecker.cs:243, runtime/CSharp/src/Misc/RuleDependencyChecker.cs:254, …
  • A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers). (×28) — runtime/CSharp/src/Atn/ATNConfig.cs:216, runtime/CSharp/src/Atn/ATNConfigSet.cs:193, runtime/CSharp/src/Atn/ATNConfigSet.cs:195, …

What to do

  • 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)8.7 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation5.0 / 10Adequate✓ 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 structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

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

M4 · Documentation accuracy9.9 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

  • doc/ace-javascript-target.md links to `resources/worker-base.js`, but `doc/resources/worker-base.js` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — doc/ace-javascript-target.md:137
  • doc/javascript-target.md names Node.js 14, but the repository declares engines `>=16`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — doc/javascript-target.md:18
  • doc/releasing-antlr.md documents the environment variable `GPG_TTY`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — doc/releasing-antlr.md:208
  • doc/swift-target.md names `antlr4/runtime/Swift`, but no file or folder `antlr4/runtime/Swift` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — doc/swift-target.md:42

What to do

  • Reconcile the README with reality: doc/ace-javascript-target.md links to `resources/worker-base.js`, but `doc/resources/worker-base.js` does not exist; doc/javascript-target.md names Node.js 14, but the repository declares engines `>=16`; doc/releasing-antlr.md documents the environment variable `GPG_TTY`, but no code, script or configuration file names it; doc/swift-target.md names `antlr4/runtime/Swift`, but no file or folder `antlr4/runtime/Swift` exists.
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 & versioning6.0 / 10Adequate✓ Tool-verified

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

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language 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.

  • 200/221 types (90%) are public. For a library, every public type is a stability contract — make internal-by-default and expose only the intended API.

What to do

  • Make types internal by default; expose only the deliberate public API so internals can change without breaking consumers.
P3 · Security & performance tooling0.0 / 10Critical✓ 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.

  • No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 9984 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P6 · Release Hygiene8.0 / 10Strong✓ 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.

  • The changelog this check read carries 1 versioned entry, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.

What to do

  • Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
PF1 · Benchmark discipline6.0 / 10Adequate✓ 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.

  • No benchmark suite was found by the two searches this check runs. FIRST, a BenchmarkDotNet package reference in any project file — every project the workspace loaded, plus a walk of project files on disk that never loaded, because a benchmark suite is exactly the project a partial load drops. SECOND, a script harness: a file whose name contains `benchmark` and ends `.py`, `.sh`, `.ps1`, `.bash`, `.rb`, `.js` or `.mjs`, credited ONLY when this repository's CI text also mentions benchmarks — a harness no pipeline runs is read as a fixture, deliberately. Neither search can see a benchmark suite in another ecosystem's idiom (a Go `testing.B` file, a JMH or criterion project, a pytest-benchmark run), so this is 'no benchmark found by those two searches', not a verdict that the repository has none. Where code is performance-sensitive, a benchmark guards against silent regressions — but it's a bonus here, not a deduction.

What to do

  • Add a benchmarking harness for the hot paths and run it in CI to catch regressions (for .NET, a BenchmarkDotNet project with [MemoryDiagnoser] to track allocations).
PF2 · Allocation hygiene6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

  • No Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc, ValueTask or buffer-writer usage was found. If this code sits on a hot path, these reduce the GC pressure it creates — a bonus, not a requirement.

What to do

  • On hot paths, prefer Span<T>/ReadOnlySpan<T>, ArrayPool<T>, stackalloc and ValueTask to cut the allocations those paths would otherwise make.
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 the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

R1 · Type Safety0.1 / 10Critical✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

  • 2 typed · 146 plain JS — the untyped files are runtime/JavaScript/spec/BitSetSpec.js, runtime/JavaScript/spec/HashMapSpec.js, runtime/JavaScript/spec/HashSetSpec.js, runtime/JavaScript/spec/IntervalSetSpec.js, runtime/JavaScript/spec/helpers/Reporter.js, runtime/JavaScript/spec/imports/NodeCommonJSImportSpec.cjs (+140 more).

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication9.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.

  • runtime/JavaScript/src/antlr4/misc/HashMap.js:8 · runtime/JavaScript/src/antlr4/misc/HashSet.js:9 — the two spans are one implementation copied and then locally edited — 327 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — runtime/JavaScript/src/antlr4/misc/HashMap.js:8
  • runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1423 · runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1423
  • runtime/JavaScript/src/antlr4/action/LexerChannelAction.js:14 · runtime/JavaScript/src/antlr4/action/LexerTypeAction.js:13 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — runtime/JavaScript/src/antlr4/action/LexerChannelAction.js:14
  • runtime/JavaScript/src/antlr4/action/LexerModeAction.js:12 · runtime/JavaScript/src/antlr4/action/LexerPushModeAction.js:12 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — runtime/JavaScript/src/antlr4/action/LexerModeAction.js:12
  • runtime/JavaScript/src/antlr4/atn/SemanticContext.js:94 · runtime/JavaScript/src/antlr4/atn/SemanticContext.js:197 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — runtime/JavaScript/src/antlr4/atn/SemanticContext.js:94
  • runtime/JavaScript/src/antlr4/atn/SemanticContext.js:129 · runtime/JavaScript/src/antlr4/atn/SemanticContext.js:230 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — runtime/JavaScript/src/antlr4/atn/SemanticContext.js:129
  • runtime/JavaScript/src/antlr4/Recognizer.js:97 · runtime/JavaScript/src/antlr4/error/DefaultErrorStrategy.js:542 — the two spans are one implementation copied and then locally edited — 73 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — runtime/JavaScript/src/antlr4/Recognizer.js:97
  • runtime/JavaScript/src/antlr4/atn/PrecedencePredicate.js:27 · runtime/JavaScript/src/antlr4/atn/Predicate.js:18 — the two spans are one implementation copied and then locally edited — 63 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — runtime/JavaScript/src/antlr4/atn/PrecedencePredicate.js:27
  • runtime/JavaScript/src/antlr4/BufferedTokenStream.js:276 · runtime/JavaScript/src/antlr4/BufferedTokenStream.js:297 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — runtime/JavaScript/src/antlr4/BufferedTokenStream.js:276
  • runtime/JavaScript/src/antlr4/Parser.js:98 · runtime/JavaScript/src/antlr4/Parser.js:132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — runtime/JavaScript/src/antlr4/Parser.js:98
  • runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:217 · runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:265 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:217
  • runtime/JavaScript/src/antlr4/misc/IntervalSet.js:186 · runtime/JavaScript/src/antlr4/misc/IntervalSet.js:207 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — runtime/JavaScript/src/antlr4/misc/IntervalSet.js:186
  • runtime/JavaScript/src/antlr4/transition/ActionTransition.js:8 · runtime/JavaScript/src/antlr4/transition/PredicateTransition.js:10 — the two spans are one implementation copied and then locally edited — 55 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — runtime/JavaScript/src/antlr4/transition/ActionTransition.js:8
  • runtime/JavaScript/src/antlr4/BufferedTokenStream.js:160 · runtime/JavaScript/src/antlr4/BufferedTokenStream.js:361 — the two spans are one implementation copied and then locally edited — 71 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — runtime/JavaScript/src/antlr4/BufferedTokenStream.js:160
  • runtime/JavaScript/src/antlr4/Parser.js:508 · runtime/JavaScript/src/antlr4/atn/ATN.js:132 — the two spans are one implementation copied and then locally edited — 90 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — runtime/JavaScript/src/antlr4/Parser.js:508
  • runtime/JavaScript/src/antlr4/atn/ATNConfig.js:84 · runtime/JavaScript/src/antlr4/atn/ATNConfig.js:109 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — runtime/JavaScript/src/antlr4/atn/ATNConfig.js:84
  • runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1698 · runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1709 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1698
  • runtime/JavaScript/src/antlr4/atn/PredictionMode.js:436 · runtime/JavaScript/src/antlr4/atn/PredictionMode.js:543 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — runtime/JavaScript/src/antlr4/atn/PredictionMode.js:436
  • runtime/JavaScript/src/antlr4/atn/SemanticContext.js:162 · runtime/JavaScript/src/antlr4/atn/SemanticContext.js:261 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — runtime/JavaScript/src/antlr4/atn/SemanticContext.js:162
  • runtime/JavaScript/src/antlr4/context/ParserRuleContext.js:156 · runtime/JavaScript/src/antlr4/context/ParserRuleContext.js:177 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — runtime/JavaScript/src/antlr4/context/ParserRuleContext.js:156
  • runtime/JavaScript/src/antlr4/action/LexerChannelAction.js:29 · runtime/JavaScript/src/antlr4/action/LexerCustomAction.js:44 · runtime/JavaScript/src/antlr4/action/LexerIndexedCustomAction.js:48 · runtime/JavaScript/src/antlr4/action/LexerModeAction.js:27 · +3 more site(s) not listed — the 7 copies are spread across 7 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — runtime/JavaScript/src/antlr4/action/LexerChannelAction.js:29
  • runtime/JavaScript/src/antlr4/atn/SemanticContext.js:189 · runtime/JavaScript/src/antlr4/atn/SemanticContext.js:288 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — runtime/JavaScript/src/antlr4/atn/SemanticContext.js:189
  • runtime/JavaScript/src/antlr4/error/ErrorListener.js:12 · runtime/JavaScript/src/antlr4/error/ProxyErrorListener.js:17 — the two spans are one implementation copied and then locally edited — 65 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — runtime/JavaScript/src/antlr4/error/ErrorListener.js:12
  • runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:289 · runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:735 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:289
  • runtime/JavaScript/src/antlr4/utils/stringHashCode.js:34 · runtime/JavaScript/src/antlr4/utils/stringHashCode.js:55 — the two spans are one implementation copied and then locally edited — 119 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — runtime/JavaScript/src/antlr4/utils/stringHashCode.js:34

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R2 · Cyclomatic Complexity6.5 / 10Adequate✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • reduceToSingleOperationPerIndex has cyclomatic complexity 31 and cognitive complexity 58; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:215
  • mergeArrays has cyclomatic complexity 30 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:131
  • computeReachSet has cyclomatic complexity 26 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:698
  • execATN has cyclomatic complexity 22 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:395
  • _LOOK has cyclomatic complexity 22 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/atn/LL1Analyzer.js:113
  • canDropLoopEntryEdgeInLeftRecursiveRule has cyclomatic complexity 19 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1316
  • closure has cyclomatic complexity 18 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:354
  • mergeSingletons has cyclomatic complexity 18 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:292
  • closure_ has cyclomatic complexity 17 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1260
  • readEdges has cyclomatic complexity 17 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js:242
  • verifyATN has cyclomatic complexity 17 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js:463
  • getEpsilonTarget has cyclomatic complexity 15 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:409
  • execATNWithFullContext has cyclomatic complexity 14 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:589
  • getText has cyclomatic complexity 14 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:144
  • nextToken has cyclomatic complexity 13 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/Lexer.js:91
  • getCachedPredictionContext has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:33
  • toString has cyclomatic complexity 12 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/context/RuleContext.js:135
  • sync has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/error/DefaultErrorStrategy.js:197
  • closureCheckingStopState has cyclomatic complexity 11 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1211

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files7.6 / 10Strong✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js has 1656 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1
  • runtime/JavaScript/src/antlr4/error/DefaultErrorStrategy.js has 669 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — runtime/JavaScript/src/antlr4/error/DefaultErrorStrategy.js:1
  • runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js has 600 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:1
  • runtime/JavaScript/src/antlr4/Parser.js has 590 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — runtime/JavaScript/src/antlr4/Parser.js:1
  • runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js has 556 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js:1
  • runtime/JavaScript/spec/rewriter/TokenStreamRewriterSpec.js has 549 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — runtime/JavaScript/spec/rewriter/TokenStreamRewriterSpec.js:1
  • runtime/JavaScript/src/antlr4/atn/PredictionMode.js has 544 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — runtime/JavaScript/src/antlr4/atn/PredictionMode.js:1
  • runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js has 431 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:1
  • runtime/JavaScript/src/antlr4/TokenStreamRewriter.js has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage9.8 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×3) — runtime/JavaScript/src/antlr4/context/InterpreterRuleContext.js:1, runtime/JavaScript/src/antlr4/utils/titleCase.js:1, runtime/JavaScript/src/antlr4/TokenSource.js:1

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness8.6 / 10Strong✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code9.9 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 5 application, 66 tooling and 12 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (5 application, 66 tooling, 12 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×2) — runtime/JavaScript/src/antlr4/context/InterpreterRuleContext.js, runtime/JavaScript/src/antlr4/utils/titleCase.js
  • Nothing imports this binding — it is safe to review for removal. — runtime/JavaScript/src/antlr4/TokenSource.js:5

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene8.5 / 10Strong✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Declared in runtime/JavaScript/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

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 document10.0 / 10Exemplary○ Nothing flagged

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.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

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.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

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.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

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.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

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.

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 handling10.0 / 10Exemplary○ Nothing flagged

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.

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.

X32 · Type resolved by simple name across every loaded assembly10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a plugin lookup names the type it means — searching every assembly loaded into the process for a candidate whose SIMPLE name equals a string supplied at runtime, and taking the first one found, is decided by assembly LOAD ORDER rather than by this source, so the same name can resolve to a different type on the next run.

Method: Roslyn syntax only, no semantic model: every invocation of `First`/`FirstOrDefault`/`Single`/`SingleOrDefault` whose OWN expression subtree contains both a `GetAssemblies()` call and a `GetTypes()`/`GetExportedTypes()` call — a single-element pick out of every type loaded into the process. A nested selector in the same chain sees no `GetAssemblies()` in its own subtree and is outside the population, so one lookup counts once however many links its chain has. A finding additionally needs both remaining halves: the selector must be `First`/`FirstOrDefault` (`Single`/`SingleOrDefault` reports the ambiguity rather than resolving it, and is counted and never reported), and the chain must carry an `==` comparison of `<lambda parameter>.Name` against something that is not a literal. The receiver must be a plain identifier bound by one of the chain’s own lambdas, which places `assembly.GetName().Name == "X"` outside the rule by construction. One exemption: a `.Name` test joined by `&&` to a `FullName`/`AssemblyQualifiedName` test on the same identifier is spared; joined by `||` it is not. Deterministic, provable per finding. Advisory.

X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

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 Health58%Adequate — gated by R1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture92%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity73%Adequate — gated by D34Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness52%Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security63%Adequate — gated by D30Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance70%AdequateStrongest area.
Unscored — 3 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • SC1 Supply-chain hygiene — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X10 Duplicated predicate — 11 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 50 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • 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.
  • C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
  • D12 Dependency Hygiene — Dependency hygiene not measured
  • D18 Solution Shape — Dimension evaluation failed
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 reads resolved call sites in the languages it reads only — this repository's production source is .cpp, .dart, .go, .py, .swift, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing — The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — IL not measured — the analyzer's build of the target did not succeed
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • D8 Code Coverage — Coverage NOT MEASURED: the .NET half could not be measured — the repository wires up no coverage collector for `--collect:"XPlat Code Coverage"` to use; the JavaScript/TypeScript half could not be measured — runtime/JavaScript/ runs jasmine, which the coverage collector does not drive yet, so no lcov was produced — a gap in the analyzer, not something this repository is missing. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
  • DM1 Domain Modelling — applicable but not scored (1 of 2 signals for this style — below the bar we score at): 30 value object(s)
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, which this analysis does not build from source alone for this language. Reported as guidance rather than measured
  • 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 (JaCoCo XML — `mvn jacoco:report`) 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
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
  • X2 Cancellation propagation — no async method does work a token could cancel
  • X5 Nullable reference types — no NRT-eligible projects
  • 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 — 52 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · NoWarnInCsproj · ×11
  • NoWarnInCsproj runtime/CSharp/src/Antlr4.csproj:8 — 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 runtime/CSharp/src/Antlr4.csproj:8 — 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 runtime/CSharp/src/Antlr4.csproj:8 — CS1580 — 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 runtime/CSharp/src/Antlr4.csproj:8 — 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 runtime/CSharp/src/Antlr4.csproj:8 — NU5048 — 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.
  • NoWarnInCsproj runtime/CSharp/tests/issue-3079/Test.csproj:25 — 1701 — 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 runtime/CSharp/tests/issue-2693/Test.csproj:25 — 1701 — 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 runtime/CSharp/tests/issue-3079/Test.csproj:25 — 1702 — 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 runtime/CSharp/tests/issue-2693/Test.csproj:25 — 1702 — 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 runtime/CSharp/tests/issue-3079/Test.csproj:25 — 3021 — 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 runtime/CSharp/tests/issue-2693/Test.csproj:25 — 3021 — 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.
D30 · Dependency Vulnerabilities · High CVE · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · FileScopedPragmaDisable · ×3
  • FileScopedPragmaDisable runtime/CSharp/src/Atn/ArrayPredictionContext.cs:13 — #pragma warning disable 0659 // 'class' overrides Object.Equals(object o) but does not override Object.GetHashCode() — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
  • FileScopedPragmaDisable runtime/CSharp/src/Atn/EmptyPredictionContext.cs:12 — #pragma warning disable 0659 // 'class' overrides Object.Equals(object o) but does not override Object.GetHashCode() — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
  • FileScopedPragmaDisable runtime/CSharp/src/Atn/SingletonPredictionContext.cs:9 — #pragma warning disable 0659 // 'class' overrides Object.Equals(object o) but does not override Object.GetHashCode() — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
D28 · Secrets (history) · High secret · ×2
  • REDACTED
  • REDACTED
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×2
  • REDACTED
  • REDACTED
AX3 · Project dependency cycles · Namespace dependency cycle · ×1
  • Namespace dependency cycle runtime/CSharp/src/Parser.cs:14 — The namespaces Antlr4.Runtime ↔ Antlr4.Runtime.Atn ↔ Antlr4.Runtime.Dfa ↔ Antlr4.Runtime.Misc ↔ Antlr4.Runtime.Tree ↔ Antlr4.Runtime.Tree.Pattern depend on each other. The lightest dependency in the cycle is Antlr4.Runtime → Antlr4.Runtime.Tree.Pattern (Antlr4.Runtime.Parser → Antlr4.Runtime.Tree.Pattern.ParseTreePattern, 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.
D13 · REDACTED Scanning · Leaked secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×1
  • REDACTED
Serious — 767 finding(s)
D10 · Test Quality · No assertions · ×116
  • No assertions: processWhenDependencyRemoved antlr4-maven-plugin/src/test/java/org/antlr/mojo/antlr4/Antlr4MojoTest.java:316 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testA tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:34 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAB tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:45 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testABorCD tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:263 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAOptional tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:326 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAStar tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:473 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAorB tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:57 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAorBoptional tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:339 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAorBorEmptyPlus tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:440 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAorBplus tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:422 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAorBstar tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:512 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAorBthenC tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:368 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAorEpsilon tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:312 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testAplus tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:380 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testEmptyOrEmpty tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:459 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testFollow tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:298 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testForRepeatedTransitionsToStopState tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:588 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testNestedAstar tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:489 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testPredicatedAorB tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:531 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testSetAorB tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:72 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testSetAorBoptional tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:355 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testStringLiteralInParser tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:251 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testbA tool-testsuite/test/org/antlr/v4/test/tool/TestATNConstruction.java:279 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testEmptyActions tool-testsuite/test/org/antlr/v4/test/tool/TestActionTranslation.java:219 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: testBadInlineActions tool-testsuite/test/org/antlr/v4/test/tool/TestAttributeChecks.java:221 — This method's body runs code, and no assertion was recognised in it. Recognised: JUnit's assertion methods (assertEquals, assertTrue, assertInstanceOf, assertThrows, assertThrowsExactly, assertTimeoutPreemptively, assertAll and the rest of JUnit 5's list), assertThat (AssertJ, Hamcrest, Truth), fail, Mockito's verify and the `assert` statement, in the test body and in helper methods of the test's own class or an in-repository base class, followed three calls deep. Verification through a helper on another object or in another class, through a custom matcher library, or through a harness that fails by throwing under some other name is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • + 91 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×38
  • TooManyMethods: Grammar tool/src/org/antlr/v4/tool/Grammar.java:52 — TooManyMethods — 85 methods. The bar is 30 methods; this is 55 over it, 2.83× 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: Parser runtime/Java/src/org/antlr/v4/runtime/Parser.java:38 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Parser runtime/Swift/Sources/Antlr4/Parser.swift:28 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.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: TreeViewer tool/src/org/antlr/v4/gui/TreeViewer.java:53 — TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× 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: Parser runtime/Dart/lib/src/parser.dart:24 — TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× 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: ParserATNSimulator runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:250 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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: ParserATNSimulator runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:238 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.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: BaseParser runtime/Go/antlr/v4/parser.go:35 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.53× 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: ParserATNSimulator runtime/CSharp/src/Atn/ParserATNSimulator.cs — TooManyMethods — 751 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ParserATNSimulator runtime/Go/antlr/v4/parser_atn_simulator.go:35 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ParserATNFactory tool/src/org/antlr/v4/automata/ParserATNFactory.java:74 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ParserATNSimulator runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:33 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Parser runtime/Python3/src/antlr4/Parser.py:47 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.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: ParserATNSimulator runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:257 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.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: BasicSemanticChecks tool/src/org/antlr/v4/semantics/BasicSemanticChecks.java:60 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.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: ParserATNSimulator runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:261 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.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: Lexer runtime/Java/src/org/antlr/v4/runtime/Lexer.java:22 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.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: Lexer runtime/Swift/Sources/Antlr4/Lexer.swift:17 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.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: Parser runtime/JavaScript/src/antlr4/Parser.js:15 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.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: IntervalSet runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:32 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.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: BitSet runtime/Swift/Sources/Antlr4/misc/BitSet.swift:44 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.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: Tool tool/src/org/antlr/v4/Tool.java:62 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.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: TokenStreamRewriter runtime/Java/src/org/antlr/v4/runtime/TokenStreamRewriter.java:91 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.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: IntervalSet runtime/CSharp/src/Misc/IntervalSet.cs — TooManyMethods — 384 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 30 methods; this is 7 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.
  • TooManyMethods: Parser runtime/CSharp/src/Parser.cs — TooManyMethods — 379 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 30 methods; this is 7 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.
  • + 13 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×15
  • TodoComment runtime/CSharp/src/Atn/ATNConfigSet.cs:35 — // TODO: these fields make me pretty uncomfortable but nice to pack up info together, saves recomputation — 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 runtime/CSharp/src/Atn/ATNConfigSet.cs:36 — // TODO: can we track conflicts as they are added to save scanning configs later? — 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 runtime/CSharp/src/Atn/ATNDeserializer.cs:804 — // TODO: not yet implemented — 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 runtime/CSharp/src/Atn/LexerATNConfig.cs:23 — // TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment runtime/CSharp/src/Atn/LexerATNSimulator.cs:537 — // TODO: if the entry rule is invoked recursively, some — 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 runtime/CSharp/src/Atn/ParserATNSimulator.cs:1281 — // // Optimize away p||p and p&&p TODO: optimize() was a no-op — 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 runtime/CSharp/src/Atn/ParserATNSimulator.cs:1517 — /* TODO: If we are doing predicates, there is no point in pursuing — 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 runtime/CSharp/src/Atn/ParserATNSimulator.cs:1660 — // TODO: can remove? only care when we add to set per middle of this method — 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 runtime/CSharp/src/Atn/PredictionContext.cs:330 — // TODO: track whether this is possible above during merge sort for speed — 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 runtime/CSharp/src/Atn/ProfilingATNSimulator.cs:144 — // TODO: does not handle delayed errors per getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule() — 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 runtime/CSharp/src/Atn/SetTransition.cs:21 — // TODO (sam): should we really allow null here? — 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 runtime/CSharp/src/Dfa/DFAState.cs:142 — // TODO (sam): what to do when configs==null? — 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 runtime/CSharp/src/Lexer.cs:634 — // TODO: Do we lose character or line position information? — 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 runtime/CSharp/src/Parser.cs:973 — // TODO: useful in parser? — 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 runtime/CSharp/src/Tree/Xpath/XPath.cs:90 — // TODO: check for invalid token/rule names, bad syntax — 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.
D3 · God Classes · FileTooLong · ×12
  • FileTooLong: src/parser_atn_simulator.dart runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart — FileTooLong — 1009 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 509 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: atn/ParserATNSimulator.java runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java — FileTooLong — 776 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: ParserATNSimulator (250-2189). The bar is 500 significant lines; this is 276 over it, 1.55× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Atn/ParserATNSimulator.cs runtime/CSharp/src/Atn/ParserATNSimulator.cs — FileTooLong — 757 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 257 over it, 1.51× 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: v4/parser_atn_simulator.go runtime/Go/antlr/v4/parser_atn_simulator.go — FileTooLong — 757 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: ParserATNSimulator (44 blocks, 35-1666). The bar is 500 significant lines; this is 257 over it, 1.51× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: atn/ParserATNSimulator.js runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js — FileTooLong — 723 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 223 over it, 1.45× 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: atn/ParserATNSimulator.swift runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift — FileTooLong — 697 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 197 over it, 1.39× 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: atn/ParserATNSimulator.py runtime/Python3/src/antlr4/atn/ParserATNSimulator.py — FileTooLong — 695 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 195 over it, 1.39× 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: tool/Grammar.java tool/src/org/antlr/v4/tool/Grammar.java — FileTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: Grammar (52-1367). The bar is 500 significant lines; this is 181 over it, 1.36× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Atn/ATNDeserializer.cs runtime/CSharp/src/Atn/ATNDeserializer.cs — FileTooLong — 598 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 98 over it, 1.20× 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: v4/Tool.java tool/src/org/antlr/v4/Tool.java — FileTooLong — 582 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: Tool (62-969). The bar is 500 significant lines; this is 82 over it, 1.16× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: automata/LexerATNFactory.java tool/src/org/antlr/v4/automata/LexerATNFactory.java — FileTooLong — 549 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: LexerATNFactory (38-817). The bar is 500 significant lines; this is 49 over it, 1.10× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: gui/TreeViewer.java tool/src/org/antlr/v4/gui/TreeViewer.java — FileTooLong — 536 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: TreeViewer (53-862). The bar is 500 significant lines; this is 36 over it, 1.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×11
  • Duplicated block (5 lines × 2) runtime/CSharp/src/Atn/ATNConfig.cs:198 — runtime/CSharp/src/Atn/ATNConfig.cs:198-202 | runtime/CSharp/src/Atn/LexerATNConfig.cs:78-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `runtime/CSharp/src/Atn/LexerATNConfig.cs:83` calls `Update` and `runtime/CSharp/src/Atn/ATNConfig.cs:203` 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) runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java:181 — runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java:181-185 | runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNConfig.java:74-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNConfig.java:79` calls `update` and `runtime/Java/src/org/antlr/v4/runtime/atn/ATNConfig.java:186` 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) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:2127 — runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:2127-2131 | runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:2136-2140 — both copies are in the same file, so extract the 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) tool/src/org/antlr/v4/codegen/model/ElementFrequenciesVisitor.java:217 — tool/src/org/antlr/v4/codegen/model/ElementFrequenciesVisitor.java:217-221 | tool/src/org/antlr/v4/codegen/model/ElementFrequenciesVisitor.java:260-264 — both copies are in the same file, so extract the 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) runtime/CSharp/src/Atn/LexerATNSimulator.cs:108 — runtime/CSharp/src/Atn/LexerATNSimulator.cs:108-112 | runtime/CSharp/src/Atn/ParserATNSimulator.cs:298-302 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 (5 lines × 2) runtime/CSharp/src/Atn/LexerModeAction.cs:100 — runtime/CSharp/src/Atn/LexerModeAction.cs:100-104 | runtime/CSharp/src/Atn/LexerPushModeAction.cs:99-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java:132 — runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java:132-136 | runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:307-311 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) tool/src/org/antlr/v4/codegen/model/RuleFunction.java:300 — tool/src/org/antlr/v4/codegen/model/RuleFunction.java:300-304 | tool/src/org/antlr/v4/codegen/model/decl/CodeBlock.java:36-40 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) runtime/Java/src/org/antlr/v4/runtime/RuleContext.java:218 — runtime/Java/src/org/antlr/v4/runtime/RuleContext.java:218-222 | runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `recog` to `Recognizer<?,?>` in one and `Parser` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) runtime/Go/antlr/v4/parser_atn_simulator.go:1015 — runtime/Go/antlr/v4/parser_atn_simulator.go:1015-1019 | runtime/Go/antlr/v4/parser_atn_simulator.go:1068-1072 — both copies are in the same file, so extract the 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 `runtime/Go/antlr/v4/parser_atn_simulator.go:1015` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) runtime/Go/antlr/v4/parser_atn_simulator.go:1629 — runtime/Go/antlr/v4/parser_atn_simulator.go:1629-1633 | runtime/Go/antlr/v4/parser_atn_simulator.go:1641-1645 — both copies are in the same file, so extract the 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 `runtime/Go/antlr/v4/parser_atn_simulator.go:1629` 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.
D3 · God Classes · ClassTooLong · ×8
  • ClassTooLong: ParserATNSimulator runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:250 — ClassTooLong — 764 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 364 over it, 1.91× 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: ParserATNSimulator runtime/Go/antlr/v4/parser_atn_simulator.go:35 — ClassTooLong — 726 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods, 44 blocks, lines 35-1666. The bar is 400 significant lines; this is 326 over it, 1.82× 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: Grammar tool/src/org/antlr/v4/tool/Grammar.java:52 — ClassTooLong — 639 significant lines (blank, comment-only and punctuation-only lines excluded), 85 methods. The bar is 400 significant lines; this is 239 over it, 1.60× 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: ATNDeserializer runtime/CSharp/src/Atn/ATNDeserializer.cs — ClassTooLong — 591 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 191 over it, 1.48× 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: Tool tool/src/org/antlr/v4/Tool.java:62 — ClassTooLong — 530 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 130 over it, 1.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.
  • ClassTooLong: LexerATNFactory tool/src/org/antlr/v4/automata/LexerATNFactory.java:38 — ClassTooLong — 521 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 121 over it, 1.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.
  • ClassTooLong: TreeViewer tool/src/org/antlr/v4/gui/TreeViewer.java:53 — ClassTooLong — 493 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 400 significant lines; this is 93 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: ParserATNFactory tool/src/org/antlr/v4/automata/ParserATNFactory.java:74 — ClassTooLong — 405 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 5 over it, 1.01× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×8
  • Duplicated block (6 lines × 2) tool/src/org/antlr/v4/tool/GrammarTransformPipeline.java:306 — tool/src/org/antlr/v4/tool/GrammarTransformPipeline.java:306-311 | tool/src/org/antlr/v4/tool/GrammarTransformPipeline.java:328-333 — both copies are in the same file, so extract the 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 `tool/src/org/antlr/v4/tool/GrammarTransformPipeline.java:306` 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) runtime/Java/src/org/antlr/v4/runtime/UnbufferedCharStream.java:146 — runtime/Java/src/org/antlr/v4/runtime/UnbufferedCharStream.java:146-151 | runtime/Java/src/org/antlr/v4/runtime/UnbufferedTokenStream.java:161-166 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) runtime/Java/src/org/antlr/v4/runtime/atn/LexerModeAction.java:69 — runtime/Java/src/org/antlr/v4/runtime/atn/LexerModeAction.java:69-74 | runtime/Java/src/org/antlr/v4/runtime/atn/LexerPushModeAction.java:69-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 both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) tool/src/org/antlr/v4/tool/Alternative.java:117 — tool/src/org/antlr/v4/tool/Alternative.java:117-122 | tool/src/org/antlr/v4/tool/Rule.java:276-281 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) tool/src/org/antlr/v4/tool/Alternative.java:109 — tool/src/org/antlr/v4/tool/Alternative.java:109-114 | tool/src/org/antlr/v4/tool/Rule.java:268-273 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) runtime/Go/antlr/v4/semantic_context.go:271 — runtime/Go/antlr/v4/semantic_context.go:271-277 | runtime/Go/antlr/v4/semantic_context.go:418-423 — both copies are in the same file, so extract the 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 `runtime/Go/antlr/v4/semantic_context.go:271` 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) REDACTED:223 — REDACTED:223-228 | REDACTED:238-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:244` calls `WriteString`, `Itoa` and `REDACTED:229` 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) runtime/Swift/Sources/Antlr4/atn/LexerATNSimulator.swift:131 — runtime/Swift/Sources/Antlr4/atn/LexerATNSimulator.swift:131-136 | runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:303-308 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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.
D30 · Dependency Vulnerabilities · Medium CVE · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · CommentedOutCode · ×6
  • CommentedOutCode runtime/CSharp/src/AntlrInputStream.cs:280 — 3 consecutive commented-code lines
  • CommentedOutCode runtime/CSharp/src/Atn/ArrayPredictionContext.cs:69 — 3 consecutive commented-code lines
  • CommentedOutCode runtime/CSharp/src/Atn/ParserATNSimulator.cs:286 — 3 consecutive commented-code lines
  • CommentedOutCode runtime/CSharp/src/Atn/ParserATNSimulator.cs:1282 — 3 consecutive commented-code lines
  • CommentedOutCode runtime/CSharp/src/Atn/ATNConfig.cs:215 — 4 consecutive commented-code lines
  • CommentedOutCode runtime/CSharp/src/ParserRuleContext.cs:208 — 4 consecutive commented-code lines
D2 · Cognitive Complexity · ParserATNSimulator.evalSemanticContext (cognitive 18) · ×6
  • ParserATNSimulator.evalSemanticContext (cognitive 18) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1353 — ParserATNSimulator.evalSemanticContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserATNSimulator.evalSemanticContext (cognitive 18) runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:1069 — ParserATNSimulator.evalSemanticContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserATNSimulator.evalSemanticContext (cognitive 18) runtime/Go/antlr/v4/parser_atn_simulator.go:961 — ParserATNSimulator.evalSemanticContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserATNSimulator.evalSemanticContext (cognitive 18) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:1243 — ParserATNSimulator.evalSemanticContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserATNSimulator.evalSemanticContext (cognitive 18) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:1392 — ParserATNSimulator.evalSemanticContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserATNSimulator.evalSemanticContext (cognitive 18) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1171 — ParserATNSimulator.evalSemanticContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×6
  • Duplicated block (12 lines × 2) tool/src/org/antlr/v4/automata/ParserATNFactory.java:567 — tool/src/org/antlr/v4/automata/ParserATNFactory.java:567-578 | tool/src/org/antlr/v4/automata/ParserATNFactory.java:615-626 — both copies are in the same file, so extract the 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 `tool/src/org/antlr/v4/automata/ParserATNFactory.java:567` 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) scripts/deploy_to_website.py:22 — scripts/deploy_to_website.py:22-33 | scripts/update_antlr_version.py:44-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) runtime/Go/antlr/v4/semantic_context.go:210 — runtime/Go/antlr/v4/semantic_context.go:210-221 | runtime/Go/antlr/v4/semantic_context.go:359-370 — both copies are in the same file, so extract the 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 `runtime/Go/antlr/v4/semantic_context.go:210` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) runtime/Swift/Sources/Antlr4/misc/BitSet.swift:706 — runtime/Swift/Sources/Antlr4/misc/BitSet.swift:706-717 | runtime/Swift/Sources/Antlr4/misc/BitSet.swift:748-759 — both copies are in the same file, so extract the 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 `runtime/Swift/Sources/Antlr4/misc/BitSet.swift:706` 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) runtime/Dart/lib/src/atn/src/semantic_context.dart:222 — runtime/Dart/lib/src/atn/src/semantic_context.dart:222-233 | runtime/Dart/lib/src/atn/src/semantic_context.dart:326-337 — both copies are in the same file, so extract the 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) runtime/Dart/lib/src/interval_set.dart:607 — runtime/Dart/lib/src/interval_set.dart:607-618 | runtime/Dart/lib/src/interval_set.dart:621-632 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D1 · Cyclomatic Complexity · LL1Analyzer._LOOK (cyclomatic 22) · ×5
  • LL1Analyzer._LOOK (cyclomatic 22) runtime/Java/src/org/antlr/v4/runtime/atn/LL1Analyzer.java:137 — LL1Analyzer._LOOK 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.
  • LL1Analyzer._LOOK (cyclomatic 22) runtime/Python3/src/antlr4/LL1Analyzer.py:110 — LL1Analyzer._LOOK 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.
  • LL1Analyzer._LOOK (cyclomatic 22) runtime/Swift/Sources/Antlr4/atn/LL1Analyzer.swift:131 — LL1Analyzer._LOOK 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.
  • LL1Analyzer._LOOK (cyclomatic 22) runtime/Dart/lib/src/ll1_analyzer.dart:97 — LL1Analyzer._LOOK 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.
  • LL1Analyzer._LOOK (cyclomatic 22) runtime/JavaScript/src/antlr4/atn/LL1Analyzer.js:113 — LL1Analyzer._LOOK 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 · ParserATNSimulator.closure_ (cyclomatic 17) · ×5
  • ParserATNSimulator.closure_ (cyclomatic 17) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1504 — ParserATNSimulator.closure_ 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.
  • ParserATNSimulator.closure_ (cyclomatic 17) runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:1145 — ParserATNSimulator.closure_ 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.
  • ParserATNSimulator.closure_ (cyclomatic 17) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:1394 — ParserATNSimulator.closure_ 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.
  • ParserATNSimulator.closure_ (cyclomatic 17) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:1579 — ParserATNSimulator.closure_ 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.
  • ParserATNSimulator.closure_ (cyclomatic 17) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1260 — ParserATNSimulator.closure_ 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.
D2 · Cognitive Complexity · LexerATNSimulator.getReachableConfigSet (cognitive 19) · ×5
  • LexerATNSimulator.getReachableConfigSet (cognitive 19) runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java:317 — LexerATNSimulator.getReachableConfigSet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LexerATNSimulator.getReachableConfigSet (cognitive 19) runtime/Python3/src/antlr4/atn/LexerATNSimulator.py:259 — LexerATNSimulator.getReachableConfigSet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LexerATNSimulator.getReachableConfigSet (cognitive 19) runtime/Go/antlr/v4/lexer_atn_simulator.go:274 — LexerATNSimulator.getReachableConfigSet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LexerATNSimulator.getReachableConfigSet (cognitive 19) runtime/Dart/lib/src/atn/src/lexer_atn_simulator.dart:318 — LexerATNSimulator.getReachableConfigSet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LexerATNSimulator.getReachableConfigSet (cognitive 19) runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:277 — LexerATNSimulator.getReachableConfigSet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×5
  • Duplicated block (7 lines × 2) runtime/CSharp/src/Atn/ParserATNSimulator.cs:1957 — runtime/CSharp/src/Atn/ParserATNSimulator.cs:1957-1963 | runtime/CSharp/src/Atn/ParserATNSimulator.cs:2008-2014 — both copies are in the same file, so extract the 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 `runtime/CSharp/src/Atn/ParserATNSimulator.cs:1957` 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 × 2) tool/src/org/antlr/v4/tool/DOTGenerator.java:72 — tool/src/org/antlr/v4/tool/DOTGenerator.java:72-78 | tool/src/org/antlr/v4/tool/DOTGenerator.java:81-87 — both copies are in the same file, so extract the 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 `tool/src/org/antlr/v4/tool/DOTGenerator.java:72` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) runtime/CSharp/src/UnbufferedCharStream.cs:192 — runtime/CSharp/src/UnbufferedCharStream.cs:192-198 | runtime/CSharp/src/UnbufferedTokenStream.cs:226-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. 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) runtime/Python3/src/antlr4/error/DiagnosticErrorListener.py:57 — runtime/Python3/src/antlr4/error/DiagnosticErrorListener.py:57-63 | runtime/Python3/src/antlr4/error/DiagnosticErrorListener.py:67-73 — both copies are in the same file, so extract the 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) runtime/Swift/Sources/Antlr4/atn/ActionTransition.swift:19 — runtime/Swift/Sources/Antlr4/atn/ActionTransition.swift:19-25 | runtime/Swift/Sources/Antlr4/atn/PredicateTransition.swift:23-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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, `runtime/Swift/Sources/Antlr4/atn/ActionTransition.swift:15` calls `init` and `runtime/Swift/Sources/Antlr4/atn/PredicateTransition.swift:20` 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 × 2) · ×5
  • Duplicated block (9 lines × 2) runtime/Java/src/org/antlr/v4/runtime/misc/Array2DHashSet.java:423 — runtime/Java/src/org/antlr/v4/runtime/misc/Array2DHashSet.java:423-431 | runtime/Java/src/org/antlr/v4/runtime/misc/FlexibleHashMap.java:251-259 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `runtime/Java/src/org/antlr/v4/runtime/misc/Array2DHashSet.java:423` 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) tool/src/org/antlr/v4/parse/ScopeParser.java:285 — tool/src/org/antlr/v4/parse/ScopeParser.java:285-293 | tool/src/org/antlr/v4/parse/ScopeParser.java:296-304 — both copies are in the same file, so extract the 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 `tool/src/org/antlr/v4/parse/ScopeParser.java:285` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) tool/src/org/antlr/v4/semantics/ActionSniffer.java:42 — tool/src/org/antlr/v4/semantics/ActionSniffer.java:42-50 | tool/src/org/antlr/v4/semantics/AttributeChecks.java:77-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) runtime/Java/src/org/antlr/v4/runtime/UnbufferedCharStream.java:238 — runtime/Java/src/org/antlr/v4/runtime/UnbufferedCharStream.java:238-246 | runtime/Java/src/org/antlr/v4/runtime/UnbufferedTokenStream.java:206-214 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 (9 lines × 2) runtime/Swift/Sources/Antlr4/UnbufferedCharStream.swift:186 — runtime/Swift/Sources/Antlr4/UnbufferedCharStream.swift:186-194 | runtime/Swift/Sources/Antlr4/UnbufferedTokenStream.swift:197-205 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 (8 lines × 2) · ×5
  • Duplicated block (8 lines × 2) runtime/Java/src/org/antlr/v4/runtime/LexerInterpreter.java:52 — runtime/Java/src/org/antlr/v4/runtime/LexerInterpreter.java:52-59 | runtime/Java/src/org/antlr/v4/runtime/ParserInterpreter.java:102-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) runtime/Java/src/org/antlr/v4/runtime/misc/InterpreterDataReader.java:64 — runtime/Java/src/org/antlr/v4/runtime/misc/InterpreterDataReader.java:64-71 | runtime/Java/src/org/antlr/v4/runtime/misc/InterpreterDataReader.java:73-80 — both copies are in the same file, so extract the 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `runtime/Java/src/org/antlr/v4/runtime/misc/InterpreterDataReader.java:82` calls `VocabularyImpl`, `toArray` and `runtime/Java/src/org/antlr/v4/runtime/misc/InterpreterDataReader.java:73` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java:55 — runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java:55-62 | tool/src/org/antlr/v4/gui/Trees.java:115-122 — 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 `runtime/Java/src/org/antlr/v4/runtime/tree/Trees.java:55` 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) tool/src/org/antlr/v4/codegen/model/decl/AltLabelStructDecl.java:34 — tool/src/org/antlr/v4/codegen/model/decl/AltLabelStructDecl.java:34-41 | tool/src/org/antlr/v4/codegen/model/decl/StructDecl.java:63-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 `tool/src/org/antlr/v4/codegen/model/decl/AltLabelStructDecl.java:34` 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, `tool/src/org/antlr/v4/codegen/model/decl/StructDecl.java:61` calls `hasAltSpecificContexts` and `tool/src/org/antlr/v4/codegen/model/decl/AltLabelStructDecl.java:33` 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) tool/src/org/antlr/v4/semantics/ActionSniffer.java:33 — tool/src/org/antlr/v4/semantics/ActionSniffer.java:33-40 | tool/src/org/antlr/v4/semantics/AttributeChecks.java:36-43 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
R10 · Code Duplication · Duplicated block (10 lines × 2 locations) · ×5
  • Duplicated block (10 lines × 2 locations) runtime/JavaScript/src/antlr4/atn/ATNConfig.js:84 — runtime/JavaScript/src/antlr4/atn/ATNConfig.js:84 · runtime/JavaScript/src/antlr4/atn/ATNConfig.js:109 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (10 lines × 2 locations) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1698 — runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1698 · runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1709 — both copies are in the same file, so extract the 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 locations) runtime/JavaScript/src/antlr4/atn/PredictionMode.js:436 — runtime/JavaScript/src/antlr4/atn/PredictionMode.js:436 · runtime/JavaScript/src/antlr4/atn/PredictionMode.js:543 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (10 lines × 2 locations) runtime/JavaScript/src/antlr4/atn/SemanticContext.js:162 — runtime/JavaScript/src/antlr4/atn/SemanticContext.js:162 · runtime/JavaScript/src/antlr4/atn/SemanticContext.js:261 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (10 lines × 2 locations) runtime/JavaScript/src/antlr4/context/ParserRuleContext.js:156 — runtime/JavaScript/src/antlr4/context/ParserRuleContext.js:156 · runtime/JavaScript/src/antlr4/context/ParserRuleContext.js:177 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
D1 · Cyclomatic Complexity · ParserATNSimulator.computeReachSet (cyclomatic 24) · ×4
  • ParserATNSimulator.computeReachSet (cyclomatic 24) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:747 — ParserATNSimulator.computeReachSet 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.
  • ParserATNSimulator.computeReachSet (cyclomatic 24) runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:661 — ParserATNSimulator.computeReachSet 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.
  • ParserATNSimulator.computeReachSet (cyclomatic 24) runtime/Go/antlr/v4/parser_atn_simulator.go:526 — ParserATNSimulator.computeReachSet 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.
  • ParserATNSimulator.computeReachSet (cyclomatic 24) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:754 — ParserATNSimulator.computeReachSet 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 · ParseTreePatternMatcher.split (cyclomatic 21) · ×4
  • ParseTreePatternMatcher.split (cyclomatic 21) runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePatternMatcher.java:412 — ParseTreePatternMatcher.split 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.
  • ParseTreePatternMatcher.split (cyclomatic 21) runtime/Python3/src/antlr4/tree/ParseTreePatternMatcher.py:306 — ParseTreePatternMatcher.split 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.
  • ParseTreePatternMatcher.split (cyclomatic 21) runtime/Swift/Sources/Antlr4/tree/pattern/ParseTreePatternMatcher.swift:351 — ParseTreePatternMatcher.split 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.
  • ParseTreePatternMatcher.split (cyclomatic 21) runtime/Dart/lib/src/tree/src/pattern/parse_tree_match.dart:509 — ParseTreePatternMatcher.split 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 · LexerATNSimulator.closure (cyclomatic 18) · ×4
  • LexerATNSimulator.closure (cyclomatic 18) runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java:403 — LexerATNSimulator.closure 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.
  • LexerATNSimulator.closure (cyclomatic 18) runtime/Python3/src/antlr4/atn/LexerATNSimulator.py:320 — LexerATNSimulator.closure 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.
  • LexerATNSimulator.closure (cyclomatic 18) runtime/Go/antlr/v4/lexer_atn_simulator.go:349 — LexerATNSimulator.closure 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.
  • LexerATNSimulator.closure (cyclomatic 18) runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:354 — LexerATNSimulator.closure 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.
D17 · Explicit Debt · DeadPreprocessorBranch · ×4
  • DeadPreprocessorBranch runtime/CSharp/src/Misc/RuleDependencyChecker.cs:234 — #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
  • DeadPreprocessorBranch runtime/CSharp/src/Misc/RuleDependencyChecker.cs:243 — #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
  • DeadPreprocessorBranch runtime/CSharp/src/Misc/RuleDependencyChecker.cs:254 — #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
  • DeadPreprocessorBranch runtime/CSharp/src/Misc/RuleDependencyChecker.cs:262 — #if false — no definition of that symbol was found anywhere this analysis looks: not in a <DefineConstants> in any project file, props or targets under any condition, not on a build script's command line, not in a #define, and not in a project-template manifest; nor is it one the compiler or SDK defines itself. On that evidence the condition is decided the same way in every configuration this repository can build, and the code on the dead side of it never compiles — including the part a reader will assume is what ships. Either define the symbol in the configuration that is supposed to have it, or delete the branch and keep the behaviour you are actually shipping. If some other mechanism binds it, that mechanism is outside the list above and this row is a gap in what we read, not a fact about your code.
D2 · Cognitive Complexity · LexerATNSimulator.execATN (cognitive 16) · ×4
  • LexerATNSimulator.execATN (cognitive 16) runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java:165 — LexerATNSimulator.execATN has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LexerATNSimulator.execATN (cognitive 16) runtime/Python3/src/antlr4/atn/LexerATNSimulator.py:137 — LexerATNSimulator.execATN has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LexerATNSimulator.execATN (cognitive 16) runtime/Go/antlr/v4/lexer_atn_simulator.go:141 — LexerATNSimulator.execATN has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LexerATNSimulator.execATN (cognitive 16) runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:136 — LexerATNSimulator.execATN has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RuleContext.toString (cognitive 16) · ×4
  • RuleContext.toString (cognitive 16) runtime/Java/src/org/antlr/v4/runtime/RuleContext.java:224 — RuleContext.toString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • RuleContext.toString (cognitive 16) runtime/Python3/src/antlr4/RuleContext.py:208 — RuleContext.toString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • RuleContext.toString (cognitive 16) runtime/Swift/Sources/Antlr4/RuleContext.swift:206 — RuleContext.toString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • RuleContext.toString (cognitive 16) runtime/Dart/lib/src/rule_context.dart:169 — RuleContext.toString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 4, ternaries 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D31 · IaC & Container Security · Medium IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Dead `#if false` region · ×4
  • Dead `#if false` region runtime/CSharp/src/Misc/RuleDependencyChecker.cs:234 — Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
  • Dead `#if false` region runtime/CSharp/src/Misc/RuleDependencyChecker.cs:243 — Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
  • Dead `#if false` region runtime/CSharp/src/Misc/RuleDependencyChecker.cs:254 — Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
  • Dead `#if false` region runtime/CSharp/src/Misc/RuleDependencyChecker.cs:262 — Code inside a `#if false` block is permanently excluded from the build — disabled code that should be removed or restored.
R10 · Code Duplication · Duplicated block (12 lines × 2 locations) · ×4
  • Duplicated block (12 lines × 2 locations) runtime/JavaScript/src/antlr4/BufferedTokenStream.js:276 — runtime/JavaScript/src/antlr4/BufferedTokenStream.js:276 · runtime/JavaScript/src/antlr4/BufferedTokenStream.js:297 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (12 lines × 2 locations) runtime/JavaScript/src/antlr4/Parser.js:98 — runtime/JavaScript/src/antlr4/Parser.js:98 · runtime/JavaScript/src/antlr4/Parser.js:132 — both copies are in the same file, so extract the 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 locations) runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:217 — runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:217 · runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:265 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (12 lines × 2 locations) runtime/JavaScript/src/antlr4/misc/IntervalSet.js:186 — runtime/JavaScript/src/antlr4/misc/IntervalSet.js:186 · runtime/JavaScript/src/antlr4/misc/IntervalSet.js:207 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
D1 · Cyclomatic Complexity · ParserATNSimulator.execATN (cyclomatic 22) · ×3
  • ParserATNSimulator.execATN (cyclomatic 22) runtime/Go/antlr/v4/parser_atn_simulator.go:214 — ParserATNSimulator.execATN 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.
  • ParserATNSimulator.execATN (cyclomatic 22) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:423 — ParserATNSimulator.execATN 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.
  • ParserATNSimulator.execATN (cyclomatic 22) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:395 — ParserATNSimulator.execATN 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 · ParserATNSimulator.execATN (cyclomatic 21) · ×3
  • ParserATNSimulator.execATN (cyclomatic 21) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:413 — ParserATNSimulator.execATN 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.
  • ParserATNSimulator.execATN (cyclomatic 21) runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:386 — ParserATNSimulator.execATN 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.
  • ParserATNSimulator.execATN (cyclomatic 21) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:401 — ParserATNSimulator.execATN 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 · ATNDeserializer.readEdges (cyclomatic 17) · ×3
  • ATNDeserializer.readEdges (cyclomatic 17) runtime/Python3/src/antlr4/atn/ATNDeserializer.py:137 — ATNDeserializer.readEdges 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.
  • ATNDeserializer.readEdges (cyclomatic 17) runtime/Go/antlr/v4/atn_deserializer.go:230 — ATNDeserializer.readEdges 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.
  • ATNDeserializer.readEdges (cyclomatic 17) runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js:242 — ATNDeserializer.readEdges 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 · ATNDeserializer.verifyATN (cyclomatic 17) · ×3
  • ATNDeserializer.verifyATN (cyclomatic 17) runtime/Python3/src/antlr4/atn/ATNDeserializer.py:311 — ATNDeserializer.verifyATN 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.
  • ATNDeserializer.verifyATN (cyclomatic 17) runtime/Go/antlr/v4/atn_deserializer.go:471 — ATNDeserializer.verifyATN 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 taking that case's concrete type, so the dispatch reads one line per case. These arms are selected by TYPE rather than by value, so there is no key a lookup table could be built on; where you own the matched types, giving them one shared interface method and calling that is the form a table would have taken, and where you do not, keep the cases — they stay explicit and reviewable.
  • ATNDeserializer.verifyATN (cyclomatic 17) runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js:463 — ATNDeserializer.verifyATN 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 · ATNDeserializer.verifyATN (cyclomatic 16) · ×3
  • ATNDeserializer.verifyATN (cyclomatic 16) runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializer.java:409 — ATNDeserializer.verifyATN 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.
  • ATNDeserializer.verifyATN (cyclomatic 16) runtime/Swift/Sources/Antlr4/atn/ATNDeserializer.swift:423 — ATNDeserializer.verifyATN 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.
  • ATNDeserializer.verifyATN (cyclomatic 16) runtime/Dart/lib/src/atn/src/atn_deserializer.dart:450 — ATNDeserializer.verifyATN 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.
D2 · Cognitive Complexity · ParserATNSimulator.closure_ (cognitive 44) · ×3
  • ParserATNSimulator.closure_ (cognitive 44) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1504 — ParserATNSimulator.closure_ has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (39 pts), boolean chains 4, loops 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • ParserATNSimulator.closure_ (cognitive 44) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:1579 — ParserATNSimulator.closure_ has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (39 pts), boolean chains 4, loops 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • ParserATNSimulator.closure_ (cognitive 44) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1260 — ParserATNSimulator.closure_ has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (39 pts), boolean chains 4, loops 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LexerATNSimulator.closure (cognitive 33) · ×3
  • LexerATNSimulator.closure (cognitive 33) runtime/Java/src/org/antlr/v4/runtime/atn/LexerATNSimulator.java:403 — LexerATNSimulator.closure has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LexerATNSimulator.closure (cognitive 33) runtime/Python3/src/antlr4/atn/LexerATNSimulator.py:320 — LexerATNSimulator.closure has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LexerATNSimulator.closure (cognitive 33) runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:354 — LexerATNSimulator.closure has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.verifyATN (cognitive 28) · ×3
  • ATNDeserializer.verifyATN (cognitive 28) runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializer.java:409 — ATNDeserializer.verifyATN has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ATNDeserializer.verifyATN (cognitive 28) runtime/Python3/src/antlr4/atn/ATNDeserializer.py:311 — ATNDeserializer.verifyATN has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ATNDeserializer.verifyATN (cognitive 28) runtime/Dart/lib/src/atn/src/atn_deserializer.dart:450 — ATNDeserializer.verifyATN has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PredictionContext.toDOTString (cognitive 28) · ×3
  • PredictionContext.toDOTString (cognitive 28) runtime/Java/src/org/antlr/v4/runtime/atn/PredictionContext.java:487 — PredictionContext.toDOTString has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 4 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • PredictionContext.toDOTString (cognitive 28) runtime/Swift/Sources/Antlr4/atn/PredictionContext.swift:486 — PredictionContext.toDOTString has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 4 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • PredictionContext.toDOTString (cognitive 28) runtime/Dart/lib/src/prediction_context.dart:474 — PredictionContext.toDOTString has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 4 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.execATNWithFullContext (cognitive 25) · ×3
  • ParserATNSimulator.execATNWithFullContext (cognitive 25) runtime/Go/antlr/v4/parser_atn_simulator.go:418 — ParserATNSimulator.execATNWithFullContext has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserATNSimulator.execATNWithFullContext (cognitive 25) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:670 — ParserATNSimulator.execATNWithFullContext has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserATNSimulator.execATNWithFullContext (cognitive 25) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:589 — ParserATNSimulator.execATNWithFullContext has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.generateRuleBypassTransition (cognitive 19) · ×3
  • ATNDeserializer.generateRuleBypassTransition (cognitive 19) runtime/Python3/src/antlr4/atn/ATNDeserializer.py:213 — ATNDeserializer.generateRuleBypassTransition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ATNDeserializer.generateRuleBypassTransition (cognitive 19) runtime/Go/antlr/v4/atn_deserializer.go:341 — ATNDeserializer.generateRuleBypassTransition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ATNDeserializer.generateRuleBypassTransition (cognitive 19) runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js:348 — ATNDeserializer.generateRuleBypassTransition has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IntervalSet.add (cognitive 18) · ×3
  • IntervalSet.add (cognitive 18) runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:108 — IntervalSet.add has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • IntervalSet.add (cognitive 18) runtime/Swift/Sources/Antlr4/misc/IntervalSet.swift:104 — IntervalSet.add has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • IntervalSet.add (cognitive 18) runtime/Dart/lib/src/interval_set.dart:225 — IntervalSet.add has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.applyPrecedenceFilter (cognitive 17) · ×3
  • ParserATNSimulator.applyPrecedenceFilter (cognitive 17) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1112 — ParserATNSimulator.applyPrecedenceFilter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserATNSimulator.applyPrecedenceFilter (cognitive 17) runtime/Go/antlr/v4/parser_atn_simulator.go:754 — ParserATNSimulator.applyPrecedenceFilter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserATNSimulator.applyPrecedenceFilter (cognitive 17) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:1087 — ParserATNSimulator.applyPrecedenceFilter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserInterpreter.parse (cognitive 17) · ×3
  • ParserInterpreter.parse (cognitive 17) runtime/Python3/src/antlr4/ParserInterpreter.py:61 — ParserInterpreter.parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 1 (3 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserInterpreter.parse (cognitive 17) runtime/Swift/Sources/Antlr4/ParserInterpreter.swift:120 — ParserInterpreter.parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 1 (3 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserInterpreter.parse (cognitive 17) runtime/Dart/lib/src/parser_interpreter.dart:117 — ParserInterpreter.parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 1 (3 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · MethodTooLong · ×3
  • MethodTooLong: ATNDeserializer.deserialize runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializer.java:51 — MethodTooLong — deserialize 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: UnicodeDataTemplateController.addTR35ExtendedPictographicPropertyCodesToCodePointRanges tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java:227 — MethodTooLong — addTR35ExtendedPictographicPropertyCodesToCodePointRanges runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38× 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: ATNDeserializer.deserialize runtime/Swift/Sources/Antlr4/atn/ATNDeserializer.swift:18 — MethodTooLong — deserialize runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× 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.
R4 · Test Coverage · No test reaches this file · ×3
  • No test reaches this file runtime/JavaScript/src/antlr4/context/InterpreterRuleContext.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file runtime/JavaScript/src/antlr4/utils/titleCase.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file runtime/JavaScript/src/antlr4/TokenSource.js:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
D1 · Cyclomatic Complexity · ParseTreePatternMatcher.matchImpl (cyclomatic 21) · ×2
  • ParseTreePatternMatcher.matchImpl (cyclomatic 21) runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePatternMatcher.java:256 — ParseTreePatternMatcher.matchImpl 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.
  • ParseTreePatternMatcher.matchImpl (cyclomatic 21) runtime/Python3/src/antlr4/tree/ParseTreePatternMatcher.py:195 — ParseTreePatternMatcher.matchImpl 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 · ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cyclomatic 20) · ×2
  • ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cyclomatic 20) runtime/Go/antlr/v4/parser_atn_simulator.go:1183 — ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule 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.
  • ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cyclomatic 20) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:1570 — ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule 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 · ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cyclomatic 19) · ×2
  • ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cyclomatic 19) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:1661 — ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule 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.
  • ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cyclomatic 19) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1316 — ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule 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 · PredictionContext.mergeSingletons (cyclomatic 18) · ×2
  • PredictionContext.mergeSingletons (cyclomatic 18) runtime/Java/src/org/antlr/v4/runtime/atn/PredictionContext.java:194 — PredictionContext.mergeSingletons 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.
  • PredictionContext.mergeSingletons (cyclomatic 18) runtime/Python3/src/antlr4/PredictionContext.py:307 — PredictionContext.mergeSingletons 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.
D2 · Cognitive Complexity · ParserATNSimulator.execATN (cognitive 51) · ×2
  • ParserATNSimulator.execATN (cognitive 51) runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:386 — ParserATNSimulator.execATN has cognitive complexity 51 (threshold 15). Drivers by points: if/else 17 (48 pts), boolean chains 2, loops 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • ParserATNSimulator.execATN (cognitive 51) runtime/Go/antlr/v4/parser_atn_simulator.go:214 — ParserATNSimulator.execATN has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (45 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ParserATNSimulator.execATN (cognitive 50) · ×2
  • ParserATNSimulator.execATN (cognitive 50) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:413 — ParserATNSimulator.execATN has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (44 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • ParserATNSimulator.execATN (cognitive 50) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:401 — ParserATNSimulator.execATN has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (44 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ParserATNSimulator.closure_ (cognitive 50) · ×2
  • ParserATNSimulator.closure_ (cognitive 50) runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:1145 — ParserATNSimulator.closure_ has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (47 pts), boolean chains 2, loops 1 (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • ParserATNSimulator.closure_ (cognitive 50) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:1394 — ParserATNSimulator.closure_ has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (46 pts), boolean chains 3, loops 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PredictionContext.mergeArrays (cognitive 48) · ×2
  • PredictionContext.mergeArrays (cognitive 48) runtime/Java/src/org/antlr/v4/runtime/atn/PredictionContext.java:345 — PredictionContext.mergeArrays has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (39 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • PredictionContext.mergeArrays (cognitive 48) runtime/Python3/src/antlr4/PredictionContext.py:443 — PredictionContext.mergeArrays has cognitive complexity 48 (threshold 15). Drivers by points: if/else 22 (38 pts), boolean chains 5, loops 3 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LL1Analyzer._LOOK (cognitive 40) · ×2
  • LL1Analyzer._LOOK (cognitive 40) runtime/Java/src/org/antlr/v4/runtime/atn/LL1Analyzer.java:137 — LL1Analyzer._LOOK has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (34 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LL1Analyzer._LOOK (cognitive 40) runtime/JavaScript/src/antlr4/atn/LL1Analyzer.js:113 — LL1Analyzer._LOOK has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (34 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.readEdges (cognitive 40) · ×2
  • ATNDeserializer.readEdges (cognitive 40) runtime/Go/antlr/v4/atn_deserializer.go:230 — ATNDeserializer.readEdges has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 6 (11 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ATNDeserializer.readEdges (cognitive 40) runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js:242 — ATNDeserializer.readEdges has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 6 (11 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent 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 · ParserATNSimulator.computeReachSet (cognitive 36) · ×2
  • ParserATNSimulator.computeReachSet (cognitive 36) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:747 — ParserATNSimulator.computeReachSet has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserATNSimulator.computeReachSet (cognitive 36) runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:661 — ParserATNSimulator.computeReachSet has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PredictionContext.toStrings (cognitive 34) · ×2
  • PredictionContext.toStrings (cognitive 34) runtime/Java/src/org/antlr/v4/runtime/atn/PredictionContext.java:660 — PredictionContext.toStrings has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • PredictionContext.toStrings (cognitive 34) runtime/Dart/lib/src/prediction_context.dart:652 — PredictionContext.toStrings has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PredictionContext.mergeSingletons (cognitive 32) · ×2
  • PredictionContext.mergeSingletons (cognitive 32) runtime/Java/src/org/antlr/v4/runtime/atn/PredictionContext.java:194 — PredictionContext.mergeSingletons has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • PredictionContext.mergeSingletons (cognitive 32) runtime/Python3/src/antlr4/PredictionContext.py:307 — PredictionContext.mergeSingletons has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParseTreePatternMatcher.split (cognitive 29) · ×2
  • ParseTreePatternMatcher.split (cognitive 29) runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePatternMatcher.java:412 — ParseTreePatternMatcher.split has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 4, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParseTreePatternMatcher.split (cognitive 29) runtime/Dart/lib/src/tree/src/pattern/parse_tree_match.dart:509 — ParseTreePatternMatcher.split has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (24 pts), loops 4, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.closureCheckingStopState (cognitive 28) · ×2
  • ParserATNSimulator.closureCheckingStopState (cognitive 28) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:1326 — ParserATNSimulator.closureCheckingStopState has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 1 (3 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • ParserATNSimulator.closureCheckingStopState (cognitive 28) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:1488 — ParserATNSimulator.closureCheckingStopState has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 1 (3 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Parser.consume (cognitive 21) · ×2
  • Parser.consume (cognitive 21) runtime/Java/src/org/antlr/v4/runtime/Parser.java:568 — Parser.consume has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (8 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Parser.consume (cognitive 21) runtime/Dart/lib/src/parser.dart:379 — Parser.consume has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (8 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cognitive 20) · ×2
  • ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cognitive 20) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1666 — ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cognitive 20) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1316 — ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParseTreePatternMatcher.tokenize (cognitive 20) · ×2
  • ParseTreePatternMatcher.tokenize (cognitive 20) runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePatternMatcher.java:365 — ParseTreePatternMatcher.tokenize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParseTreePatternMatcher.tokenize (cognitive 20) runtime/Dart/lib/src/tree/src/pattern/parse_tree_match.dart:461 — ParseTreePatternMatcher.tokenize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LexerATNSimulator.getEpsilonTarget (cognitive 20) · ×2
  • LexerATNSimulator.getEpsilonTarget (cognitive 20) runtime/Go/antlr/v4/lexer_atn_simulator.go:406 — LexerATNSimulator.getEpsilonTarget has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LexerATNSimulator.getEpsilonTarget (cognitive 20) runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:409 — LexerATNSimulator.getEpsilonTarget has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PredictionContext.getCachedContext (cognitive 18) · ×2
  • PredictionContext.getCachedContext (cognitive 18) runtime/Java/src/org/antlr/v4/runtime/atn/PredictionContext.java:544 — PredictionContext.getCachedContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • PredictionContext.getCachedContext (cognitive 18) runtime/Dart/lib/src/prediction_context.dart:539 — PredictionContext.getCachedContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TokenStreamRewriter.getText (cognitive 18) · ×2
  • TokenStreamRewriter.getText (cognitive 18) runtime/Java/src/org/antlr/v4/runtime/TokenStreamRewriter.java:383 — TokenStreamRewriter.getText has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • TokenStreamRewriter.getText (cognitive 18) runtime/Swift/Sources/Antlr4/TokenStreamRewriter.swift:572 — TokenStreamRewriter.getText has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IntervalSet.toString (cognitive 16) · ×2
  • IntervalSet.toString (cognitive 16) runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:475 — IntervalSet.toString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • IntervalSet.toString (cognitive 16) runtime/Swift/Sources/Antlr4/misc/IntervalSet.swift:547 — IntervalSet.toString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserInterpreter.visitState (cognitive 16) · ×2
  • ParserInterpreter.visitState (cognitive 16) runtime/Python3/src/antlr4/ParserInterpreter.py:99 — ParserInterpreter.visitState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParserInterpreter.visitState (cognitive 16) runtime/Dart/lib/src/parser_interpreter.dart:184 — ParserInterpreter.visitState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×2
  • Duplicated block (14 lines × 2) tool/src/org/antlr/v4/gui/Interpreter.java:169 — tool/src/org/antlr/v4/gui/Interpreter.java:169-182 | tool/src/org/antlr/v4/gui/TestRig.java:172-185 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (14 lines × 2) runtime/Go/antlr/v4/jcollect.go:185 — runtime/Go/antlr/v4/jcollect.go:185-198 | runtime/Go/antlr/v4/jcollect.go:326-339 — both copies are in the same file, so extract the 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 `runtime/Go/antlr/v4/jcollect.go:185` 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 (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:585 — runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:585-595 | runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:600-610 — both copies are in the same file, so extract the 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 `runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:585` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) tool/src/org/antlr/v4/semantics/AttributeChecks.java:172 — tool/src/org/antlr/v4/semantics/AttributeChecks.java:172-182 | tool/src/org/antlr/v4/semantics/AttributeChecks.java:186-196 — both copies are in the same file, so extract the 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×2
  • Duplicated block (10 lines × 2) tool/src/org/antlr/v4/tool/LeftRecursiveRule.java:124 — tool/src/org/antlr/v4/tool/LeftRecursiveRule.java:124-133 | tool/src/org/antlr/v4/tool/LeftRecursiveRule.java:138-147 — both copies are in the same file, so extract the 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 `tool/src/org/antlr/v4/tool/LeftRecursiveRule.java:124` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) runtime/Dart/lib/src/atn/src/semantic_context.dart:271 — runtime/Dart/lib/src/atn/src/semantic_context.dart:271-280 | runtime/Dart/lib/src/atn/src/semantic_context.dart:375-384 — both copies are in the same file, so extract the 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 (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) runtime/CSharp/src/Atn/LexerMoreAction.cs:82 — runtime/CSharp/src/Atn/LexerMoreAction.cs:82-86 | runtime/CSharp/src/Atn/LexerPopModeAction.cs:82-86 | runtime/CSharp/src/Atn/LexerSkipAction.cs:82-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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.
  • Duplicated block (5 lines × 3) runtime/Java/src/org/antlr/v4/runtime/atn/LexerMoreAction.java:62 — runtime/Java/src/org/antlr/v4/runtime/atn/LexerMoreAction.java:62-66 | runtime/Java/src/org/antlr/v4/runtime/atn/LexerPopModeAction.java:62-66 | runtime/Java/src/org/antlr/v4/runtime/atn/LexerSkipAction.java:62-66 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:1395 — runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:1395-1414 | runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:1425-1444 — both copies are in the same file, so extract the 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (20 lines × 2) runtime/Go/antlr/v4/parser_atn_simulator.go:1329 — runtime/Go/antlr/v4/parser_atn_simulator.go:1329-1348 | runtime/Go/antlr/v4/parser_atn_simulator.go:1366-1385 — both copies are in the same file, so extract the 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 `runtime/Go/antlr/v4/parser_atn_simulator.go:1329` 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 (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) runtime/Go/antlr/v4/comparators.go:61 — runtime/Go/antlr/v4/comparators.go:61-75 | runtime/Go/antlr/v4/comparators.go:130-144 — both copies are in the same file, so extract the 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 (15 lines × 2) runtime/Go/antlr/v4/jcollect.go:310 — runtime/Go/antlr/v4/jcollect.go:310-324 | runtime/Go/antlr/v4/jcollect.go:551-565 — both copies are in the same file, so extract the 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 `runtime/Go/antlr/v4/jcollect.go:310` 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: Parser (LCOM4 8) runtime/Java/src/org/antlr/v4/runtime/Parser.java:38 — Parser's methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Parser (LCOM4 6) runtime/CSharp/src/Parser.cs:20 — Parser'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.
R10 · Code Duplication · Duplicated block (24 lines × 2 locations) · ×2
  • Duplicated block (24 lines × 2 locations) runtime/JavaScript/src/antlr4/action/LexerChannelAction.js:14 — runtime/JavaScript/src/antlr4/action/LexerChannelAction.js:14 · runtime/JavaScript/src/antlr4/action/LexerTypeAction.js:13 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (24 lines × 2 locations) runtime/JavaScript/src/antlr4/action/LexerModeAction.js:12 — runtime/JavaScript/src/antlr4/action/LexerModeAction.js:12 · runtime/JavaScript/src/antlr4/action/LexerPushModeAction.js:12 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (10 matched lines × 2 locations) runtime/JavaScript/src/antlr4/BufferedTokenStream.js:160 — runtime/JavaScript/src/antlr4/BufferedTokenStream.js:160 · runtime/JavaScript/src/antlr4/BufferedTokenStream.js:361 — the two spans are one implementation copied and then locally edited — 71 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (10 matched lines × 2 locations) runtime/JavaScript/src/antlr4/Parser.js:508 — runtime/JavaScript/src/antlr4/Parser.js:508 · runtime/JavaScript/src/antlr4/atn/ATN.js:132 — the two spans are one implementation copied and then locally edited — 90 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
D1 · Cyclomatic Complexity · ATNDeserializer.deserialize (cyclomatic 54) · ×1
  • ATNDeserializer.deserialize (cyclomatic 54) runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializer.java:51 — ATNDeserializer.deserialize has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · antlr.reduceToSingleOperationPerIndex (cyclomatic 40) · ×1
  • antlr.reduceToSingleOperationPerIndex (cyclomatic 40) runtime/Go/antlr/v4/tokenstream_rewriter.go:537 — antlr.reduceToSingleOperationPerIndex 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 · GrammarTransformPipeline.integrateImportedGrammars (cyclomatic 39) · ×1
  • GrammarTransformPipeline.integrateImportedGrammars (cyclomatic 39) tool/src/org/antlr/v4/tool/GrammarTransformPipeline.java:156 — GrammarTransformPipeline.integrateImportedGrammars has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RewriteOperationArray.reduceToSingleOperationPerIndex (cyclomatic 33) · ×1
  • RewriteOperationArray.reduceToSingleOperationPerIndex (cyclomatic 33) runtime/Swift/Sources/Antlr4/TokenStreamRewriter.swift:247 — RewriteOperationArray.reduceToSingleOperationPerIndex has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent 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 · ATNDeserializer.InlineSetRules (cyclomatic 31) · ×1
  • ATNDeserializer.InlineSetRules (cyclomatic 31) runtime/CSharp/src/Atn/ATNDeserializer.cs:573 — ATNDeserializer.InlineSetRules 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 · CodeGenPipeline.process (cyclomatic 31) · ×1
  • CodeGenPipeline.process (cyclomatic 31) tool/src/org/antlr/v4/codegen/CodeGenPipeline.java:22 — CodeGenPipeline.process 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 · TokenStreamRewriter.reduceToSingleOperationPerIndex (cyclomatic 31) · ×1
  • TokenStreamRewriter.reduceToSingleOperationPerIndex (cyclomatic 31) runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:215 — TokenStreamRewriter.reduceToSingleOperationPerIndex 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 · PredictionContext.MergeArrays (cyclomatic 30) · ×1
  • PredictionContext.MergeArrays (cyclomatic 30) runtime/CSharp/src/Atn/PredictionContext.cs:225 — PredictionContext.MergeArrays 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 · TokenStreamRewriter.reduceToSingleOperationPerIndex (cyclomatic 30) · ×1
  • TokenStreamRewriter.reduceToSingleOperationPerIndex (cyclomatic 30) runtime/Java/src/org/antlr/v4/runtime/TokenStreamRewriter.java:478 — TokenStreamRewriter.reduceToSingleOperationPerIndex 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 · antlr.mergeArrays (cyclomatic 30) · ×1
  • antlr.mergeArrays (cyclomatic 30) runtime/Go/antlr/v4/prediction_context.go:546 — antlr.mergeArrays 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 · PredictionContextUtils.mergeArrays (cyclomatic 30) · ×1
  • PredictionContextUtils.mergeArrays (cyclomatic 30) runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:131 — PredictionContextUtils.mergeArrays 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 · TokenStreamRewriter.ReduceToSingleOperationPerIndex (cyclomatic 29) · ×1
  • TokenStreamRewriter.ReduceToSingleOperationPerIndex (cyclomatic 29) runtime/CSharp/src/TokenStreamRewriter.cs:567 — TokenStreamRewriter.ReduceToSingleOperationPerIndex 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 · PredictionContext.mergeArrays (cyclomatic 29) · ×1
  • PredictionContext.mergeArrays (cyclomatic 29) runtime/Python3/src/antlr4/PredictionContext.py:443 — PredictionContext.mergeArrays 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 · ScopeParser._splitArgumentList (cyclomatic 28) · ×1
  • ScopeParser._splitArgumentList (cyclomatic 28) tool/src/org/antlr/v4/parse/ScopeParser.java:265 — ScopeParser._splitArgumentList has cyclomatic complexity 28 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · DOTGenerator.getDOT (cyclomatic 28) · ×1
  • DOTGenerator.getDOT (cyclomatic 28) tool/src/org/antlr/v4/tool/DOTGenerator.java:181 — DOTGenerator.getDOT 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 · PredictionContext.mergeArrays (cyclomatic 28) · ×1
  • PredictionContext.mergeArrays (cyclomatic 28) runtime/Java/src/org/antlr/v4/runtime/atn/PredictionContext.java:345 — PredictionContext.mergeArrays 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 · RuleDependencyChecker.CheckDependencies (cyclomatic 27) · ×1
  • RuleDependencyChecker.CheckDependencies (cyclomatic 27) runtime/CSharp/src/Misc/RuleDependencyChecker.cs:81 — RuleDependencyChecker.CheckDependencies 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 · TokenStreamRewriter._reduceToSingleOperationPerIndex (cyclomatic 27) · ×1
  • TokenStreamRewriter._reduceToSingleOperationPerIndex (cyclomatic 27) runtime/Python3/src/antlr4/TokenStreamRewriter.py:140 — TokenStreamRewriter._reduceToSingleOperationPerIndex 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 · ParserATNSimulator.computeReachSet (cyclomatic 26) · ×1
  • ParserATNSimulator.computeReachSet (cyclomatic 26) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:698 — ParserATNSimulator.computeReachSet 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 · PredictionContext.mergeArrays (cyclomatic 25) · ×1
  • PredictionContext.mergeArrays (cyclomatic 25) runtime/Dart/lib/src/prediction_context.dart:319 — PredictionContext.mergeArrays has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ParserATNSimulator.ComputeReachSet (cyclomatic 24) · ×1
  • ParserATNSimulator.ComputeReachSet (cyclomatic 24) runtime/CSharp/src/Atn/ParserATNSimulator.cs:786 — ParserATNSimulator.ComputeReachSet 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 · ATNOptimizer.optimizeSets (cyclomatic 24) · ×1
  • ATNOptimizer.optimizeSets (cyclomatic 24) tool/src/org/antlr/v4/automata/ATNOptimizer.java:41 — ATNOptimizer.optimizeSets 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 · Tool.handleArgs (cyclomatic 23) · ×1
  • Tool.handleArgs (cyclomatic 23) tool/src/org/antlr/v4/Tool.java:198 — Tool.handleArgs 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 · LL1Analyzer.look1 (cyclomatic 23) · ×1
  • LL1Analyzer.look1 (cyclomatic 23) runtime/Go/antlr/v4/ll1_analyzer.go:122 — LL1Analyzer.look1 has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ATNDeserializer.OptimizeSets (cyclomatic 22) · ×1
  • ATNDeserializer.OptimizeSets (cyclomatic 22) runtime/CSharp/src/Atn/ATNDeserializer.cs:774 — ATNDeserializer.OptimizeSets 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 · LL1Analyzer.Look_ (cyclomatic 22) · ×1
  • LL1Analyzer.Look_ (cyclomatic 22) runtime/CSharp/src/Atn/LL1Analyzer.cs:142 — LL1Analyzer.Look_ 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 · ParserATNSimulator.ExecATN (cyclomatic 22) · ×1
  • ParserATNSimulator.ExecATN (cyclomatic 22) runtime/CSharp/src/Atn/ParserATNSimulator.cs:418 — ParserATNSimulator.ExecATN 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 · CharSupport.getStringFromGrammarStringLiteral (cyclomatic 22) · ×1
  • CharSupport.getStringFromGrammarStringLiteral (cyclomatic 22) tool/src/org/antlr/v4/misc/CharSupport.java:86 — CharSupport.getStringFromGrammarStringLiteral 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 · EscapeSequenceParsing.parseEscape (cyclomatic 22) · ×1
  • EscapeSequenceParsing.parseEscape (cyclomatic 22) tool/src/org/antlr/v4/misc/EscapeSequenceParsing.java:83 — EscapeSequenceParsing.parseEscape 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 · ATNDeserializer.CombineChainedEpsilons (cyclomatic 21) · ×1
  • ATNDeserializer.CombineChainedEpsilons (cyclomatic 21) runtime/CSharp/src/Atn/ATNDeserializer.cs:705 — ATNDeserializer.CombineChainedEpsilons 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 · ParseTreePatternMatcher.MatchImpl (cyclomatic 21) · ×1
  • ParseTreePatternMatcher.MatchImpl (cyclomatic 21) runtime/CSharp/src/Tree/Pattern/ParseTreePatternMatcher.cs:390 — ParseTreePatternMatcher.MatchImpl 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 · ParseTreePatternMatcher.Split (cyclomatic 21) · ×1
  • ParseTreePatternMatcher.Split (cyclomatic 21) runtime/CSharp/src/Tree/Pattern/ParseTreePatternMatcher.cs:587 — ParseTreePatternMatcher.Split 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 · InterpreterDataReader.parseFile (cyclomatic 21) · ×1
  • InterpreterDataReader.parseFile (cyclomatic 21) runtime/Java/src/org/antlr/v4/runtime/misc/InterpreterDataReader.java:55 — InterpreterDataReader.parseFile 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 · InterpreterDataReader.init (cyclomatic 21) · ×1
  • InterpreterDataReader.init (cyclomatic 21) runtime/Swift/Sources/Antlr4/misc/InterpreterDataReader.swift:52 — InterpreterDataReader.init has cyclomatic complexity 21 (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 · ParserATNSimulator.computeReachSet (cyclomatic 21) · ×1
  • ParserATNSimulator.computeReachSet (cyclomatic 21) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:800 — ParserATNSimulator.computeReachSet 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 · Target.getTargetStringLiteralFromANTLRStringLiteral (cyclomatic 20) · ×1
  • Target.getTargetStringLiteralFromANTLRStringLiteral (cyclomatic 20) tool/src/org/antlr/v4/codegen/Target.java:237 — Target.getTargetStringLiteralFromANTLRStringLiteral 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 · GrammarTransformPipeline.extractImplicitLexer (cyclomatic 20) · ×1
  • GrammarTransformPipeline.extractImplicitLexer (cyclomatic 20) tool/src/org/antlr/v4/tool/GrammarTransformPipeline.java:385 — GrammarTransformPipeline.extractImplicitLexer 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 · ParserInterpreter.visitState (cyclomatic 20) · ×1
  • ParserInterpreter.visitState (cyclomatic 20) runtime/Swift/Sources/Antlr4/ParserInterpreter.swift:177 — ParserInterpreter.visitState 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 · LexerAction.swift.== (cyclomatic 20) · ×1
  • LexerAction.swift.== (cyclomatic 20) runtime/Swift/Sources/Antlr4/atn/LexerAction.swift:65 — LexerAction.swift.== 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 · LexerATNFactory.createLexerAction (cyclomatic 19) · ×1
  • LexerATNFactory.createLexerAction (cyclomatic 19) tool/src/org/antlr/v4/automata/LexerATNFactory.java:634 — LexerATNFactory.createLexerAction 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 · OutputModelWalker.walk (cyclomatic 19) · ×1
  • OutputModelWalker.walk (cyclomatic 19) tool/src/org/antlr/v4/codegen/OutputModelWalker.java:54 — OutputModelWalker.walk 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 · ATNSerializer.addEdges (cyclomatic 19) · ×1
  • ATNSerializer.addEdges (cyclomatic 19) runtime/Java/src/org/antlr/v4/runtime/atn/ATNSerializer.java:159 — ATNSerializer.addEdges 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 · ATNDeserializer.deserialize (cyclomatic 19) · ×1
  • ATNDeserializer.deserialize (cyclomatic 19) runtime/Swift/Sources/Antlr4/atn/ATNDeserializer.swift:18 — ATNDeserializer.deserialize has cyclomatic complexity 19 (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 · PredictionContext.mergeArrays (cyclomatic 19) · ×1
  • PredictionContext.mergeArrays (cyclomatic 19) runtime/Swift/Sources/Antlr4/atn/PredictionContext.swift:371 — PredictionContext.mergeArrays 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 · ParseTreePatternMatcher.matchImpl (cyclomatic 19) · ×1
  • ParseTreePatternMatcher.matchImpl (cyclomatic 19) runtime/Swift/Sources/Antlr4/tree/pattern/ParseTreePatternMatcher.swift:210 — ParseTreePatternMatcher.matchImpl 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 · ParserInterpreter.visitState (cyclomatic 19) · ×1
  • ParserInterpreter.visitState (cyclomatic 19) runtime/Dart/lib/src/parser_interpreter.dart:184 — ParserInterpreter.visitState 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 · PredictionContext.mergeSingletons (cyclomatic 19) · ×1
  • PredictionContext.mergeSingletons (cyclomatic 19) runtime/Dart/lib/src/prediction_context.dart:155 — PredictionContext.mergeSingletons 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 · LexerATNSimulator.Closure (cyclomatic 18) · ×1
  • LexerATNSimulator.Closure (cyclomatic 18) runtime/CSharp/src/Atn/LexerATNSimulator.cs:407 — LexerATNSimulator.Closure 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 · ParserATNSimulator.CanDropLoopEntryEdgeInLeftRecursiveRule (cyclomatic 18) · ×1
  • ParserATNSimulator.CanDropLoopEntryEdgeInLeftRecursiveRule (cyclomatic 18) runtime/CSharp/src/Atn/ParserATNSimulator.cs:1777 — ParserATNSimulator.CanDropLoopEntryEdgeInLeftRecursiveRule 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 · PredictionContext.MergeSingletons (cyclomatic 18) · ×1
  • PredictionContext.MergeSingletons (cyclomatic 18) runtime/CSharp/src/Atn/PredictionContext.cs:137 — PredictionContext.MergeSingletons 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 · ParserInterpreter.VisitState (cyclomatic 18) · ×1
  • ParserInterpreter.VisitState (cyclomatic 18) runtime/CSharp/src/ParserInterpreter.cs:184 — ParserInterpreter.VisitState 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 · ParserInterpreter.visitState (cyclomatic 18) · ×1
  • ParserInterpreter.visitState (cyclomatic 18) runtime/Java/src/org/antlr/v4/runtime/ParserInterpreter.java:219 — ParserInterpreter.visitState 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 · antlr.mergeSingletons (cyclomatic 18) · ×1
  • antlr.mergeSingletons (cyclomatic 18) runtime/Go/antlr/v4/prediction_context.go:387 — antlr.mergeSingletons 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 · ATNDeserializer.readEdges (cyclomatic 18) · ×1
  • ATNDeserializer.readEdges (cyclomatic 18) runtime/Dart/lib/src/atn/src/atn_deserializer.dart:222 — ATNDeserializer.readEdges 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 · LexerATNSimulator.getEpsilonTarget (cyclomatic 18) · ×1
  • LexerATNSimulator.getEpsilonTarget (cyclomatic 18) runtime/Dart/lib/src/atn/src/lexer_atn_simulator.dart:508 — LexerATNSimulator.getEpsilonTarget 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 · PredictionContextUtils.mergeSingletons (cyclomatic 18) · ×1
  • PredictionContextUtils.mergeSingletons (cyclomatic 18) runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:292 — PredictionContextUtils.mergeSingletons 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 · ATNDeserializer.GenerateRuleBypassTransitions (cyclomatic 17) · ×1
  • ATNDeserializer.GenerateRuleBypassTransitions (cyclomatic 17) runtime/CSharp/src/Atn/ATNDeserializer.cs:88 — ATNDeserializer.GenerateRuleBypassTransitions 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 · ATNDeserializer.ReadEdges (cyclomatic 17) · ×1
  • ATNDeserializer.ReadEdges (cyclomatic 17) runtime/CSharp/src/Atn/ATNDeserializer.cs:219 — ATNDeserializer.ReadEdges 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 · ParserATNSimulator.Closure_ (cyclomatic 17) · ×1
  • ParserATNSimulator.Closure_ (cyclomatic 17) runtime/CSharp/src/Atn/ParserATNSimulator.cs:1606 — ParserATNSimulator.Closure_ 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 · LexerATNFactory.checkCommands (cyclomatic 17) · ×1
  • LexerATNFactory.checkCommands (cyclomatic 17) tool/src/org/antlr/v4/automata/LexerATNFactory.java:688 — LexerATNFactory.checkCommands 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 · ParserATNSimulator.closureWork (cyclomatic 17) · ×1
  • ParserATNSimulator.closureWork (cyclomatic 17) runtime/Go/antlr/v4/parser_atn_simulator.go:1115 — ParserATNSimulator.closureWork 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 · ATNDeserializer.generateRuleBypassTransitions (cyclomatic 17) · ×1
  • ATNDeserializer.generateRuleBypassTransitions (cyclomatic 17) runtime/Swift/Sources/Antlr4/atn/ATNDeserializer.swift:340 — ATNDeserializer.generateRuleBypassTransitions 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 · LexerATNSimulator.closure (cyclomatic 17) · ×1
  • LexerATNSimulator.closure (cyclomatic 17) runtime/Dart/lib/src/atn/src/lexer_atn_simulator.dart:414 — LexerATNSimulator.closure 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 · ATNDeserializer.VerifyATN (cyclomatic 16) · ×1
  • ATNDeserializer.VerifyATN (cyclomatic 16) runtime/CSharp/src/Atn/ATNDeserializer.cs:490 — ATNDeserializer.VerifyATN 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 · LeftRecursiveRuleAnalyzer.text (cyclomatic 16) · ×1
  • LeftRecursiveRuleAnalyzer.text (cyclomatic 16) tool/src/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.java:324 — LeftRecursiveRuleAnalyzer.text 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 · Interpreter.interp (cyclomatic 16) · ×1
  • Interpreter.interp (cyclomatic 16) tool/src/org/antlr/v4/gui/Interpreter.java:132 — Interpreter.interp 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 · Interpreter.<init> (cyclomatic 16) · ×1
  • Interpreter.<init> (cyclomatic 16) tool/src/org/antlr/v4/gui/Interpreter.java:63 — Interpreter.<init> 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 · ScopeParser._parsePrefixDecl (cyclomatic 16) · ×1
  • ScopeParser._parsePrefixDecl (cyclomatic 16) tool/src/org/antlr/v4/parse/ScopeParser.java:144 — ScopeParser._parsePrefixDecl 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 · ParserInterpreter.visitState (cyclomatic 16) · ×1
  • ParserInterpreter.visitState (cyclomatic 16) runtime/Python3/src/antlr4/ParserInterpreter.py:99 — ParserInterpreter.visitState 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 · LexerATNSimulator.closure (cyclomatic 16) · ×1
  • LexerATNSimulator.closure (cyclomatic 16) runtime/Swift/Sources/Antlr4/atn/LexerATNSimulator.swift:413 — LexerATNSimulator.closure 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 · ParserATNSimulator.execATNWithFullContext (cyclomatic 16) · ×1
  • ParserATNSimulator.execATNWithFullContext (cyclomatic 16) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:635 — ParserATNSimulator.execATNWithFullContext 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 · ATNDeserializer.generateRuleBypassTransition (cyclomatic 16) · ×1
  • ATNDeserializer.generateRuleBypassTransition (cyclomatic 16) runtime/Dart/lib/src/atn/src/atn_deserializer.dart:333 — ATNDeserializer.generateRuleBypassTransition 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.
D19 · Documentation Quality · Low XML-doc coverage · ×1
  • Low XML-doc coverage: Antlr4 runtime/CSharp/src/Antlr4.csproj — Antlr4: 35 % XML-doc coverage (548/1546).
D2 · Cognitive Complexity · GrammarTransformPipeline.integrateImportedGrammars (cognitive 125) · ×1
  • GrammarTransformPipeline.integrateImportedGrammars (cognitive 125) tool/src/org/antlr/v4/tool/GrammarTransformPipeline.java:156 — GrammarTransformPipeline.integrateImportedGrammars has cognitive complexity 125 (threshold 15). Drivers by points: if/else 28 (84 pts), loops 13 (40 pts), boolean chains 1 (nesting depth added 83). To reduce it, split the body into named stages: move each independent 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 · ATNDeserializer.deserialize (cognitive 125) · ×1
  • ATNDeserializer.deserialize (cognitive 125) runtime/Java/src/org/antlr/v4/runtime/atn/ATNDeserializer.java:51 — ATNDeserializer.deserialize has cognitive complexity 125 (threshold 15). Drivers by points: if/else 30 (83 pts), loops 22 (40 pts), boolean chains 2 (nesting depth added 71). To reduce it, split the body into named stages: move each independent 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 · CodeGenPipeline.process (cognitive 85) · ×1
  • CodeGenPipeline.process (cognitive 85) tool/src/org/antlr/v4/codegen/CodeGenPipeline.java:22 — CodeGenPipeline.process has cognitive complexity 85 (threshold 15). Drivers by points: if/else 29 (81 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 53). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · antlr.reduceToSingleOperationPerIndex (cognitive 84) · ×1
  • antlr.reduceToSingleOperationPerIndex (cognitive 84) runtime/Go/antlr/v4/tokenstream_rewriter.go:537 — antlr.reduceToSingleOperationPerIndex has cognitive complexity 84 (threshold 15). Drivers by points: if/else 22 (63 pts), loops 7 (11 pts), boolean chains 10 (nesting depth added 45). To reduce it, split the body into named stages: move each independent 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 · ATNOptimizer.optimizeSets (cognitive 72) · ×1
  • ATNOptimizer.optimizeSets (cognitive 72) tool/src/org/antlr/v4/automata/ATNOptimizer.java:41 — ATNOptimizer.optimizeSets has cognitive complexity 72 (threshold 15). Drivers by points: if/else 16 (49 pts), loops 7 (21 pts), boolean chains 2 (nesting depth added 47). To reduce it, split the body into named stages: move each independent 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 · RewriteOperationArray.reduceToSingleOperationPerIndex (cognitive 72) · ×1
  • RewriteOperationArray.reduceToSingleOperationPerIndex (cognitive 72) runtime/Swift/Sources/Antlr4/TokenStreamRewriter.swift:247 — RewriteOperationArray.reduceToSingleOperationPerIndex has cognitive complexity 72 (threshold 15). Drivers by points: if/else 19 (55 pts), loops 7 (11 pts), boolean chains 6 (nesting depth added 40). To reduce it, split the body into named stages: move each independent 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 · CharSupport.getStringFromGrammarStringLiteral (cognitive 64) · ×1
  • CharSupport.getStringFromGrammarStringLiteral (cognitive 64) tool/src/org/antlr/v4/misc/CharSupport.java:86 — CharSupport.getStringFromGrammarStringLiteral has cognitive complexity 64 (threshold 15). Drivers by points: if/else 12 (45 pts), loops 3 (11 pts), boolean chains 8 (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IntervalSet.And (cognitive 62) · ×1
  • IntervalSet.And (cognitive 62) runtime/CSharp/src/Misc/IntervalSet.cs:374 — IntervalSet.And has cognitive complexity 62 (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 · IntervalSet.and (cognitive 62) · ×1
  • IntervalSet.and (cognitive 62) runtime/Swift/Sources/Antlr4/misc/IntervalSet.swift:324 — IntervalSet.and has cognitive complexity 62 (threshold 15). Drivers by points: if/else 17 (60 pts), boolean chains 1, loops 1 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DOTGenerator.getDOT (cognitive 58) · ×1
  • DOTGenerator.getDOT (cognitive 58) tool/src/org/antlr/v4/tool/DOTGenerator.java:181 — DOTGenerator.getDOT has cognitive complexity 58 (threshold 15). Drivers by points: if/else 25 (53 pts), loops 4 (5 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent 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 · reduceToSingleOperationPerIndex (cognitive 58) · ×1
  • reduceToSingleOperationPerIndex (cognitive 58) runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:215 — reduceToSingleOperationPerIndex has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 7 (11 pts), boolean chains 6, ternaries 1 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent 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 · TokenStreamRewriter.reduceToSingleOperationPerIndex (cognitive 57) · ×1
  • TokenStreamRewriter.reduceToSingleOperationPerIndex (cognitive 57) runtime/Java/src/org/antlr/v4/runtime/TokenStreamRewriter.java:478 — TokenStreamRewriter.reduceToSingleOperationPerIndex has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 7 (11 pts), boolean chains 5, ternaries 1 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent 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 · TokenStreamRewriter.ReduceToSingleOperationPerIndex (cognitive 56) · ×1
  • TokenStreamRewriter.ReduceToSingleOperationPerIndex (cognitive 56) runtime/CSharp/src/TokenStreamRewriter.cs:567 — TokenStreamRewriter.ReduceToSingleOperationPerIndex has cognitive complexity 56 (threshold 15). To reduce it, split the body into named stages: move each independent 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 · ParseTreePatternMatcher.MatchImpl (cognitive 54) · ×1
  • ParseTreePatternMatcher.MatchImpl (cognitive 54) runtime/CSharp/src/Tree/Pattern/ParseTreePatternMatcher.cs:390 — ParseTreePatternMatcher.MatchImpl 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 · ParserATNSimulator.execATN (cognitive 54) · ×1
  • ParserATNSimulator.execATN (cognitive 54) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:395 — ParserATNSimulator.execATN has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (51 pts), boolean chains 2, loops 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ParserATNSimulator.execATN (cognitive 53) · ×1
  • ParserATNSimulator.execATN (cognitive 53) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:423 — ParserATNSimulator.execATN has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (47 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ATNDeserializer.InlineSetRules (cognitive 52) · ×1
  • ATNDeserializer.InlineSetRules (cognitive 52) runtime/CSharp/src/Atn/ATNDeserializer.cs:573 — ATNDeserializer.InlineSetRules 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 · ParseTreePatternMatcher.matchImpl (cognitive 52) · ×1
  • ParseTreePatternMatcher.matchImpl (cognitive 52) runtime/Swift/Sources/Antlr4/tree/pattern/ParseTreePatternMatcher.swift:210 — ParseTreePatternMatcher.matchImpl has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (48 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ATNDeserializer.OptimizeSets (cognitive 51) · ×1
  • ATNDeserializer.OptimizeSets (cognitive 51) runtime/CSharp/src/Atn/ATNDeserializer.cs:774 — ATNDeserializer.OptimizeSets 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 · ParserATNSimulator.ExecATN (cognitive 51) · ×1
  • ParserATNSimulator.ExecATN (cognitive 51) runtime/CSharp/src/Atn/ParserATNSimulator.cs:418 — ParserATNSimulator.ExecATN has cognitive complexity 51 (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 · Tool.handleArgs (cognitive 51) · ×1
  • Tool.handleArgs (cognitive 51) tool/src/org/antlr/v4/Tool.java:198 — Tool.handleArgs has cognitive complexity 51 (threshold 15). Drivers by points: if/else 19 (40 pts), boolean chains 4, error handling 1 (4 pts), loops 2 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent 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 · mergeArrays (cognitive 50) · ×1
  • mergeArrays (cognitive 50) runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:131 — mergeArrays has cognitive complexity 50 (threshold 15). Drivers by points: if/else 23 (39 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.CombineChainedEpsilons (cognitive 49) · ×1
  • ATNDeserializer.CombineChainedEpsilons (cognitive 49) runtime/CSharp/src/Atn/ATNDeserializer.cs:705 — ATNDeserializer.CombineChainedEpsilons has cognitive complexity 49 (threshold 15). To reduce it, split the body into named stages: move each independent 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 · PredictionContext.MergeArrays (cognitive 49) · ×1
  • PredictionContext.MergeArrays (cognitive 49) runtime/CSharp/src/Atn/PredictionContext.cs:225 — PredictionContext.MergeArrays has cognitive complexity 49 (threshold 15). To reduce it, split the body into named stages: move each independent 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 · RuleDependencyChecker.CheckDependencies (cognitive 49) · ×1
  • RuleDependencyChecker.CheckDependencies (cognitive 49) runtime/CSharp/src/Misc/RuleDependencyChecker.cs:81 — RuleDependencyChecker.CheckDependencies has cognitive complexity 49 (threshold 15). To reduce it, split the body into named stages: move each independent 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 · antlr.mergeArrays (cognitive 48) · ×1
  • antlr.mergeArrays (cognitive 48) runtime/Go/antlr/v4/prediction_context.go:546 — antlr.mergeArrays has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (39 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.closureWork (cognitive 48) · ×1
  • ParserATNSimulator.closureWork (cognitive 48) runtime/Go/antlr/v4/parser_atn_simulator.go:1115 — ParserATNSimulator.closureWork has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (44 pts), boolean chains 3, loops 1 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TokenStreamRewriter._reduceToSingleOperationPerIndex (cognitive 47) · ×1
  • TokenStreamRewriter._reduceToSingleOperationPerIndex (cognitive 47) runtime/Python3/src/antlr4/TokenStreamRewriter.py:140 — TokenStreamRewriter._reduceToSingleOperationPerIndex has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (34 pts), loops 7 (11 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent 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 · ParserATNSimulator.computeReachSet (cognitive 45) · ×1
  • ParserATNSimulator.computeReachSet (cognitive 45) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:698 — ParserATNSimulator.computeReachSet has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (34 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.GenerateRuleBypassTransitions (cognitive 44) · ×1
  • ATNDeserializer.GenerateRuleBypassTransitions (cognitive 44) runtime/CSharp/src/Atn/ATNDeserializer.cs:88 — ATNDeserializer.GenerateRuleBypassTransitions has cognitive complexity 44 (threshold 15). To reduce it, split the body into named stages: move each independent 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 · ParserATNSimulator.Closure_ (cognitive 44) · ×1
  • ParserATNSimulator.Closure_ (cognitive 44) runtime/CSharp/src/Atn/ParserATNSimulator.cs:1606 — ParserATNSimulator.Closure_ has cognitive complexity 44 (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 · ATNDeserializer.readEdges (cognitive 44) · ×1
  • ATNDeserializer.readEdges (cognitive 44) runtime/Dart/lib/src/atn/src/atn_deserializer.dart:222 — ATNDeserializer.readEdges has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (33 pts), loops 6 (11 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent 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 · ScopeParser._splitArgumentList (cognitive 43) · ×1
  • ScopeParser._splitArgumentList (cognitive 43) tool/src/org/antlr/v4/parse/ScopeParser.java:265 — ScopeParser._splitArgumentList has cognitive complexity 43 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 5 (13 pts), boolean chains 9, match/switch 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.generateRuleBypassTransitions (cognitive 43) · ×1
  • ATNDeserializer.generateRuleBypassTransitions (cognitive 43) runtime/Swift/Sources/Antlr4/atn/ATNDeserializer.swift:340 — ATNDeserializer.generateRuleBypassTransitions has cognitive complexity 43 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 5 (11 pts), boolean chains 3 (nesting depth added 26). To reduce it, split the body into named stages: move each independent 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 · LL1Analyzer._LOOK (cognitive 43) · ×1
  • LL1Analyzer._LOOK (cognitive 43) runtime/Swift/Sources/Antlr4/atn/LL1Analyzer.swift:131 — LL1Analyzer._LOOK has cognitive complexity 43 (threshold 15). Drivers by points: if/else 20 (37 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.computeReachSet (cognitive 42) · ×1
  • ParserATNSimulator.computeReachSet (cognitive 42) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:754 — ParserATNSimulator.computeReachSet has cognitive complexity 42 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LL1Analyzer._LOOK (cognitive 42) · ×1
  • LL1Analyzer._LOOK (cognitive 42) runtime/Dart/lib/src/ll1_analyzer.dart:97 — LL1Analyzer._LOOK has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (35 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParseTreePatternMatcher.Split (cognitive 41) · ×1
  • ParseTreePatternMatcher.Split (cognitive 41) runtime/CSharp/src/Tree/Pattern/ParseTreePatternMatcher.cs:587 — ParseTreePatternMatcher.Split has cognitive complexity 41 (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 · LexerATNFactory.checkRangeAndAddToSet (cognitive 41) · ×1
  • LexerATNFactory.checkRangeAndAddToSet (cognitive 41) tool/src/org/antlr/v4/automata/LexerATNFactory.java:550 — LexerATNFactory.checkRangeAndAddToSet has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 2 (9 pts), ternaries 1 (5 pts), boolean chains 2 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LL1Analyzer.look1 (cognitive 41) · ×1
  • LL1Analyzer.look1 (cognitive 41) runtime/Go/antlr/v4/ll1_analyzer.go:122 — LL1Analyzer.look1 has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (35 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 17). Of this number, 38 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent 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 · LL1Analyzer.Look_ (cognitive 40) · ×1
  • LL1Analyzer.Look_ (cognitive 40) runtime/CSharp/src/Atn/LL1Analyzer.cs:142 — LL1Analyzer.Look_ 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 · PredictionContext.ToStrings (cognitive 40) · ×1
  • PredictionContext.ToStrings (cognitive 40) runtime/CSharp/src/Atn/PredictionContext.cs:491 — PredictionContext.ToStrings 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 · ATNDeserializer.ReadEdges (cognitive 39) · ×1
  • ATNDeserializer.ReadEdges (cognitive 39) runtime/CSharp/src/Atn/ATNDeserializer.cs:219 — ATNDeserializer.ReadEdges 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.
D2 · Cognitive Complexity · EscapeSequenceParsing.parseEscape (cognitive 39) · ×1
  • EscapeSequenceParsing.parseEscape (cognitive 39) tool/src/org/antlr/v4/misc/EscapeSequenceParsing.java:83 — EscapeSequenceParsing.parseEscape has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 5 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.readEdges (cognitive 39) · ×1
  • ATNDeserializer.readEdges (cognitive 39) runtime/Python3/src/antlr4/atn/ATNDeserializer.py:137 — ATNDeserializer.readEdges has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 6 (11 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent 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 · ParserATNSimulator.computeReachSet (cognitive 39) · ×1
  • ParserATNSimulator.computeReachSet (cognitive 39) runtime/Go/antlr/v4/parser_atn_simulator.go:526 — ParserATNSimulator.computeReachSet has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (28 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PredictionContext.mergeArrays (cognitive 39) · ×1
  • PredictionContext.mergeArrays (cognitive 39) runtime/Dart/lib/src/prediction_context.dart:319 — PredictionContext.mergeArrays has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParseTreePatternMatcher.matchImpl (cognitive 38) · ×1
  • ParseTreePatternMatcher.matchImpl (cognitive 38) runtime/Java/src/org/antlr/v4/runtime/tree/pattern/ParseTreePatternMatcher.java:256 — ParseTreePatternMatcher.matchImpl has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.closureCheckingStopState (cognitive 38) · ×1
  • ParserATNSimulator.closureCheckingStopState (cognitive 38) runtime/Go/antlr/v4/parser_atn_simulator.go:996 — ParserATNSimulator.closureCheckingStopState has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (33 pts), loops 2 (5 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ATNPrinter.asString (cognitive 37) · ×1
  • ATNPrinter.asString (cognitive 37) tool/src/org/antlr/v4/automata/ATNPrinter.java:45 — ATNPrinter.asString has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (24 pts), ternaries 2 (10 pts), loops 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DOTGenerator.getStateLabel (cognitive 37) · ×1
  • DOTGenerator.getStateLabel (cognitive 37) tool/src/org/antlr/v4/tool/DOTGenerator.java:111 — DOTGenerator.getStateLabel has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (25 pts), loops 3 (11 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent 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 · ParserATNSimulator.ComputeReachSet (cognitive 36) · ×1
  • ParserATNSimulator.ComputeReachSet (cognitive 36) runtime/CSharp/src/Atn/ParserATNSimulator.cs:786 — ParserATNSimulator.ComputeReachSet 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 · ParserATNSimulator.execATNWithFullContext (cognitive 36) · ×1
  • ParserATNSimulator.execATNWithFullContext (cognitive 36) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:635 — ParserATNSimulator.execATNWithFullContext has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (33 pts), boolean chains 2, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Target.getTargetStringLiteralFromANTLRStringLiteral (cognitive 35) · ×1
  • Target.getTargetStringLiteralFromANTLRStringLiteral (cognitive 35) tool/src/org/antlr/v4/codegen/Target.java:237 — Target.getTargetStringLiteralFromANTLRStringLiteral has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 2 (6 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SymbolChecks.checkForLabelConflicts (cognitive 35) · ×1
  • SymbolChecks.checkForLabelConflicts (cognitive 35) tool/src/org/antlr/v4/semantics/SymbolChecks.java:117 — SymbolChecks.checkForLabelConflicts has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 5 (16 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent 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 · LL1Analyzer._LOOK (cognitive 35) · ×1
  • LL1Analyzer._LOOK (cognitive 35) runtime/Python3/src/antlr4/LL1Analyzer.py:110 — LL1Analyzer._LOOK has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PredictionContext.toStrings (cognitive 35) · ×1
  • PredictionContext.toStrings (cognitive 35) runtime/Swift/Sources/Antlr4/atn/PredictionContext.swift:649 — PredictionContext.toStrings has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PredictionContext.MergeSingletons (cognitive 34) · ×1
  • PredictionContext.MergeSingletons (cognitive 34) runtime/CSharp/src/Atn/PredictionContext.cs:137 — PredictionContext.MergeSingletons 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 · ParseTreePatternMatcher.matchImpl (cognitive 34) · ×1
  • ParseTreePatternMatcher.matchImpl (cognitive 34) runtime/Python3/src/antlr4/tree/ParseTreePatternMatcher.py:195 — ParseTreePatternMatcher.matchImpl has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ATNDeserializer.generateRuleBypassTransition (cognitive 34) · ×1
  • ATNDeserializer.generateRuleBypassTransition (cognitive 34) runtime/Dart/lib/src/atn/src/atn_deserializer.dart:333 — ATNDeserializer.generateRuleBypassTransition has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LexerATNSimulator.Closure (cognitive 33) · ×1
  • LexerATNSimulator.Closure (cognitive 33) runtime/CSharp/src/Atn/LexerATNSimulator.cs:407 — LexerATNSimulator.Closure 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 · GrammarTransformPipeline.extractImplicitLexer (cognitive 33) · ×1
  • GrammarTransformPipeline.extractImplicitLexer (cognitive 33) tool/src/org/antlr/v4/tool/GrammarTransformPipeline.java:385 — GrammarTransformPipeline.extractImplicitLexer has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 7 (10 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PredictionContext.mergeSingletons (cognitive 33) · ×1
  • PredictionContext.mergeSingletons (cognitive 33) runtime/Dart/lib/src/prediction_context.dart:155 — PredictionContext.mergeSingletons has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParseTreePatternMatcher.matchImpl (cognitive 33) · ×1
  • ParseTreePatternMatcher.matchImpl (cognitive 33) runtime/Dart/lib/src/tree/src/pattern/parse_tree_match.dart:363 — ParseTreePatternMatcher.matchImpl has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (29 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ATNDeserializer.VerifyATN (cognitive 32) · ×1
  • ATNDeserializer.VerifyATN (cognitive 32) runtime/CSharp/src/Atn/ATNDeserializer.cs:490 — ATNDeserializer.VerifyATN 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 · OutputModelWalker.walk (cognitive 32) · ×1
  • OutputModelWalker.walk (cognitive 32) tool/src/org/antlr/v4/codegen/OutputModelWalker.java:54 — OutputModelWalker.walk has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 3 (7 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InterpreterDataReader.parseFile (cognitive 32) · ×1
  • InterpreterDataReader.parseFile (cognitive 32) runtime/Java/src/org/antlr/v4/runtime/misc/InterpreterDataReader.java:55 — InterpreterDataReader.parseFile has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 6 (8 pts), ternaries 2 (4 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LexerATNSimulator.closure (cognitive 32) · ×1
  • LexerATNSimulator.closure (cognitive 32) runtime/Go/antlr/v4/lexer_atn_simulator.go:349 — LexerATNSimulator.closure has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.verifyATN (cognitive 32) · ×1
  • ATNDeserializer.verifyATN (cognitive 32) runtime/Swift/Sources/Antlr4/atn/ATNDeserializer.swift:423 — ATNDeserializer.verifyATN has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PredictionContextUtils.mergeSingletons (cognitive 32) · ×1
  • PredictionContextUtils.mergeSingletons (cognitive 32) runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:292 — PredictionContextUtils.mergeSingletons has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LexerATNSimulator.closure (cognitive 31) · ×1
  • LexerATNSimulator.closure (cognitive 31) runtime/Swift/Sources/Antlr4/atn/LexerATNSimulator.swift:413 — LexerATNSimulator.closure has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (25 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LeftRecursiveRuleAnalyzer.text (cognitive 30) · ×1
  • LeftRecursiveRuleAnalyzer.text (cognitive 30) tool/src/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.java:324 — LeftRecursiveRuleAnalyzer.text has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParseTreePatternMatcher.split (cognitive 30) · ×1
  • ParseTreePatternMatcher.split (cognitive 30) runtime/Swift/Sources/Antlr4/tree/pattern/ParseTreePatternMatcher.swift:351 — ParseTreePatternMatcher.split has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (25 pts), loops 4, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.computeReachSet (cognitive 30) · ×1
  • ParserATNSimulator.computeReachSet (cognitive 30) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:800 — ParserATNSimulator.computeReachSet has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 4 (7 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lexer.nextToken (cognitive 30) · ×1
  • Lexer.nextToken (cognitive 30) runtime/JavaScript/src/antlr4/Lexer.js:91 — Lexer.nextToken has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SymbolChecks.checkForUnreachableTokens (cognitive 29) · ×1
  • SymbolChecks.checkForUnreachableTokens (cognitive 29) tool/src/org/antlr/v4/semantics/SymbolChecks.java:338 — SymbolChecks.checkForUnreachableTokens has cognitive complexity 29 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 4 (13 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNSerializer.addEdges (cognitive 29) · ×1
  • ATNSerializer.addEdges (cognitive 29) runtime/Java/src/org/antlr/v4/runtime/atn/ATNSerializer.java:159 — ATNSerializer.addEdges has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (15 pts), ternaries 2 (8 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LexerATNSimulator.closure (cognitive 29) · ×1
  • LexerATNSimulator.closure (cognitive 29) runtime/Dart/lib/src/atn/src/lexer_atn_simulator.dart:414 — LexerATNSimulator.closure has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.closureCheckingStopState (cognitive 29) · ×1
  • ParserATNSimulator.closureCheckingStopState (cognitive 29) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1211 — ParserATNSimulator.closureCheckingStopState has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ParserATNSimulator.ClosureCheckingStopState (cognitive 28) · ×1
  • ParserATNSimulator.ClosureCheckingStopState (cognitive 28) runtime/CSharp/src/Atn/ParserATNSimulator.cs:1537 — ParserATNSimulator.ClosureCheckingStopState has cognitive complexity 28 (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 · DOTGenerator.getDOT (cognitive 28) · ×1
  • DOTGenerator.getDOT (cognitive 28) tool/src/org/antlr/v4/tool/DOTGenerator.java:60 — DOTGenerator.getDOT has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 4 (6 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.closureCheckingStopStateRecursive (cognitive 28) · ×1
  • ParserATNSimulator.closureCheckingStopStateRecursive (cognitive 28) runtime/Go/antlr/v4/parser_atn_simulator.go:1063 — ParserATNSimulator.closureCheckingStopStateRecursive has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 1 (3 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Lexer.nextToken (cognitive 28) · ×1
  • Lexer.nextToken (cognitive 28) runtime/Swift/Sources/Antlr4/Lexer.swift:128 — Lexer.nextToken has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 2 (5 pts), error handling 1 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnbufferedCharStream.fill (cognitive 27) · ×1
  • UnbufferedCharStream.fill (cognitive 27) runtime/Java/src/org/antlr/v4/runtime/UnbufferedCharStream.java:158 — UnbufferedCharStream.fill has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.validateStates (cognitive 27) · ×1
  • ATNDeserializer.validateStates (cognitive 27) runtime/Swift/Sources/Antlr4/atn/ATNDeserializer.swift:262 — ATNDeserializer.validateStates has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 3 (7 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PredictionContext.mergeArrays (cognitive 27) · ×1
  • PredictionContext.mergeArrays (cognitive 27) runtime/Swift/Sources/Antlr4/atn/PredictionContext.swift:371 — PredictionContext.mergeArrays has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lexer.nextToken (cognitive 27) · ×1
  • Lexer.nextToken (cognitive 27) runtime/Dart/lib/src/lexer.dart:108 — Lexer.nextToken has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 2 (5 pts), error handling 1 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParseTreePatternMatcher.split (cognitive 26) · ×1
  • ParseTreePatternMatcher.split (cognitive 26) runtime/Python3/src/antlr4/tree/ParseTreePatternMatcher.py:306 — ParseTreePatternMatcher.split has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 4, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IntervalSet.toString (cognitive 26) · ×1
  • IntervalSet.toString (cognitive 26) runtime/Dart/lib/src/interval_set.dart:530 — IntervalSet.toString has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.ExecATNWithFullContext (cognitive 25) · ×1
  • ParserATNSimulator.ExecATNWithFullContext (cognitive 25) runtime/CSharp/src/Atn/ParserATNSimulator.cs:652 — ParserATNSimulator.ExecATNWithFullContext 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 · IntervalSet.Subtract (cognitive 25) · ×1
  • IntervalSet.Subtract (cognitive 25) runtime/CSharp/src/Misc/IntervalSet.cs:280 — IntervalSet.Subtract 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 · ParseTreePatternMatcher.Tokenize (cognitive 25) · ×1
  • ParseTreePatternMatcher.Tokenize (cognitive 25) runtime/CSharp/src/Tree/Pattern/ParseTreePatternMatcher.cs:523 — ParseTreePatternMatcher.Tokenize 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 · UnbufferedCharStream.Fill (cognitive 25) · ×1
  • UnbufferedCharStream.Fill (cognitive 25) runtime/CSharp/src/UnbufferedCharStream.cs:211 — UnbufferedCharStream.Fill 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 · LexerATNFactory.checkCommands (cognitive 25) · ×1
  • LexerATNFactory.checkCommands (cognitive 25) tool/src/org/antlr/v4/automata/LexerATNFactory.java:688 — LexerATNFactory.checkCommands has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Interpreter.<init> (cognitive 25) · ×1
  • Interpreter.<init> (cognitive 25) tool/src/org/antlr/v4/gui/Interpreter.java:63 — Interpreter.<init> has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SymbolChecks.getSingleTokenValues (cognitive 25) · ×1
  • SymbolChecks.getSingleTokenValues (cognitive 25) tool/src/org/antlr/v4/semantics/SymbolChecks.java:378 — SymbolChecks.getSingleTokenValues has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.closureCheckingStopState (cognitive 25) · ×1
  • ParserATNSimulator.closureCheckingStopState (cognitive 25) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1440 — ParserATNSimulator.closureCheckingStopState has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 1 (3 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Lexer.nextToken (cognitive 25) · ×1
  • Lexer.nextToken (cognitive 25) runtime/Python3/src/antlr4/Lexer.py:114 — Lexer.nextToken has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · antlr.mergeSingletons (cognitive 25) · ×1
  • antlr.mergeSingletons (cognitive 25) runtime/Go/antlr/v4/prediction_context.go:387 — antlr.mergeSingletons has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cognitive 25) · ×1
  • ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cognitive 25) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:1570 — ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 8, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PredictionContext.mergeSingletons (cognitive 25) · ×1
  • PredictionContext.mergeSingletons (cognitive 25) runtime/Swift/Sources/Antlr4/atn/PredictionContext.swift:200 — PredictionContext.mergeSingletons has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IntervalSet.subtract (cognitive 25) · ×1
  • IntervalSet.subtract (cognitive 25) runtime/Swift/Sources/Antlr4/misc/IntervalSet.swift:237 — IntervalSet.subtract has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParseTreePatternMatcher.tokenize (cognitive 25) · ×1
  • ParseTreePatternMatcher.tokenize (cognitive 25) runtime/Swift/Sources/Antlr4/tree/pattern/ParseTreePatternMatcher.swift:303 — ParseTreePatternMatcher.tokenize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RuleDependencyChecker.GetRuleVersions (cognitive 24) · ×1
  • RuleDependencyChecker.GetRuleVersions (cognitive 24) runtime/CSharp/src/Misc/RuleDependencyChecker.cs:213 — RuleDependencyChecker.GetRuleVersions 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 · ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cognitive 24) · ×1
  • ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cognitive 24) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:1661 — ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 8, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ListTokenSource.Line.get (cognitive 23) · ×1
  • ListTokenSource.Line.get (cognitive 23) runtime/CSharp/src/ListTokenSource.cs:217 — ListTokenSource.Line.get has cognitive complexity 23 (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 · IntervalSet.ToString (cognitive 23) · ×1
  • IntervalSet.ToString (cognitive 23) runtime/CSharp/src/Misc/IntervalSet.cs:616 — IntervalSet.ToString 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 · LexerATNFactory.createLexerAction (cognitive 23) · ×1
  • LexerATNFactory.createLexerAction (cognitive 23) tool/src/org/antlr/v4/automata/LexerATNFactory.java:634 — LexerATNFactory.createLexerAction has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RuleFunction.getDeclsForAllElements (cognitive 23) · ×1
  • RuleFunction.getDeclsForAllElements (cognitive 23) tool/src/org/antlr/v4/codegen/model/RuleFunction.java:173 — RuleFunction.getDeclsForAllElements has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScopeParser.parseAttributeDef (cognitive 23) · ×1
  • ScopeParser.parseAttributeDef (cognitive 23) tool/src/org/antlr/v4/parse/ScopeParser.java:68 — ScopeParser.parseAttributeDef has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Array2DHashSet.containsAll (cognitive 23) · ×1
  • Array2DHashSet.containsAll (cognitive 23) runtime/Java/src/org/antlr/v4/runtime/misc/Array2DHashSet.java:305 — Array2DHashSet.containsAll has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (7 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IntervalSet.and (cognitive 23) · ×1
  • IntervalSet.and (cognitive 23) runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:315 — IntervalSet.and has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.closureCheckingStopState (cognitive 23) · ×1
  • ParserATNSimulator.closureCheckingStopState (cognitive 23) runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:1103 — ParserATNSimulator.closureCheckingStopState has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 1 (3 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PredictionContext.String (cognitive 23) · ×1
  • PredictionContext.String (cognitive 23) runtime/Go/antlr/v4/prediction_context.go:222 — PredictionContext.String has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 12). 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 · ATNDeserializer.deserialize (cognitive 23) · ×1
  • ATNDeserializer.deserialize (cognitive 23) runtime/Swift/Sources/Antlr4/atn/ATNDeserializer.swift:18 — ATNDeserializer.deserialize has cognitive complexity 23 (threshold 15). Drivers by points: loops 10 (12 pts), if/else 8 (11 pts) (nesting depth added 5). 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 · IntervalSet.subtract (cognitive 23) · ×1
  • IntervalSet.subtract (cognitive 23) runtime/Dart/lib/src/interval_set.dart:320 — IntervalSet.subtract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNFactory.elemList (cognitive 22) · ×1
  • ParserATNFactory.elemList (cognitive 22) tool/src/org/antlr/v4/automata/ParserATNFactory.java:465 — ParserATNFactory.elemList has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Interpreter.interp (cognitive 22) · ×1
  • Interpreter.interp (cognitive 22) tool/src/org/antlr/v4/gui/Interpreter.java:132 — Interpreter.interp has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (15 pts), error handling 1 (2 pts), loops 1 (2 pts), ternaries 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · LeftRecursiveRule.getAltLabels (cognitive 22) · ×1
  • LeftRecursiveRule.getAltLabels (cognitive 22) tool/src/org/antlr/v4/tool/LeftRecursiveRule.java:117 — LeftRecursiveRule.getAltLabels has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.execATNWithFullContext (cognitive 22) · ×1
  • ParserATNSimulator.execATNWithFullContext (cognitive 22) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:622 — ParserATNSimulator.execATNWithFullContext has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IntervalSet.subtract (cognitive 22) · ×1
  • IntervalSet.subtract (cognitive 22) runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:229 — IntervalSet.subtract has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GrammarDependencies.analyse (cognitive 22) · ×1
  • GrammarDependencies.analyse (cognitive 22) REDACTED:212 — GrammarDependencies.analyse has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 4 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseLexer.NextToken (cognitive 22) · ×1
  • BaseLexer.NextToken (cognitive 22) runtime/Go/antlr/v4/lexer.go:181 — BaseLexer.NextToken has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cognitive 22) · ×1
  • ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cognitive 22) runtime/Go/antlr/v4/parser_atn_simulator.go:1183 — ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.consume (cognitive 22) · ×1
  • Parser.consume (cognitive 22) runtime/Swift/Sources/Antlr4/Parser.swift:536 — Parser.consume has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (8 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.verifyATN (cognitive 22) · ×1
  • ATNDeserializer.verifyATN (cognitive 22) runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js:463 — ATNDeserializer.verifyATN has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ParserATNSimulator.ApplyPrecedenceFilter (cognitive 21) · ×1
  • ParserATNSimulator.ApplyPrecedenceFilter (cognitive 21) runtime/CSharp/src/Atn/ParserATNSimulator.cs:1173 — ParserATNSimulator.ApplyPrecedenceFilter 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 · Parser.Consume (cognitive 21) · ×1
  • Parser.Consume (cognitive 21) runtime/CSharp/src/Parser.cs:724 — Parser.Consume 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 · TokenStreamRewriter.GetText (cognitive 21) · ×1
  • TokenStreamRewriter.GetText (cognitive 21) runtime/CSharp/src/TokenStreamRewriter.cs:456 — TokenStreamRewriter.GetText 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 · Trees.GetNodeText (cognitive 21) · ×1
  • Trees.GetNodeText (cognitive 21) runtime/CSharp/src/Tree/Trees.cs:83 — Trees.GetNodeText 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 · TailEpsilonRemover.visitState (cognitive 21) · ×1
  • TailEpsilonRemover.visitState (cognitive 21) tool/src/org/antlr/v4/automata/TailEpsilonRemover.java:31 — TailEpsilonRemover.visitState has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 3 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BuildDependencyGenerator.getGeneratedFileList (cognitive 21) · ×1
  • BuildDependencyGenerator.getGeneratedFileList (cognitive 21) tool/src/org/antlr/v4/tool/BuildDependencyGenerator.java:78 — BuildDependencyGenerator.getGeneratedFileList has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tool.sortGrammarByTokenVocab (cognitive 21) · ×1
  • Tool.sortGrammarByTokenVocab (cognitive 21) tool/src/org/antlr/v4/Tool.java:491 — Tool.sortGrammarByTokenVocab has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseParser.Consume (cognitive 21) · ×1
  • BaseParser.Consume (cognitive 21) runtime/Go/antlr/v4/parser.go:415 — BaseParser.Consume has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (8 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LexerATNSimulator.getReachableConfigSet (cognitive 21) · ×1
  • LexerATNSimulator.getReachableConfigSet (cognitive 21) runtime/Swift/Sources/Antlr4/atn/LexerATNSimulator.swift:319 — LexerATNSimulator.getReachableConfigSet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TokenStreamRewriter.getText (cognitive 21) · ×1
  • TokenStreamRewriter.getText (cognitive 21) runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:144 — TokenStreamRewriter.getText has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lexer.NextToken (cognitive 20) · ×1
  • Lexer.NextToken (cognitive 20) runtime/CSharp/src/Lexer.cs:141 — Lexer.NextToken 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 · Utils.EscapeWhitespace (cognitive 20) · ×1
  • Utils.EscapeWhitespace (cognitive 20) runtime/CSharp/src/Misc/Utils.cs:55 — Utils.EscapeWhitespace 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 · RuleFunction.addContextGetters (cognitive 20) · ×1
  • RuleFunction.addContextGetters (cognitive 20) tool/src/org/antlr/v4/codegen/model/RuleFunction.java:120 — RuleFunction.addContextGetters has cognitive complexity 20 (threshold 15). Drivers by points: loops 5 (14 pts), if/else 3 (6 pts) (nesting depth added 12). 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 · SemanticPipeline.assignLexerTokenTypes (cognitive 20) · ×1
  • SemanticPipeline.assignLexerTokenTypes (cognitive 20) tool/src/org/antlr/v4/semantics/SemanticPipeline.java:137 — SemanticPipeline.assignLexerTokenTypes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNSerializer.addEdges (cognitive 20) · ×1
  • ATNSerializer.addEdges (cognitive 20) runtime/Java/src/org/antlr/v4/runtime/atn/ATNSerializer.java:289 — ATNSerializer.addEdges has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lexer.nextToken (cognitive 20) · ×1
  • Lexer.nextToken (cognitive 20) runtime/Java/src/org/antlr/v4/runtime/Lexer.java:112 — Lexer.nextToken has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 1 (3 pts), loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.execATNWithFullContext (cognitive 20) · ×1
  • ParserATNSimulator.execATNWithFullContext (cognitive 20) runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:558 — ParserATNSimulator.execATNWithFullContext has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XPath.getXPathElement (cognitive 20) · ×1
  • XPath.getXPathElement (cognitive 20) runtime/Python3/src/antlr4/xpath/XPath.py:133 — XPath.getXPathElement has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 4 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseParserRuleContext.String (cognitive 20) · ×1
  • BaseParserRuleContext.String (cognitive 20) runtime/Go/antlr/v4/parser_rule_context.go:324 — BaseParserRuleContext.String has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserInterpreter.visitState (cognitive 20) · ×1
  • ParserInterpreter.visitState (cognitive 20) runtime/Swift/Sources/Antlr4/ParserInterpreter.swift:177 — ParserInterpreter.visitState has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.deriveEdgesForRuleStopStates (cognitive 20) · ×1
  • ATNDeserializer.deriveEdgesForRuleStopStates (cognitive 20) runtime/Swift/Sources/Antlr4/atn/ATNDeserializer.swift:236 — ATNDeserializer.deriveEdgesForRuleStopStates has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.adaptivePredict (cognitive 20) · ×1
  • ParserATNSimulator.adaptivePredict (cognitive 20) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:310 — ParserATNSimulator.adaptivePredict has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PredictionContext.getCachedContext (cognitive 20) · ×1
  • PredictionContext.getCachedContext (cognitive 20) runtime/Swift/Sources/Antlr4/atn/PredictionContext.swift:549 — PredictionContext.getCachedContext has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LexerATNSimulator.GetReachableConfigSet (cognitive 19) · ×1
  • LexerATNSimulator.GetReachableConfigSet (cognitive 19) runtime/CSharp/src/Atn/LexerATNSimulator.cs:308 — LexerATNSimulator.GetReachableConfigSet 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 · ParserATNSimulator.CanDropLoopEntryEdgeInLeftRecursiveRule (cognitive 19) · ×1
  • ParserATNSimulator.CanDropLoopEntryEdgeInLeftRecursiveRule (cognitive 19) runtime/CSharp/src/Atn/ParserATNSimulator.cs:1777 — ParserATNSimulator.CanDropLoopEntryEdgeInLeftRecursiveRule 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 · GrammarParserInterpreter.visitDecisionState (cognitive 19) · ×1
  • GrammarParserInterpreter.visitDecisionState (cognitive 19) tool/src/org/antlr/v4/tool/GrammarParserInterpreter.java:163 — GrammarParserInterpreter.visitDecisionState has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cognitive 19) · ×1
  • ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule (cognitive 19) runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:1285 — ParserATNSimulator.canDropLoopEntryEdgeInLeftRecursiveRule has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 4, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParseTreePatternMatcher.tokenize (cognitive 19) · ×1
  • ParseTreePatternMatcher.tokenize (cognitive 19) runtime/Python3/src/antlr4/tree/ParseTreePatternMatcher.py:275 — ParseTreePatternMatcher.tokenize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IntervalSet.addInterval (cognitive 19) · ×1
  • IntervalSet.addInterval (cognitive 19) runtime/Go/antlr/v4/interval_set.go:91 — IntervalSet.addInterval has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LexerAction.swift.== (cognitive 19) · ×1
  • LexerAction.swift.== (cognitive 19) runtime/Swift/Sources/Antlr4/atn/LexerAction.swift:65 — LexerAction.swift.== has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 9. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between 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 · PredictionContextUtils.getCachedPredictionContext (cognitive 19) · ×1
  • PredictionContextUtils.getCachedPredictionContext (cognitive 19) runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:33 — PredictionContextUtils.getCachedPredictionContext has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.TestTailCall (cognitive 18) · ×1
  • ATNDeserializer.TestTailCall (cognitive 18) runtime/CSharp/src/Atn/ATNDeserializer.cs:911 — ATNDeserializer.TestTailCall 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 · ParserATNSimulator.EvalSemanticContext (cognitive 18) · ×1
  • ParserATNSimulator.EvalSemanticContext (cognitive 18) runtime/CSharp/src/Atn/ParserATNSimulator.cs:1444 — ParserATNSimulator.EvalSemanticContext 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 · PredictionContext.GetCachedContext (cognitive 18) · ×1
  • PredictionContext.GetCachedContext (cognitive 18) runtime/CSharp/src/Atn/PredictionContext.cs:410 — PredictionContext.GetCachedContext 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 · IntervalSet.Add (cognitive 18) · ×1
  • IntervalSet.Add (cognitive 18) runtime/CSharp/src/Misc/IntervalSet.cs:130 — IntervalSet.Add 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 · LeftRecursiveRuleTransformer.translateLeftRecursiveRules (cognitive 18) · ×1
  • LeftRecursiveRuleTransformer.translateLeftRecursiveRules (cognitive 18) tool/src/org/antlr/v4/analysis/LeftRecursiveRuleTransformer.java:64 — LeftRecursiveRuleTransformer.translateLeftRecursiveRules has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LexerATNFactory.set (cognitive 18) · ×1
  • LexerATNFactory.set (cognitive 18) tool/src/org/antlr/v4/automata/LexerATNFactory.java:245 — LexerATNFactory.set has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScopeParser._parsePrefixDecl (cognitive 18) · ×1
  • ScopeParser._parsePrefixDecl (cognitive 18) tool/src/org/antlr/v4/parse/ScopeParser.java:144 — ScopeParser._parsePrefixDecl has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNSerializer.serializeSets (cognitive 18) · ×1
  • ATNSerializer.serializeSets (cognitive 18) runtime/Java/src/org/antlr/v4/runtime/atn/ATNSerializer.java:335 — ATNSerializer.serializeSets has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IterativeParseTreeWalker.walk (cognitive 18) · ×1
  • IterativeParseTreeWalker.walk (cognitive 18) runtime/Java/src/org/antlr/v4/runtime/tree/IterativeParseTreeWalker.java:22 — IterativeParseTreeWalker.walk has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · antlr.getCachedBasePredictionContext (cognitive 18) · ×1
  • antlr.getCachedBasePredictionContext (cognitive 18) runtime/Go/antlr/v4/prediction_context.go:680 — antlr.getCachedBasePredictionContext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JMap.Put (cognitive 18) · ×1
  • JMap.Put (cognitive 18) runtime/Go/antlr/v4/jcollect.go:300 — JMap.Put has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RuleContext.toString (cognitive 18) · ×1
  • RuleContext.toString (cognitive 18) runtime/JavaScript/src/antlr4/context/RuleContext.js:135 — RuleContext.toString has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 6, ternaries 1 (3 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.applyPrecedenceFilter (cognitive 18) · ×1
  • ParserATNSimulator.applyPrecedenceFilter (cognitive 18) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:946 — ParserATNSimulator.applyPrecedenceFilter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ListTokenSource.Column.get (cognitive 17) · ×1
  • ListTokenSource.Column.get (cognitive 17) runtime/CSharp/src/ListTokenSource.cs:146 — ListTokenSource.Column.get 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 · IntervalSet.ToString (cognitive 17) · ×1
  • IntervalSet.ToString (cognitive 17) runtime/CSharp/src/Misc/IntervalSet.cs:674 — IntervalSet.ToString 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 · LexerATNFactory.getSetFromCharSetLiteral (cognitive 17) · ×1
  • LexerATNFactory.getSetFromCharSetLiteral (cognitive 17) tool/src/org/antlr/v4/automata/LexerATNFactory.java:419 — LexerATNFactory.getSetFromCharSetLiteral has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IntervalSet.toString (cognitive 17) · ×1
  • IntervalSet.toString (cognitive 17) runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:515 — IntervalSet.toString has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Antlr4Mojo.execute (cognitive 17) · ×1
  • Antlr4Mojo.execute (cognitive 17) antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java:223 — Antlr4Mojo.execute has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (6 pts), if/else 5 (6 pts), loops 3 (5 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XPath.split (cognitive 17) · ×1
  • XPath.split (cognitive 17) runtime/Python3/src/antlr4/xpath/XPath.py:80 — XPath.split has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JStore.Put (cognitive 17) · ×1
  • JStore.Put (cognitive 17) runtime/Go/antlr/v4/jcollect.go:159 — JStore.Put has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JPCMap.Put (cognitive 17) · ×1
  • JPCMap.Put (cognitive 17) runtime/Go/antlr/v4/jcollect.go:444 — JPCMap.Put has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNConfigSet.applyPrecedenceFilter (cognitive 17) · ×1
  • ATNConfigSet.applyPrecedenceFilter (cognitive 17) runtime/Swift/Sources/Antlr4/atn/ATNConfigSet.swift:400 — ATNConfigSet.applyPrecedenceFilter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LexerATNSimulator.execATN (cognitive 17) · ×1
  • LexerATNSimulator.execATN (cognitive 17) runtime/Swift/Sources/Antlr4/atn/LexerATNSimulator.swift:165 — LexerATNSimulator.execATN has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.adaptivePredict (cognitive 17) · ×1
  • ParserATNSimulator.adaptivePredict (cognitive 17) runtime/Dart/lib/src/atn/src/parser_atn_simulator.dart:321 — ParserATNSimulator.adaptivePredict has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LexerATNSimulator.ExecATN (cognitive 16) · ×1
  • LexerATNSimulator.ExecATN (cognitive 16) runtime/CSharp/src/Atn/LexerATNSimulator.cs:141 — LexerATNSimulator.ExecATN 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 · ArrayEdgeMap.PutAll (cognitive 16) · ×1
  • ArrayEdgeMap.PutAll (cognitive 16) runtime/CSharp/src/Dfa/ArrayEdgeMap.cs:87 — ArrayEdgeMap.PutAll 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 · DFASerializer.ToString (cognitive 16) · ×1
  • DFASerializer.ToString (cognitive 16) runtime/CSharp/src/Dfa/DFASerializer.cs:48 — DFASerializer.ToString 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 · ParserInterpreter.Parse (cognitive 16) · ×1
  • ParserInterpreter.Parse (cognitive 16) runtime/CSharp/src/ParserInterpreter.cs:112 — ParserInterpreter.Parse 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 · RuleContext.ToString (cognitive 16) · ×1
  • RuleContext.ToString (cognitive 16) runtime/CSharp/src/RuleContext.cs:290 — RuleContext.ToString 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 · LeftRecursiveRuleAnalyzer.hasImmediateRecursiveRuleRefs (cognitive 16) · ×1
  • LeftRecursiveRuleAnalyzer.hasImmediateRecursiveRuleRefs (cognitive 16) tool/src/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.java:263 — LeftRecursiveRuleAnalyzer.hasImmediateRecursiveRuleRefs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ScopeParser._parsePostfixDecl (cognitive 16) · ×1
  • ScopeParser._parsePostfixDecl (cognitive 16) tool/src/org/antlr/v4/parse/ScopeParser.java:196 — ScopeParser._parsePostfixDecl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TokenVocabParser.load (cognitive 16) · ×1
  • TokenVocabParser.load (cognitive 16) tool/src/org/antlr/v4/parse/TokenVocabParser.java:36 — TokenVocabParser.load has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 4 (6 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Array2DHashSet.expand (cognitive 16) · ×1
  • Array2DHashSet.expand (cognitive 16) runtime/Java/src/org/antlr/v4/runtime/misc/Array2DHashSet.java:142 — Array2DHashSet.expand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Array2DHashSet.retainAll (cognitive 16) · ×1
  • Array2DHashSet.retainAll (cognitive 16) runtime/Java/src/org/antlr/v4/runtime/misc/Array2DHashSet.java:335 — Array2DHashSet.retainAll has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XPathLexer.nextToken (cognitive 16) · ×1
  • XPathLexer.nextToken (cognitive 16) runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java:93 — XPathLexer.nextToken has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserInterpreter.parse (cognitive 16) · ×1
  • ParserInterpreter.parse (cognitive 16) runtime/Java/src/org/antlr/v4/runtime/ParserInterpreter.java:160 — ParserInterpreter.parse has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 1 (3 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Antlr4Mojo.getCommandArguments (cognitive 16) · ×1
  • Antlr4Mojo.getCommandArguments (cognitive 16) antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java:317 — Antlr4Mojo.getCommandArguments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 2, loops 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Parser.consume (cognitive 16) · ×1
  • Parser.consume (cognitive 16) runtime/Python3/src/antlr4/Parser.py:345 — Parser.consume has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TokenStreamRewriter.getText (cognitive 16) · ×1
  • TokenStreamRewriter.getText (cognitive 16) runtime/Python3/src/antlr4/TokenStreamRewriter.py:108 — TokenStreamRewriter.getText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParserATNSimulator.applyPrecedenceFilter (cognitive 16) · ×1
  • ParserATNSimulator.applyPrecedenceFilter (cognitive 16) runtime/Python3/src/antlr4/atn/ParserATNSimulator.py:881 — ParserATNSimulator.applyPrecedenceFilter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JPCMap2.Put (cognitive 16) · ×1
  • JPCMap2.Put (cognitive 16) runtime/Go/antlr/v4/jcollect.go:542 — JPCMap2.Put has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IterativeParseTreeWalker.Walk (cognitive 16) · ×1
  • IterativeParseTreeWalker.Walk (cognitive 16) runtime/Go/antlr/v4/tree.go:257 — IterativeParseTreeWalker.Walk has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Trees.getNodeText (cognitive 16) · ×1
  • Trees.getNodeText (cognitive 16) runtime/Swift/Sources/Antlr4/tree/Trees.swift:86 — Trees.getNodeText has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (16 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ATNDeserializer.markPrecedenceDecisions (cognitive 16) · ×1
  • ATNDeserializer.markPrecedenceDecisions (cognitive 16) runtime/Dart/lib/src/atn/src/atn_deserializer.dart:424 — ATNDeserializer.markPrecedenceDecisions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (14 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D22 · Internal API Consistency · Inconsistent naming convention for text accessors compared to other stream types. While `ANTLRInputStream` and `BufferedTokenStream` use `getText(Interval)` or similar explicit range-based methods, `Lexer` uses simple `getText()` and `setText()` which implies getting/setting the *current* token's text or internal buffer state without explicit context. This is a minor domain difference (Lexer state vs Stream content), but the lack of `getCharIndex`/`setCharIndex` symmetry with `getLine`/`setLine` is also notable. However, the most glaring inconsistency is between `Lexer.getText()` and `ANTLRInputStream.getText(Interval)`. `Lexer.getText()` likely returns the text of the *current* token being built, whereas `ANTLRInputStream` returns text from a range. This is a semantic difference, not a naming redundancy. · ×1
  • Inconsistent naming convention for text accessors compared to other stream types. While `ANTLRInputStream` and `BufferedTokenStream` use `getText(Interval)` or similar explicit range-based methods, `Lexer` uses simple `getText()` and `setText()` which implies getting/setting the *current* token's text or internal buffer state without explicit context. This is a minor domain difference (Lexer state vs Stream content), but the lack of `getCharIndex`/`setCharIndex` symmetry with `getLine`/`setLine` is also notable. However, the most glaring inconsistency is between `Lexer.getText()` and `ANTLRInputStream.getText(Interval)`. `Lexer.getText()` likely returns the text of the *current* token being built, whereas `ANTLRInputStream` returns text from a range. This is a semantic difference, not a naming redundancy. — This is actually consistent with the domain: `Lexer` manages token construction state, while `CharStream`/`TokenStream` manage buffered input. No action needed. (signatures: Lexer.getText(): runtime~Swift~String | Lexer.setText(runtime~Swift~String))
D22 · Internal API Consistency · Inconsistent naming for string-to-ID lookup operations. `Parser` uses `getRuleIndex` to map a rule name string to an integer ID, while `Recognizer` uses `getTokenType` to map a token name string to an integer ID. While the return types are both `Int`, the method names suggest different domains (Rule vs Token). A more consistent pattern would be `getRuleIndex` vs `getTokenTypeIndex` or `getTokenType` vs `getRuleIndex` -> `getRuleIndex` vs `getTokenType` is acceptable if the domain is distinct, but `Recognizer` is the base class. `Parser` inherits from `Recognizer`. It is confusing that `Parser` overrides/defines `getRuleIndex` while the base `Recognizer` defines `getTokenType`. A user might expect `getRuleIndex` to be on `Recognizer` or `getTokenType` to be on `Parser` if they were symmetric. However, since Rules and Tokens are distinct concepts, this is likely intentional. · ×1
  • Inconsistent naming for string-to-ID lookup operations. `Parser` uses `getRuleIndex` to map a rule name string to an integer ID, while `Recognizer` uses `getTokenType` to map a token name string to an integer ID. While the return types are both `Int`, the method names suggest different domains (Rule vs Token). A more consistent pattern would be `getRuleIndex` vs `getTokenTypeIndex` or `getTokenType` vs `getRuleIndex` -> `getRuleIndex` vs `getTokenType` is acceptable if the domain is distinct, but `Recognizer` is the base class. `Parser` inherits from `Recognizer`. It is confusing that `Parser` overrides/defines `getRuleIndex` while the base `Recognizer` defines `getTokenType`. A user might expect `getRuleIndex` to be on `Recognizer` or `getTokenType` to be on `Parser` if they were symmetric. However, since Rules and Tokens are distinct concepts, this is likely intentional. — No action needed. Distinct domains (Rules vs Tokens). (signatures: Parser.getRuleIndex(runtime~Swift~String): Int | Recognizer.getTokenType(runtime~Swift~String): Int)
D22 · Internal API Consistency · Excessive and confusingly similar overloads for string representation. `toStringTree` has 3 overloads with different parameter types (Parser, List<String?>, None). `toString` has 2 overloads (Recognizer, List<String>). This creates a high cognitive load for users trying to get a debug string. Specifically, `toStringTree()` vs `toStringTree([String]?)` vs `toStringTree(Parser)` are very similar in intent (debugging tree structure) but differ in how they resolve symbol names. Similarly, `toString(Recognizer)` vs `toString([String])` are ambiguous. · ×1
  • Excessive and confusingly similar overloads for string representation. `toStringTree` has 3 overloads with different parameter types (Parser, List<String?>, None). `toString` has 2 overloads (Recognizer, List<String>). This creates a high cognitive load for users trying to get a debug string. Specifically, `toStringTree()` vs `toStringTree([String]?)` vs `toStringTree(Parser)` are very similar in intent (debugging tree structure) but differ in how they resolve symbol names. Similarly, `toString(Recognizer)` vs `toString([String])` are ambiguous. — Unify into a single `toStringTree(options: TreeStringOptions)` or similar structured parameter, or clearly separate 'debug' vs 'pretty' print methods. Reduce the number of overloads for `toStringTree` and `toString`. (signatures: RuleContext.toStringTree(runtime~Swift~Parser): runtime~Swift~String | RuleContext.toStringTree([String]?): runtime~Swift~String | RuleContext.toStringTree(): runtime~Swift~String | RuleContext.toString(Recognizer<T>): runtime~Swift~String | RuleContext.toString([String]): runtime~Swift~String)
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Duplicated block (18–27 lines × 2) · ×1
  • Duplicated block (18–27 lines × 2) tool/src/org/antlr/v4/codegen/ParserFactory.java:116 — tool/src/org/antlr/v4/codegen/ParserFactory.java:116-142 | tool/src/org/antlr/v4/codegen/ParserFactory.java:157-174 — both copies are in the same file, so extract the 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 `tool/src/org/antlr/v4/codegen/ParserFactory.java:116` 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 (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1813 — runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1813-1838 | runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1861-1886 — both copies are in the same file, so extract the 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 `runtime/Java/src/org/antlr/v4/runtime/atn/ParserATNSimulator.java:1813` 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 (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) tool/src/org/antlr/v4/gui/TreeViewer.java:506 — tool/src/org/antlr/v4/gui/TreeViewer.java:506-526 | tool/src/org/antlr/v4/gui/TreeViewer.java:571-589 — both copies are in the same file, so extract the 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 `tool/src/org/antlr/v4/gui/TreeViewer.java:506` 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 (13 lines × 2) · ×1
  • Duplicated block (13 lines × 2) runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:476 — runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:476-488 | runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:516-528 — both copies are in the same file, so extract the 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 `runtime/Java/src/org/antlr/v4/runtime/misc/IntervalSet.java:476` 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 (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) tool/src/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.java:126 — tool/src/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.java:126-138 | tool/src/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.java:174-185 — both copies are in the same file, so extract the 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, `tool/src/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.java:141` calls `nextPrecedence`, `addPrecedenceArgToRules`, `stripAltLabel` and `tool/src/org/antlr/v4/analysis/LeftRecursiveRuleAnalyzer.java:186` 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) · ×1
  • Duplicated block (9 lines × 4) runtime/CSharp/src/Misc/RuleDependencyChecker.cs:108 — runtime/CSharp/src/Misc/RuleDependencyChecker.cs:108-116 | runtime/CSharp/src/Misc/RuleDependencyChecker.cs:122-130 | runtime/CSharp/src/Misc/RuleDependencyChecker.cs:136-144 | runtime/CSharp/src/Misc/RuleDependencyChecker.cs:150-158 — 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 `runtime/CSharp/src/Misc/RuleDependencyChecker.cs:108` 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 (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) runtime/Java/src/org/antlr/v4/runtime/atn/LexerChannelAction.java:78 — runtime/Java/src/org/antlr/v4/runtime/atn/LexerChannelAction.java:78-87 | runtime/Java/src/org/antlr/v4/runtime/atn/LexerModeAction.java:77-86 | runtime/Java/src/org/antlr/v4/runtime/atn/LexerTypeAction.java:76-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) runtime/Go/antlr/v4/dfa_serializer.go:46 — runtime/Go/antlr/v4/dfa_serializer.go:46-69 | runtime/Go/antlr/v4/dfa_serializer.go:135-158 — both copies are in the same file, so extract the 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 `runtime/Go/antlr/v4/dfa_serializer.go:46` 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 (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) runtime/Go/antlr/v4/parser_atn_simulator.go:1020 — runtime/Go/antlr/v4/parser_atn_simulator.go:1020-1041 | runtime/Go/antlr/v4/parser_atn_simulator.go:1073-1094 — both copies are in the same file, so extract the 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 (17–18 lines × 2) · ×1
  • Duplicated block (17–18 lines × 2) runtime/Go/antlr/v4/utils.go:333 — runtime/Go/antlr/v4/utils.go:333-350 | runtime/Go/antlr/v4/utils.go:359-375 — both copies are in the same file, so extract the 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 `runtime/Go/antlr/v4/utils.go:333` 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 (25–27 lines × 2) · ×1
  • Duplicated block (25–27 lines × 2) runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:1721 — runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:1721-1747 | runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:1765-1789 — both copies are in the same file, so extract the 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 `runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:1721` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `nil` to `ctx dependent=true") //if ( parser !=` in one and `ctx dependent=\(pt.isCtxDependent)") //if ( parser !=` 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 (21–22 lines × 2) · ×1
  • Duplicated block (21–22 lines × 2) runtime/Swift/Sources/Antlr4/misc/IntervalSet.swift:501 — runtime/Swift/Sources/Antlr4/misc/IntervalSet.swift:501-521 | runtime/Swift/Sources/Antlr4/misc/IntervalSet.swift:548-569 — both copies are in the same file, so extract the 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 `runtime/Swift/Sources/Antlr4/misc/IntervalSet.swift:501` 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 (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) runtime/Swift/Sources/Antlr4/misc/BitSet.swift:280 — runtime/Swift/Sources/Antlr4/misc/BitSet.swift:280-293 | runtime/Swift/Sources/Antlr4/misc/BitSet.swift:361-375 — both copies are in the same file, so extract the 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 `runtime/Swift/Sources/Antlr4/misc/BitSet.swift:280` 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 (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) runtime/Swift/Sources/Antlr4/atn/SemanticContext.swift:241 — runtime/Swift/Sources/Antlr4/atn/SemanticContext.swift:241-249 | runtime/Swift/Sources/Antlr4/atn/SemanticContext.swift:335-341 — both copies are in the same file, so extract the 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 `runtime/Swift/Sources/Antlr4/atn/SemanticContext.swift:241` 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 (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) runtime/Dart/lib/src/atn/src/atn_config.dart:143 — runtime/Dart/lib/src/atn/src/atn_config.dart:143-149 | runtime/Dart/lib/src/atn/src/atn_config.dart:215-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D44 · Platform End-of-Life · End-of-life runtime · ×1
  • End-of-life runtime: .NET net5.0 runtime/CSharp/tests/issue-3079/Test.csproj:4 — runtime/CSharp/tests/issue-3079/Test.csproj declares .NET net5.0 as this project's target framework, and .NET 5, support ended 2022-05-10. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2022-05-10 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — .NET and JavaScript/TypeScript suite — Coverage NOT MEASURED: the .NET half could not be measured — the repository wires up no coverage collector for `--collect:"XPlat Code Coverage"` to use; the JavaScript/TypeScript half could not be measured — runtime/JavaScript/ runs jasmine, which the coverage collector does not drive yet, so no lcov was produced — a gap in the analyzer, not something this repository is missing. This repository's production source spans both ecosystems, and no partial figure is published as if it were the whole: coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 2 typed · 146 plain JS — the untyped files are runtime/JavaScript/spec/BitSetSpec.js, runtime/JavaScript/spec/HashMapSpec.js, runtime/JavaScript/spec/HashSetSpec.js, runtime/JavaScript/spec/IntervalSetSpec.js, runtime/JavaScript/spec/helpers/Reporter.js, runtime/JavaScript/spec/imports/NodeCommonJSImportSpec.cjs (+140 more).
R10 · Code Duplication · Duplicated block with local edits (58 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (58 matched lines × 2 locations) runtime/JavaScript/src/antlr4/misc/HashMap.js:8 — runtime/JavaScript/src/antlr4/misc/HashMap.js:8 · runtime/JavaScript/src/antlr4/misc/HashSet.js:9 — the two spans are one implementation copied and then locally edited — 327 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (34 lines × 2 locations) · ×1
  • Duplicated block (34 lines × 2 locations) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1423 — runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1423 · runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (22 lines × 2 locations) · ×1
  • Duplicated block (22 lines × 2 locations) runtime/JavaScript/src/antlr4/atn/SemanticContext.js:94 — runtime/JavaScript/src/antlr4/atn/SemanticContext.js:94 · runtime/JavaScript/src/antlr4/atn/SemanticContext.js:197 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (20 lines × 2 locations) · ×1
  • Duplicated block (20 lines × 2 locations) runtime/JavaScript/src/antlr4/atn/SemanticContext.js:129 — runtime/JavaScript/src/antlr4/atn/SemanticContext.js:129 · runtime/JavaScript/src/antlr4/atn/SemanticContext.js:230 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (17 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (17 matched lines × 2 locations) runtime/JavaScript/src/antlr4/Recognizer.js:97 — runtime/JavaScript/src/antlr4/Recognizer.js:97 · runtime/JavaScript/src/antlr4/error/DefaultErrorStrategy.js:542 — the two spans are one implementation copied and then locally edited — 73 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (16 matched lines × 2 locations) runtime/JavaScript/src/antlr4/atn/PrecedencePredicate.js:27 — runtime/JavaScript/src/antlr4/atn/PrecedencePredicate.js:27 · runtime/JavaScript/src/antlr4/atn/Predicate.js:18 — the two spans are one implementation copied and then locally edited — 63 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (12 matched lines × 2 locations) runtime/JavaScript/src/antlr4/transition/ActionTransition.js:8 — runtime/JavaScript/src/antlr4/transition/ActionTransition.js:8 · runtime/JavaScript/src/antlr4/transition/PredicateTransition.js:10 — the two spans are one implementation copied and then locally edited — 55 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (9 lines × 7 locations) · ×1
  • Duplicated block (9 lines × 7 locations) runtime/JavaScript/src/antlr4/action/LexerChannelAction.js:29 — runtime/JavaScript/src/antlr4/action/LexerChannelAction.js:29 · runtime/JavaScript/src/antlr4/action/LexerCustomAction.js:44 · runtime/JavaScript/src/antlr4/action/LexerIndexedCustomAction.js:48 · runtime/JavaScript/src/antlr4/action/LexerModeAction.js:27 · +3 more site(s) not listed — the 7 copies are spread across 7 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (9 lines × 2 locations) · ×1
  • Duplicated block (9 lines × 2 locations) runtime/JavaScript/src/antlr4/atn/SemanticContext.js:189 — runtime/JavaScript/src/antlr4/atn/SemanticContext.js:189 · runtime/JavaScript/src/antlr4/atn/SemanticContext.js:288 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (7 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (7 matched lines × 2 locations) runtime/JavaScript/src/antlr4/error/ErrorListener.js:12 — runtime/JavaScript/src/antlr4/error/ErrorListener.js:12 · runtime/JavaScript/src/antlr4/error/ProxyErrorListener.js:17 — the two spans are one implementation copied and then locally edited — 65 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×1
  • Duplicated block (6 lines × 2 locations) runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:289 — runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:289 · runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:735 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (6 matched lines × 2 locations) runtime/JavaScript/src/antlr4/utils/stringHashCode.js:34 — runtime/JavaScript/src/antlr4/utils/stringHashCode.js:34 · runtime/JavaScript/src/antlr4/utils/stringHashCode.js:55 — the two spans are one implementation copied and then locally edited — 119 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R2 · Cyclomatic Complexity · Complex function reduceToSingleOperationPerIndex (cyclomatic 31, cognitive 58) · ×1
  • Complex function reduceToSingleOperationPerIndex (cyclomatic 31, cognitive 58) runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:215 — reduceToSingleOperationPerIndex has cyclomatic complexity 31 and cognitive complexity 58; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function mergeArrays (cyclomatic 30, cognitive 50) · ×1
  • Complex function mergeArrays (cyclomatic 30, cognitive 50) runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:131 — mergeArrays has cyclomatic complexity 30 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function computeReachSet (cyclomatic 26, cognitive 45) · ×1
  • Complex function computeReachSet (cyclomatic 26, cognitive 45) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:698 — computeReachSet has cyclomatic complexity 26 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function execATN (cyclomatic 22, cognitive 54) · ×1
  • Complex function execATN (cyclomatic 22, cognitive 54) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:395 — execATN has cyclomatic complexity 22 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function _LOOK (cyclomatic 22, cognitive 40) · ×1
  • Complex function _LOOK (cyclomatic 22, cognitive 40) runtime/JavaScript/src/antlr4/atn/LL1Analyzer.js:113 — _LOOK has cyclomatic complexity 22 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function canDropLoopEntryEdgeInLeftRecursiveRule (cyclomatic 19, cognitive 20) · ×1
  • Complex function canDropLoopEntryEdgeInLeftRecursiveRule (cyclomatic 19, cognitive 20) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1316 — canDropLoopEntryEdgeInLeftRecursiveRule has cyclomatic complexity 19 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function closure (cyclomatic 18, cognitive 33) · ×1
  • Complex function closure (cyclomatic 18, cognitive 33) runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:354 — closure has cyclomatic complexity 18 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function mergeSingletons (cyclomatic 18, cognitive 32) · ×1
  • Complex function mergeSingletons (cyclomatic 18, cognitive 32) runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:292 — mergeSingletons has cyclomatic complexity 18 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function closure_ (cyclomatic 17, cognitive 44) · ×1
  • Complex function closure_ (cyclomatic 17, cognitive 44) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1260 — closure_ has cyclomatic complexity 17 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function readEdges (cyclomatic 17, cognitive 40) · ×1
  • Complex function readEdges (cyclomatic 17, cognitive 40) runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js:242 — readEdges has cyclomatic complexity 17 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function verifyATN (cyclomatic 17, cognitive 22) · ×1
  • Complex function verifyATN (cyclomatic 17, cognitive 22) runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js:463 — verifyATN has cyclomatic complexity 17 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getEpsilonTarget (cyclomatic 15, cognitive 20) · ×1
  • Complex function getEpsilonTarget (cyclomatic 15, cognitive 20) runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:409 — getEpsilonTarget has cyclomatic complexity 15 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function execATNWithFullContext (cyclomatic 14, cognitive 25) · ×1
  • Complex function execATNWithFullContext (cyclomatic 14, cognitive 25) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:589 — execATNWithFullContext has cyclomatic complexity 14 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getText (cyclomatic 14, cognitive 21) · ×1
  • Complex function getText (cyclomatic 14, cognitive 21) runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:144 — getText has cyclomatic complexity 14 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function nextToken (cyclomatic 13, cognitive 30) · ×1
  • Complex function nextToken (cyclomatic 13, cognitive 30) runtime/JavaScript/src/antlr4/Lexer.js:91 — nextToken has cyclomatic complexity 13 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getCachedPredictionContext (cyclomatic 13, cognitive 19) · ×1
  • Complex function getCachedPredictionContext (cyclomatic 13, cognitive 19) runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:33 — getCachedPredictionContext has cyclomatic complexity 13 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function toString (cyclomatic 12, cognitive 18) · ×1
  • Complex function toString (cyclomatic 12, cognitive 18) runtime/JavaScript/src/antlr4/context/RuleContext.js:135 — toString has cyclomatic complexity 12 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function sync (cyclomatic 12, cognitive 9) · ×1
  • Complex function sync (cyclomatic 12, cognitive 9) runtime/JavaScript/src/antlr4/error/DefaultErrorStrategy.js:197 — sync has cyclomatic complexity 12 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function closureCheckingStopState (cyclomatic 11, cognitive 29) · ×1
  • Complex function closureCheckingStopState (cyclomatic 11, cognitive 29) runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1211 — closureCheckingStopState has cyclomatic complexity 11 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js · ×1
  • runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js: 1656 lines of code runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js:1 — runtime/JavaScript/src/antlr4/atn/ParserATNSimulator.js has 1656 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · runtime/JavaScript/src/antlr4/error/DefaultErrorStrategy.js · ×1
  • runtime/JavaScript/src/antlr4/error/DefaultErrorStrategy.js: 669 lines of code runtime/JavaScript/src/antlr4/error/DefaultErrorStrategy.js:1 — runtime/JavaScript/src/antlr4/error/DefaultErrorStrategy.js has 669 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js · ×1
  • runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js: 600 lines of code runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js:1 — runtime/JavaScript/src/antlr4/atn/LexerATNSimulator.js has 600 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · runtime/JavaScript/src/antlr4/Parser.js · ×1
  • runtime/JavaScript/src/antlr4/Parser.js: 590 lines of code runtime/JavaScript/src/antlr4/Parser.js:1 — runtime/JavaScript/src/antlr4/Parser.js has 590 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js · ×1
  • runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js: 556 lines of code runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js:1 — runtime/JavaScript/src/antlr4/atn/ATNDeserializer.js has 556 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · runtime/JavaScript/spec/rewriter/TokenStreamRewriterSpec.js · ×1
  • runtime/JavaScript/spec/rewriter/TokenStreamRewriterSpec.js: 549 lines of code runtime/JavaScript/spec/rewriter/TokenStreamRewriterSpec.js:1 — runtime/JavaScript/spec/rewriter/TokenStreamRewriterSpec.js has 549 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · runtime/JavaScript/src/antlr4/atn/PredictionMode.js · ×1
  • runtime/JavaScript/src/antlr4/atn/PredictionMode.js: 544 lines of code runtime/JavaScript/src/antlr4/atn/PredictionMode.js:1 — runtime/JavaScript/src/antlr4/atn/PredictionMode.js has 544 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js · ×1
  • runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js: 431 lines of code runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js:1 — runtime/JavaScript/src/antlr4/context/PredictionContextUtils.js has 431 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · runtime/JavaScript/src/antlr4/TokenStreamRewriter.js · ×1
  • runtime/JavaScript/src/antlr4/TokenStreamRewriter.js: 405 lines of code runtime/JavaScript/src/antlr4/TokenStreamRewriter.js:1 — runtime/JavaScript/src/antlr4/TokenStreamRewriter.js has 405 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~12 LoC) · ×1
  • Dead file (~12 LoC) runtime/JavaScript/src/antlr4/context/InterpreterRuleContext.js — no import path from any entry point (5 application, 66 tooling, 12 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~9 LoC) · ×1
  • Dead file (~9 LoC) runtime/JavaScript/src/antlr4/utils/titleCase.js — no import path from any entry point (5 application, 66 tooling, 12 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency 'glob-parent' · ×1
  • Unused dependency 'glob-parent' — Declared in runtime/JavaScript/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'minimist' · ×1
  • Unused dependency 'minimist' — Declared in runtime/JavaScript/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'source-map-support' · ×1
  • Unused dependency 'source-map-support' — Declared in runtime/JavaScript/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
SC1 · Supply-chain hygiene · NuGet dependencies are not locked · ×1
  • NuGet dependencies are not locked — No packages.lock.json and no central package management — restores aren't reproducible or pinned (SSDF PW.4.4). Enable <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> (commit the lockfile) or adopt Directory.Packages.props. Advisory — never scored.
Minor — 157 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×93
  • Orphaned file runtime/CSharp/src/DefaultErrorStrategy.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 runtime/CSharp/src/Atn/PredictionMode.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 runtime/CSharp/src/Misc/IntervalSet.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 runtime/CSharp/src/TokenStreamRewriter.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 runtime/CSharp/src/Tree/Pattern/ParseTreePatternMatcher.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 runtime/CSharp/src/Atn/LexerATNSimulator.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 runtime/CSharp/src/Misc/RuleDependencyChecker.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 runtime/CSharp/src/BufferedTokenStream.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 runtime/CSharp/src/Lexer.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 runtime/CSharp/src/Atn/PredictionContext.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 runtime/CSharp/src/Atn/SemanticContext.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 runtime/CSharp/src/UnbufferedCharStream.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 runtime/CSharp/src/ParserRuleContext.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 runtime/CSharp/src/IIntStream.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 runtime/CSharp/src/Recognizer.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 runtime/CSharp/src/UnbufferedTokenStream.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 runtime/CSharp/src/ParserInterpreter.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 runtime/CSharp/src/Atn/LexerActionExecutor.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 runtime/CSharp/src/ListTokenSource.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 runtime/CSharp/src/Atn/ATNConfigSet.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 runtime/CSharp/src/Atn/LL1Analyzer.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 runtime/CSharp/src/CommonToken.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 runtime/CSharp/src/Tree/Pattern/ParseTreeMatch.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 runtime/CSharp/src/Tree/Xpath/XPath.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 runtime/CSharp/src/RuleContext.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.
  • + 68 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Commented-out code · ×28
  • Commented-out code runtime/CSharp/src/Atn/ATNConfig.cs:216 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Atn/ATNConfigSet.cs:193 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Atn/ATNConfigSet.cs:195 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Atn/ArrayPredictionContext.cs:35 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Atn/LexerATNSimulator.cs:800 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Atn/ParserATNSimulator.cs:286 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Atn/ParserATNSimulator.cs:287 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Atn/ParserATNSimulator.cs:288 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Atn/ParserATNSimulator.cs:705 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Atn/ParserATNSimulator.cs:706 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Atn/ParserATNSimulator.cs:1283 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Atn/ParserATNSimulator.cs:1315 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Atn/ParserATNSimulator.cs:1621 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/BufferedTokenStream.cs:324 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/CommonTokenStream.cs:151 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/DefaultErrorStrategy.cs:155 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/DefaultErrorStrategy.cs:211 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/DefaultErrorStrategy.cs:272 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/DefaultErrorStrategy.cs:318 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/DefaultErrorStrategy.cs:786 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/DefaultErrorStrategy.cs:817 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/DefaultErrorStrategy.cs:822 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Lexer.cs:316 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Lexer.cs:633 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • Commented-out code runtime/CSharp/src/Misc/RuleDependencyChecker.cs:52 — A line of code has been commented out rather than removed — dead weight that rots and confuses. Delete it (version control remembers).
  • + 3 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×11
  • Duplicated predicate runtime/CSharp/src/Atn/ATN.cs:246 — `ctx != null && ctx.invokingState >= 0 && following.Contains(TokenConstants.EPSILON)` appears character-identically in 2 files — runtime/CSharp/src/Atn/ATN.cs, runtime/CSharp/src/Parser.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 runtime/Dart/lib/src/atn/src/atn.dart:153 — `ctx != null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)` appears character-identically in 2 files — runtime/Dart/lib/src/atn/src/atn.dart, runtime/Dart/lib/src/parser.dart. 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 runtime/Go/antlr/v4/atn.go:162 — `ctx != nil && ctx.GetInvokingState() >= 0 && following.contains(TokenEpsilon)` appears character-identically in 2 files — runtime/Go/antlr/v4/atn.go, runtime/Go/antlr/v4/parser.go. 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 tool/src/org/antlr/v4/tool/Alternative.java:119 — `anyLabelDef!=null && (anyLabelDef.type==LabelType.RULE_LIST_LABEL || anyLabelDef.type==LabelType.TOKEN_LIST_LABEL)` appears character-identically in 2 files — tool/src/org/antlr/v4/tool/Alternative.java, tool/src/org/antlr/v4/tool/Rule.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tool/src/org/antlr/v4/tool/Alternative.java:70 — `anyLabelDef!=null && anyLabelDef.type==LabelType.RULE_LABEL` appears character-identically in 2 files — tool/src/org/antlr/v4/tool/Alternative.java, tool/src/org/antlr/v4/tool/Rule.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tool/src/org/antlr/v4/tool/Alternative.java:61 — `anyLabelDef!=null && anyLabelDef.type==LabelType.TOKEN_LABEL` appears character-identically in 2 files — tool/src/org/antlr/v4/tool/Alternative.java, tool/src/org/antlr/v4/tool/Rule.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate runtime/Java/src/org/antlr/v4/runtime/BufferedTokenStream.java:290 — `types==null || types.contains(t.getType())` appears character-identically in 2 files — runtime/Java/src/org/antlr/v4/runtime/BufferedTokenStream.java, tool/src/org/antlr/v4/tool/ast/GrammarAST.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate tool/src/org/antlr/v4/semantics/BasicSemanticChecks.java:497 — `valueText.equals("true") || valueText.equals("false")` appears character-identically in 2 files — tool/src/org/antlr/v4/semantics/BasicSemanticChecks.java, tool/src/org/antlr/v4/semantics/RuleCollector.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate runtime/JavaScript/src/antlr4/Parser.js:515 — `ctx !== null && ctx.invokingState >= 0 && following.contains(Token.EPSILON)` appears character-identically in 2 files — runtime/JavaScript/src/antlr4/Parser.js, runtime/JavaScript/src/antlr4/atn/ATN.js. 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 runtime/JavaScript/src/antlr4/misc/HashMap.js:18 — `equalsFunction || standardEqualsFunction` appears character-identically in 2 files — runtime/JavaScript/src/antlr4/misc/HashMap.js, runtime/JavaScript/src/antlr4/misc/HashSet.js. 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 runtime/JavaScript/src/antlr4/misc/HashMap.js:17 — `hashFunction || standardHashCodeFunction` appears character-identically in 2 files — runtime/JavaScript/src/antlr4/misc/HashMap.js, runtime/JavaScript/src/antlr4/misc/HashSet.js. 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.
M4 · Documentation accuracy · README/code drift · ×4
  • README/code drift doc/ace-javascript-target.md:137 — doc/ace-javascript-target.md links to `resources/worker-base.js`, but `doc/resources/worker-base.js` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift doc/javascript-target.md:18 — doc/javascript-target.md names Node.js 14, but the repository declares engines `>=16`. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift doc/releasing-antlr.md:208 — doc/releasing-antlr.md documents the environment variable `GPG_TTY`, but no code, script or configuration file names it. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift doc/swift-target.md:42 — doc/swift-target.md names `antlr4/runtime/Swift`, but no file or folder `antlr4/runtime/Swift` exists. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file runtime/CSharp/src/Atn/ParserATNSimulator.cs:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file runtime/CSharp/src/Parser.cs:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file runtime/CSharp/src/Atn/ATNDeserializer.cs:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
AX6 · Interface segregation · Fat interface · ×2
  • Fat interface: ATNFactory (26 abstract methods) tool/src/org/antlr/v4/automata/ATNFactory.java:19 — `ATNFactory` declares 26 abstract methods: `action`, `action`, `alt`, `block`, `charSetLiteral`, `createATN`, `epsilon`, `label`, `lexerAltCommands`, `lexerCallCommand`, `lexerCommand`, `listLabel`, `newState`, `optional`, `plus`, `range`, `rule`, `ruleRef`, `sempred`, `set`, `setCurrentOuterAlt`, `setCurrentRuleName`, `star`, `stringLiteral`, `tokenRef`, `wildcard`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 26 declarations carry 25 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 25 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: OutputModelFactory (35 abstract methods) tool/src/org/antlr/v4/codegen/OutputModelFactory.java:31 — `OutputModelFactory` declares 35 abstract methods: `action`, `alternative`, `epsilon`, `finishAlternative`, `getChoiceBlock`, `getCodeBlockLevel`, `getComplexChoiceBlock`, `getComplexEBNFBlock`, `getController`, `getCurrentBlock`, `getCurrentOuterMostAlt`, `getCurrentOuterMostAlternativeBlock`, `getCurrentRuleFunction`, `getEBNFBlock`, `getGenerator`, `getGrammar`, `getLL1ChoiceBlock`, `getLL1EBNFBlock`, `getLL1Test`, `getRoot`, `getTreeLevel`, `lexer`, `lexerFile`, `needsImplicitLabel`, `parser`, `parserFile`, `rule`, `rulePostamble`, `ruleRef`, `sempred`, `set`, `setController`, `stringRef`, `tokenRef`, `wildcard`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
X7 · Silent fallback defaults · Silent fallback default in catch · ×2
  • Silent fallback default in catch runtime/Swift/Sources/Antlr4/atn/ParserATNSimulator.swift:2053 — `getTextInInterval` turns every thrown error into `"<unknown>"` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch runtime/Swift/Sources/Antlr4/DiagnosticErrorListener.swift:138 — `getTextInInterval` turns every thrown error into `"<unknown>"` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: runtime/CSharp/src/IVocabulary.cs. Pair on, review, or document these before any departure.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `Antlr4` (28476 LoC, 185 public types across 9 namespaces). Review these for cohesion — draw the boundary inside the assembly first (group each responsibility into its own namespace/folder and keep the cross-boundary members internal), since splitting a published assembly moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D34 · Knowledge Freshness · Dormant codebase · ×1
  • Dormant codebase — 96 of 96 significant files have no living knowledge — the codebase as a whole is dormant, not 96 separate risks. Counted over 96 of the 179 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change.
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.
P10 · Library API & versioning · Large public API surface · ×1
  • Large public API surface — 200/221 types (90%) are public. For a library, every public type is a stability contract — make internal-by-default and expose only the intended API.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 9984 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P6 · Release Hygiene · Changelog looks stale/thin · ×1
  • Changelog looks stale/thin — The changelog this check read carries 1 versioned entry, against a bar of 3. Counted as either the distinct `x.y.z` versions it names (a link's target is not counted) or its version-shaped section headings (`## [1.2.0]`, `## V14.x.x`, `## Updates in 8.0.x`), whichever is the larger — so a log sectioned by minor series counts its sections, not its individual patch numbers. Entries recorded somewhere this check does not read — release notes generated at tag time from a generator config it did not recognise, or a log kept outside the repository — are not counted here, and this row is about what is re-findable in the tree rather than about how often you release.
PF1 · Benchmark discipline · No performance benchmarks · ×1
  • No performance benchmarks — No benchmark suite was found by the two searches this check runs. FIRST, a BenchmarkDotNet package reference in any project file — every project the workspace loaded, plus a walk of project files on disk that never loaded, because a benchmark suite is exactly the project a partial load drops. SECOND, a script harness: a file whose name contains `benchmark` and ends `.py`, `.sh`, `.ps1`, `.bash`, `.rb`, `.js` or `.mjs`, credited ONLY when this repository's CI text also mentions benchmarks — a harness no pipeline runs is read as a fixture, deliberately. Neither search can see a benchmark suite in another ecosystem's idiom (a Go `testing.B` file, a JMH or criterion project, a pytest-benchmark run), so this is 'no benchmark found by those two searches', not a verdict that the repository has none. Where code is performance-sensitive, a benchmark guards against silent regressions — but it's a bonus here, not a deduction.
PF2 · Allocation hygiene · No allocation-aware APIs detected · ×1
  • No allocation-aware APIs detected — No Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc, ValueTask or buffer-writer usage was found. If this code sits on a hot path, these reduce the GC pressure it creates — a bonus, not a requirement.
R7 · Dead Code · Unused export 'default' · ×1
  • Unused export 'default' runtime/JavaScript/src/antlr4/TokenSource.js:5 — Nothing imports this binding — it is safe to review for removal.
X7 · Silent fallback defaults · Silent fallback default on parse failure · ×1
  • Silent fallback default on parse failure runtime/CSharp/src/TokenStreamRewriter.cs:395 — `GetLastRewriteTokenIndex` returns `-1` when `lastRewriteTokenIndexes.TryGetValue(programName, out I)` is false, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer to the test rather than a stand-in for a value that could not be read, this is not a silent default: say so in a comment on the member and the row stops firing.
Minor — 5 finding(s)
D10 · Test Quality · Skipped (documented) · ×5
  • Skipped (documented): test_aex_bfx tool-testsuite/test/org/antlr/v4/test/tool/TestGraphNodes.java:396 — Skipped with a documented reason — a deferral, not lazy debt: switched off by @Disabled
  • Skipped (documented): testStartRuleWithoutEOF tool-testsuite/test/org/antlr/v4/test/tool/TestParserExec.java:57 — Skipped with a documented reason — a deferral, not lazy debt: switched off by @Disabled
  • Skipped (documented): testDeepLookahead tool-testsuite/test/org/antlr/v4/test/tool/TestParserProfiler.java:184 — Skipped with a documented reason — a deferral, not lazy debt: switched off by @Disabled
  • Skipped (documented): testSimpleLanguage tool-testsuite/test/org/antlr/v4/test/tool/TestParserProfiler.java:167 — Skipped with a documented reason — a deferral, not lazy debt: switched off by @Disabled
  • Skipped (documented): compileJdk tool-testsuite/test/org/antlr/v4/test/tool/TestPerformance.java:392 — Skipped with a documented reason — a deferral, not lazy debt: switched off by @Disabled

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-470a39467d4740e281c209267b3eb93d/history.json --exit-code 0 --source .3artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-470a39467d4740e281c209267b3eb93d/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/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .29artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update19artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .6artifacts/raw/trivy-config.json
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 1 file(s) — `runtime/Swift/Sources/Antlr4/atn/PredictionContext.swift` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.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 Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a16c62-55e0-772a-9c8a-6c2a3fcd76eb · 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