src/main/java/org/plumelib/bcelutil/BcelUtil.java
public static void makeMethodBodyEmpty(MethodGen mg) {

    mg.setInstructionList(new InstructionList(new RETURN()));
    mg.removeExceptionHandlers();
    mg.removeLineNumbers();
    mg.removeLocalVariables();
    mg.setMaxLocals();
  }
public static void makeMethodBodyEmpty(MethodGen mg) {

    mg.setInstructionList(new InstructionList(new RETURN()));
    mg.removeExceptionHandlers();
    mg.removeLineNumbers();
    mg.removeLocalVariables();
    mg.setMaxLocals();
  }
Empties the method of all code (except for a return). This includes line numbers, exceptions,
local variables, etc.

@param mg the method to clear out