Program: 88774
Project: 88774
Buggy source:
public SootClass resolveClassAndSupportClasses(String className,Scene cm){
  soot.Timer timer=new soot.Timer("String_Node_Str");
  soot.Timer buildTimer=new soot.Timer("String_Node_Str");
  Timers.v().resolverTimer.start();
  setActiveClassManager(cm);
  classesToResolve=new LinkedList();
  markedClasses=new HashSet();
  SootClass newClass=getResolvedClass(className);
  while (!classesToResolve.isEmpty()) {
    SootClass bclass=(SootClass)classesToResolve.removeFirst();
    className=bclass.getName();
    timer.start();
    if (Options.v().verbose())     G.v().out.println("String_Node_Str" + className + "String_Node_Str");
    ClassFile coffiClass=new ClassFile(className);
{
      boolean success=coffiClass.loadClassFile();
      timer.end();
      if (!success) {
        if (!Scene.v().allowsPhantomRefs())         throw new RuntimeException("String_Node_Str" + bclass.getName());
 else {
          G.v().out.println("String_Node_Str" + className + "String_Node_Str");
          bclass.setPhantom(true);
          continue;
        }
      }
      buildTimer.start();
      CONSTANT_Class_info c=(CONSTANT_Class_info)coffiClass.constant_pool[coffiClass.this_class];
      String name=((CONSTANT_Utf8_info)(coffiClass.constant_pool[c.name_index])).convert();
      name=name.replace('/','.');
      if (!name.equals(bclass.getName())) {
        throw new RuntimeException("String_Node_Str" + name + "String_Node_Str"+ bclass.getName()+ "String_Node_Str");
      }
    }
    bclass.setModifiers(coffiClass.access_flags & (~0x0020));
{
      if (coffiClass.super_class != 0) {
        CONSTANT_Class_info c=(CONSTANT_Class_info)coffiClass.constant_pool[coffiClass.super_class];
        String superName=((CONSTANT_Utf8_info)(coffiClass.constant_pool[c.name_index])).convert();
        superName=superName.replace('/','.');
        bclass.setSuperclass(getResolvedClass(superName));
      }
    }
{
      for (int i=0; i < coffiClass.interfaces_count; i++) {
        CONSTANT_Class_info c=(CONSTANT_Class_info)coffiClass.constant_pool[coffiClass.interfaces[i]];
        String interfaceName=((CONSTANT_Utf8_info)(coffiClass.constant_pool[c.name_index])).convert();
        interfaceName=interfaceName.replace('/','.');
        SootClass interfaceClass=getResolvedClass(interfaceName);
        bclass.addInterface(interfaceClass);
      }
    }
    for (int i=0; i < coffiClass.fields_count; i++) {
      field_info fieldInfo=coffiClass.fields[i];
      String fieldName=((CONSTANT_Utf8_info)(coffiClass.constant_pool[fieldInfo.name_index])).convert();
      String fieldDescriptor=((CONSTANT_Utf8_info)(coffiClass.constant_pool[fieldInfo.descriptor_index])).convert();
      int modifiers=fieldInfo.access_flags;
      Type fieldType=jimpleTypeOfFieldDescriptor(cm,fieldDescriptor);
      bclass.addField(new SootField(fieldName,fieldType,modifiers));
      assertResolvedClassForType(fieldType);
    }
    for (int i=0; i < coffiClass.methods_count; i++) {
      method_info methodInfo=coffiClass.methods[i];
      String methodName=((CONSTANT_Utf8_info)(coffiClass.constant_pool[methodInfo.name_index])).convert();
      String methodDescriptor=((CONSTANT_Utf8_info)(coffiClass.constant_pool[methodInfo.descriptor_index])).convert();
      List parameterTypes;
      Type returnType;
{
        Type[] types=jimpleTypesOfFieldOrMethodDescriptor(cm,methodDescriptor);
        parameterTypes=new ArrayList();
        for (int j=0; j < types.length - 1; j++) {
          assertResolvedClassForType(types[j]);
          parameterTypes.add(types[j]);
        }
        returnType=types[types.length - 1];
        assertResolvedClassForType(returnType);
      }
      int modifiers=methodInfo.access_flags;
      SootMethod method;
      method=new SootMethod(methodName,parameterTypes,returnType,modifiers);
      bclass.addMethod(method);
      methodInfo.jmethod=method;
{
        for (int j=0; j < methodInfo.attributes_count; j++)         if (methodInfo.attributes[j] instanceof Exception_attribute) {
          Exception_attribute exceptions=(Exception_attribute)methodInfo.attributes[j];
          for (int k=0; k < exceptions.number_of_exceptions; k++) {
            CONSTANT_Class_info c=(CONSTANT_Class_info)coffiClass.constant_pool[exceptions.exception_index_table[k]];
            String exceptionName=((CONSTANT_Utf8_info)(coffiClass.constant_pool[c.name_index])).convert();
            exceptionName=exceptionName.replace('/','.');
            method.addException(getResolvedClass(exceptionName));
          }
        }
      }
{
        for (int k=0; k < coffiClass.constant_pool_count; k++)         if (coffiClass.constant_pool[k] instanceof CONSTANT_Class_info) {
          CONSTANT_Class_info c=(CONSTANT_Class_info)coffiClass.constant_pool[k];
          String desc=((CONSTANT_Utf8_info)(coffiClass.constant_pool[c.name_index])).convert();
          String name=desc.replace('/','.');
          if (name.startsWith("String_Node_Str"))           assertResolvedClassForType(jimpleTypeOfFieldDescriptor(cm,desc));
 else           assertResolvedClass(name);
        }
      }
    }
    for (int i=0; i < coffiClass.methods_count; i++) {
      method_info methodInfo=coffiClass.methods[i];
      methodInfo.jmethod.setSource(new CoffiMethodSource(coffiClass,methodInfo));
    }
    buildTimer.end();
  }
  Timers.v().resolverTimer.end();
  return newClass;
}

