Context
On v8, Java method_invocation entries drop receiver and type information. With same-named methods in multiple classes, resolution is ambiguous and no call edges are emitted.
Reproducer
Services.java
class PaymentGateway { static void ping() {} void charge() {} }
class AuditLog { static void ping() {} void charge() {} }
Checkout.java
class Checkout {
PaymentGateway gateway;
void run(PaymentGateway parameter) {
PaymentGateway.ping();
gateway.charge();
this.gateway.charge();
parameter.charge();
}
}
Current behavior
Representative cache shapes (paths, locations, and repeated call sites omitted):
[
{"callee": "ping", "is_member_call": false, "receiver": null},
{"callee": "charge", "is_member_call": false, "receiver": null}
]
All four call sites are stored without receiver information.
Expected
Preserve the receiver and static receiver type per call site, then resolve only unambiguous owners:
run -> PaymentGateway.ping [EXTRACTED]
run -> PaymentGateway.charge [INFERRED]
The three charge() calls remain separate in the cache but deduplicate to one graph edge. No edge should target the same-named AuditLog methods.
Scope
Cover explicit type receivers, current-class fields, parameters, and explicitly typed locals. Defer inherited fields, chained receivers, interface/runtime dispatch, and target overload selection.
Context
On
v8, Javamethod_invocationentries drop receiver and type information. With same-named methods in multiple classes, resolution is ambiguous and no call edges are emitted.Reproducer
Services.javaCheckout.javaCurrent behavior
Representative cache shapes (paths, locations, and repeated call sites omitted):
[ {"callee": "ping", "is_member_call": false, "receiver": null}, {"callee": "charge", "is_member_call": false, "receiver": null} ]All four call sites are stored without receiver information.
Expected
Preserve the receiver and static receiver type per call site, then resolve only unambiguous owners:
The three
charge()calls remain separate in the cache but deduplicate to one graph edge. No edge should target the same-namedAuditLogmethods.Scope
Cover explicit type receivers, current-class fields, parameters, and explicitly typed locals. Defer inherited fields, chained receivers, interface/runtime dispatch, and target overload selection.