Program: 168927
Project: 168927
Buggy source:
@SuppressWarnings("String_Node_Str") private <T>Class<? extends T> createProxyClass(ViewType<T> viewType,boolean unsafe){
  Class<?> clazz=viewType.getJavaType();
  String suffix=unsafe ? "String_Node_Str" : "String_Node_Str";
  String proxyClassName=clazz.getName() + "String_Node_Str" + suffix;
  CtClass cc=pool.makeClass(proxyClassName);
  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);
    }
    CtField initialStateField=null;
    CtField dirtyStateField=null;
    if (viewType.isUpdateable()) {
      cc.addInterface(pool.get(UpdateableProxy.class.getName()));
      addGetEntityViewClass(cc,clazz);
      dirtyStateField=new CtField(pool.get(Object[].class.getName()),"String_Node_Str",cc);
      dirtyStateField.setModifiers(getModifiers(false));
      cc.addField(dirtyStateField);
      addGetter(cc,dirtyStateField,"String_Node_Str");
      if (viewType.isPartiallyUpdateable()) {
        initialStateField=new CtField(pool.get(Object[].class.getName()),"String_Node_Str",cc);
        initialStateField.setModifiers(getModifiers(false));
        cc.addField(initialStateField);
        addStateElementGetter(cc,initialStateField,"String_Node_Str",0);
        addGetter(cc,initialStateField,"String_Node_Str");
      }
    }
    Set<MethodAttribute<? super T,?>> attributes=viewType.getAttributes();
    CtField[] attributeFields=new CtField[attributes.size()];
    CtClass[] attributeTypes=new CtClass[attributes.size()];
    int i=1;
    MethodAttribute<? super T,?> idAttribute=viewType.getIdAttribute();
    CtField idField=addMembersForAttribute(idAttribute,clazz,cc,initialStateField,dirtyStateField,0,-1);
    attributeFields[0]=idField;
    attributeTypes[0]=idField.getType();
    attributes.remove(idAttribute);
    if (viewType.isUpdateable() && !viewType.isPartiallyUpdateable()) {
      addGetter(cc,idField,"String_Node_Str",Object.class);
      addGetter(cc,null,"String_Node_Str",Object[].class);
    }
    int dirtyStateIndex=0;
    for (    MethodAttribute<?,?> attribute : attributes) {
      if (attribute == idAttribute) {
        continue;
      }
      CtField attributeField=addMembersForAttribute(attribute,clazz,cc,initialStateField,dirtyStateField,i,dirtyStateIndex);
      attributeFields[i]=attributeField;
      attributeTypes[i]=attributeField.getType();
      i++;
      if (attribute.isUpdateable()) {
        dirtyStateIndex++;
      }
    }
    CtClass equalsDeclaringClass=superCc.getMethod("String_Node_Str",getEqualsDesc()).getDeclaringClass();
    CtClass hashCodeDeclaringClass=superCc.getMethod("String_Node_Str",getHashCodeDesc()).getDeclaringClass();
    boolean hasCustomEqualsHashCode=false;
    if (!"String_Node_Str".equals(equalsDeclaringClass.getName())) {
      hasCustomEqualsHashCode=true;
      LOG.warning("String_Node_Str" + equalsDeclaringClass.getName() + "String_Node_Str");
    }
    if (!"String_Node_Str".equals(hashCodeDeclaringClass.getName())) {
      hasCustomEqualsHashCode=true;
      LOG.warning("String_Node_Str" + hashCodeDeclaringClass.getName() + "String_Node_Str");
    }
    if (!hasCustomEqualsHashCode) {
      cc.addMethod(createEquals(cc,idField));
      cc.addMethod(createHashCode(cc,idField));
    }
    if (clazz.isInterface()) {
      cc.addConstructor(createConstructor(cc,attributeFields,attributeTypes,initialStateField,dirtyStateField,attributeFields.length,dirtyStateIndex,unsafe));
    }
    Set<MappingConstructor<T>> constructors=viewType.getConstructors();
    for (    MappingConstructor<?> constructor : constructors) {
      int constructorParameterCount=1 + attributes.size() + constructor.getParameterAttributes().size();
      CtClass[] constructorAttributeTypes=new CtClass[constructorParameterCount];
      System.arraycopy(attributeTypes,0,constructorAttributeTypes,0,1 + attributes.size());
      CtConstructor superConstructor=findConstructor(superCc,constructor);
      System.arraycopy(superConstructor.getParameterTypes(),0,constructorAttributeTypes,1 + attributes.size(),superConstructor.getParameterTypes().length);
      cc.addConstructor(createConstructor(cc,attributeFields,constructorAttributeTypes,initialStateField,dirtyStateField,attributeFields.length,dirtyStateIndex,unsafe));
    }
    try {
      if (unsafe) {
        return (Class<? extends T>)UnsafeHelper.define(cc.getName(),cc.toBytecode(),clazz);
      }
 else {
        return cc.toClass(clazz.getClassLoader(),null);
      }
    }
 catch (    CannotCompileException ex) {
      if (ex.getCause() instanceof LinkageError) {
        LinkageError error=(LinkageError)ex.getCause();
        try {
          return (Class<? extends T>)pool.getClassLoader().loadClass(proxyClassName);
        }
 catch (        ClassNotFoundException cnfe) {
          throw error;
        }
      }
 else {
        throw ex;
      }
    }
  }
 catch (  Exception ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
 finally {
    pool.removeClassPath(classPath);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private <T>Class<? extends T> createProxyClass(ViewType<T> viewType,boolean unsafe){
  Class<?> clazz=viewType.getJavaType();
  String suffix=unsafe ? "String_Node_Str" : "String_Node_Str";
  String proxyClassName=clazz.getName() + "String_Node_Str" + suffix;
  CtClass cc=pool.makeClass(proxyClassName);
  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);
    }
    CtField initialStateField=null;
    CtField dirtyStateField=null;
    if (viewType.isUpdateable()) {
      cc.addInterface(pool.get(UpdateableProxy.class.getName()));
      addGetEntityViewClass(cc,clazz);
      dirtyStateField=new CtField(pool.get(Object[].class.getName()),"String_Node_Str",cc);
      dirtyStateField.setModifiers(getModifiers(false));
      cc.addField(dirtyStateField);
      addGetter(cc,dirtyStateField,"String_Node_Str");
      if (viewType.isPartiallyUpdateable()) {
        initialStateField=new CtField(pool.get(Object[].class.getName()),"String_Node_Str",cc);
        initialStateField.setModifiers(getModifiers(false));
        cc.addField(initialStateField);
        addStateElementGetter(cc,initialStateField,"String_Node_Str",0);
        addGetter(cc,initialStateField,"String_Node_Str");
      }
    }
    Set<MethodAttribute<? super T,?>> attributes=viewType.getAttributes();
    CtField[] attributeFields=new CtField[attributes.size()];
    CtClass[] attributeTypes=new CtClass[attributes.size()];
    int i=1;
    MethodAttribute<? super T,?> idAttribute=viewType.getIdAttribute();
    CtField idField=addMembersForAttribute(idAttribute,clazz,cc,initialStateField,dirtyStateField,0,-1);
    attributeFields[0]=idField;
    attributeTypes[0]=idField.getType();
    attributes.remove(idAttribute);
    if (viewType.isUpdateable() && !viewType.isPartiallyUpdateable()) {
      addGetter(cc,idField,"String_Node_Str",Object.class);
      addGetter(cc,null,"String_Node_Str",Object[].class);
    }
    int dirtyStateIndex=0;
    for (    MethodAttribute<?,?> attribute : attributes) {
      if (attribute == idAttribute) {
        continue;
      }
      CtField attributeField=addMembersForAttribute(attribute,clazz,cc,initialStateField,dirtyStateField,i,dirtyStateIndex);
      attributeFields[i]=attributeField;
      attributeTypes[i]=attributeField.getType();
      i++;
      if (attribute.isUpdateable()) {
        dirtyStateIndex++;
      }
    }
    CtClass equalsDeclaringClass=superCc.getMethod("String_Node_Str",getEqualsDesc()).getDeclaringClass();
    CtClass hashCodeDeclaringClass=superCc.getMethod("String_Node_Str",getHashCodeDesc()).getDeclaringClass();
    boolean hasCustomEqualsHashCode=false;
    if (!"String_Node_Str".equals(equalsDeclaringClass.getName())) {
      hasCustomEqualsHashCode=true;
      LOG.warning("String_Node_Str" + equalsDeclaringClass.getName() + "String_Node_Str");
    }
    if (!"String_Node_Str".equals(hashCodeDeclaringClass.getName())) {
      hasCustomEqualsHashCode=true;
      LOG.warning("String_Node_Str" + hashCodeDeclaringClass.getName() + "String_Node_Str");
    }
    if (!hasCustomEqualsHashCode) {
      cc.addMethod(createEquals(cc,idField));
      cc.addMethod(createHashCode(cc,idField));
    }
    if (clazz.isInterface()) {
      cc.addConstructor(createConstructor(cc,attributeFields,attributeTypes,initialStateField,dirtyStateField,attributeFields.length,dirtyStateIndex,unsafe));
    }
    Set<MappingConstructor<T>> constructors=viewType.getConstructors();
    for (    MappingConstructor<?> constructor : constructors) {
      int constructorParameterCount=1 + attributes.size() + constructor.getParameterAttributes().size();
      CtClass[] constructorAttributeTypes=new CtClass[constructorParameterCount];
      System.arraycopy(attributeTypes,0,constructorAttributeTypes,0,1 + attributes.size());
      CtConstructor superConstructor=findConstructor(superCc,constructor);
      System.arraycopy(superConstructor.getParameterTypes(),0,constructorAttributeTypes,1 + attributes.size(),superConstructor.getParameterTypes().length);
      cc.addConstructor(createConstructor(cc,attributeFields,constructorAttributeTypes,initialStateField,dirtyStateField,attributeFields.length,dirtyStateIndex,unsafe));
    }
    try {
      if (unsafe) {
        return (Class<? extends T>)UnsafeHelper.define(cc.getName(),cc.toBytecode(),clazz);
      }
 else {
        return cc.toClass(clazz.getClassLoader(),null);
      }
    }
 catch (    CannotCompileException ex) {
      if (ex.getCause() instanceof LinkageError) {
        LinkageError error=(LinkageError)ex.getCause();
        try {
          return (Class<? extends T>)pool.getClassLoader().loadClass(proxyClassName);
        }
 catch (        ClassNotFoundException cnfe) {
          throw error;
        }
      }
 else {
        throw ex;
      }
    }
catch (    LinkageError error) {
      try {
        return (Class<? extends T>)pool.getClassLoader().loadClass(proxyClassName);
      }
 catch (      ClassNotFoundException cnfe) {
        throw error;
      }
    }
  }
 catch (  Exception ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
 finally {
    pool.removeClassPath(classPath);
  }
}