Program: 149808
Project: 149808
Buggy source:
/** 
 * Create (in host jdk address space) the rvm objects that will be needed at run time to execute enough of the virtual machine to dynamically load and compile the remainder of itself. Side effect: rvm objects are created in host jdk address space Statics is populated "bootImageTypes" dictionary is populated with name/type pairs
 * @param typeNames names of rvm classes whose static fields will containthe objects comprising the virtual machine bootimage
 */
public static void createBootImageObjects(Vector<String> typeNames,String bootImageTypeNamesFile) throws IllegalAccessException {
  Callbacks.notifyBootImage(typeNames.elements());
  long startTime=0;
  long stopTime=0;
  if (verbose >= 1)   say("String_Node_Str");
  if (profile)   startTime=System.currentTimeMillis();
  for (  String typeName : typeNames) {
    if (verbose >= 4)     say("String_Node_Str",typeName);
    RVMType type;
    try {
      TypeReference tRef=TypeReference.findOrCreate(typeName);
      type=tRef.resolve();
    }
 catch (    NoClassDefFoundError ncdf) {
      ncdf.printStackTrace(System.out);
      fail(bootImageTypeNamesFile + "String_Node_Str" + typeName+ "String_Node_Str"+ ncdf);
      return;
    }
catch (    IllegalArgumentException ila) {
      ila.printStackTrace(System.out);
      fail(bootImageTypeNamesFile + "String_Node_Str" + typeName+ "String_Node_Str"+ ila);
      return;
    }
    type.markAsBootImageClass();
    typeName=typeName.replace('/','.');
    if (typeName.startsWith("String_Node_Str"))     typeName=typeName.substring(1,typeName.length() - 1);
    bootImageTypes.put(typeName,type);
  }
  if (profile) {
    stopTime=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (stopTime - startTime) + "String_Node_Str");
  }
  if (verbose >= 1)   say(String.valueOf(bootImageTypes.size()),"String_Node_Str");
  if (profile)   startTime=System.currentTimeMillis();
  if (verbose >= 1)   say("String_Node_Str");
  for (  RVMType type : bootImageTypes.values()) {
    if (verbose >= 2)     say("String_Node_Str" + type);
    type.resolve();
  }
  for (  RVMType type : bootImageTypes.values()) {
    type.allBootImageTypesResolved();
  }
  if (profile) {
    stopTime=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (stopTime - startTime) + "String_Node_Str");
  }
  BootRecord bootRecord=BootRecord.the_boot_record;
  RVMClass rvmBRType=getRvmType(bootRecord.getClass()).asClass();
  RVMArray intArrayType=RVMArray.getPrimitiveArrayType(10);
  bootImage.allocateDataStorage(rvmBRType.getInstanceSize(),ObjectModel.getAlignment(rvmBRType),ObjectModel.getOffsetForAlignment(rvmBRType));
  Address jtocAddress=bootImage.allocateDataStorage(intArrayType.getInstanceSize(0),ObjectModel.getAlignment(intArrayType),ObjectModel.getOffsetForAlignment(intArrayType));
  bootImage.resetAllocator();
  bootRecord.tocRegister=jtocAddress.plus(intArrayType.getInstanceSize(Statics.middleOfTable));
  OutOfLineMachineCode.init();
  if (profile)   startTime=System.currentTimeMillis();
  if (verbose >= 1)   say("String_Node_Str");
  if (verbose >= 1)   say("String_Node_Str" + numThreads + "String_Node_Str");
  ExecutorService threadPool=Executors.newFixedThreadPool(numThreads);
  for (  RVMType type : bootImageTypes.values()) {
    threadPool.execute(new BootImageWorker(type));
  }
  threadPool.shutdown();
  try {
    while (!threadPool.awaitTermination(Long.MAX_VALUE,TimeUnit.SECONDS)) {
      say("String_Node_Str");
    }
  }
 catch (  InterruptedException e) {
    throw new Error("String_Node_Str",e);
  }
  if (BootImageWorker.instantiationFailed) {
    throw new Error("String_Node_Str");
  }
  if (profile) {
    stopTime=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (stopTime - startTime) + "String_Node_Str");
  }
  staticsJunk=Statics.bootImageInstantiationFinished();
  FunctionTable functionTable=BuildJNIFunctionTable.buildTable();
  JNIEnvironment.initFunctionTable(functionTable);
  if (verbose >= 1)   say("String_Node_Str");
  if (profile)   startTime=System.currentTimeMillis();
  bootImageTypeFields=new HashMap<Key,FieldInfo>(bootImageTypes.size());
  HashSet<String> invalidEntrys=new HashSet<String>();
  for (  RVMType rvmType : bootImageTypes.values()) {
    FieldInfo fieldInfo;
    if (!rvmType.isClassType())     continue;
    Class jdkType=getJdkType(rvmType);
    if (jdkType == null)     continue;
    Key key=new Key(jdkType);
    fieldInfo=bootImageTypeFields.get(key);
    if (fieldInfo != null) {
      fieldInfo.rvmType=rvmType;
    }
 else {
      if (verbose >= 1)       say("String_Node_Str" + rvmType);
      fieldInfo=new FieldInfo(jdkType,rvmType);
      bootImageTypeFields.put(key,fieldInfo);
      for (Class cls=jdkType.getSuperclass(); cls != null; cls=cls.getSuperclass()) {
        key=new Key(cls);
        fieldInfo=bootImageTypeFields.get(key);
        if (fieldInfo != null) {
          break;
        }
 else {
          if (verbose >= 1)           say("String_Node_Str" + jdkType);
          fieldInfo=new FieldInfo(cls,null);
          bootImageTypeFields.put(key,fieldInfo);
        }
      }
    }
  }
  for (  FieldInfo fieldInfo : bootImageTypeFields.values()) {
    RVMType rvmType=fieldInfo.rvmType;
    if (rvmType == null) {
      if (verbose >= 1)       say("String_Node_Str" + fieldInfo.jdkType);
      continue;
    }
    Class jdkType=fieldInfo.jdkType;
    if (verbose >= 1)     say("String_Node_Str" + rvmType);
    RVMField[] rvmFields=rvmType.getStaticFields();
    fieldInfo.jdkStaticFields=new Field[rvmFields.length];
    for (int j=0; j < rvmFields.length; j++) {
      String rvmName=rvmFields[j].getName().toString();
      for (      Field f : fieldInfo.jdkFields) {
        if (f.getName().equals(rvmName)) {
          fieldInfo.jdkStaticFields[j]=f;
          f.setAccessible(true);
          break;
        }
      }
    }
    rvmFields=rvmType.getInstanceFields();
    fieldInfo.jdkInstanceFields=new Field[rvmFields.length];
    for (int j=0; j < rvmFields.length; j++) {
      String rvmName=rvmFields[j].getName().toString();
      jdkType=getJdkType(rvmFields[j].getDeclaringClass());
      if (jdkType == null)       continue;
      FieldInfo jdkFieldInfo=bootImageTypeFields.get(new Key(jdkType));
      if (jdkFieldInfo == null)       continue;
      Field[] jdkFields=jdkFieldInfo.jdkFields;
      for (      Field f : jdkFields) {
        if (f.getName().equals(rvmName)) {
          fieldInfo.jdkInstanceFields[j]=f;
          f.setAccessible(true);
          break;
        }
      }
    }
  }
  if (profile) {
    stopTime=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (stopTime - startTime) + "String_Node_Str");
  }
  startupThread=Scheduler.setupBootThread();
  byte[] stack=startupThread.getStack();
  int idx=stack.length - 1;
  if (VM.LittleEndian) {
    stack[idx--]=(byte)0xde;
    stack[idx--]=(byte)0xad;
    stack[idx--]=(byte)0xba;
    stack[idx--]=(byte)0xbe;
  }
 else {
    stack[idx--]=(byte)0xbe;
    stack[idx--]=(byte)0xba;
    stack[idx--]=(byte)0xad;
    stack[idx--]=(byte)0xde;
  }
  BootstrapClassLoader.setBootstrapRepositories(bootImageRepositoriesAtExecutionTime);
  if (verbose >= 1)   say("String_Node_Str");
  if (profile)   startTime=System.currentTimeMillis();
  for (  RVMType rvmType : bootImageTypes.values()) {
    if (verbose >= 1)     say("String_Node_Str",rvmType.toString());
    if (!rvmType.isClassType())     continue;
    Class jdkType=getJdkType(rvmType);
    if (jdkType == null && verbose >= 1) {
      say("String_Node_Str" + rvmType + "String_Node_Str");
    }
    RVMField[] rvmFields=rvmType.getStaticFields();
    for (int j=0; j < rvmFields.length; ++j) {
      RVMField rvmField=rvmFields[j];
      TypeReference rvmFieldType=rvmField.getType();
      Offset rvmFieldOffset=rvmField.getOffset();
      String rvmFieldName=rvmField.getName().toString();
      Field jdkFieldAcc=null;
      if (jdkType != null)       jdkFieldAcc=getJdkFieldAccessor(jdkType,j,STATIC_FIELD);
      if (jdkFieldAcc == null) {
        if (jdkType != null) {
          if (!copyKnownClasspathStaticField(jdkType,rvmFieldName,rvmFieldType,rvmFieldOffset)) {
            if (verbose >= 2) {
              traceContext.push(rvmFieldType.toString(),jdkType.getName(),rvmFieldName);
              traceContext.traceFieldNotInHostJdk();
              traceContext.pop();
            }
            Statics.setSlotContents(rvmFieldOffset,0);
            if (!VM.runningTool)             bootImage.countNulledReference();
            invalidEntrys.add(jdkType.getName());
          }
        }
 else {
          if (verbose >= 2) {
            traceContext.push(rvmFieldType.toString(),rvmFieldType.toString(),rvmFieldName);
            traceContext.traceFieldNotInHostJdk();
            traceContext.pop();
          }
          Statics.setSlotContents(rvmFieldOffset,0);
          if (!VM.runningTool)           bootImage.countNulledReference();
          invalidEntrys.add(rvmField.getDeclaringClass().toString());
        }
        continue;
      }
      if (!Modifier.isStatic(jdkFieldAcc.getModifiers())) {
        if (verbose >= 2)         traceContext.push(rvmFieldType.toString(),jdkType.getName(),rvmFieldName);
        if (verbose >= 2)         traceContext.traceFieldNotStaticInHostJdk();
        if (verbose >= 2)         traceContext.pop();
        Statics.setSlotContents(rvmFieldOffset,0);
        if (!VM.runningTool)         bootImage.countNulledReference();
        invalidEntrys.add(jdkType.getName());
        continue;
      }
      if (!equalTypes(jdkFieldAcc.getType().getName(),rvmFieldType)) {
        if (verbose >= 2)         traceContext.push(rvmFieldType.toString(),jdkType.getName(),rvmFieldName);
        if (verbose >= 2)         traceContext.traceFieldDifferentTypeInHostJdk();
        if (verbose >= 2)         traceContext.pop();
        Statics.setSlotContents(rvmFieldOffset,0);
        if (!VM.runningTool)         bootImage.countNulledReference();
        invalidEntrys.add(jdkType.getName());
        continue;
      }
      if (verbose >= 2)       say("String_Node_Str",String.valueOf(Statics.offsetAsSlot(rvmFieldOffset)),"String_Node_Str",rvmField.toString());
      if (rvmFieldType.isPrimitiveType()) {
        if (rvmFieldType.isBooleanType()) {
          Statics.setSlotContents(rvmFieldOffset,jdkFieldAcc.getBoolean(null) ? 1 : 0);
        }
 else         if (rvmFieldType.isByteType()) {
          Statics.setSlotContents(rvmFieldOffset,jdkFieldAcc.getByte(null));
        }
 else         if (rvmFieldType.isCharType()) {
          Statics.setSlotContents(rvmFieldOffset,jdkFieldAcc.getChar(null));
        }
 else         if (rvmFieldType.isShortType()) {
          Statics.setSlotContents(rvmFieldOffset,jdkFieldAcc.getShort(null));
        }
 else         if (rvmFieldType.isIntType()) {
          Statics.setSlotContents(rvmFieldOffset,jdkFieldAcc.getInt(null));
        }
 else         if (rvmFieldType.isLongType()) {
          Statics.setSlotContents(rvmFieldOffset,jdkFieldAcc.getLong(null));
        }
 else         if (rvmFieldType.isFloatType()) {
          float f=jdkFieldAcc.getFloat(null);
          Statics.setSlotContents(rvmFieldOffset,Float.floatToIntBits(f));
        }
 else         if (rvmFieldType.isDoubleType()) {
          double d=jdkFieldAcc.getDouble(null);
          Statics.setSlotContents(rvmFieldOffset,Double.doubleToLongBits(d));
        }
 else         if (rvmFieldType.equals(TypeReference.Address) || rvmFieldType.equals(TypeReference.Word) || rvmFieldType.equals(TypeReference.Extent)|| rvmFieldType.equals(TypeReference.Offset)) {
          Object o=jdkFieldAcc.get(null);
          String msg="String_Node_Str" + rvmField.toString();
          boolean warn=rvmFieldType.equals(TypeReference.Address);
          Statics.setSlotContents(rvmFieldOffset,getWordValue(o,msg,warn));
        }
 else {
          fail("String_Node_Str" + rvmFieldType);
        }
      }
 else {
        final Object o=jdkFieldAcc.get(null);
        if (verbose >= 3)         say("String_Node_Str",VM.addressAsHexString(Magic.objectAsAddress(o)));
        Statics.setSlotContents(rvmFieldOffset,o);
      }
    }
  }
  if (verbose >= 2) {
    for (    final String entry : invalidEntrys) {
      say("String_Node_Str",entry);
    }
  }
  if (profile) {
    stopTime=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (stopTime - startTime) + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Create (in host jdk address space) the rvm objects that will be needed at run time to execute enough of the virtual machine to dynamically load and compile the remainder of itself. Side effect: rvm objects are created in host jdk address space Statics is populated "bootImageTypes" dictionary is populated with name/type pairs
 * @param typeNames names of rvm classes whose static fields will containthe objects comprising the virtual machine bootimage
 */
public static void createBootImageObjects(Vector<String> typeNames,String bootImageTypeNamesFile) throws IllegalAccessException {
  Callbacks.notifyBootImage(typeNames.elements());
  long startTime=0;
  long stopTime=0;
  if (verbose >= 1)   say("String_Node_Str");
  if (profile)   startTime=System.currentTimeMillis();
  for (  String typeName : typeNames) {
    if (verbose >= 4)     say("String_Node_Str",typeName);
    RVMType type;
    try {
      TypeReference tRef=TypeReference.findOrCreate(typeName);
      type=tRef.resolve();
    }
 catch (    NoClassDefFoundError ncdf) {
      ncdf.printStackTrace(System.out);
      fail(bootImageTypeNamesFile + "String_Node_Str" + typeName+ "String_Node_Str"+ ncdf);
      return;
    }
catch (    IllegalArgumentException ila) {
      ila.printStackTrace(System.out);
      fail(bootImageTypeNamesFile + "String_Node_Str" + typeName+ "String_Node_Str"+ ila);
      return;
    }
    type.markAsBootImageClass();
    typeName=typeName.replace('/','.');
    if (typeName.startsWith("String_Node_Str"))     typeName=typeName.substring(1,typeName.length() - 1);
    bootImageTypes.put(typeName,type);
  }
  if (profile) {
    stopTime=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (stopTime - startTime) + "String_Node_Str");
  }
  if (verbose >= 1)   say(String.valueOf(bootImageTypes.size()),"String_Node_Str");
  if (profile)   startTime=System.currentTimeMillis();
  if (verbose >= 1)   say("String_Node_Str");
  for (  RVMType type : bootImageTypes.values()) {
    if (verbose >= 2)     say("String_Node_Str" + type);
    type.resolve();
  }
  for (  RVMType type : bootImageTypes.values()) {
    type.allBootImageTypesResolved();
  }
  if (profile) {
    stopTime=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (stopTime - startTime) + "String_Node_Str");
  }
  BootRecord bootRecord=BootRecord.the_boot_record;
  RVMClass rvmBRType=getRvmType(bootRecord.getClass()).asClass();
  RVMArray intArrayType=RVMArray.getPrimitiveArrayType(10);
  bootImage.allocateDataStorage(rvmBRType.getInstanceSize(),ObjectModel.getAlignment(rvmBRType),ObjectModel.getOffsetForAlignment(rvmBRType,false));
  Address jtocAddress=bootImage.allocateDataStorage(intArrayType.getInstanceSize(0),ObjectModel.getAlignment(intArrayType),ObjectModel.getOffsetForAlignment(intArrayType,false));
  bootImage.resetAllocator();
  bootRecord.tocRegister=jtocAddress.plus(intArrayType.getInstanceSize(Statics.middleOfTable));
  OutOfLineMachineCode.init();
  if (profile)   startTime=System.currentTimeMillis();
  if (verbose >= 1)   say("String_Node_Str");
  if (verbose >= 1)   say("String_Node_Str" + numThreads + "String_Node_Str");
  ExecutorService threadPool=Executors.newFixedThreadPool(numThreads);
  for (  RVMType type : bootImageTypes.values()) {
    threadPool.execute(new BootImageWorker(type));
  }
  threadPool.shutdown();
  try {
    while (!threadPool.awaitTermination(Long.MAX_VALUE,TimeUnit.SECONDS)) {
      say("String_Node_Str");
    }
  }
 catch (  InterruptedException e) {
    throw new Error("String_Node_Str",e);
  }
  if (BootImageWorker.instantiationFailed) {
    throw new Error("String_Node_Str");
  }
  if (profile) {
    stopTime=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (stopTime - startTime) + "String_Node_Str");
  }
  staticsJunk=Statics.bootImageInstantiationFinished();
  FunctionTable functionTable=BuildJNIFunctionTable.buildTable();
  JNIEnvironment.initFunctionTable(functionTable);
  if (verbose >= 1)   say("String_Node_Str");
  if (profile)   startTime=System.currentTimeMillis();
  bootImageTypeFields=new HashMap<Key,FieldInfo>(bootImageTypes.size());
  HashSet<String> invalidEntrys=new HashSet<String>();
  for (  RVMType rvmType : bootImageTypes.values()) {
    FieldInfo fieldInfo;
    if (!rvmType.isClassType())     continue;
    Class jdkType=getJdkType(rvmType);
    if (jdkType == null)     continue;
    Key key=new Key(jdkType);
    fieldInfo=bootImageTypeFields.get(key);
    if (fieldInfo != null) {
      fieldInfo.rvmType=rvmType;
    }
 else {
      if (verbose >= 1)       say("String_Node_Str" + rvmType);
      fieldInfo=new FieldInfo(jdkType,rvmType);
      bootImageTypeFields.put(key,fieldInfo);
      for (Class cls=jdkType.getSuperclass(); cls != null; cls=cls.getSuperclass()) {
        key=new Key(cls);
        fieldInfo=bootImageTypeFields.get(key);
        if (fieldInfo != null) {
          break;
        }
 else {
          if (verbose >= 1)           say("String_Node_Str" + jdkType);
          fieldInfo=new FieldInfo(cls,null);
          bootImageTypeFields.put(key,fieldInfo);
        }
      }
    }
  }
  for (  FieldInfo fieldInfo : bootImageTypeFields.values()) {
    RVMType rvmType=fieldInfo.rvmType;
    if (rvmType == null) {
      if (verbose >= 1)       say("String_Node_Str" + fieldInfo.jdkType);
      continue;
    }
    Class jdkType=fieldInfo.jdkType;
    if (verbose >= 1)     say("String_Node_Str" + rvmType);
    RVMField[] rvmFields=rvmType.getStaticFields();
    fieldInfo.jdkStaticFields=new Field[rvmFields.length];
    for (int j=0; j < rvmFields.length; j++) {
      String rvmName=rvmFields[j].getName().toString();
      for (      Field f : fieldInfo.jdkFields) {
        if (f.getName().equals(rvmName)) {
          fieldInfo.jdkStaticFields[j]=f;
          f.setAccessible(true);
          break;
        }
      }
    }
    rvmFields=rvmType.getInstanceFields();
    fieldInfo.jdkInstanceFields=new Field[rvmFields.length];
    for (int j=0; j < rvmFields.length; j++) {
      String rvmName=rvmFields[j].getName().toString();
      jdkType=getJdkType(rvmFields[j].getDeclaringClass());
      if (jdkType == null)       continue;
      FieldInfo jdkFieldInfo=bootImageTypeFields.get(new Key(jdkType));
      if (jdkFieldInfo == null)       continue;
      Field[] jdkFields=jdkFieldInfo.jdkFields;
      for (      Field f : jdkFields) {
        if (f.getName().equals(rvmName)) {
          fieldInfo.jdkInstanceFields[j]=f;
          f.setAccessible(true);
          break;
        }
      }
    }
  }
  if (profile) {
    stopTime=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (stopTime - startTime) + "String_Node_Str");
  }
  startupThread=Scheduler.setupBootThread();
  byte[] stack=startupThread.getStack();
  int idx=stack.length - 1;
  if (VM.LittleEndian) {
    stack[idx--]=(byte)0xde;
    stack[idx--]=(byte)0xad;
    stack[idx--]=(byte)0xba;
    stack[idx--]=(byte)0xbe;
  }
 else {
    stack[idx--]=(byte)0xbe;
    stack[idx--]=(byte)0xba;
    stack[idx--]=(byte)0xad;
    stack[idx--]=(byte)0xde;
  }
  BootstrapClassLoader.setBootstrapRepositories(bootImageRepositoriesAtExecutionTime);
  if (verbose >= 1)   say("String_Node_Str");
  if (profile)   startTime=System.currentTimeMillis();
  for (  RVMType rvmType : bootImageTypes.values()) {
    if (verbose >= 1)     say("String_Node_Str",rvmType.toString());
    if (!rvmType.isClassType())     continue;
    Class jdkType=getJdkType(rvmType);
    if (jdkType == null && verbose >= 1) {
      say("String_Node_Str" + rvmType + "String_Node_Str");
    }
    RVMField[] rvmFields=rvmType.getStaticFields();
    for (int j=0; j < rvmFields.length; ++j) {
      RVMField rvmField=rvmFields[j];
      TypeReference rvmFieldType=rvmField.getType();
      Offset rvmFieldOffset=rvmField.getOffset();
      String rvmFieldName=rvmField.getName().toString();
      Field jdkFieldAcc=null;
      if (jdkType != null)       jdkFieldAcc=getJdkFieldAccessor(jdkType,j,STATIC_FIELD);
      if (jdkFieldAcc == null) {
        if (jdkType != null) {
          if (!copyKnownClasspathStaticField(jdkType,rvmFieldName,rvmFieldType,rvmFieldOffset)) {
            if (verbose >= 2) {
              traceContext.push(rvmFieldType.toString(),jdkType.getName(),rvmFieldName);
              traceContext.traceFieldNotInHostJdk();
              traceContext.pop();
            }
            Statics.setSlotContents(rvmFieldOffset,0);
            if (!VM.runningTool)             bootImage.countNulledReference();
            invalidEntrys.add(jdkType.getName());
          }
        }
 else {
          if (verbose >= 2) {
            traceContext.push(rvmFieldType.toString(),rvmFieldType.toString(),rvmFieldName);
            traceContext.traceFieldNotInHostJdk();
            traceContext.pop();
          }
          Statics.setSlotContents(rvmFieldOffset,0);
          if (!VM.runningTool)           bootImage.countNulledReference();
          invalidEntrys.add(rvmField.getDeclaringClass().toString());
        }
        continue;
      }
      if (!Modifier.isStatic(jdkFieldAcc.getModifiers())) {
        if (verbose >= 2)         traceContext.push(rvmFieldType.toString(),jdkType.getName(),rvmFieldName);
        if (verbose >= 2)         traceContext.traceFieldNotStaticInHostJdk();
        if (verbose >= 2)         traceContext.pop();
        Statics.setSlotContents(rvmFieldOffset,0);
        if (!VM.runningTool)         bootImage.countNulledReference();
        invalidEntrys.add(jdkType.getName());
        continue;
      }
      if (!equalTypes(jdkFieldAcc.getType().getName(),rvmFieldType)) {
        if (verbose >= 2)         traceContext.push(rvmFieldType.toString(),jdkType.getName(),rvmFieldName);
        if (verbose >= 2)         traceContext.traceFieldDifferentTypeInHostJdk();
        if (verbose >= 2)         traceContext.pop();
        Statics.setSlotContents(rvmFieldOffset,0);
        if (!VM.runningTool)         bootImage.countNulledReference();
        invalidEntrys.add(jdkType.getName());
        continue;
      }
      if (verbose >= 2)       say("String_Node_Str",String.valueOf(Statics.offsetAsSlot(rvmFieldOffset)),"String_Node_Str",rvmField.toString());
      if (rvmFieldType.isPrimitiveType()) {
        if (rvmFieldType.isBooleanType()) {
          Statics.setSlotContents(rvmFieldOffset,jdkFieldAcc.getBoolean(null) ? 1 : 0);
        }
 else         if (rvmFieldType.isByteType()) {
          Statics.setSlotContents(rvmFieldOffset,jdkFieldAcc.getByte(null));
        }
 else         if (rvmFieldType.isCharType()) {
          Statics.setSlotContents(rvmFieldOffset,jdkFieldAcc.getChar(null));
        }
 else         if (rvmFieldType.isShortType()) {
          Statics.setSlotContents(rvmFieldOffset,jdkFieldAcc.getShort(null));
        }
 else         if (rvmFieldType.isIntType()) {
          Statics.setSlotContents(rvmFieldOffset,jdkFieldAcc.getInt(null));
        }
 else         if (rvmFieldType.isLongType()) {
          Statics.setSlotContents(rvmFieldOffset,jdkFieldAcc.getLong(null));
        }
 else         if (rvmFieldType.isFloatType()) {
          float f=jdkFieldAcc.getFloat(null);
          Statics.setSlotContents(rvmFieldOffset,Float.floatToIntBits(f));
        }
 else         if (rvmFieldType.isDoubleType()) {
          double d=jdkFieldAcc.getDouble(null);
          Statics.setSlotContents(rvmFieldOffset,Double.doubleToLongBits(d));
        }
 else         if (rvmFieldType.equals(TypeReference.Address) || rvmFieldType.equals(TypeReference.Word) || rvmFieldType.equals(TypeReference.Extent)|| rvmFieldType.equals(TypeReference.Offset)) {
          Object o=jdkFieldAcc.get(null);
          String msg="String_Node_Str" + rvmField.toString();
          boolean warn=rvmFieldType.equals(TypeReference.Address);
          Statics.setSlotContents(rvmFieldOffset,getWordValue(o,msg,warn));
        }
 else {
          fail("String_Node_Str" + rvmFieldType);
        }
      }
 else {
        final Object o=jdkFieldAcc.get(null);
        if (verbose >= 3)         say("String_Node_Str",VM.addressAsHexString(Magic.objectAsAddress(o)));
        Statics.setSlotContents(rvmFieldOffset,o);
      }
    }
  }
  if (verbose >= 2) {
    for (    final String entry : invalidEntrys) {
      say("String_Node_Str",entry);
    }
  }
  if (profile) {
    stopTime=System.currentTimeMillis();
    System.out.println("String_Node_Str" + (stopTime - startTime) + "String_Node_Str");
  }
}