Skip to content

C# reference graph overmatches common same-name member calls #3894

Description

@Widthdom

Dogfood audit finding from codex/dogfood-audit-20260623.

Observed

The C# graph appears to attribute member calls to unrelated local functions that share the same simple name. This pollutes references, hotspots, and likely impact.

Examples from dogfooding:

  • references Combine --exact-name returns many Path.Combine(...) calls as references to a local Combine helper.
  • hotspots reports Combine in WorkerProcessCleanupDiagnostics.cs with thousands of references.
  • Similar overmatches were seen for local/helper names such as GetString, Max, Join, and Replace, where BCL/extension/member calls are counted against unrelated project symbols.

Expected

Reference extraction should account for receiver/declaring type or otherwise suppress obvious BCL/common-member false positives. At minimum, graph consumers should avoid treating Path.Combine, Math.Max, string.Join, JsonElement.GetString, etc. as references to unrelated same-name local functions.

Impact

This weakens several high-value workflows: hotspot ranking, impact analysis, reference lookup, and dead-code triage.

Activity

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

    .NETPull requests that update .NET codebugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions