ShadowData is a framework to attach shadow state, or meta data in general, to heap objects in Java. Doing this correctly and efficiently isn't exactly trivial. The ShadowData framework implements two different approaches, and the related paper discusses the issues involved.
Here you can download source codes of a simplified SWAT Leak Detector written in Java. There are two versions that differ in the underlying ShadowData implementation: hash map and heap tagging.
To build and run the examples follow the README files. Please don't hesitate to send comments and report bugs to Matej Vitásek.