fix NPE on MethodFormat.getCodeSource