Skip to content

objective-c func_start (4.4% precision) and csharp func_start (58.2% precision) have large, confirmed-real false-positive rates #1314

Closed

Description

@squid-protocol

What

Unlike #1313 (a measurement-tool ground-truth gap), these two are confirmed GENUINE engine
false-positive problems: recall is good-to-perfect for both (tree-sitter's real_functions is
nonzero and GitGalaxy finds almost all of them), but extra_functions is large enough to tank
precision badly.

Language real_functions found_functions extra_functions func_precision
objective-c 5 5 (100% recall) 108 4.4%
csharp 558 553 (99.1% recall) 397 58.2%

Also flagging typescript's class precision (not func) while here: real_classes=285,
found_classes=285 (100% recall), extra_classes=537 -> 34.7% class precision. Same shape
(recall is fine, precision is badly hurt by a large false-positive count), different pillar
(class_start not func_start).

Why this is worth its own issue

objective-c's 108 phantoms against only 5 real functions (across 5 corpus files) is a ~20:1
false-positive ratio -- almost certainly func_start matching a common Objective-C syntax shape
that isn't a real function definition (method declarations in a @interface block without a
body, property/selector syntax, or a C-family lookalike given objc's C heritage -- not
investigated yet, this issue is the initial flag, not the diagnosis). csharp's 397 phantoms
against 558 real ones is a smaller ratio but still a substantial, measured precision problem
worth its own investigation rather than living silently in the summary table.

Suggested next step

For each, run tests/tools/tree_sitter_accuracy_audit.py --lang <lang> (full report, not --ci)
to get _extra_examples sample names, trace back to source lines the same way #1266's
investigation did for scala/matlab/haskell, and check tests/extraction/languages/test_objectivec_strict.py
/ test_csharp_strict.py for whether the false-positive shape is already a known, deliberately-
accepted ambiguity (per how_to_harden_extraction.md's recurring bug class #7,
bare-call-vs-declaration) before assuming it's a fixable regex gap.

Related: #1261 (parent epic).

Activity

  1. added
    bug
    core-engine
    threat: false-positive
    on Aug 12, 2026
  2. added this to the v2.4.8 milestone on Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcore-enginethreat: false-positive

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions