def report_code_duplication(self):
    code_to_code_items = {}
    code_items = self.get_code_items()
    if code_items:
        for code_item in code_items:
            key = code_item.insns
            if (key in code_to_code_items):
                code_to_code_items[key].append(code_item)
            else:
                code_to_code_items[key] = [code_item]
        for key in code_to_code_items:
            code_items = code_to_code_items[key]
            if (len(code_items) > 1):
                print(('-' * 72))
                print('The following methods have the same code:')
                for code_item in code_items:
                    method = self.find_method_from_code_off(code_item.get_offset())
                    if method.is_virtual:
                        print('virtual', end=' ')
                    else:
                        print('direct', end=' ')
                    print(method.get_qualified_name())
                method.dump_code()
def report_code_duplication(self):
    code_to_code_items = {}
    code_items = self.get_code_items()
    if code_items:
        for code_item in code_items:
            key = code_item.insns
            if (key in code_to_code_items):
                code_to_code_items[key].append(code_item)
            else:
                code_to_code_items[key] = [code_item]
        for key in code_to_code_items:
            code_items = code_to_code_items[key]
            if (len(code_items) > 1):
                print(('-' * 72))
                print('The following methods have the same code:')
                for code_item in code_items:
                    method = self.find_method_from_code_off(code_item.get_offset())
                    if method.is_virtual:
                        print('virtual', end=' ')
                    else:
                        print('direct', end=' ')
                    print(method.get_qualified_name())
                method.dump_code()