Program: 53652
Project: 53652
Buggy source:
private Class<?> injectToPlainClassLoader(ClassPool pool,ClassLoader classLoader,String className) throws NotFoundException, IOException, CannotCompileException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
  Class<?> c=null;
  try {
    c=classLoader.loadClass(className);
  }
 catch (  ClassNotFoundException ex) {
    if (logger.isTraceEnabled()) {
      logger.trace("String_Node_Str",ex.getMessage(),ex);
    }
  }
  if (c != null) {
    return c;
  }
  final CtClass ct=pool.get(className);
  if (ct == null) {
    throw new NotFoundException(className);
  }
  final CtClass superClass=ct.getSuperclass();
  if (superClass != null) {
    injectToPlainClassLoader(pool,classLoader,superClass.getName());
  }
  final CtClass[] interfaces=ct.getInterfaces();
  for (  CtClass ctInterface : interfaces) {
    injectToPlainClassLoader(pool,classLoader,ctInterface.getName());
  }
  final Collection<String> refs=ct.getRefClasses();
  for (  String ref : refs) {
    try {
      injectToPlainClassLoader(pool,classLoader,ref);
    }
 catch (    NotFoundException e) {
      logger.warn("String_Node_Str",e);
    }
  }
  final byte[] bytes=ct.toBytecode();
  return (Class<?>)DEFINE_CLASS.invoke(classLoader,ct.getName(),bytes,0,bytes.length);
}

Fixed version (ground truth):
private Class<?> injectToPlainClassLoader(ClassPool pool,ClassLoader classLoader,String className,ClassLoadingChecker classLoadingChecker) throws NotFoundException, IOException, CannotCompileException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
  if (pluginConfig.getProfilerPackageFilter().accept(className)) {
    if (isDebug) {
      logger.debug("String_Node_Str",className);
    }
    return null;
  }
  if (!pluginConfig.getPluginPackageFilter().accept(className)) {
    if (isDebug) {
      logger.debug("String_Node_Str",className);
    }
    return null;
  }
  if (!classLoadingChecker.isFirstLoad(className)) {
    if (isDebug) {
      logger.debug("String_Node_Str",className);
    }
    return null;
  }
  Class<?> c=null;
  try {
    c=classLoader.loadClass(className);
    if (isDebug) {
      logger.debug("String_Node_Str",className);
    }
  }
 catch (  ClassNotFoundException ex) {
    if (isDebug) {
      logger.debug("String_Node_Str",ex.getMessage());
    }
  }
  if (c != null) {
    return c;
  }
  final CtClass ct=pool.getOrNull(className);
  if (ct == null) {
    throw new NotFoundException(className);
  }
  final CtClass superClass=ct.getSuperclass();
  if (superClass != null) {
    if ("String_Node_Str".equals(superClass.getName())) {
      return null;
    }
    injectToPlainClassLoader(pool,classLoader,superClass.getName(),classLoadingChecker);
  }
  final CtClass[] interfaces=ct.getInterfaces();
  for (  CtClass ctInterface : interfaces) {
    injectToPlainClassLoader(pool,classLoader,ctInterface.getName(),classLoadingChecker);
  }
  @SuppressWarnings("String_Node_Str") final Collection<String> referenceClassList=ct.getRefClasses();
  if (isDebug) {
    logger.debug("String_Node_Str",className,referenceClassList);
  }
  for (  String referenceClass : referenceClassList) {
    try {
      injectToPlainClassLoader(pool,classLoader,referenceClass,classLoadingChecker);
    }
 catch (    NotFoundException e) {
      logger.warn("String_Node_Str",e.getMessage(),e);
    }
  }
  if (logger.isInfoEnabled()) {
    logger.debug("String_Node_Str",className,classLoader);
  }
  final byte[] bytes=ct.toBytecode();
  return (Class<?>)DEFINE_CLASS.invoke(classLoader,ct.getName(),bytes,0,bytes.length);
}