Program: 52754
Project: 52754
Buggy source:
@SuppressWarnings("String_Node_Str") public <T>T createProxy(Class<T> toMock,InvocationHandler handler,Method[] mockedMethods,ConstructorArgs args){
  Enhancer enhancer=createEnhancer(toMock);
  MockMethodInterceptor interceptor=new MockMethodInterceptor(handler);
  if (mockedMethods != null) {
    interceptor.setMockedMethods(mockedMethods);
  }
  enhancer.setCallbackType(interceptor.getClass());
  Class<?> mockClass;
  try {
    mockClass=enhancer.createClass();
  }
 catch (  CodeGenerationException e) {
    enhancer.setClassLoader(getClass().getClassLoader());
    mockClass=enhancer.createClass();
  }
  try {
    Enhancer.registerCallbacks(mockClass,new Callback[]{interceptor});
    if (args != null) {
      Constructor<?> cstr;
      try {
        cstr=mockClass.getDeclaredConstructor(args.getConstructor().getParameterTypes());
      }
 catch (      NoSuchMethodException e) {
        throw new RuntimeException("String_Node_Str",e);
      }
      T mock;
      try {
        cstr.setAccessible(true);
        mock=(T)cstr.newInstance(args.getInitArgs());
      }
 catch (      InstantiationException e) {
        throw new RuntimeException("String_Node_Str",e);
      }
catch (      IllegalAccessException e) {
        throw new RuntimeException("String_Node_Str",e);
      }
catch (      InvocationTargetException e) {
        throw new RuntimeException("String_Node_Str",e.getTargetException());
      }
      return mock;
    }
 else {
      Factory mock;
      try {
        mock=(Factory)ClassInstantiatorFactory.getInstantiator().newInstance(mockClass);
      }
 catch (      InstantiationException e) {
        throw new RuntimeException("String_Node_Str" + toMock + "String_Node_Str"+ ClassInstantiatorFactory.getJVM()+ "String_Node_Str");
      }
      mock.getCallback(0);
      return (T)mock;
    }
  }
  finally {
    Enhancer.registerCallbacks(mockClass,null);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public <T>T createProxy(Class<T> toMock,InvocationHandler handler,Method[] mockedMethods,ConstructorArgs args){
  Enhancer enhancer=createEnhancer(toMock);
  MockMethodInterceptor interceptor=new MockMethodInterceptor(handler);
  if (mockedMethods != null) {
    interceptor.setMockedMethods(mockedMethods);
  }
  enhancer.setCallbackType(interceptor.getClass());
  Class<?> mockClass;
  try {
    mockClass=enhancer.createClass();
  }
 catch (  CodeGenerationException e) {
    LinkedClassLoader linkedClassLoader=new LinkedClassLoader();
    linkedClassLoader.addClassLoader(toMock.getClassLoader());
    linkedClassLoader.addClassLoader(ClassProxyFactory.class.getClassLoader());
    enhancer.setClassLoader(linkedClassLoader);
    mockClass=enhancer.createClass();
  }
  try {
    Enhancer.registerCallbacks(mockClass,new Callback[]{interceptor});
    if (args != null) {
      Constructor<?> cstr;
      try {
        cstr=mockClass.getDeclaredConstructor(args.getConstructor().getParameterTypes());
      }
 catch (      NoSuchMethodException e) {
        throw new RuntimeException("String_Node_Str",e);
      }
      T mock;
      try {
        cstr.setAccessible(true);
        mock=(T)cstr.newInstance(args.getInitArgs());
      }
 catch (      InstantiationException e) {
        throw new RuntimeException("String_Node_Str",e);
      }
catch (      IllegalAccessException e) {
        throw new RuntimeException("String_Node_Str",e);
      }
catch (      InvocationTargetException e) {
        throw new RuntimeException("String_Node_Str",e.getTargetException());
      }
      return mock;
    }
 else {
      Factory mock;
      try {
        mock=(Factory)ClassInstantiatorFactory.getInstantiator().newInstance(mockClass);
      }
 catch (      InstantiationException e) {
        throw new RuntimeException("String_Node_Str" + toMock + "String_Node_Str"+ ClassInstantiatorFactory.getJVM()+ "String_Node_Str");
      }
      mock.getCallback(0);
      return (T)mock;
    }
  }
  finally {
    Enhancer.registerCallbacks(mockClass,null);
  }
}