442baa24f996bc45e04cdf40c85e0c4fe88a40f3,dh_segment/post_processing/PAGE.py,Page,write_to_file,#Page#Any#Any#,333

Before Change


        root.set("xmlns", _ns["p"])
        // Metadata
        generated_on = str(datetime.datetime.now().isoformat())
        metadata = ET.SubElement(root, "Metadata")
        creator = ET.SubElement(metadata, "Creator")
        creator.text = creator_name
        created = ET.SubElement(metadata, "Created")
        // TODO : Consider the case where the file already exists and only an update needs to be done
        created.text = generated_on
        last_change = ET.SubElement(metadata, "LastChange")
        last_change.text = generated_on

        root.append(self.to_xml())

After Change


        root.set("xmlns", _ns["p"])

        // Updating metadata
        if self.metadata.creator is None:
            self.metadata.creator = creator_name
        generated_on = str(datetime.datetime.now().isoformat())
        if self.metadata.created is None:
            self.metadata.created = generated_on
        else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: dhlab-epfl/dhSegment
Commit Name: 442baa24f996bc45e04cdf40c85e0c4fe88a40f3
Time: 2018-07-06
Author: sofia.oliveiraares@epfl.ch
File Name: dh_segment/post_processing/PAGE.py
Class Name: Page
Method Name: write_to_file


Project Name: prody/ProDy
Commit Name: 0fd9b09ed653adfb4aeb70df71a4bb174dac14c7
Time: 2018-05-06
Author: shz66@pitt.edu
File Name: prody/database/cath.py
Class Name: CATHDB
Method Name: _parse


Project Name: gboeing/osmnx
Commit Name: 8948aabb8b97a26bc788ab5db7543ee6271a436d
Time: 2020-05-22
Author: boeing@usc.edu
File Name: osmnx/io.py
Class Name:
Method Name: save_graph_xml