506a594e8e5fd755bc02ea2c5fe6437b8b682057,fonduer/utils/udf.py,UDF,run,#UDF#,160

Before Change


        while True:
            try:
                x = self.in_queue.get(True, QUEUE_TIMEOUT)
                for y in self.apply(x, **self.apply_kwargs):

                    // If an out_queue is provided, add to that, else add to session
                    if self.out_queue is not None:
                        self.out_queue.put(y, True, QUEUE_TIMEOUT)
                    else:
                        self.session.add(y)
                self.in_queue.task_done()
            except Empty:
                break
        self.session.commit()

After Change


        while True:
            try:
                x = self.in_queue.get(True, QUEUE_TIMEOUT)
                self.session.add_all(y for y in self.apply(x, **self.apply_kwargs))
                self.in_queue.task_done()
            except Empty:
                break
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: HazyResearch/fonduer
Commit Name: 506a594e8e5fd755bc02ea2c5fe6437b8b682057
Time: 2018-08-14
Author: lwhsiao@stanford.edu
File Name: fonduer/utils/udf.py
Class Name: UDF
Method Name: run


Project Name: quiltdata/quilt
Commit Name: f84d7243d70c2f8a2a7b7a4390141789fb181ceb
Time: 2017-02-22
Author: dima@gmail.com
File Name: tests/tag_test.py
Class Name: TagTestCase
Method Name: setUp


Project Name: quiltdata/quilt
Commit Name: f84d7243d70c2f8a2a7b7a4390141789fb181ceb
Time: 2017-02-22
Author: dima@gmail.com
File Name: tests/version_test.py
Class Name: VersionTestCase
Method Name: setUp