922554c5da52e88aa4a1564bc8f087c134b77fcc,openml/tasks/functions.py,,_create_task_cache_directory,#Any#,263

Before Change


    )
    try:
        os.makedirs(task_cache_dir)
    except (OSError, IOError):
        // TODO add debug information!
        pass
    return task_cache_dir

After Change


    task_cache_dir = os.path.join(
        config.get_cache_directory(), "tasks", str(task_id)
    )
    if os.path.exists(task_cache_dir) and os.path.isdir(task_cache_dir):
        pass
    elif os.path.exists(task_cache_dir) and not os.path.isdir(task_cache_dir):
        raise ValueError("Task cache dir exists but is not a directory!")
    else:
        os.makedirs(task_cache_dir)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: openml/openml-python
Commit Name: 922554c5da52e88aa4a1564bc8f087c134b77fcc
Time: 2017-10-10
Author: feurerm@informatik.uni-freiburg.de
File Name: openml/tasks/functions.py
Class Name:
Method Name: _create_task_cache_directory


Project Name: haotianteng/Chiron
Commit Name: cc90cfc15715f842b98016eab40f66feff8c0e14
Time: 2018-11-24
Author: havens.teng@gmail.com
File Name: chiron/utils/extract_sig_ref.py
Class Name:
Method Name: extract


Project Name: openml/openml-python
Commit Name: 922554c5da52e88aa4a1564bc8f087c134b77fcc
Time: 2017-10-10
Author: feurerm@informatik.uni-freiburg.de
File Name: openml/tasks/functions.py
Class Name:
Method Name: _create_task_cache_directory


Project Name: openml/openml-python
Commit Name: 922554c5da52e88aa4a1564bc8f087c134b77fcc
Time: 2017-10-10
Author: feurerm@informatik.uni-freiburg.de
File Name: openml/datasets/functions.py
Class Name:
Method Name: _create_dataset_cache_directory