e485b12acb290ba9bd7670179144e92ffd31d0bc,python/vmaf_quality_runner.py,VmafQualityRunner,_get_quality_scores,#VmafQualityRunner#Any#,125

Before Change


        log_file_path = self._get_log_file_path(asset)
        vmaf_scores = []
        vmaf_idx = 0
        with open(log_file_path, "rt") as log_file:
            for line in log_file.readlines():
                mo_vmaf = re.match(r"vmaf: ([0-9]+) ([0-9.]+)", line)
                if mo_vmaf:
                    cur_vmaf_idx = int(mo_vmaf.group(1))
                    assert cur_vmaf_idx == vmaf_idx
                    vmaf_scores.append(float(mo_vmaf.group(2)))
                    vmaf_idx += 1

        // add VMAF scores
        result[self.TYPE + "_scores"] = vmaf_scores

        return result

After Change


        
        repr_asset = repr(asset)
        assert repr_asset in self.asset2quality_map
        return self.asset2quality_map[repr_asset]

    def _remove_log(self, asset):
        
        Remove VmafFeatureExtractor"s log instead
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: Netflix/vmaf
Commit Name: e485b12acb290ba9bd7670179144e92ffd31d0bc
Time: 2016-02-12
Author: zli@netflix.com
File Name: python/vmaf_quality_runner.py
Class Name: VmafQualityRunner
Method Name: _get_quality_scores


Project Name: miso-belica/sumy
Commit Name: fb1065c0807c8f112c7469ced3849fe9512acb48
Time: 2014-04-26
Author: miso.belica@gmail.com
File Name: sumy/utils.py
Class Name:
Method Name: get_stop_words


Project Name: WZBSocialScienceCenter/tmtoolkit
Commit Name: 49923807b4bec0edfba81b2e0bee8456de3f7f3c
Time: 2017-07-11
Author: markus.konrad@wzb.eu
File Name: tmtoolkit/corpus.py
Class Name: Corpus
Method Name: add_folder