fd758534e21a68dfc934cf5dff3fe4183986df51,tensorflow/python/keras/utils/version_utils.py,,swap_class,#Any#Any#Any#Any#,98

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)
         // `v1_cls` often extends `v2_cls`, so it may still call `swap_class`
         // even if it doesn"t need to. That being said, it may be the safest
         // not to over optimize this logic for the sake of correctness,
         // especially if we swap v1 & v2 classes that don"t extend each other,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


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


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: EducationalTestingService/skll
Commit Name: 37b5e1c4870c256f1b1634a36b9bce0a1a829668
Time: 2014-10-19
Author: dblanchard@ets.org
File Name: skll/learner.py
Class Name: Learner
Method Name: train