bf464d7ed9283988fea1f548a11a0171fd2ff364,keras/utils/version_utils.py,,swap_class,#Any#Any#Any#Any#,97
Before Change
// Recursively search superclasses to swap in the right Keras class.
cls.__bases__ = tuple(
swap_class(base, v2_cls, v1_cls, use_v2) for base in cls.__bases__)
return cls
After Change
// Recursively search superclasses to swap in the right Keras class.
new_bases = []
for base in cls.__bases__:
if ((use_v2 and issubclass(base, v1_cls)
or (not use_v2 and issubclass(base, v2_cls)))):
new_base = swap_class(base, v2_cls, v1_cls, use_v2)
else:
new_base = base
new_bases.append(new_base)
cls.__bases__ = tuple(new_bases)
return cls
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: keras-team/keras
Commit Name: bf464d7ed9283988fea1f548a11a0171fd2ff364
Time: 2021-01-06
Author: gardener@tensorflow.org
File Name: keras/utils/version_utils.py
Class Name:
Method Name: swap_class
Project Name: automl/SMAC3
Commit Name: b8ef4c4c20a459515091c2b1b27e3e8ee4709cef
Time: 2020-02-10
Author: feurerm@informatik.uni-freiburg.de
File Name: smac/facade/smac_ac_facade.py
Class Name: SMAC4AC
Method Name: __init__
Project Name: tensorflow/tensorflow
Commit Name: fd758534e21a68dfc934cf5dff3fe4183986df51
Time: 2021-01-06
Author: gardener@tensorflow.org
File Name: tensorflow/python/keras/utils/version_utils.py
Class Name:
Method Name: swap_class