Self-contained, end-to-end examples of multiplex β one Java, one Python.
# from the repo root
uv run ./multiplex ./examples/config-java.yml # Java
uv run ./multiplex ./examples/config-python.yml # PythonMutates one method β com.example.Classifier.classify in the small Maven
project under project/java-example/ β using the
basic approach, then runs that project's JUnit tests against each mutant with
the mvn backend to see which mutants survive.
Mutates one function β classify in
project/python-example/classifier.py β
using the basic approach with project.language: python, then runs that
project's pytest suite against each mutant with the pytest backend. Output
lands under project/python-example/output/basic-mutants/ (mutant files are
.py; the summary CSV columns are identical to the Java run).
Prerequisite: pytest for the active interpreter (already provided by uv run)
plus an LLM endpoint as below. The rest of this page describes the Java example.
-
mvnand a JDK 11 or newer on yourPATH(themvnruntool runsmvn clean test; the project targets Java 11). Ifmvnuses an older JDK β e.g. viaJAVA_HOMEβ the build fails with "release version 11 not supported"; pointJAVA_HOMEat a JDK 11+ or lowermaven.compiler.releaseinproject/java-example/pom.xml. -
A running Ollama serving the model named in
config-java.ymlunderllm.model(defaultgpt-oss:20b):ollama pull gpt-oss:20b # or edit llm.model to a model you already haveAny LiteLLM-supported provider works β edit the
llmsection ofconfig-java.yml(model,endpoint,token_env_var).
Written under project/java-example/output/basic-mutants/:
mutant_N.javaβ each generated mutant (the mutated method body).mutant_summary.csvβ one row per mutant with columnsMUTANT, EQUIVALENCE, COMPILABLE, SURVIVES. A surviving mutant is one the test suite failed to catch.
These run artifacts (plus the *.orig source backup and Maven target/) are
git-ignored.
Prompt sets are optional per approach, so you can switch mutation.approach in
config-java.yml to hazop or stpa without editing anything else β their
prompts are already included. mutahunter and llmorpheus need their own
prompts added first (see the comments in config-java.yml and the top-level
README).