public String getMethodBytecode ( final String methodName , final ClassReader classReader ) { final Tracer visit = new Tracer ( methodName ) ; classReader . accept ( visit , ClassReader . SKIP_DEBUG ) ; return visit . getText ( ) ; }
This will return a series of bytecode instructions which can be used to compare one method with another . debug info like local var declarations and line numbers are ignored so the focus is on the content .