b3f9fcd7774b4848df1eb8cea1eb1bdf6459911d,sbin/db_mgmt_cwe.py,CWEHandler,startElement,#CWEHandler#,55

Before Change


        elif name == "Related_Weaknesses" and self.weakness_tag:
            self.related_weaknesses_sub_tag = True
            self.related_weaknesses = []
        elif name == "Related_Weakness" and self.related_weaknesses_sub_tag:
            self.related_weakness_tag = True
            self.nature = attrs.get("Nature")
            self.id = attrs.get("CWE_ID")

After Change


            self.weakness_relationships_tag = True
            self.relationships = []

        elif name == "Relationship" and self.weakness_relationships_tag:
            self.relationship_tag = True
            self.relationship = {}

        elif name == "Relationship_View_ID" and self.relationship_tag:
            self.relationship_view_tag = True
            self.relationship_view = ""
            self.view_id = []
        elif name == "Relationship_Target_Form" and self.relationship_tag:
            self.relationship_target_tag = True
            self.relationship_target = ""
        elif name == "Relationship_Nature" and self.relationship_tag:
            self.relationship_nature_tag = True
            self.relationship_nature = ""
        elif name == "Relationship_Target_ID" and self.relationship_tag:
            self.relationship_id_tag = True
            self.relationship_id = ""

    def characters(self, ch):
        if self.description_summary_tag:
            self.description_summary += ch.replace("       ", "")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 26

Instances


Project Name: cve-search/cve-search
Commit Name: b3f9fcd7774b4848df1eb8cea1eb1bdf6459911d
Time: 2019-01-29
Author: serge-olivier.paquette@delvelabs.ca
File Name: sbin/db_mgmt_cwe.py
Class Name: CWEHandler
Method Name: startElement


Project Name: cve-search/cve-search
Commit Name: 3d9978f882917da9761694fc1db1b4525291f382
Time: 2020-10-01
Author: paul.tikken@gmail.com
File Name: lib/content_handlers.py
Class Name: CWEHandler
Method Name: startElement


Project Name: scikit-optimize/scikit-optimize
Commit Name: ddca7f56ce7a154c2284d6464cf872a1f4992f3d
Time: 2020-02-20
Author: holgernahrstaedt@gmx.de
File Name: skopt/optimizer/optimizer.py
Class Name: Optimizer
Method Name: __init__