code: public static String localVariablesToString(MethodGen mg) {
  
      StringBuilder out = new StringBuilder();
      out.append(String.format("Locals for %s [cnt %d]%n", mg, mg.getMaxLocals()));
      LocalVariableGen[] lvgs = mg.getLocalVariables();
      if ((lvgs != null) && (lvgs.length > 0)) {
        for (LocalVariableGen lvg : lvgs) {
          out.append(String.format("  %s [index %d]%n", lvg, lvg.getIndex()));
        }
      }
      return out.toString();
    }
docs: Return a description of the local variables (one per line).
  
  @param mg the method whose local variables to describe
  @return a description of the local variables (one per line)