JavaCallStackExtractor is a tool designed to extract as much information as possible from a Java call stack stored in a text-based file.
It was created to provide a parser for Java call stacks, enabling their analysis within the Moose software analysis platform by generating a dedicated meta-model.
For More information about this meta-model see the FamixCallStack project.
This tool requires Java version 9 to 21.
Newer versions might work, but have not been tested.
It is highly recommended to use the same Java version for both the program you want to analyze and the extractor (for example, if your application is executed in Java 9, the extractor should be cexecuted on Java 9).
Using different versions may lead to unexpected behavior.
Launch the program you want to analyze with the following VM argument:
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5006
In Eclipse, you can add this argument in the Run Configuration > VM Arguments section:
This command enables debug mode on the Java VM:
- jdwp: Java Debug Wire Protocol
- transport=dt_socket: Enables socket-based communication
- server=y: Starts the JVM in debug server mode (waits for a debugger)
- suspend=y: JVM execution is paused until a debugger connects
- address=5006: Port used to wait for debugger connection
Edit the config.json file to fit the structure of your project. Refer to config.md for detailed instructions.
Execute the main method of JDICallstackExtractor. The output will be generated in the root directory of this repository.