r/programminghelp

Java 21 static-analysis engine for dependency and call graphs what edge cases am I missing?
▲ 3 r/programminghelp+1 crossposts

Java 21 static-analysis engine for dependency and call graphs what edge cases am I missing?

Hi everyone,

I’ve been building a Java 21 code-analysis engine and would love some feedback on the dependency resolution.

It uses JavaParser and resolves imports, same-package classes, inheritance, method calls, etc. I’m mainly trying to avoid false dependency edges in complex Java codebases.

GitHub: https://github.com/abhishek94443/CodeContext-Java

Would appreciate any feedback on edge cases or things I may be missing.

u/Capable-Island-4564 — 10 days ago
▲ 9 r/programminghelp+1 crossposts

Help me understand NUL please!

https://preview.redd.it/wpno1k6lmath1.png?width=384&format=png&auto=webp&s=c95e3b46b59f9d359529071e44dc7bbb305a39f1

Hello everyone, currently in Week 2 (and really enjoying it). I understand the concept of NUL marking the end of a string.

I was playing around with this with the programme above (Input is Hello), but I am a little confused because all of the conditionals come out as 1 (true). In my mind [5] should be the only true value index after the end of the string... but I am very confused as to why [6] and [7] are also showing as true.

Interestingly, if I hard code the sentence variable to "Hello" (instead of getting it via the get_string function), I get the expected answer of 1,0,0.

I think this might be related to the values that are being held in memory... but cannot seem to find an answer, so would appreciate any insights to make sure I understand the concept thoroughly. thanks all

reddit.com
u/Competitive_Brick574 — 12 days ago