Program: 75419
Project: 75419
Buggy source:
private void _processClass(SootClass theClass){
  Hierarchy hierarchy=Scene.v().getActiveHierarchy();
  if (!theClass.isApplicationClass()) {
    theClass.setLibraryClass();
  }
  _addClasses(hierarchy.getSuperclassesOfIncluding(theClass));
  _addClasses(theClass.getInterfaces());
  for (Iterator fields=theClass.getFields().iterator(); fields.hasNext(); ) {
    SootField field=(SootField)fields.next();
    Type type=field.getType();
    if (type instanceof RefType) {
      _addClass(((RefType)type).getSootClass());
    }
  }
  for (Iterator methods=theClass.getMethods().iterator(); methods.hasNext(); ) {
    SootMethod method=(SootMethod)methods.next();
    for (Iterator types=method.getParameterTypes().iterator(); types.hasNext(); ) {
      Type type=(Type)types.next();
      if (type instanceof RefType) {
        _addClass(((RefType)type).getSootClass());
      }
    }
{
      Type type=method.getReturnType();
      if (type instanceof RefType) {
        _addClass(((RefType)type).getSootClass());
      }
    }
    if (!method.isConcrete()) {
      continue;
    }
    JimpleBody body=(JimpleBody)method.retrieveActiveBody();
    for (Iterator it=body.getTraps().iterator(); it.hasNext(); ) {
      Trap t=(Trap)it.next();
      _addClass(t.getException());
    }
    for (Iterator units=body.getUnits().iterator(); units.hasNext(); ) {
      Unit unit=(Unit)units.next();
      for (Iterator boxes=unit.getUseAndDefBoxes().iterator(); boxes.hasNext(); ) {
        ValueBox box=(ValueBox)boxes.next();
        Value value=box.getValue();
        if (value instanceof FieldRef) {
          SootField field=((FieldRef)value).getField();
          SootClass refClass=field.getDeclaringClass();
          if (!refClass.equals(theClass)) {
            _addClass(refClass);
          }
        }
 else         if (value instanceof InvokeExpr) {
          SootMethod refMethod=((InvokeExpr)value).getMethod();
          SootClass refClass=refMethod.getDeclaringClass();
          if (!refClass.equals(theClass)) {
            _addClass(refClass);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void _processClass(SootClass theClass){
  Hierarchy hierarchy=Scene.v().getActiveHierarchy();
  if (!theClass.isApplicationClass()) {
    theClass.setLibraryClass();
  }
  _addClasses(hierarchy.getSuperclassesOfIncluding(theClass));
  _addClasses(theClass.getInterfaces());
  for (Iterator fields=theClass.getFields().iterator(); fields.hasNext(); ) {
    SootField field=(SootField)fields.next();
    Type type=field.getType();
    if (type instanceof RefType) {
      _addClass(((RefType)type).getSootClass());
    }
  }
  for (Iterator methods=theClass.getMethods().iterator(); methods.hasNext(); ) {
    SootMethod method=(SootMethod)methods.next();
    for (Iterator types=method.getParameterTypes().iterator(); types.hasNext(); ) {
      Type type=(Type)types.next();
      if (type instanceof RefType) {
        _addClass(((RefType)type).getSootClass());
      }
    }
{
      Type type=method.getReturnType();
      if (type instanceof RefType) {
        _addClass(((RefType)type).getSootClass());
      }
    }
    if (!method.isConcrete()) {
      continue;
    }
    JimpleBody body=(JimpleBody)method.retrieveActiveBody();
    for (Iterator it=body.getTraps().iterator(); it.hasNext(); ) {
      Trap t=(Trap)it.next();
      _addClass(t.getException());
    }
    for (Iterator units=body.getUnits().iterator(); units.hasNext(); ) {
      Unit unit=(Unit)units.next();
      for (Iterator boxes=unit.getUseAndDefBoxes().iterator(); boxes.hasNext(); ) {
        ValueBox box=(ValueBox)boxes.next();
        Value value=box.getValue();
        if (value instanceof FieldRef) {
          SootField field=((FieldRef)value).getField();
          SootClass refClass=field.getDeclaringClass();
          if (!refClass.equals(theClass)) {
            _addClass(refClass);
          }
        }
 else         if (value instanceof InvokeExpr) {
          SootMethod refMethod=((InvokeExpr)value).getMethod();
          SootClass refClass=refMethod.getDeclaringClass();
          if (!refClass.equals(theClass)) {
            _addClass(refClass);
          }
        }
 else         if (value instanceof NewExpr) {
          SootClass refClass=((NewExpr)value).getBaseType().getSootClass();
          if (!refClass.equals(theClass)) {
            _addClass(refClass);
          }
        }
      }
    }
  }
}