3e80a81f04091891e065fae96ad33075a41a19ba,cube/io_utils/model_store.py,ModelMetadata,read,#ModelMetadata#Any#,43

Before Change


        if not filename.endswith("metadata.json"):
            raise IOException("Metadata file ["+filename+"] does not seem to be valid!")
        
        data = json.load(fopen(filename,"r"))
        if sys.version_info[0] == 2: 
            items = data.iteritems()
        else:
            items = data.items()

After Change


            raise IOException("Metadata file ["+filename+"] not found!")
        if not filename.endswith("metadata.json"):
            raise IOException("Metadata file ["+filename+"] does not seem to be valid!")
        with fopen(filename,"r") as f:
            data = json.load(f)
        if sys.version_info[0] == 2: 
            items = data.iteritems()
        else:
            items = data.items()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: adobe/NLP-Cube
Commit Name: 3e80a81f04091891e065fae96ad33075a41a19ba
Time: 2019-01-21
Author: dumitrescu.stefan@gmail.com
File Name: cube/io_utils/model_store.py
Class Name: ModelMetadata
Method Name: read


Project Name: adobe/NLP-Cube
Commit Name: 3e80a81f04091891e065fae96ad33075a41a19ba
Time: 2019-01-21
Author: dumitrescu.stefan@gmail.com
File Name: cube/io_utils/embeddings.py
Class Name: WordEmbeddings
Method Name: read_from_file


Project Name: adobe/NLP-Cube
Commit Name: 3e80a81f04091891e065fae96ad33075a41a19ba
Time: 2019-01-21
Author: dumitrescu.stefan@gmail.com
File Name: cube/io_utils/model_store.py
Class Name: ModelStore
Method Name: _download_with_progress_bar