d691d1b9e1bea69067156faa1a517dc7e0213b17,api/data_refinery_api/views.py,Stats,_aggregate_nomad_jobs,#Stats#Any#,1147

Before Change


        nomad_running_jobs = {}
        nomad_pending_jobs = {}
        for (aggregate_key, group) in aggregated_jobs:
            if not aggregate_key: continue
            aggregated_pending = 0
            aggregated_running = 0
            for job in group:
                children = job["JobSummary"]["Children"]
                aggregated_pending = aggregated_pending + children["Pending"]
                aggregated_running = aggregated_running + children["Running"]

            nomad_pending_jobs[aggregate_key] = aggregated_pending

After Change


        nomad_running_jobs = {}
        nomad_pending_jobs = {}
        for (aggregate_key, group) in aggregated_jobs:
            nomad_pending_jobs[aggregate_key] = sum(job["JobSummary"]["Children"]["Pending"] for job in group)
            nomad_running_jobs[aggregate_key] = sum(job["JobSummary"]["Children"]["Running"] for job in group)

        return nomad_pending_jobs, nomad_running_jobs
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: AlexsLemonade/refinebio
Commit Name: d691d1b9e1bea69067156faa1a517dc7e0213b17
Time: 2019-03-19
Author: arielsvn@gmail.com
File Name: api/data_refinery_api/views.py
Class Name: Stats
Method Name: _aggregate_nomad_jobs


Project Name: mozilla/bugbug
Commit Name: f16992b25bb153df3ab87c5111db2a101cf68c73
Time: 2020-04-09
Author: mcastelluccio@mozilla.com
File Name: bugbug/models/testselect.py
Class Name: TestSelectModel
Method Name: train_test_split


Project Name: osmr/imgclsmob
Commit Name: ff46766065ea7846f8b36701451afc2bf6d667d3
Time: 2019-06-08
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/efficientnet.py
Class Name:
Method Name: _test