8d0245d51bf3dda12a89dd1b5b5e5bad69959519,debug_toolbar/utils/tracking/db.py,NormalCursorWrapper,_decode,#NormalCursorWrapper#,94

Before Change


        return map(self._quote_expr, params)

    def _decode(self, param):
        if isinstance(param, unicode):
            return param.decode("utf-8", "ignore")
        return param

    def execute(self, sql, params=()):
        start = datetime.now()
        try:

After Change


        try:
            return force_unicode(param, strings_only=True)
        except UnicodeDecodeError:
            return "(encoded string)"

    def execute(self, sql, params=()):
        start = datetime.now()
        try:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: jazzband/django-debug-toolbar
Commit Name: 8d0245d51bf3dda12a89dd1b5b5e5bad69959519
Time: 2013-02-20
Author: dcramer@gmail.com
File Name: debug_toolbar/utils/tracking/db.py
Class Name: NormalCursorWrapper
Method Name: _decode


Project Name: pytorch/tutorials
Commit Name: 69d978ed497856d05730c05564597e604713f5c4
Time: 2018-09-16
Author: minkawhich@fb.com
File Name: beginner_source/chatbot_tutorial.py
Class Name:
Method Name: evaluate


Project Name: pytorch/tutorials
Commit Name: a61996ae5406ddfee4ac65ab647ebe858fc16260
Time: 2018-09-17
Author: matthewinkawhich@gmail.com
File Name: beginner_source/chatbot_tutorial.py
Class Name:
Method Name: evaluate