c0a393e873fb6bbf469fc83fc563aba785c2f246,pynndescent/pynndescent_.py,,initialized_nnd_search,#Any#Any#Any#Any#Any#Any#Any#,89

Before Change



            if vertex == -1:
                break
            candidates = indices[indptr[vertex] : indptr[vertex + 1]]
            for j in range(candidates.shape[0]):
                if (
                    candidates[j] == vertex
                    or candidates[j] == -1
                    or candidates[j] in tried
                ):
                    continue
                d = dist(data[candidates[j]], query_points[i], *dist_args)
                unchecked_heap_push(initialization, i, d, candidates[j], 1)
                tried.add(candidates[j])

After Change


        // Find smallest flagged vertex
        vertex = smallest_flagged(initialization, i)

        while vertex >= 0:

            for j in range(indptr[vertex], indptr[vertex + 1]):

                candidate = indices[j]

                if candidate not in tried:
                    d = dist(data[candidate], query_points[i], *dist_args)
                    unchecked_heap_push(initialization, i, d, candidate, 1)
                    tried.add(candidate)

            // Find smallest flagged vertex
            vertex = smallest_flagged(initialization, i)

    return initialization


@numba.njit(fastmath=True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: lmcinnes/pynndescent
Commit Name: c0a393e873fb6bbf469fc83fc563aba785c2f246
Time: 2019-09-12
Author: leland.mcinnes@gmail.com
File Name: pynndescent/pynndescent_.py
Class Name:
Method Name: initialized_nnd_search


Project Name: mozilla/bugbug
Commit Name: 3f2b1d4efa10398263b1002e0bd4a13ecb83ead1
Time: 2019-06-04
Author: ayush.shridhar1506@gmail.com
File Name: bugbug/models/duplicate.py
Class Name: DuplicateModel
Method Name: get_labels


Project Name: home-assistant/home-assistant
Commit Name: 68c1dd7cd47c516df765a1742a62abca5c3d5f83
Time: 2015-09-14
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/automation/__init__.py
Class Name:
Method Name: setup