Repository navigation
java tri-comparison sweep: fix bodyless abstract-method drop + args annotation gap - #2092
Merged
Merged
Conversation
…omparison sweep
Tri-comparison ledger sweep for java validated 4 unvalidated shapes and found 3
real, confirmed engine/audit-tool defects (all now fixed and re-verified):
- func_start silently dropped bodyless abstract/interface method declarations
(`protected abstract long startTime();`) via detector.py's generic Mode-B
fallback, which only ever searches for a `{` and discards `;`-terminated
matches. Java never got the dedicated terminator-search handling that
csharp/rust/go/objective-c/dart/perl already have for this same shape.
(#2089)
- args' modifier-repeat group never got the interleaved-return-type-annotation
fix (`private <T> @nullable T foo(...)`) that func_start's sibling group
already got in #1486/#1489, causing the whole args alternation to fall
through to the lambda-matching branch and misattribute an unrelated in-body
lambda's arg count as the function's own. (#2091)
- tree_sitter_accuracy_audit.py's own `_get_param_count` was missing java's
`spread_parameter` (varargs) node type from its counted_types whitelist --
the same recurring per-grammar gap already fixed for 11 other languages.
Not a GitGalaxy defect. (#2090)
All 4 ledger shapes (28+12+3+1 occurrences) now validated, still_reproduces:
false. Java's tri-comparison chart is now a clean 100% 3-way tie (318/318 func
precision, 35/35 class precision) with no unvalidated-disagreement asterisks.
Both golden-master fixtures re-blessed against the full differential-scan
corpus -- all drift traces to java/springboot's corrected function-parameter
counts, java files inside groovy-ecosystem repos, and the expected topological
ripple from the whole-graph layout recomputing.
Also adds docs/language_status/java.md (previously undocumented).
Co-Authored-By: Claude Sonnet 5 <[email protected]>
This was referenced Aug 22, 2026
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tri-comparison ledger sweep for
java(tri-comparison-ledger-sweepskill). Found and fixed 3real, confirmed defects behind the language's 4 open ledger shapes; the java tri-comparison chart
now shows a clean 100% 3-way tie on both ranked panels with no unvalidated-disagreement
asterisks.
;-terminated signatures) #2089 —detector.py's generic Mode-B body-slicing fallback silently dropped bodylessabstract/interface method declarations (
protected abstract long startTime();).func_start'sown regex already matches these fine (its lookahead explicitly allows
;as a terminator), butjava never got the dedicated terminator-search branch that csharp (csharp func_start never matches expression-bodied methods, and can hallucinate bare calls as functions with no enclosing brace #789), rust/zig/solidity
(rust func_start misses bodyless multi-line trait method signatures (deserialize_* family) #1319), go (Go
func_recall_pct: Bodyless Functions Dropped by_slice_by_braces#1756), objective-c (objective-c func_start (4.4% precision) and csharp func_start (58.2% precision) have large, confirmed-real false-positive rates #1314/objective-c: bodyless C-style prototypes are only found by accident, with a wrong body span #1336), dart, and perl (perl: bodyless forward declaration can accidentally grab an unrelated nearby{as its body #1609) already have for thisidentical shape. Not a narrow edge case — abstract/interface method signatures are one of the
most common shapes in idiomatic Java.
argsrule's modifier-repeat group never got thematching fix for an interleaved return-type annotation (
private <T> @Nullable T handleBindResult(...), common JSpecify/Checker Framework style in modern Spring code). Withoutit, the whole
argsalternation fell through to the lambda-matching branch and misattributedan unrelated in-body lambda's arg count as the function's real parameter count.
tests/tools/tree_sitter_accuracy_audit.py's own_get_param_countwas missing java'sspread_parameter(varargs) node type from itscounted_typeswhitelist, the same recurring per-grammar gap already fixed for 11 otherlanguages under tree_sitter_accuracy_audit: _get_param_count node-type whitelist missing real per-language parameter node types (11 languages) #1339/tree_sitter_accuracy_audit: ruby's _get_param_count whitelist missing 'keyword_parameter' (follow-on gap from #1339) #1506/tree_sitter_accuracy_audit: dart's _get_param_count doesn't recurse into optional_formal_parameters, undercounting every {named} or [optional] parameter to 0 #1570/rust func_start misses bodyless multi-line trait method signatures (deserialize_* family) #1319.
Verification
test_java.py/test_java_strict.py, 161 cases) and the full extractionsuite (6213 cases) pass clean.
python tests/ruff_audit.py --ci/python tests/mypy_audit.py --ci— no new findings.tri_comparison_gatherer.gather_language("java")full corpus name+line diff: zero functionstree-sitter finds that GitGalaxy misses, zero args mismatches anywhere.
addition (before/after ledger diff, scoped to
java/only).crucible_check.pyagainst the full ~80-repo differential-scan corpus: both golden-masterfixtures re-blessed. All drift traces to
java/springboot's corrected function-parametercounts,
.javafiles living insidegroovy/gradle/groovy/spockrepos (same java rulesapply regardless of the repo's dominant-ecosystem label), and the expected topological-
coordinate ripple from the whole-graph layout recomputing with corrected counts.
status: "validated",still_reproduces: false.Also
Adds
docs/language_status/java.md(previously undocumented — sections 1-8 via thelanguage-statusskill's process, §9 tri-comparison section written from this sweep's findings)and updates its
README.mdindex row.Test plan
pytest tests/extraction/languages/test_java.py tests/extraction/languages/test_java_strict.pypytest tests/extraction/(full suite, no regressions)tests/ruff_audit.py --ci/tests/mypy_audit.py --citests/tools/crucible_check.py(both full_precision and zero_dependency modes pass)🤖 Generated with Claude Code