Program: 61725
Project: 61725
Buggy source:
public static boolean searchPrototypeChain(boolean instanceOnly,List<ABC> abcs,String pkg,String obj,String propertyName,Reference<String> outName,Reference<String> outNs,Reference<String> outPropNs,Reference<Integer> outPropNsKind,Reference<GraphTargetItem> outPropType,Reference<ValueKind> outPropValue){
  for (  ABC abc : abcs) {
    if (!instanceOnly) {
      for (      ScriptInfo ii : abc.script_info) {
        for (        Trait t : ii.traits.traits) {
          if (eq(pkg,t.getName(abc).getNamespace(abc.constants).getName(abc.constants))) {
            if (propertyName.equals(t.getName(abc).getName(abc.constants,new ArrayList<String>()))) {
              outName.setVal(obj);
              outNs.setVal(pkg);
              outPropNs.setVal(t.getName(abc).getNamespace(abc.constants).getName(abc.constants));
              outPropNsKind.setVal(t.getName(abc).getNamespace(abc.constants).kind);
              outPropType.setVal(getTraitReturnType(abc,t));
              if (t instanceof TraitSlotConst) {
                TraitSlotConst tsc=(TraitSlotConst)t;
                outPropValue.setVal(new ValueKind(tsc.value_index,tsc.value_kind));
              }
              return true;
            }
          }
        }
      }
    }
    for (int i=0; i < abc.instance_info.size(); i++) {
      InstanceInfo ii=abc.instance_info.get(i);
      Multiname clsName=ii.getName(abc.constants);
      if (obj.equals(clsName.getName(abc.constants,new ArrayList<String>()))) {
        if (eq(pkg,clsName.getNamespace(abc.constants).getName(abc.constants))) {
          for (          Trait t : ii.instance_traits.traits) {
            if (t.getName(abc) == null) {
              continue;
            }
            if (propertyName.equals(t.getName(abc).getName(abc.constants,new ArrayList<String>()))) {
              outName.setVal(obj);
              outNs.setVal(pkg);
              outPropNs.setVal(t.getName(abc).getNamespace(abc.constants).getName(abc.constants));
              outPropNsKind.setVal(t.getName(abc).getNamespace(abc.constants).kind);
              outPropType.setVal(getTraitReturnType(abc,t));
              if (t instanceof TraitSlotConst) {
                TraitSlotConst tsc=(TraitSlotConst)t;
                outPropValue.setVal(new ValueKind(tsc.value_index,tsc.value_kind));
              }
              return true;
            }
          }
          if (!instanceOnly) {
            for (            Trait t : abc.class_info.get(i).static_traits.traits) {
              if (t.getName(abc) == null) {
                continue;
              }
              if (propertyName.equals(t.getName(abc).getName(abc.constants,new ArrayList<String>()))) {
                outName.setVal(obj);
                outNs.setVal(pkg);
                outPropNs.setVal(t.getName(abc).getNamespace(abc.constants).getName(abc.constants));
                outPropNsKind.setVal(t.getName(abc).getNamespace(abc.constants).kind);
                outPropType.setVal(getTraitReturnType(abc,t));
                if (t instanceof TraitSlotConst) {
                  TraitSlotConst tsc=(TraitSlotConst)t;
                  outPropValue.setVal(new ValueKind(tsc.value_index,tsc.value_kind));
                }
                return true;
              }
            }
          }
          Multiname superName=abc.constants.constant_multiname.get(ii.super_index);
          if (superName != null) {
            return searchPrototypeChain(instanceOnly,abcs,superName.getNamespace(abc.constants).getName(abc.constants),superName.getName(abc.constants,new ArrayList<String>()),propertyName,outName,outNs,outPropNs,outPropNsKind,outPropType,outPropValue);
          }
 else {
            return false;
          }
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
public static boolean searchPrototypeChain(boolean instanceOnly,List<ABC> abcs,String pkg,String obj,String propertyName,Reference<String> outName,Reference<String> outNs,Reference<String> outPropNs,Reference<Integer> outPropNsKind,Reference<Integer> outPropNsIndex,Reference<GraphTargetItem> outPropType,Reference<ValueKind> outPropValue){
  for (  ABC abc : abcs) {
    if (!instanceOnly) {
      for (      ScriptInfo ii : abc.script_info) {
        if (ii.deleted) {
          continue;
        }
        for (        Trait t : ii.traits.traits) {
          if (eq(pkg,t.getName(abc).getNamespace(abc.constants).getName(abc.constants))) {
            if (propertyName.equals(t.getName(abc).getName(abc.constants,new ArrayList<String>()))) {
              outName.setVal(obj);
              outNs.setVal(pkg);
              outPropNs.setVal(t.getName(abc).getNamespace(abc.constants).getName(abc.constants));
              outPropNsKind.setVal(t.getName(abc).getNamespace(abc.constants).kind);
              outPropNsIndex.setVal(abc.constants.getNamespaceSubIndex(t.getName(abc).namespace_index));
              outPropType.setVal(getTraitReturnType(abc,t));
              if (t instanceof TraitSlotConst) {
                TraitSlotConst tsc=(TraitSlotConst)t;
                outPropValue.setVal(new ValueKind(tsc.value_index,tsc.value_kind));
              }
              return true;
            }
          }
        }
      }
    }
    for (int i=0; i < abc.instance_info.size(); i++) {
      InstanceInfo ii=abc.instance_info.get(i);
      if (ii.deleted) {
        continue;
      }
      Multiname clsName=ii.getName(abc.constants);
      if (obj.equals(clsName.getName(abc.constants,new ArrayList<String>()))) {
        if (eq(pkg,clsName.getNamespace(abc.constants).getName(abc.constants))) {
          for (          Trait t : ii.instance_traits.traits) {
            if (t.getName(abc) == null) {
              continue;
            }
            if (propertyName.equals(t.getName(abc).getName(abc.constants,new ArrayList<String>()))) {
              outName.setVal(obj);
              outNs.setVal(pkg);
              outPropNs.setVal(t.getName(abc).getNamespace(abc.constants).getName(abc.constants));
              outPropNsKind.setVal(t.getName(abc).getNamespace(abc.constants).kind);
              outPropNsIndex.setVal(abc.constants.getNamespaceSubIndex(t.getName(abc).namespace_index));
              outPropType.setVal(getTraitReturnType(abc,t));
              if (t instanceof TraitSlotConst) {
                TraitSlotConst tsc=(TraitSlotConst)t;
                outPropValue.setVal(new ValueKind(tsc.value_index,tsc.value_kind));
              }
              return true;
            }
          }
          if (!instanceOnly) {
            for (            Trait t : abc.class_info.get(i).static_traits.traits) {
              if (t.getName(abc) == null) {
                continue;
              }
              if (propertyName.equals(t.getName(abc).getName(abc.constants,new ArrayList<String>()))) {
                outName.setVal(obj);
                outNs.setVal(pkg);
                outPropNs.setVal(t.getName(abc).getNamespace(abc.constants).getName(abc.constants));
                outPropNsKind.setVal(t.getName(abc).getNamespace(abc.constants).kind);
                outPropNsIndex.setVal(abc.constants.getNamespaceSubIndex(t.getName(abc).namespace_index));
                outPropType.setVal(getTraitReturnType(abc,t));
                if (t instanceof TraitSlotConst) {
                  TraitSlotConst tsc=(TraitSlotConst)t;
                  outPropValue.setVal(new ValueKind(tsc.value_index,tsc.value_kind));
                }
                return true;
              }
            }
          }
          Multiname superName=abc.constants.constant_multiname.get(ii.super_index);
          if (superName != null) {
            return searchPrototypeChain(instanceOnly,abcs,superName.getNamespace(abc.constants).getName(abc.constants),superName.getName(abc.constants,new ArrayList<String>()),propertyName,outName,outNs,outPropNs,outPropNsKind,outPropNsIndex,outPropType,outPropValue);
          }
 else {
            return false;
          }
        }
      }
    }
  }
  return false;
}