

def _link_fields(self, field_refs, acount, progress_monitor):
    count = 0
    progress_monitor.start('Parsing fields', acount)
    log = gl.LinkerLog(self, self.field_kind.kind)
    for scode_reference in field_refs:
        if self._reject_reference(scode_reference):
            progress_monitor.work('Skipped reference', 1)
            continue
        (field_name, fqn_container) = self._get_field_name(scode_reference)
        code_elements = []
        code_elements.extend(self._get_field_elements(field_name, PREFIX_FIELD_LINKER, self.field_kind))
        code_elements.extend(self._get_field_elements(field_name, PREFIX_ENUM_VAL_LINKER, self.enum_value_kind))
        code_elements.extend(self._get_field_elements(field_name, PREFIX_ANN_FIELD_LINKER, self.ann_field_kind))
        (code_element, potentials) = self.get_code_element(scode_reference, code_elements, field_name, fqn_container, 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 field', 1)
    log.close()
    progress_monitor.done()
    print('Associated {0} fields'.format(count))

dataset/ETHPy150Open bartdag/recodoc2/recodoc2/apps/codebase/linker/java_linkers.py JavaFieldLinker._link_fields/original