dc378a80b77685cc45c2b53e2f484ed9c6d8c44c,python/ray/autoscaler/command_runner.py,DockerCommandRunner,_check_container_status,#DockerCommandRunner#,667

Before Change



    def _check_container_status(self):
        no_exist = "not_present"
        cmd = check_docker_running_cmd(self.docker_name) + " ".join(
            ["||", "echo", quote(no_exist)])
        output = self.ssh_command_runner.run(
            cmd, with_output=True).decode("utf-8").strip()
        if no_exist in output:
            return False

After Change


            with_output=True).decode("utf-8").strip()
        // Checks for the false positive where "true" is in the container name
        return ("true" in output.lower()
                and "no such object" not in output.lower())

    def _docker_expand_user(self, string, any_char=False):
        user_pos = string.find("~")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: ray-project/ray
Commit Name: dc378a80b77685cc45c2b53e2f484ed9c6d8c44c
Time: 2020-08-26
Author: ian.rodney@gmail.com
File Name: python/ray/autoscaler/command_runner.py
Class Name: DockerCommandRunner
Method Name: _check_container_status


Project Name: allenai/allennlp
Commit Name: 87c23e4a7e25d81e91ba8234eef38b5395993c51
Time: 2020-06-12
Author: epwalsh10@gmail.com
File Name: allennlp/training/util.py
Class Name:
Method Name: make_vocab_from_params


Project Name: keras-team/keras
Commit Name: e74a37438b5389ae19eb61b431859f9789100874
Time: 2017-05-22
Author: ajoseph.lobo@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: function