A Study on Dynamic Instrumentation for Java Programs