e149204a22366e7ddb1bb587f3c255ce2daf01e9,skbio/diversity/_driver.py,,_partial_pw,#Any#Any#Any#Any#,184

Before Change



    // flattening list benchmark here
    // http://stackoverflow.com/a/952952
    all_ids_in_pairs = {id_ for pair in id_pairs for id_ in pair}
    if not all_ids_in_pairs.issubset(ids):
        raise ValueError("`id_pairs` are not a subset of `ids`")

    if isinstance(metric, str):

After Change


    if not all_ids_in_pairs.issubset(ids):
        raise ValueError("`id_pairs` are not a subset of `ids`")

    hashes = {i for i in id_pairs}.union({i[::-1] for i in id_pairs})
    if len(hashes) != len(id_pairs) * 2:
        raise ValueError("Duplicate ID pairs observed.")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: biocore/scikit-bio
Commit Name: e149204a22366e7ddb1bb587f3c255ce2daf01e9
Time: 2016-04-19
Author: mcdonadt@colorado.edu
File Name: skbio/diversity/_driver.py
Class Name:
Method Name: _partial_pw


Project Name: pantsbuild/pants
Commit Name: 7fb7c83177ac7f6f41efd18abb3c7d57121327a0
Time: 2018-08-20
Author: ericarellano@me.com
File Name: tests/python/pants_test/backend/jvm/tasks/test_binary_create_integration.py
Class Name: BinaryCreateIntegrationTest
Method Name: test_agent_dependency


Project Name: pantsbuild/pants
Commit Name: c62f342cb5ad163267e101579510675de94ea211
Time: 2020-03-06
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: tests/python/pants_test/backend/codegen/antlr/python/test_antlr_py_gen.py
Class Name: AntlrPyGenTest
Method Name: test_antlr_py_gen