Program: 100237
Project: 100237
Buggy source:
/** 
 * @param klass
 * @return true if the add succeeded; false if it failed for some reason
 * @throws IllegalArgumentException if klass is null
 */
public boolean addClass(IClass klass){
  if (klass == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (DEBUG) {
    Trace.println("String_Node_Str" + klass);
  }
  Set<IClass> loadedSuperclasses;
  Collection loadedSuperInterfaces;
  try {
    loadedSuperclasses=computeSuperclasses(klass);
    loadedSuperInterfaces=klass.isInterface() ? null : klass.getAllImplementedInterfaces();
  }
 catch (  ClassHierarchyException e) {
    if (klass instanceof ShrikeClass) {
      if (DEBUG) {
        Trace.println("String_Node_Str" + klass);
      }
    }
    Warnings.add(ClassExclusion.create(klass.getReference(),e.getMessage()));
    return false;
  }
  Node node=findOrCreateNode(klass);
  if (klass.getReference().equals(language.getRootType())) {
    Assertions._assert(root == null);
    root=node;
  }
  Set workingSuperclasses=HashSetFactory.make(loadedSuperclasses);
  while (node != null) {
    IClass c=node.getJavaClass();
    IClass superclass=null;
    try {
      superclass=c.getSuperclass();
    }
 catch (    ClassHierarchyException e1) {
      Assertions.UNREACHABLE();
    }
    if (superclass != null) {
      workingSuperclasses.remove(superclass);
      Node supernode=findOrCreateNode(superclass);
      if (DEBUG) {
        Trace.println("String_Node_Str" + node.getJavaClass() + "String_Node_Str"+ supernode.getJavaClass());
      }
      supernode.addChild(node);
      if (supernode.getJavaClass().getReference().equals(language.getRootType())) {
        node=null;
      }
 else {
        node=supernode;
      }
    }
 else {
      node=null;
    }
  }
  if (loadedSuperInterfaces != null) {
    for (Iterator it3=loadedSuperInterfaces.iterator(); it3.hasNext(); ) {
      IClass iface=(IClass)it3.next();
      try {
        computeSuperclasses(iface);
      }
 catch (      ClassHierarchyException e) {
        Warnings.add(ClassExclusion.create(iface.getReference(),e.getMessage()));
        continue;
      }
      if (DEBUG && Assertions.verifyAssertions) {
        if (!iface.isInterface()) {
          Assertions._assert(false,"String_Node_Str" + iface);
        }
        if (klass.isInterface()) {
          Assertions._assert(false,"String_Node_Str" + klass);
        }
      }
      recordImplements(klass,iface);
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param klass
 * @return true if the add succeeded; false if it failed for some reason
 * @throws IllegalArgumentException if klass is null
 */
public boolean addClass(IClass klass){
  if (klass == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (DEBUG) {
    Trace.println("String_Node_Str" + klass);
  }
  Set<IClass> loadedSuperclasses;
  Collection loadedSuperInterfaces;
  try {
    loadedSuperclasses=computeSuperclasses(klass);
    loadedSuperInterfaces=klass.getAllImplementedInterfaces();
  }
 catch (  ClassHierarchyException e) {
    if (klass instanceof ShrikeClass) {
      if (DEBUG) {
        Trace.println("String_Node_Str" + klass);
      }
    }
    Warnings.add(ClassExclusion.create(klass.getReference(),e.getMessage()));
    return false;
  }
  Node node=findOrCreateNode(klass);
  if (klass.getReference().equals(language.getRootType())) {
    Assertions._assert(root == null);
    root=node;
  }
  Set workingSuperclasses=HashSetFactory.make(loadedSuperclasses);
  while (node != null) {
    IClass c=node.getJavaClass();
    IClass superclass=null;
    try {
      superclass=c.getSuperclass();
    }
 catch (    ClassHierarchyException e1) {
      Assertions.UNREACHABLE();
    }
    if (superclass != null) {
      workingSuperclasses.remove(superclass);
      Node supernode=findOrCreateNode(superclass);
      if (DEBUG) {
        Trace.println("String_Node_Str" + node.getJavaClass() + "String_Node_Str"+ supernode.getJavaClass());
      }
      supernode.addChild(node);
      if (supernode.getJavaClass().getReference().equals(language.getRootType())) {
        node=null;
      }
 else {
        node=supernode;
      }
    }
 else {
      node=null;
    }
  }
  if (loadedSuperInterfaces != null) {
    for (Iterator it3=loadedSuperInterfaces.iterator(); it3.hasNext(); ) {
      IClass iface=(IClass)it3.next();
      try {
        computeSuperclasses(iface);
      }
 catch (      ClassHierarchyException e) {
        Warnings.add(ClassExclusion.create(iface.getReference(),e.getMessage()));
        continue;
      }
      if (DEBUG && Assertions.verifyAssertions) {
        if (!iface.isInterface()) {
          Assertions._assert(false,"String_Node_Str" + iface);
        }
        if (klass.isInterface()) {
          Assertions._assert(false,"String_Node_Str" + klass);
        }
      }
      recordImplements(klass,iface);
    }
  }
  return true;
}