

def analyze_attributes(attributes):
    analysis = {
        
    }
    for (attribute, values) in attributes.iteritems():
        if ((attribute[0] == '@') or (attribute == 'message')):
            continue
        analysis[attribute] = []
        total_hits = sum(values.values())
        for (value_hash, hits) in values.iteritems():
            value = json.loads(value_hash)
            analysis[attribute].append((((100.0 * hits) / total_hits), value))
        analysis[attribute] = sorted(analysis[attribute], key=(lambda x: ((1 - values[0]), x[1])))
    return analysis

dataset/ETHPy150Open openstack-infra/elastic-recheck/elastic_recheck/cmd/query.py analyze_attributes/VarMisuse@143/158 `x`->`values`