def __init__(self, modelPath, role, sim_search=False, mode=MODE_RANDOM_TRANSITION,
                 lexerStyle=LEXER_TOKENS, templates_no_fields=False):
        markov_model, rule_list, template_list = ("%s.markovModel" % modelPath,
                                                  modelPath % "%s.rules",
                                                  "%s.templates" % modelPath)
        self.modelPath = modelPath
        # MarkovModel object is created
        self.mm = MarkovModel(markov_model)
        # RuleList and Rule objects are created
        self.rl = RuleList(rule_list)
        # TemplateList and Template objects are created
        self.tl = TemplateList(template_list, lexerStyle)
        # Transition mode
        self.mode = int(mode)
        # Reference to fuzzer object
        self.fuzzer = ""
        # Role: client or server (UAC/UAS)
        self.role = role
        if role == "UAC":
            self.otherside = "UAS"
        else:
            self.otherside = "UAC"
        self.templates = RingBuffer(20)
        self.fields = RingBuffer(20)
        self.reset_model()
        # force a transition after receiving a message even if no template
        # is exactly matched by matching the closest template
        self.similarity_search = sim_search
        self.sim_matched_template = False
        # in a fuzzing state, allow selecting templates with no
        # fields to help the model go on
        self.templates_no_fields = templates_no_fields
dataset/ETHPy150Open hgascon/pulsar/pulsar/core/lens.py/Lens.__init__/swapped operands of `%`