First off, thank you for considering contributing to Java2Graph!
The repository is built strictly using Java 17 and Maven.
Ensure you have the following installed:
- JDK 17 (Temurin/Eclipse Adoptium is heavily recommended)
- Maven 3.6+
To bootstrap the local IDE bindings and download the required Picocli and JavaParser dependencies:
mvn clean install -DskipTestsJava2Graph works by pipelining a raw source directory through a rigid sequence of strictly uncoupled Passes. If you are adding a new feature, find the corresponding pass:
DelombokPass: Intercepts the raw filesystem. Detects truesrc/main/javaroots and isolates individual executions of Lombok, copying missing original files as a fail-safe.ParsePass: Boots theJavaParsermodule and streams the Java codebase sequentially into rawCompilationUnitAST states.ResolvePass: The heavy lifter. Crawls theCompilationUnitmodels using O(1) TokenRange heuristic maps and/or SymbolSolvers to deduceImplementsandMethodCalledges.ExportPass: Enforces strict directory wiping protocols and writes theGraphContextmemory-state sequentially into.csvdatasets, instructingLadybugDBto bulk-ingest them.
If you must modify the structural POJOs like InheritanceEdge or MethodCallEdge mapped inside GraphContext:
- Do not remove
Objects.hash()/equals(): The global memory structures rely on exact identity equality withinjava.util.Setcollections to deduplicate overlapping multi-module source discoveries.
Java2Graph includes an automated JUnit 5 (Jupiter) and JaCoCo metrics suite. All functional pull requests must pass the core suite.
To execute the test suite locally:
mvn clean testTo view the coverage footprint:
mvn jacoco:reportNote: We heavily favor fully synthetic headless AST verification Tests over testing raw Database/Kuzu bindings, as it allows GitHub CI/CD to run OS-agnostic testing pipelines.
- Fork the repo.
- Cut a new branch explicitly scoped to your feature (e.g.,
feature/custom-edges). - Ensure the project builds cleanly, and
mvn clean testclears. - Push your branch and open a definitive Pull Request. We will review it shortly!