2ac20f382ec18f7f109f6f77500d96b963e7bcfd,snake/game.py,Game,__restart,#Game#,88

Before Change



    def __restart(self):
        self.__snake.dead = True
        time.sleep(0.5)
        self.__map.reset()
        self.__snake = Snake(self.__map, self.__conf.init_direc,
                             self.__conf.init_bodies, self.__conf.init_types)
        self.__pause = False

After Change


        self.__snake = Snake(self.__map, self.__conf.init_direc,
                             self.__conf.init_bodies, self.__conf.init_types)
        self.__pause = False
        self.__game_loop_thread = Thread(target=self.__game_loop, name="GameLoopThread")
        self.__game_loop_thread.start()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: chuyangliu/snake
Commit Name: 2ac20f382ec18f7f109f6f77500d96b963e7bcfd
Time: 2017-12-09
Author: chuyang.s.liu@gmail.com
File Name: snake/game.py
Class Name: Game
Method Name: __restart


Project Name: dmlc/dgl
Commit Name: 4f02bb751b312aec02eab82737382f1f94829a4a
Time: 2019-12-29
Author: mctt90@gmail.com
File Name: tests/pytorch/test_kvstore.py
Class Name:
Method Name:


Project Name: chuyangliu/snake
Commit Name: 2ac20f382ec18f7f109f6f77500d96b963e7bcfd
Time: 2017-12-09
Author: chuyang.s.liu@gmail.com
File Name: snake/game.py
Class Name: Game
Method Name: __restart


Project Name: home-assistant/home-assistant
Commit Name: 665436cd910035b25805fa62b63f357c6eeef37e
Time: 2015-11-10
Author: leoc.git@gmail.com
File Name: homeassistant/components/light/zwave.py
Class Name: ZwaveDimmer
Method Name: _value_changed