

def _link_methods(self, method_refs, mcount, progress_monitor):
    count = 0
    progress_monitor.start('Parsing methods', mcount)
    log = gl.LinkerLog(self, self.method_kind.kind)
    for scode_reference in method_refs:
        if self._reject_reference(scode_reference):
            progress_monitor.work('Skipped reference', 1)
            continue
        method_info = self._get_method_info(scode_reference)
        code_elements = self._get_method_elements(method_info)
        (code_element, potentials) = self.get_code_element(scode_reference, code_elements, method_info, log)
        count += gl.save_link(scode_reference, code_element, potentials, self)
        if (not log.custom_filtered):
            reclassify_java(code_element, scode_reference)
        progress_monitor.work('Processed method', 1)
    log.close()
    progress_monitor.done()
    print('Associated {0} methods'.format(count))

dataset/ETHPy150Open bartdag/recodoc2/recodoc2/apps/codebase/linker/java_linkers.py JavaMethodLinker._link_methods/original