Fixed version (ground truth):
public SootClass resolveClassAndSupportClasses(String className,Scene cm){
  soot.Timer timer=new soot.Timer("String_Node_Str");
  soot.Timer buildTimer=new soot.Timer("String_Node_Str");
  Timers.v().resolverTimer.start();
  setActiveClassManager(cm);
  classesToResolve=new LinkedList();
  markedClasses=new HashSet();
  SootClass newClass=getResolvedClass(className);
  while (!classesToResolve.isEmpty()) {
    SootClass bclass=(SootClass)classesToResolve.removeFirst();
    className=bclass.getName();
    timer.start();
    if (Options.v().verbose())     G.v().out.println("String_Node_Str" + className + "String_Node_Str");
    ClassFile coffiClass=new ClassFile(className);
{
      boolean success=coffiClass.loadClassFile();
      timer.end();
      if (!success) {
        if (!Scene.v().allowsPhantomRefs())         throw new RuntimeException("String_Node_Str" + bclass.getName());
 else {
          G.v().out.println("String_Node_Str" + className + "String_Node_Str");
          bclass.setPhantom(true);
          continue;
        }
      }
      buildTimer.start();
      CONSTANT_Class_info c=(CONSTANT_Class_info)coffiClass.constant_pool[coffiClass.this_class];
      String name=((CONSTANT_Utf8_info)(coffiClass.constant_pool[c.name_index])).convert();
      name=name.replace('/','.');
      if (!name.equals(bclass.getName())) {
        throw new RuntimeException("String_Node_Str" + name + "String_Node_Str"+ bclass.getName()+ "String_Node_Str");
      }
    }
    bclass.setModifiers(coffiClass.access_flags & (~0x0020));
{
      if (coffiClass.super_class != 0) {
        CONSTANT_Class_info c=(CONSTANT_Class_info)coffiClass.constant_pool[coffiClass.super_class];
        String superName=((CONSTANT_Utf8_info)(coffiClass.constant_pool[c.name_index])).convert();
        superName=superName.replace('/','.');
        bclass.setSuperclass(getResolvedClass(superName));
      }
    }
{
      for (int i=0; i < coffiClass.interfaces_count; i++) {
        CONSTANT_Class_info c=(CONSTANT_Class_info)coffiClass.constant_pool[coffiClass.interfaces[i]];
        String interfaceName=((CONSTANT_Utf8_info)(coffiClass.constant_pool[c.name_index])).convert();
        interfaceName=interfaceName.replace('/','.');
        SootClass interfaceClass=getResolvedClass(interfaceName);
        bclass.addInterface(interfaceClass);
      }
    }
    for (int i=0; i < coffiClass.fields_count; i++) {
      field_info fieldInfo=coffiClass.fields[i];
      String fieldName=((CONSTANT_Utf8_info)(coffiClass.constant_pool[fieldInfo.name_index])).convert();
      String fieldDescriptor=((CONSTANT_Utf8_info)(coffiClass.constant_pool[fieldInfo.descriptor_index])).convert();
      int modifiers=fieldInfo.access_flags;
      Type fieldType=jimpleTypeOfFieldDescriptor(cm,fieldDescriptor);
      bclass.addField(new SootField(fieldName,fieldType,modifiers));
      assertResolvedClassForType(fieldType);
    }
    for (int i=0; i < coffiClass.methods_count; i++) {
      method_info methodInfo=coffiClass.methods[i];
      String methodName=((CONSTANT_Utf8_info)(coffiClass.constant_pool[methodInfo.name_index])).convert();
      String methodDescriptor=((CONSTANT_Utf8_info)(coffiClass.constant_pool[methodInfo.descriptor_index])).convert();
      List parameterTypes;
      Type returnType;
{
        Type[] types=jimpleTypesOfFieldOrMethodDescriptor(cm,methodDescriptor);
        parameterTypes=new ArrayList();
        for (int j=0; j < types.length - 1; j++) {
          assertResolvedClassForType(types[j]);
          parameterTypes.add(types[j]);
        }
        returnType=types[types.length - 1];
        assertResolvedClassForType(returnType);
      }
      int modifiers=methodInfo.access_flags;
      SootMethod method;
      method=new SootMethod(methodName,parameterTypes,returnType,modifiers);
      bclass.addMethod(method);
      methodInfo.jmethod=method;
{
        for (int j=0; j < methodInfo.attributes_count; j++)         if (methodInfo.attributes[j] instanceof Exception_attribute) {
          Exception_attribute exceptions=(Exception_attribute)methodInfo.attributes[j];
          for (int k=0; k < exceptions.number_of_exceptions; k++) {
            CONSTANT_Class_info c=(CONSTANT_Class_info)coffiClass.constant_pool[exceptions.exception_index_table[k]];
            String exceptionName=((CONSTANT_Utf8_info)(coffiClass.constant_pool[c.name_index])).convert();
            exceptionName=exceptionName.replace('/','.');
            method.addExceptionIfAbsent(getResolvedClass(exceptionName));
          }
        }
      }
{
        for (int k=0; k < coffiClass.constant_pool_count; k++)         if (coffiClass.constant_pool[k] instanceof CONSTANT_Class_info) {
          CONSTANT_Class_info c=(CONSTANT_Class_info)coffiClass.constant_pool[k];
          String desc=((CONSTANT_Utf8_info)(coffiClass.constant_pool[c.name_index])).convert();
          String name=desc.replace('/','.');
          if (name.startsWith("String_Node_Str"))           assertResolvedClassForType(jimpleTypeOfFieldDescriptor(cm,desc));
 else           assertResolvedClass(name);
        }
      }
    }
    for (int i=0; i < coffiClass.methods_count; i++) {
      method_info methodInfo=coffiClass.methods[i];
      methodInfo.jmethod.setSource(new CoffiMethodSource(coffiClass,methodInfo));
    }
    buildTimer.end();
  }
  Timers.v().resolverTimer.end();
  return newClass;
}