JavaSlicer is a program slicer for Java source code. It is based on the System Dependence Graph with some adaptations and extensions (JSysDG, exceptions...) to improve its accuracy in common Java constructs.
Given a Java program, first, a graph representation is generated, that contains all the control and flow interrelations. Then, the graph is traversed following the classic program slicing algorithm to extract slices in linear time.
This website is a limited trial of JavaSlicer, with time and memory constraints to avoid abuse.
You can generate slices and graphs for simple programs.
If you require higher limits, you can download the source code or pre-built binaries from its git repository.
You can either write down or paste a Java program.