Skip to content

[Bug]: Java overloaded methods collapse into a single node #5251

Open

Description

@ramarro123

Pre-flight checks

  • I have checked the Troubleshooting section in the README

What happened?

Overloaded Java methods become one node, so callers of different overloads cannot be told apart and affected returns a superset. C# already handles this: extract.py#L6900 _csharp_overload_index, extract.py#L6915 _csharp_collapse_overloads (v0.9.111 (commit 18cd78f)); the Java extractor has no equivalent.

Suggested fix, mirroring C#: node id = name + erased parameter types (run(String,int)); bind call sites by arity, and by literal/declared argument type when known; when undecidable keep edges to every overload as INFERRED.

Related: #4584 (C#), #4956 (Kotlin).

Steps to reproduce

mkdir -p mini && cat > mini/Svc.java <<'EOF'
class Svc {
  void run(String s) {}
  void run(int i) {}
  void run(String s, int i) {}
}
EOF
graphify extract mini --code-only

Error output or graph output

One node `run()` at L3; no node for the overloads at L4 and L5.

Graphify version

0.9.111

Operating System

Linux

Python Version

3.12

Installation Method

pip

Additional Environment Details

No response

Additional context

No response

Activity

  1. added
    bug
    on Nov 16, 2026
  2. github-actions commented on Nov 16, 2026

    @github-actions

    Thanks for opening this issue, @ramarro123. A maintainer will take a look soon.

    If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

    To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions