Buggy code:
public class ProxySubclassGenerator { private static final Logger LOGGER = LoggerFactory . getLogger ( ProxySubclassGenerator . class ) ; private static final Map < ClassLoader , ConcurrentMap < String , String > > proxyClassesByClassLoader ; private static final char FINAL_MODIFIER = '!' ; private static final char UNABLE_TO_PROXY = '#' ; public static Class < ? > getProxySubclass ( Class < ? > aClass ) throws UnableToProxyException { } public static Object newProxySubclassInstance ( Class < ? > classToProxy , InvocationHandler ih ) throws UnableToProxyException { } private static Class < ? > generateAndLoadSubclass ( Class < ? > aClass , ClassLoader loader ) throws UnableToProxyException { ProxySubclassGenerator . LOGGER . debug ( LOG_ENTRY , "generateAndLoadSubclass" , new Object [ ] { aClass , loader } ) ; String newClassName = ( "$" + ( aClass . getSimpleName ( ) ) ) + ( aClass . hashCode ( ) ) ; String packageName = aClass . getPackage ( ) . getName ( ) ; if ( ( packageName . startsWith ( "java." ) ) || ( packageName . startsWith ( "javax." ) ) ) { <START_BUG> packageName = "com.ibm.osgi.blueprint.proxy." + packageName ; <END_BUG> } String fullNewClassName = ( ( packageName + "." ) + newClassName ) . replaceAll ( "\\." , "//" ) ; ProxySubclassGenerator . LOGGER . debug ( "New<seq2seq4repair_space>class<seq2seq4repair_space>name:<seq2seq4repair_space>{}" , newClassName ) ; ProxySubclassGenerator . LOGGER . debug ( "Full<seq2seq4repair_space>new<seq2seq4repair_space>class<seq2seq4repair_space>name:<seq2seq4repair_space>{}" , fullNewClassName ) ; Class < ? > clazz = null ; try { ClassReader cReader = new ClassReader ( loader . getResourceAsStream ( ( ( aClass . getName ( ) . replaceAll ( "\\." , "//" ) ) + ".class" ) ) ) ; ClassWriter cWriter = new ClassWriter ( ClassWriter . COMPUTE_MAXS ) ; ClassVisitor dynamicSubclassAdapter = new ProxySubclassAdapter ( cWriter , fullNewClassName , loader ) ; byte [ ] byteClassData = ProxySubclassGenerator . processClass ( cReader , cWriter , dynamicSubclassAdapter ) ; clazz = ProxySubclassGenerator . loadClassFromBytes ( loader , ProxySubclassGenerator . getBinaryName ( fullNewClassName ) , byteClassData , aClass . getName ( ) ) ; } catch ( IOException ioe ) { ProxySubclassGenerator . LOGGER . debug ( LOG_EXCEPTION , ioe ) ; throw new ProxyClassBytecodeGenerationException ( aClass . getName ( ) , ioe ) ; } catch ( TypeNotPresentException tnpe ) { ProxySubclassGenerator . LOGGER . debug ( LOG_EXCEPTION , tnpe ) ; throw new ProxyClassBytecodeGenerationException ( tnpe . typeName ( ) , tnpe . getCause ( ) ) ; } ProxySubclassGenerator . LOGGER . debug ( LOG_EXIT , "generateAndLoadSubclass" , clazz ) ; return clazz ; } private static byte [ ] processClass ( ClassReader cReader , ClassWriter cWriter , ClassVisitor cVisitor ) { } private static String getBinaryName ( String name ) { } private static Class < ? > loadClassFromBytes ( ClassLoader loader , String name , byte [ ] classData , String classToProxyName ) throws UnableToProxyException { } public static boolean isProxySubclass ( Class < ? > aClass ) { } private static void scanForFinalModifiers ( Class < ? > clazz ) throws FinalModifierException { } public static InvocationHandler getInvocationHandler ( Object o ) { } }

Fix:
packageName = "org.apache.aries.blueprint.proxy." + packageName ;