Program: 53872
Project: 53872
Buggy source:
private boolean process(ReferenceBinding binding){
  JDeclaredType type=(JDeclaredType)getType(binding);
  try {
    if (type instanceof JClassType && type != program.getTypeJavaLangObject()) {
      JMethod getClassMethod=program.createMethod(type.getSourceInfo().makeChild(BuildDeclMapVisitor.class,"String_Node_Str"),"String_Node_Str",type,program.getTypeJavaLangClass(),false,false,false,false,false);
      assert(type.getMethods().get(2) == getClassMethod);
      getClassMethod.freezeParamTypes();
      getClassMethod.setSynthetic();
    }
    if (binding.isNestedType() && !binding.isStatic() && !(binding instanceof BinaryTypeBinding)) {
      assert(type instanceof JClassType);
      NestedTypeBinding nestedBinding=(NestedTypeBinding)binding;
      if (nestedBinding.enclosingInstances != null) {
        for (int i=0; i < nestedBinding.enclosingInstances.length; ++i) {
          SyntheticArgumentBinding arg=nestedBinding.enclosingInstances[i];
          if (arg.matchingField != null) {
            createField(arg,type,Disposition.THIS_REF);
          }
        }
      }
      if (nestedBinding.outerLocalVariables != null) {
        for (int i=0; i < nestedBinding.outerLocalVariables.length; ++i) {
          SyntheticArgumentBinding arg=nestedBinding.outerLocalVariables[i];
          boolean isReallyThisRef=false;
          if (arg.actualOuterLocalVariable instanceof SyntheticArgumentBinding) {
            SyntheticArgumentBinding outer=(SyntheticArgumentBinding)arg.actualOuterLocalVariable;
            if (outer.matchingField != null) {
              JField field=(JField)typeMap.get(outer.matchingField);
              if (field.isThisRef()) {
                isReallyThisRef=true;
              }
            }
          }
          createField(arg,type,isReallyThisRef ? Disposition.THIS_REF : Disposition.FINAL);
        }
      }
    }
    ReferenceBinding superClassBinding=binding.superclass();
    if (type instanceof JClassType && superClassBinding != null) {
      assert(binding.superclass().isClass() || binding.superclass().isEnum());
      JClassType superClass=(JClassType)getType(superClassBinding);
      ((JClassType)type).setSuperClass(superClass);
    }
    ReferenceBinding[] superInterfaces=binding.superInterfaces();
    for (    ReferenceBinding superInterfaceBinding : superInterfaces) {
      assert(superInterfaceBinding.isInterface());
      JInterfaceType superInterface=(JInterfaceType)getType(superInterfaceBinding);
      type.addImplements(superInterface);
    }
    ReferenceBinding enclosingBinding=binding.enclosingType();
    if (enclosingBinding != null) {
      type.setEnclosingType((JDeclaredType)getType(enclosingBinding));
    }
    if (type instanceof JEnumType) {
      processEnumType(binding,(JEnumType)type);
    }
    return true;
  }
 catch (  VirtualMachineError e) {
    throw e;
  }
catch (  InternalCompilerException ice) {
    ice.addNode(type);
    throw ice;
  }
catch (  Throwable e) {
    throw new InternalCompilerException(type,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
private boolean process(ReferenceBinding binding){
  JDeclaredType type=(JDeclaredType)getType(binding);
  try {
    if (type instanceof JClassType && type != program.getTypeJavaLangObject()) {
      JMethod getClassMethod=program.createMethod(type.getSourceInfo().makeChild(BuildDeclMapVisitor.class,"String_Node_Str"),"String_Node_Str",type,program.getTypeJavaLangClass(),false,false,false,false,false);
      assert(type.getMethods().get(2) == getClassMethod);
      getClassMethod.freezeParamTypes();
      getClassMethod.setSynthetic();
    }
    if (binding.isNestedType() && !binding.isStatic() && !(binding instanceof BinaryTypeBinding)) {
      assert(type instanceof JClassType);
      NestedTypeBinding nestedBinding=(NestedTypeBinding)binding;
      if (nestedBinding.enclosingInstances != null) {
        for (int i=0; i < nestedBinding.enclosingInstances.length; ++i) {
          SyntheticArgumentBinding arg=nestedBinding.enclosingInstances[i];
          createField(arg,type,Disposition.THIS_REF);
        }
      }
      if (nestedBinding.outerLocalVariables != null) {
        for (int i=0; i < nestedBinding.outerLocalVariables.length; ++i) {
          SyntheticArgumentBinding arg=nestedBinding.outerLocalVariables[i];
          boolean isReallyThisRef=false;
          if (arg.actualOuterLocalVariable instanceof SyntheticArgumentBinding) {
            SyntheticArgumentBinding outer=(SyntheticArgumentBinding)arg.actualOuterLocalVariable;
            if (outer.matchingField != null) {
              JField field=(JField)typeMap.get(outer.matchingField);
              if (field.isThisRef()) {
                isReallyThisRef=true;
              }
            }
          }
          createField(arg,type,isReallyThisRef ? Disposition.THIS_REF : Disposition.FINAL);
        }
      }
    }
    ReferenceBinding superClassBinding=binding.superclass();
    if (type instanceof JClassType && superClassBinding != null) {
      assert(binding.superclass().isClass() || binding.superclass().isEnum());
      JClassType superClass=(JClassType)getType(superClassBinding);
      ((JClassType)type).setSuperClass(superClass);
    }
    ReferenceBinding[] superInterfaces=binding.superInterfaces();
    for (    ReferenceBinding superInterfaceBinding : superInterfaces) {
      assert(superInterfaceBinding.isInterface());
      JInterfaceType superInterface=(JInterfaceType)getType(superInterfaceBinding);
      type.addImplements(superInterface);
    }
    ReferenceBinding enclosingBinding=binding.enclosingType();
    if (enclosingBinding != null) {
      type.setEnclosingType((JDeclaredType)getType(enclosingBinding));
    }
    if (type instanceof JEnumType) {
      processEnumType(binding,(JEnumType)type);
    }
    return true;
  }
 catch (  VirtualMachineError e) {
    throw e;
  }
catch (  InternalCompilerException ice) {
    ice.addNode(type);
    throw ice;
  }
catch (  Throwable e) {
    throw new InternalCompilerException(type,"String_Node_Str",e);
  }
}