68fa96c91dae536ac2568f77e6449b19fc5a9109,snorkel/parser.py,XMLDocParser,parse_file,#XMLDocParser#Any#Any#,136

Before Change


            // We store the XML tree as a string due to a serialization bug. It cannot currently be pickled directly
            //TODO: Implement a special dictionary that can handle this automatically (http://docs.sqlalchemy.org/en/latest/orm/extensions/mutable.html)
            attribs = {"root": et.tostring(doc)} if self.keep_xml_tree else {}
            yield Document(name=str(id), file=str(file_name), attribs=attribs), str(text)

    def _can_read(self, fpath):
        return fpath.endswith(".xml")

After Change


            meta = {"file_name": str(file_name)}
            if self.keep_xml_tree:
                meta["root"] = et.tostring(doc)
            yield Document(name=doc_id, stable_id=doc_id, meta=meta), text

    def _can_read(self, fpath):
        return fpath.endswith(".xml")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: snorkel-team/snorkel
Commit Name: 68fa96c91dae536ac2568f77e6449b19fc5a9109
Time: 2016-08-29
Author: ajratner@gmail.com
File Name: snorkel/parser.py
Class Name: XMLDocParser
Method Name: parse_file


Project Name: bokeh/bokeh
Commit Name: ac47ce4d0ea99d090aa4ccfe51133ae6e32ee344
Time: 2015-08-29
Author: nroth@dealnews.com
File Name: bokeh/charts/builder/bar_builder.py
Class Name: BarBuilder
Method Name: _yield_renderers


Project Name: biocore/scikit-bio
Commit Name: 4531b11adaa7a877dcbc7f7d3b7b1abf536c595c
Time: 2015-06-25
Author: ebolyen@gmail.com
File Name: skbio/io/formats/_base.py
Class Name:
Method Name: _format_fasta_like_records