5826b0b625c86fc6b2c9a62e0e54cc9319aa4e0a,pysos/main.py,,cmd_clean,#Any#Any#,202

Before Change


        if relpath.startswith("."):
            sys.exit("Only subdirectories of the current directory can be cleaned. {} specified.".format(dir))
        for dirname, subdir, filelist in os.walk(dir):
            env.logger.warning((dirname, subdir, filelist))
            subdir[:] = [d for d in subdir if not d.startswith(".")]
            removed_files.extend([os.path.join(dirname, x) for x in filelist if os.path.abspath(os.path.join(dirname, x)) not in tracked_files])
            removed_dirs.extend([os.path.join(dirname, x) for x in subdir if os.path.abspath(os.path.join(dirname, x)) not in tracked_dirs])
    //

After Change


        if args.__dirs__:
            rd = dedup(removed_dirs)
            for d in rd:
                print("Removing {}".format(rd))
                if os.path.isdir(d):
                    shutil.rmtree(d)
                else:
                    os.unlink(d)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: vatlab/SoS
Commit Name: 5826b0b625c86fc6b2c9a62e0e54cc9319aa4e0a
Time: 2016-10-14
Author: ben.bog@gmail.com
File Name: pysos/main.py
Class Name:
Method Name: cmd_clean


Project Name: stanfordnlp/stanza
Commit Name: e2783bf0cd9f06c75af90eadf8c545ff21ec8682
Time: 2019-09-06
Author: horatio@gmail.com
File Name: stanfordnlp/models/pos/trainer.py
Class Name: Trainer
Method Name: save


Project Name: vatlab/SoS
Commit Name: bcaede32c6947e92118845f03c90c3cfdfe0aebd
Time: 2017-04-04
Author: ben.bog@gmail.com
File Name: sos/sos_task.py
Class Name:
Method Name: check_tasks