How gumtreediff/gumtree works
Project type and purpose
• This is a multi-module Java library / tool (“GumTree”) for syntax-aware AST differencing. It provides:
• A core diff engine (matching, actions)
• Language-specific tree generators (plugins wrapping ANTLR, JDT, srcML, Tree-sitter, etc.)
• User interfaces (CLI client, Swing- and web-based diff viewer)
• Benchmarking harness
• Docker packaging and documentation
File structure
• Root: settings.gradle, build.gradle, .github (CI), docker, doc, dist, benchmark, buildSrc (Gradle scripts)
• Subprojects (each with its own build.gradle):
• core – the diff engine: packages for tree model, matchers (heuristic & optimal), action generators, IO utilities, tests
• gen.* – one subproject per language or input format (antlr3, antlr4, css, javaparser, jdt, js, json, srcml, treesitter-ng, xml, yaml). Each exposes a TreeGenerator plugin.
• client – the CLI front-end: parse arguments, invoke tree gen, core diff, print edit script
• client.diff – the GUI/web diff viewer: Swing panels + embedded Monaco browser widgets
• benchmark – dataset runners invoking the CLI on datasets, measuring performance
• docker – Dockerfile to containerize the CLI or server