374c26d2c01a7a07078e398542faae0ae55c1014,tfdeploy.py,Operation,eval,#Operation#,388

Before Change


            args.extend(self.kwargs)
        else:
            args = [args] + self.kwargs
        return self.func(*args)

    @staticmethod
    def func():
         func(*args)

After Change


        
        // set a cache uuid for this eval call
        if _uuid is None:
            _uuid = uuid4()

        // already cached?
        if _uuid == self.last_uuid:
            return self.value
        else:
            self.last_uuid = _uuid

        args = [t.eval(feed_dict=feed_dict, _uuid=_uuid) for t in self.inputs]
        if self.unpack:
            args.extend(self.kwargs)
        else:
            args = [args] + self.kwargs

        self.value = self.func(*args)

        return self.value

    @staticmethod
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: riga/tfdeploy
Commit Name: 374c26d2c01a7a07078e398542faae0ae55c1014
Time: 2016-03-11
Author: marcelrieger@me.com
File Name: tfdeploy.py
Class Name: Operation
Method Name: eval


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 06a40e8c874aff7b292621995fbb479e48b1e119
Time: 2020-04-28
Author: tmatsuo@google.com
File Name: storage/cloud-client/encryption_test.py
Class Name:
Method Name: test_blob


Project Name: jazzband/django-debug-toolbar
Commit Name: f0d0ddbada065ec0ff4fc64aed9d2f9ba48ba5a3
Time: 2013-11-15
Author: aymeric.augustin@m4x.org
File Name: debug_toolbar/toolbar.py
Class Name: DebugToolbar
Method Name: store