Program: 61739
Project: 61739
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<String> outPropType,Reference<ValueKind> outPropValue){
  for (  ABC abc : abcs) {
    if (!instanceOnly) {
      for (      ScriptInfo ii : abc.script_info) {
        for (        Trait t : ii.traits.traits) {
          if (pkg.equals(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).toString());
              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 (pkg.equals(clsName.getNamespace(abc.constants).getName(abc.constants))) {
          for (          Trait t : ii.instance_traits.traits) {
            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).toString());
              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 (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).toString());
                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<String> outPropType,Reference<ValueKind> outPropValue){
  for (  ABC abc : abcs) {
    if (!instanceOnly) {
      for (      ScriptInfo ii : abc.script_info) {
        for (        Trait t : ii.traits.traits) {
          if (pkg.equals(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).toString());
              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 (pkg.equals(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).toString());
              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).toString());
                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;
}