Program: 61544
Project: 61544
Buggy source:
private void parseImportsUsagesFromMethodInfo(ABC abc,int method_index,List<DottedChain> imports,List<String> uses,String ignorePackage,List<String> fullyQualifiedNames,List<Integer> visitedMethods){
  if ((method_index < 0) || (method_index >= abc.method_info.size())) {
    return;
  }
  visitedMethods.add(method_index);
  if (abc.method_info.get(method_index).ret_type != 0) {
    parseImportsUsagesFromMultiname(abc,imports,uses,abc.constants.getMultiname(abc.method_info.get(method_index).ret_type),ignorePackage,fullyQualifiedNames);
  }
  for (  int t : abc.method_info.get(method_index).param_types) {
    if (t != 0) {
      parseImportsUsagesFromMultiname(abc,imports,uses,abc.constants.getMultiname(t),ignorePackage,fullyQualifiedNames);
    }
  }
  MethodBody body=abc.findBody(method_index);
  if (body != null) {
    parseImportsUsagesFromTraits(abc,body.traits,imports,uses,ignorePackage,fullyQualifiedNames);
    for (    ABCException ex : body.exceptions) {
      parseImportsUsagesFromMultiname(abc,imports,uses,abc.constants.getMultiname(ex.type_index),ignorePackage,fullyQualifiedNames);
    }
    for (    AVM2Instruction ins : body.getCode().code) {
      if (ins.definition instanceof AlchemyTypeIns) {
        DottedChain nimport=new DottedChain((AlchemyTypeIns.ALCHEMY_PACKAGE + "String_Node_Str" + ins.definition.instructionName).split("String_Node_Str"));
        if (!imports.contains(nimport)) {
          imports.add(nimport);
        }
      }
      if (ins.definition instanceof NewFunctionIns) {
        if (ins.operands[0] != method_index) {
          if (!visitedMethods.contains(ins.operands[0])) {
            parseImportsUsagesFromMethodInfo(abc,ins.operands[0],imports,uses,ignorePackage,fullyQualifiedNames,visitedMethods);
          }
        }
      }
      if ((ins.definition instanceof FindPropertyStrictIns) || (ins.definition instanceof FindPropertyIns) || (ins.definition instanceof GetLexIns)|| (ins.definition instanceof CoerceIns)|| (ins.definition instanceof AsTypeIns)) {
        int m=ins.operands[0];
        if (m != 0) {
          parseImportsUsagesFromMultiname(abc,imports,uses,abc.constants.getMultiname(m),ignorePackage,fullyQualifiedNames);
        }
      }
 else {
        for (int k=0; k < ins.definition.operands.length; k++) {
          if (ins.definition.operands[k] == AVM2Code.DAT_MULTINAME_INDEX) {
            int multinameIndex=ins.operands[k];
            parseUsagesFromMultiname(abc,imports,uses,abc.constants.getMultiname(multinameIndex),ignorePackage,fullyQualifiedNames);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void parseImportsUsagesFromMethodInfo(ABC abc,int method_index,List<DottedChain> imports,List<String> uses,String ignorePackage,List<String> fullyQualifiedNames,List<Integer> visitedMethods){
  if ((method_index < 0) || (method_index >= abc.method_info.size())) {
    return;
  }
  visitedMethods.add(method_index);
  if (abc.method_info.get(method_index).ret_type != 0) {
    parseImportsUsagesFromMultiname(abc,imports,uses,abc.constants.getMultiname(abc.method_info.get(method_index).ret_type),ignorePackage,fullyQualifiedNames);
  }
  for (  int t : abc.method_info.get(method_index).param_types) {
    if (t != 0) {
      parseImportsUsagesFromMultiname(abc,imports,uses,abc.constants.getMultiname(t),ignorePackage,fullyQualifiedNames);
    }
  }
  MethodBody body=abc.findBody(method_index);
  if (body != null) {
    parseImportsUsagesFromTraits(abc,body.traits,imports,uses,ignorePackage,fullyQualifiedNames);
    for (    ABCException ex : body.exceptions) {
      parseImportsUsagesFromMultiname(abc,imports,uses,abc.constants.getMultiname(ex.type_index),ignorePackage,fullyQualifiedNames);
    }
    for (    AVM2Instruction ins : body.getCode().code) {
      if (ins.definition instanceof AlchemyTypeIns) {
        DottedChain nimport=new DottedChain((AlchemyTypeIns.ALCHEMY_PACKAGE + "String_Node_Str" + ins.definition.instructionName).split("String_Node_Str"));
        if (!imports.contains(nimport)) {
          imports.add(nimport);
        }
      }
      if (ins.definition instanceof NewFunctionIns) {
        if (ins.operands[0] != method_index) {
          if (!visitedMethods.contains(ins.operands[0])) {
            parseImportsUsagesFromMethodInfo(abc,ins.operands[0],imports,uses,ignorePackage,fullyQualifiedNames,visitedMethods);
          }
        }
      }
      if ((ins.definition instanceof FindPropertyStrictIns) || (ins.definition instanceof FindPropertyIns) || (ins.definition instanceof GetLexIns)|| (ins.definition instanceof CoerceIns)|| (ins.definition instanceof AsTypeIns)) {
        int m=ins.operands[0];
        if (m != 0) {
          if (m < abc.constants.constant_multiname.size()) {
            parseImportsUsagesFromMultiname(abc,imports,uses,abc.constants.getMultiname(m),ignorePackage,fullyQualifiedNames);
          }
        }
      }
 else {
        for (int k=0; k < ins.definition.operands.length; k++) {
          if (ins.definition.operands[k] == AVM2Code.DAT_MULTINAME_INDEX) {
            int multinameIndex=ins.operands[k];
            if (multinameIndex < abc.constants.constant_multiname.size()) {
              parseUsagesFromMultiname(abc,imports,uses,abc.constants.getMultiname(multinameIndex),ignorePackage,fullyQualifiedNames);
            }
          }
        }
      }
    }
  }
}