

def reclassify_java(code_element, scode_reference):
    reclassified = False
    if ((scode_reference.snippet is not None) or (code_element is not None)):
        return reclassified
    automatic_reclass = set(['method', 'field', 'annotation field', 'enumeration value', 'annotation', 'enumeration'])
    unknown_kind = cu.get_value(PREFIX_UNKNOWN, UNKNOWN_KEY, gl.get_unknown_kind, None)
    if (scode_reference.kind_hint.kind in automatic_reclass):
        scode_reference.kind_hint = unknown_kind
        reclassified = True
    elif (scode_reference.child_references.count() == 0):
        scode_reference.kind_hint = unknown_kind
        reclassified = True
    if reclassified:
        scode_reference.save()
    return reclassified

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