Program: 88775
Project: 88775
Buggy source:
public SootClass resolveClassAndSupportClasses2(String className,InputStream is){
  SootClass newClass=null;
  Scene cm=Scene.v();
  scene=cm;
  if (scene.containsClass(className))   newClass=scene.getSootClass(className);
 else {
    newClass=new SootClass(className);
    scene.addClass(newClass);
  }
  SootClass bclass=newClass;
  className=bclass.getName();
  if (Options.v().verbose())   G.v().out.println("String_Node_Str" + className + "String_Node_Str");
  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 newClass;
      }
    }
    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(getResolvedClass2(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=getResolvedClass2(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));
  }
  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++) {
        parameterTypes.add(types[j]);
      }
      returnType=types[types.length - 1];
    }
    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(getResolvedClass2(exceptionName));
        }
      }
    }
  }
  for (int i=0; i < coffiClass.methods_count; i++) {
    method_info methodInfo=coffiClass.methods[i];
    methodInfo.jmethod.setSource(new CoffiMethodSource(coffiClass,methodInfo));
  }
  return newClass;
}

Fixed version (ground truth):
public SootClass resolveClassAndSupportClasses2(String className,InputStream is){
  SootClass newClass=null;
  Scene cm=Scene.v();
  scene=cm;
  if (scene.containsClass(className))   newClass=scene.getSootClass(className);
 else {
    newClass=new SootClass(className);
    scene.addClass(newClass);
  }
  SootClass bclass=newClass;
  className=bclass.getName();
  if (Options.v().verbose())   G.v().out.println("String_Node_Str" + className + "String_Node_Str");
  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 newClass;
      }
    }
    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(getResolvedClass2(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=getResolvedClass2(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));
  }
  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++) {
        parameterTypes.add(types[j]);
      }
      returnType=types[types.length - 1];
    }
    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(getResolvedClass2(exceptionName));
        }
      }
    }
  }
  for (int i=0; i < coffiClass.methods_count; i++) {
    method_info methodInfo=coffiClass.methods[i];
    methodInfo.jmethod.setSource(new CoffiMethodSource(coffiClass,methodInfo));
  }
  return newClass;
}