fdb77374313a8f53d5f5ab192ad88e96c4b65c23,src/python/pants/core/util_rules/stripped_source_files.py,,strip_source_roots,#Any#,23

Before Change


        SourceRootsRequest.for_files(rooted_files_snapshot.files),
    )

    file_to_source_root = {
        str(file): root for file, root in source_roots_result.path_to_root.items()
    }
    files_grouped_by_source_root = {
        source_root.path: tuple(str(f) for f in files)
        for source_root, files in itertools.groupby(
            file_to_source_root.keys(), key=file_to_source_root.__getitem__
        )
    }

    if len(files_grouped_by_source_root) == 1:
        source_root = next(iter(files_grouped_by_source_root.keys()))
        if source_root == ".":

After Change


    else:
        digest_subsets = await MultiGet(
            Get(Digest, DigestSubset(rooted_files_snapshot.digest, PathGlobs(files)))
            for files in source_roots_to_files.values()
        )
        resulting_digests = await MultiGet(
            Get(Digest, RemovePrefix(digest, source_root))
            for digest, source_root in zip(digest_subsets, source_roots_to_files.keys())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: fdb77374313a8f53d5f5ab192ad88e96c4b65c23
Time: 2020-10-16
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/core/util_rules/stripped_source_files.py
Class Name:
Method Name: strip_source_roots


Project Name: uber/pyro
Commit Name: e7b6fa42c68817fd656d7d9120282db05959e484
Time: 2020-10-20
Author: fritzo@uber.com
File Name: pyro/poutine/collapse_messenger.py
Class Name: CollapseMessenger
Method Name: _get_log_prob


Project Name: dask/dask-image
Commit Name: c9fd2c425cb873508ba16221819574400ad2443e
Time: 2018-09-30
Author: jakirkham@gmail.com
File Name: dask_image/ndmeasure/__init__.py
Class Name:
Method Name: extrema


Project Name: PPPLDeepLearning/plasma-python
Commit Name: 2e7b3fa991416164986615880e8bb5878d80b8d9
Time: 2017-12-10
Author: jk7@tigergpu.princeton.edu
File Name: plasma/conf_parser.py
Class Name:
Method Name: parameters