77184b2f98f8895924c62e13a1aa307e52d32b99,volttron/platform/web/csr_endpoints.py,CSREndpoints,_csr_request_new,#CSREndpoints#Any#Any#,50

Before Change


            json_response = dict(status="ERROR",
                                 message="CSR must start with instance name: {}".format(
                                     get_platform_instance_name()))
            Response(json.dumps(json_response),
                     content_type="application/json",
                     headers={"Content-type": "application/json"})

        csr_file = self._certs.save_pending_csr_request(env.get("REMOTE_ADDR"), identity, csr)

        if self._auto_allow_csr:

After Change


            else:
                json_response["message"] = "An unkonwn error has occured during the respons phase"

        try:
            if json_response["cert"]:
                json_response["cert"] = json_response["cert"].decode("utf-8")
            response = Response(jsonapi.dumps(json_response),
                     content_type="application/json",
                     headers={"Content-type": "application/json"})
        except BaseException as e:
            _log.error(f"ERROR creating Response {e}")
        return response
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: VOLTTRON/volttron
Commit Name: 77184b2f98f8895924c62e13a1aa307e52d32b99
Time: 2019-12-31
Author: chandrika@pnnl.gov
File Name: volttron/platform/web/csr_endpoints.py
Class Name: CSREndpoints
Method Name: _csr_request_new


Project Name: chakki-works/doccano
Commit Name: 25b43f818fc0dc6a8e4414631a1bb48a96f43aba
Time: 2021-02-16
Author: light.tree.1.13@gmail.com
File Name: app/api/views.py
Class Name: AutoLabelingConfigTest
Method Name: post


Project Name: chakki-works/doccano
Commit Name: b190be011513eaf6f884551fa7273a1943d933e9
Time: 2021-02-27
Author: light.tree.1.13@gmail.com
File Name: app/api/views/label.py
Class Name: LabelUploadAPI
Method Name: post