Program: 169065
Project: 169065
Buggy source:
private static <T>Class<? extends T> createProxyClass(ViewType<T> viewType){
  Class<?> clazz=viewType.getJavaType();
  ClassPool pool=ClassPool.getDefault();
  CtClass cc=pool.makeClass(clazz.getName() + "String_Node_Str" + classCounter.getAndIncrement());
  CtClass superCc;
  try {
    superCc=pool.get(clazz.getName());
    if (clazz.isInterface()) {
      cc.addInterface(superCc);
    }
 else {
      cc.setSuperclass(superCc);
    }
    Set<MethodAttribute<? super T,?>> attributes=viewType.getAttributes();
    CtField[] attributeFields=new CtField[attributes.size()];
    CtClass[] attributeTypes=new CtClass[attributes.size()];
    int i=0;
    for (    MethodAttribute<?,?> attribute : attributes) {
      Method getter=attribute.getJavaMethod();
      Method setter=ReflectionUtils.getSetter(clazz,attribute.getName());
      CtField attributeField=new CtField(getType(pool,attribute),attribute.getName(),cc);
      attributeField.setModifiers(getModifiers(setter != null));
      String genericSignature=getGenericSignature(attribute,attributeField);
      if (genericSignature != null) {
        attributeField.setGenericSignature(genericSignature);
      }
      cc.addField(attributeField);
      boolean createBridges=!attribute.getJavaType().equals(getter.getReturnType());
      CtMethod attributeGetter=CtNewMethod.getter(getter.getName(),attributeField);
      if (genericSignature != null) {
        String getterGenericSignature="String_Node_Str" + genericSignature;
        attributeGetter.setGenericSignature(getterGenericSignature);
      }
      if (createBridges) {
        CtMethod getterBridge=createGetterBridge(cc,pool,getter,attributeGetter);
        cc.addMethod(getterBridge);
      }
      cc.addMethod(attributeGetter);
      if (setter != null) {
        CtMethod attributeSetter=CtNewMethod.setter(setter.getName(),attributeField);
        if (genericSignature != null) {
          String setterGenericSignature="String_Node_Str" + genericSignature + "String_Node_Str";
          attributeSetter.setGenericSignature(setterGenericSignature);
        }
        if (createBridges) {
          CtMethod setterBridge=createSetterBridge(cc,pool,setter,attributeSetter);
          cc.addMethod(setterBridge);
        }
        cc.addMethod(attributeSetter);
      }
      attributeFields[i]=attributeField;
      attributeTypes[i]=attributeField.getType();
      i++;
    }
    if (clazz.isInterface()) {
      cc.addConstructor(createConstructor(cc,attributeFields,attributeTypes));
    }
    Set<MappingConstructor<T>> constructors=viewType.getConstructors();
    for (    MappingConstructor<?> constructor : constructors) {
      int constructorParameterCount=attributes.size() + constructor.getParameterAttributes().size();
      CtClass[] constructorAttributeTypes=new CtClass[constructorParameterCount];
      System.arraycopy(attributeTypes,0,constructorAttributeTypes,0,attributes.size());
      CtConstructor superConstructor=findConstructor(pool,superCc,constructor);
      System.arraycopy(superConstructor.getParameterTypes(),0,constructorAttributeTypes,attributes.size(),superConstructor.getParameterTypes().length);
      cc.addConstructor(createConstructor(cc,attributeFields,constructorAttributeTypes));
    }
    return cc.toClass();
  }
 catch (  Exception ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
private static <T>Class<? extends T> createProxyClass(ViewType<T> viewType){
  Class<?> clazz=viewType.getJavaType();
  ClassPool pool=ClassPool.getDefault();
  CtClass cc=pool.makeClass(clazz.getName() + "String_Node_Str" + classCounter.getAndIncrement());
  CtClass superCc;
  ClassPath classPath=new ClassClassPath(clazz);
  pool.insertClassPath(classPath);
  try {
    superCc=pool.get(clazz.getName());
    if (clazz.isInterface()) {
      cc.addInterface(superCc);
    }
 else {
      cc.setSuperclass(superCc);
    }
    Set<MethodAttribute<? super T,?>> attributes=viewType.getAttributes();
    CtField[] attributeFields=new CtField[attributes.size()];
    CtClass[] attributeTypes=new CtClass[attributes.size()];
    int i=0;
    for (    MethodAttribute<?,?> attribute : attributes) {
      Method getter=attribute.getJavaMethod();
      Method setter=ReflectionUtils.getSetter(clazz,attribute.getName());
      CtField attributeField=new CtField(getType(pool,attribute),attribute.getName(),cc);
      attributeField.setModifiers(getModifiers(setter != null));
      String genericSignature=getGenericSignature(attribute,attributeField);
      if (genericSignature != null) {
        attributeField.setGenericSignature(genericSignature);
      }
      cc.addField(attributeField);
      boolean createBridges=!attribute.getJavaType().equals(getter.getReturnType());
      CtMethod attributeGetter=CtNewMethod.getter(getter.getName(),attributeField);
      if (genericSignature != null) {
        String getterGenericSignature="String_Node_Str" + genericSignature;
        attributeGetter.setGenericSignature(getterGenericSignature);
      }
      if (createBridges) {
        CtMethod getterBridge=createGetterBridge(cc,pool,getter,attributeGetter);
        cc.addMethod(getterBridge);
      }
      cc.addMethod(attributeGetter);
      if (setter != null) {
        CtMethod attributeSetter=CtNewMethod.setter(setter.getName(),attributeField);
        if (genericSignature != null) {
          String setterGenericSignature="String_Node_Str" + genericSignature + "String_Node_Str";
          attributeSetter.setGenericSignature(setterGenericSignature);
        }
        if (createBridges) {
          CtMethod setterBridge=createSetterBridge(cc,pool,setter,attributeSetter);
          cc.addMethod(setterBridge);
        }
        cc.addMethod(attributeSetter);
      }
      attributeFields[i]=attributeField;
      attributeTypes[i]=attributeField.getType();
      i++;
    }
    if (clazz.isInterface()) {
      cc.addConstructor(createConstructor(cc,attributeFields,attributeTypes));
    }
    Set<MappingConstructor<T>> constructors=viewType.getConstructors();
    for (    MappingConstructor<?> constructor : constructors) {
      int constructorParameterCount=attributes.size() + constructor.getParameterAttributes().size();
      CtClass[] constructorAttributeTypes=new CtClass[constructorParameterCount];
      System.arraycopy(attributeTypes,0,constructorAttributeTypes,0,attributes.size());
      CtConstructor superConstructor=findConstructor(pool,superCc,constructor);
      System.arraycopy(superConstructor.getParameterTypes(),0,constructorAttributeTypes,attributes.size(),superConstructor.getParameterTypes().length);
      cc.addConstructor(createConstructor(cc,attributeFields,constructorAttributeTypes));
    }
    return cc.toClass();
  }
 catch (  Exception ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
 finally {
    pool.removeClassPath(classPath);
  }
}