8770ead27d9085f96a7a690b5d9599591df81315,pycm/pycm_func.py,,vector_filter,#Any#Any#,491

Before Change


    temp.extend(actual_vector)
    temp.extend(predict_vector)
    for i in temp:
        if not isinstance(i, type(temp[0])):
            return [list(map(str, actual_vector)),
                    list(map(str, predict_vector))]
    return [actual_vector, predict_vector]

After Change


    temp = []
    temp.extend(actual_vector)
    temp.extend(predict_vector)
    types = set(map(type,temp))
    if len(types)>1:
        return [list(map(str, actual_vector)),list(map(str, predict_vector))]
    return [actual_vector, predict_vector]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: sepandhaghighi/pycm
Commit Name: 8770ead27d9085f96a7a690b5d9599591df81315
Time: 2018-12-17
Author: sepand.haghighi@yahoo.com
File Name: pycm/pycm_func.py
Class Name:
Method Name: vector_filter


Project Name: pyinstaller/pyinstaller
Commit Name: 989efa75c7cd07a50b53d5b1c53798ee0808b65c
Time: 2015-10-25
Author: h.goebel@crazy-compilers.com
File Name: PyInstaller/depend/utils.py
Class Name:
Method Name: scan_code_for_ctypes


Project Name: facebookresearch/ParlAI
Commit Name: 9800a9241dbb89ae2ce4b51653ec158ebce799d4
Time: 2017-08-01
Author: ahm@fb.com
File Name: parlai/core/metrics.py
Class Name: Metrics
Method Name: update_ranking_metrics