When using a cyclic debugging technique, one often has problems debugging
multi-threaded applications. The cause of all the misery is located in the
non-deterministic behaviour of such applications. Because the Java
programming language encourages the multi-threaded programming paradigm, it
is useful to eliminate some causes of non-determinism while debugging a Java
application. Therefore we have implemented a record/replay system, JaRec,
which removes the non-determinism caused by synchronization races in an
execution of a multi-threaded program. As a prime objective we focused on
portability, and as such, the bulk of JaRec has been implemented in Java
itself, without modifying the Java Virtual Machine. This is obtained by
statically instrumenting the class files, prior to loading them into the JVM.