780e9097e3394c0b1b6b3c7f2864fa4250d8fa96,parlai/mturk/core/agents.py,MTurkAgent,pay_bonus,#MTurkAgent#Any#Any#,410

Before Change



    def pay_bonus(self, bonus_amount, reason="unspecified"):
        if self.hit_is_abandoned:
            print("Conversation ID: " + str(self.conversation_id) + ", Agent ID: " + self.id + " - HIT is abandoned and thus not available for bonus.")
        else:
            if self.manager.get_agent_work_status(assignment_id=self.assignment_id) != ASSIGNMENT_NOT_DONE:
                unique_request_token = str(uuid.uuid4())
                if self.manager.pay_bonus(worker_id=self.worker_id, bonus_amount=bonus_amount, assignment_id=self.assignment_id, reason=reason, unique_request_token=unique_request_token):

After Change


            "Blocked worker ID: {}. Reason: {}".format(self.worker_id, reason)
        )

    def pay_bonus(self, bonus_amount, reason="unspecified"):
        Pays the given agent the given bonus
        if self.hit_is_abandoned:
            self._print_not_available_for("bonus")
        else:
            if self.manager.get_agent_work_status(self.assignment_id) in \
                    (self.ASSIGNMENT_DONE, self.ASSIGNMENT_APPROVED):
                unique_request_token = str(uuid.uuid4())
                self.manager.pay_bonus(
                    worker_id=self.worker_id,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 780e9097e3394c0b1b6b3c7f2864fa4250d8fa96
Time: 2017-09-05
Author: Jackurbs@gmail.com
File Name: parlai/mturk/core/agents.py
Class Name: MTurkAgent
Method Name: pay_bonus


Project Name: facebookresearch/ParlAI
Commit Name: 780e9097e3394c0b1b6b3c7f2864fa4250d8fa96
Time: 2017-09-05
Author: Jackurbs@gmail.com
File Name: parlai/mturk/core/agents.py
Class Name: MTurkAgent
Method Name: pay_bonus


Project Name: facebookresearch/ParlAI
Commit Name: 780e9097e3394c0b1b6b3c7f2864fa4250d8fa96
Time: 2017-09-05
Author: Jackurbs@gmail.com
File Name: parlai/mturk/core/agents.py
Class Name: MTurkAgent
Method Name: reject_work


Project Name: facebookresearch/ParlAI
Commit Name: 780e9097e3394c0b1b6b3c7f2864fa4250d8fa96
Time: 2017-09-05
Author: Jackurbs@gmail.com
File Name: parlai/mturk/core/agents.py
Class Name: MTurkAgent
Method Name: approve_work