Title: Call graph is missing edges to implementations of interfaces · Issue #113 · codellm-devkit/codeanalyzer-java · GitHub
Open Graph Title: Call graph is missing edges to implementations of interfaces · Issue #113 · codellm-devkit/codeanalyzer-java
X Title: Call graph is missing edges to implementations of interfaces · Issue #113 · codellm-devkit/codeanalyzer-java
Description: Describe the bug When there is call to an interface method, the call graph edge in the current call graph points to the interface and not to any of the implementations. So when there is a call to a method is a class that implements/exten...
Open Graph Description: Describe the bug When there is call to an interface method, the call graph edge in the current call graph points to the interface and not to any of the implementations. So when there is a call to a...
X Description: Describe the bug When there is call to an interface method, the call graph edge in the current call graph points to the interface and not to any of the implementations. So when there is a call to a...
Opengraph URL: https://github.com/codellm-devkit/codeanalyzer-java/issues/113
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Call graph is missing edges to implementations of interfaces","articleBody":"### Describe the bug\n\nWhen there is call to an interface method, the call graph edge in the current call graph points to the interface and not to any of the implementations. So when there is a call to a method is a class that implements/extends this interface, we don't see those edges in the call graph.\n\n### Steps To Reproduce\n\nSteps to reproduce the behavior:\n1. Generate a analysis.json with `java -jar /path/to/codeanalyzer-2.2.0-dev.jar --input /path/to/daytrader8 --output /path/to/analysis-json/`\n2. Inspect the JSON for call edges from `com.ibm.websphere.samples.daytrader.web.servlet.TradeServletAction::doBuy(ServletContext, HttpServletRequest, HttpServletResponse, String, String, String)`.\n\n\n### Observed behavior\n\nWe'll see a call edge directly to the interface, i.e., we observe that there will an edge to `tAction.buy(userID, symbol, new Double(quantity).doubleValue(), TradeConfig.getOrderProcessingMode());` where `private TradeServices tAction;` and `TradeServices` is an interface class. \n\n### Expected behavior\n\nCall graph edge should point to the right implementation(s) of the the interface (i.e, to `TradeDirect` or `TradeSLSBBean` which implement/extend `TradeServices`). Or, if we choose to be imprecise, then we'll have to have edges to each of these implementations. \n \n### Screenshots\n\n\n\n### Environment (please complete the following information):\n \n - OS: All supported\n - Version of Java: 11+\n - Version of Maven: N/A\n - Version of Gradle: N/A\n\n### Additional context\n\n- [ ] Explore the various analysis depths in WALA to see which one works\n\n- [ ] Expose the call-graph analysis depths as a CLI option to provide to codeanalyzer call graph construction \n\n- [ ] Mirror this in CLDK python-sdk repo as a now feature request \n\n- [ ] Consider manually adding call-edges to all implementing subtypes of the the interface (match by method signature of the subtypes.)\n\n- [ ] Test on below: \n\n```\ncom.ibm.websphere.samples.daytrader.web.servlet.TradeServletAction, doBuy(ServletContext, HttpServletRequest, HttpServletResponse, String, String, String)\n\nprivate TradeServices tAction\nOrderDataBean orderData = tAction.buy(userID, symbol, new Double(quantity).doubleValue(), TradeConfig.getOrderProcessingMode());\n```","author":{"url":"https://github.com/rahlk","@type":"Person","name":"rahlk"},"datePublished":"2025-02-11T03:09:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/113/codeanalyzer-java/issues/113"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:290cc9d3-ff3b-e448-aadc-0eb2add10516 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CA26:92E79:7FB61:B1672:698F2941 |
| html-safe-nonce | be71d14284de666d8e984ebd77ebf70936593ca1588b303ee3068de7684dc1c0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTI2OjkyRTc5OjdGQjYxOkIxNjcyOjY5OEYyOTQxIiwidmlzaXRvcl9pZCI6IjY0ODcxNTM5ODMyOTUwMDcwNDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 159d65eb2a502f6e99249ebe519dcab3755c1668f295e051ebc3840d0424ec9c |
| hovercard-subject-tag | issue:2844168586 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/codellm-devkit/codeanalyzer-java/113/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1a7e32ced02513610f0ed69d17abe838f32ae58a2dd1a9a53f0e5fcef7ad6c41/codellm-devkit/codeanalyzer-java/issues/113 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1a7e32ced02513610f0ed69d17abe838f32ae58a2dd1a9a53f0e5fcef7ad6c41/codellm-devkit/codeanalyzer-java/issues/113 |
| og:image:alt | Describe the bug When there is call to an interface method, the call graph edge in the current call graph points to the interface and not to any of the implementations. So when there is a call to a... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rahlk |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6102991c714c1a6a27d05fb4f96ea6ca87a6750b4f093b95cc57ed1b84b145a1 |
| turbo-cache-control | no-preview |
| go-import | github.com/codellm-devkit/codeanalyzer-java git https://github.com/codellm-devkit/codeanalyzer-java.git |
| octolytics-dimension-user_id | 197800760 |
| octolytics-dimension-user_login | codellm-devkit |
| octolytics-dimension-repository_id | 731300153 |
| octolytics-dimension-repository_nwo | codellm-devkit/codeanalyzer-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 731300153 |
| octolytics-dimension-repository_network_root_nwo | codellm-devkit/codeanalyzer-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d52a41ad9b9ffb9b63a1b4a600a6054be8b70b36 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width