Synchronized method performs implicit lock and unlock of the 'this' object. At method entry, Jikes fetches the 'this' reference from local variable 0 and acquire a lock on that object. Before each return instruction, Jikes fetches the reference from local variable 0 again, and release the lock on that object.
Although at method entry, the 'this' reference is always located in local variable 0 (see ), it is wrong to expect the 'this' reference to be still available in variable 0 when the method is about to return.
The Java VM Spec does not forbid the java compiler to reuse the variable 0 to store other references than 'this' (see ). Moreover the Spec states "Note that the monitor entry and exit automatically performed by the Java virtual machine when invoking a synchronized method are considered to occur during the calling method's invocation." (see ).
The issue have been discovered and discussed before because Soot is producing bytecode that reuse variable 0 (see ,). Note that the OpenJDK is able to handle such bytecode correctly.