HACKER Q&A
📣 fedeb95

Source code (Java) parser and/or static analysis tool


Hi HN, for some project of mine I need a library or set of them to do the following:

Parse a potentially large code base and count, starting from an entry point that may be a main method or just a user selected method, and count how many method calls are made at the same level. Then for each call do the same recursively.

In the end I'd like to count how many calls there are for each level. Optionally I'd also like to count loops and ifs.

I think a parser or a static analysis tool could be best for the job but given I need a very simple thing (I think) I'd like to know the faster thing to get started with that gets the job done.

Thanks in advance.


  👤 jeffreportmill1 Accepted Answer ✓