41f1aa3b1e87e7326f335bfd9841d72a250d111f,bugbug/models/component.py,ComponentModel,get_labels,#ComponentModel#,136

Before Change


        classes = {}

        for bug_data in bugzilla.get_bugs():
            bug_id = int(bug_data["id"])
            component = self.filter_component(bug_data)

            if component:
                classes[bug_id] = component

After Change


        return None

    def get_labels(self):
        product_components = {}
        for bug_data in bugzilla.get_bugs():
            product_components[bug_data["id"]] = (bug_data["product"], bug_data["component"])

        def is_meaningful(product, component):
            return product in self.PRODUCTS and component not in ["General", "Untriaged"]

        product_component_counts = Counter(((product, component) for product, component in product_components.values() if is_meaningful(product, component))).most_common()

        max_count = product_component_counts[0][1]
        threshold = max_count / 100

        self.meaningful_product_components = set(product_component for product_component, count in product_component_counts if count > threshold)

        classes = {}
        for bug_id, (product, component) in product_components.items():
            component = self.filter_component(product, component)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: mozilla/bugbug
Commit Name: 41f1aa3b1e87e7326f335bfd9841d72a250d111f
Time: 2019-03-18
Author: mcastelluccio@mozilla.com
File Name: bugbug/models/component.py
Class Name: ComponentModel
Method Name: get_labels


Project Name: kenshohara/3D-ResNets-PyTorch
Commit Name: 2dc9326a620d9fe60cc8c796812f33011d68f7b9
Time: 2018-11-27
Author: kensho.hara@aist.go.jp
File Name: util_scripts/video_jpg_kinetics_mit.py
Class Name:
Method Name:


Project Name: kenshohara/3D-ResNets-PyTorch
Commit Name: 82b45455ebe631854f99c2f716ab5488f1842925
Time: 2018-11-27
Author: kensho.hara@aist.go.jp
File Name: util_scripts/video_jpg_ucf101_hmdb51.py
Class Name:
Method Name: