Program: 88776
Project: 88776
Buggy source:
public void resolveFromClassFile(SootClass aClass,InputStream is,soot.SootResolver sootResolver,Scene cm){
  SootClass bclass=aClass;
  String className=bclass.getName();
  setActiveClassManager(cm);
  ClassFile coffiClass=new ClassFile(className);
{
    boolean success=coffiClass.loadClassFile(is);
    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);
        return;
      }
    }
    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(sootResolver.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=sootResolver.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));
    sootResolver.assertResolvedClassForType(fieldType);
  }
  for (int i=0; i < coffiClass.methods_count; i++) {
    method_info methodInfo=coffiClass.methods[i];
    if ((coffiClass.constant_pool[methodInfo.name_index]) == null) {
      G.v().out.println("String_Node_Str" + methodInfo.toName(coffiClass.constant_pool));
      throw new RuntimeException("String_Node_Str");
    }
    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++) {
        sootResolver.assertResolvedClassForType(types[j]);
        parameterTypes.add(types[j]);
      }
      returnType=types[types.length - 1];
      sootResolver.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(sootResolver.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"))         sootResolver.assertResolvedClassForType(jimpleTypeOfFieldDescriptor(cm,desc));
 else         sootResolver.assertResolvedClass(name);
      }
    }
  }
  for (int i=0; i < coffiClass.methods_count; i++) {
    method_info methodInfo=coffiClass.methods[i];
    methodInfo.jmethod.setSource(new CoffiMethodSource(coffiClass,methodInfo));
  }
}

Fixed version (ground truth):
public void resolveFromClassFile(SootClass aClass,InputStream is,soot.SootResolver sootResolver,Scene cm){
  SootClass bclass=aClass;
  String className=bclass.getName();
  setActiveClassManager(cm);
  ClassFile coffiClass=new ClassFile(className);
{
    boolean success=coffiClass.loadClassFile(is);
    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);
        return;
      }
    }
    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(sootResolver.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=sootResolver.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));
    sootResolver.assertResolvedClassForType(fieldType);
  }
  for (int i=0; i < coffiClass.methods_count; i++) {
    method_info methodInfo=coffiClass.methods[i];
    if ((coffiClass.constant_pool[methodInfo.name_index]) == null) {
      G.v().out.println("String_Node_Str" + methodInfo.toName(coffiClass.constant_pool));
      throw new RuntimeException("String_Node_Str");
    }
    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++) {
        sootResolver.assertResolvedClassForType(types[j]);
        parameterTypes.add(types[j]);
      }
      returnType=types[types.length - 1];
      sootResolver.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(sootResolver.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"))         sootResolver.assertResolvedClassForType(jimpleTypeOfFieldDescriptor(cm,desc));
 else         sootResolver.assertResolvedClass(name);
      }
    }
  }
  for (int i=0; i < coffiClass.methods_count; i++) {
    method_info methodInfo=coffiClass.methods[i];
    methodInfo.jmethod.setSource(new CoffiMethodSource(coffiClass,methodInfo));
  }
}