21971e673fabe25d3e7da6712f80222760516113,server/website/website/tasks/async_tasks.py,,clean_metric_data,#Any#Any#Any#,149

Before Change


            metric_labels.append(metric)
    LOG.debug(matrix.shape)
    // If they are useless columns in the matrix
    if unused_columns:
        indexes = [i for i, n in enumerate(metric_labels) if n in unused_columns]
        // Delete unused columns
        matrix = np.delete(matrix, indexes, 1)
        for i in sorted(indexes, reverse=True):
            del metric_labels[i]
    return matrix, metric_labels


def save_execution_time(start_ts, fn, result):

After Change


    default_val = 0
    metric_cat_size = len(metric_cat)
    matrix = np.ones((len(metric_matrix), metric_cat_size)) * default_val
    metric_labels_dict = {n: i for i, n in enumerate(metric_labels)}
    // column labels in matrix has the same order as ones in metric catalog
    // missing values are filled with default_val
    for i, metric_name in enumerate(metric_cat):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: cmu-db/ottertune
Commit Name: 21971e673fabe25d3e7da6712f80222760516113
Time: 2020-02-26
Author: bohanzhang95@gmail.com
File Name: server/website/website/tasks/async_tasks.py
Class Name:
Method Name: clean_metric_data


Project Name: ntucllab/libact
Commit Name: e81142f0869321cd8792e13bfc4f6fb85d9f1efc
Time: 2015-12-22
Author: yangarbiter@gmail.com
File Name: libact/query_strategies/uncertainty_sampling.py
Class Name: UncertaintySampling
Method Name: make_query


Project Name: matthewwithanm/django-imagekit
Commit Name: 77459eae73350adba1060e752ec04df0f898ab89
Time: 2011-09-22
Author: lettertwo@gmail.com
File Name: imagekit/fields.py
Class Name:
Method Name: _post_save_handler


Project Name: dpressel/mead-baseline
Commit Name: 1b8f024d01511ad332d71b973e0efc432363a160
Time: 2018-08-11
Author: blester125@users.noreply.github.com
File Name: clean.py
Class Name:
Method Name: