f11e942dbe2069e1ac09c8d8d981179d24326c70,external_api/api.py,,transfer_entities,#Any#,51

Before Change


        entity_list_dict = json.loads(request.GET.get("word_info"))
        entity_list = entity_list_dict.get("entity_list")
        es_object.transfer_specific_entities(list_of_entities=entity_list)
    except ValueError:
        HttpResponse(status=500)
    return HttpResponse(status=200)

After Change


    entity_list_dict = json.loads(request.GET.get("word_info"))
    entity_list = entity_list_dict.get("entity_list")
    status, error = es_object.transfer_specific_entities(list_of_entities=entity_list)
    result = {"status": status, "error": error}
    if not status:
        HttpResponse(json.dumps({"data": result}), content_type="application/json", status=500)
    return HttpResponse(json.dumps({"data": result}), content_type="application/json", status=200)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: hellohaptik/chatbot_ner
Commit Name: f11e942dbe2069e1ac09c8d8d981179d24326c70
Time: 2018-08-19
Author: pratik.jayarao@haptik.co
File Name: external_api/api.py
Class Name:
Method Name: transfer_entities


Project Name: home-assistant/home-assistant
Commit Name: 09d531b3b95e7943df53233d1abcb40d7e87de94
Time: 2016-08-18
Author: nkgilley@gmail.com
File Name: homeassistant/components/media_player/gpmdp.py
Class Name: GPMDP
Method Name: get_ws


Project Name: MTG/freesound
Commit Name: e5f6cf6d7c55e86233a1c77d0349d80d5d6dab62
Time: 2020-04-30
Author: frederic.font@gmail.com
File Name: utils/mail.py
Class Name:
Method Name: send_mail


Project Name: merenlab/anvio
Commit Name: 09e2b1fb81da2f624b7db8866a3e6547bebc74fb
Time: 2019-10-02
Author: a.murat.eren@gmail.com
File Name: anvio/bottleroutes.py
Class Name: BottleApplication
Method Name: get_taxonomy