48373446ecf9ef563b02c360be347da02df09ce9,deeppavlov/utils/socket/socket.py,,handle_connection,#Any#Any#Any#Any#Any#,21

Before Change


        if param_value is None or (isinstance(param_value, list) and len(param_value) > 0):
            model_args.append(param_value)
        else:
            log.error(f"nonempty array expected but got "{param_name}"={repr(param_value)}")
            await loop.sock_sendall(conn, b"[]")
            return
    lengths = {len(i) for i in model_args if i is not None}

After Change


    recv_data = b""
    try:
        while True:
            chunk = await loop.run_in_executor(None, conn.recv, bufsize)
            if chunk:
                recv_data += chunk
            else:
                break
    except BlockingIOError:
        pass
    try:
        data = json.loads(recv_data)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: deepmipt/DeepPavlov
Commit Name: 48373446ecf9ef563b02c360be347da02df09ce9
Time: 2019-08-05
Author: ignatov.fedor@gmail.com
File Name: deeppavlov/utils/socket/socket.py
Class Name:
Method Name: handle_connection


Project Name: tensorflow/tensorflow
Commit Name: 3d03ae2086b232cb6803507ae4defd997c256ec9
Time: 2020-11-18
Author: crccw@google.com
File Name: tensorflow/python/distribute/multi_process_lib.py
Class Name:
Method Name: _set_spawn_exe_path


Project Name: streamlit/streamlit
Commit Name: ddea47a633bf2cf97c69951467fdb1cc586485f1
Time: 2018-10-12
Author: adrien.g.treuille@gmail.com
File Name: lib/streamlit/Connection.py
Class Name: Connection
Method Name: _cleanup_on_exit