# Buggy code
def analyze_content(self):
    if self._content_was_analyzed:
        return

    self._content_was_analyzed = True

    if self.is_compact_ast:
        body = self._functionNotParsed["body"]

        if body and body[self.get_key()] == "Block":
            self._is_implemented = True
            self._parse_cfg(body)

        for modifier in self._functionNotParsed["modifiers"]:
            self._parse_modifier(modifier)

    else:
        children = self._functionNotParsed[self.get_children("children")]
        self._is_implemented = False
        for child in children[2:]:
            if child[self.get_key()] == "Block":
                self._is_implemented = True
                self._parse_cfg(child)

        # Parse modifier after parsing all the block
        # In the case a local variable is used in the modifier
        for child in children[2:]:
            if child[self.get_key()] == "ModifierInvocation":
                self._parse_modifier(child)

    for local_vars in self.variables:
        local_vars.analyze(self)

    for node in self.nodes:
        node.analyze_expressions(self)

    ternary_found = True
    while ternary_found:
        ternary_found = False
        for node in self.nodes:
            has_cond = HasConditional(node.expression)
            if has_cond.result():
                st = SplitTernaryExpression(node.expression)
                condition = st.condition
                assert condition
                true_expr = st.true_expression
                false_expr = st.false_expression
                self.split_ternary_node(node, condition, true_expr, false_expr)
                ternary_found = True
                break
    self._remove_alone_endif()


# Traceback (Exception)
ERROR:root:Traceback (most recent call last):
File "c:\users\vyper\documents\github\slither\slither\solc_parsing\slitherSolc.py", line 341, in _convert_to_slithir
contract.convert_expression_to_slithir()
File "c:\users\vyper\documents\github\slither\slither\solc_parsing\declarations\contract.py", line 367, in convert_expression_to_slithir
func.generate_slithir_and_analyze()
File "c:\users\vyper\documents\github\slither\slither\solc_parsing\declarations\function.py", line 927, in generate_slithir_and_analyze
node.slithir_generation()
File "c:\users\vyper\documents\github\slither\slither\core\cfg\node.py", line 506, in slithir_generation
self._irs = convert_expression(expression, self)
File "c:\users\vyper\documents\github\slither\slither\slithir\convert.py", line 734, in convert_expression
visitor = ExpressionToSlithIR(expression, node)
File "c:\users\vyper\documents\github\slither\slither\visitors\slithir\expression_to_slithir.py", line 70, in __init__
self._visit_expression(self.expression)
File "c:\users\vyper\documents\github\slither\slither\visitors\expression\expression.py", line 41, in _visit_expression
self._visit_assignement_operation(expression)
File "c:\users\vyper\documents\github\slither\slither\visitors\expression\expression.py", line 98, in _visit_assignement_operation
self._visit_expression(expression.expression_right)
File "c:\users\vyper\documents\github\slither\slither\visitors\expression\expression.py", line 92, in _visit_expression
self._post_visit(expression)
File "c:\users\vyper\documents\github\slither\slither\visitors\expression\expression.py", line 266, in _post_visit
self._post_conditional_expression(expression)
File "c:\users\vyper\documents\github\slither\slither\visitors\slithir\expression_to_slithir.py", line 151, in _post_conditional_expression
raise Exception('Ternary operator are not convertible to SlithIR {}'.format(expression))
Exception: Ternary operator are not convertible to SlithIR if a != address(0) then a else msg.sender

# Fixed code
def analyze_content(self):
    if self._content_was_analyzed:
        return

    self._content_was_analyzed = True

    if self.is_compact_ast:
        body = self._functionNotParsed["body"]

        if body and body[self.get_key()] == "Block":
            self._is_implemented = True
            self._parse_cfg(body)

        for modifier in self._functionNotParsed["modifiers"]:
            self._parse_modifier(modifier)

    else:
        children = self._functionNotParsed[self.get_children("children")]
        self._is_implemented = False
        for child in children[2:]:
            if child[self.get_key()] == "Block":
                self._is_implemented = True
                self._parse_cfg(child)

        # Parse modifier after parsing all the block
        # In the case a local variable is used in the modifier
        for child in children[2:]:
            if child[self.get_key()] == "ModifierInvocation":
                self._parse_modifier(child)

    for local_vars in self.variables:
        local_vars.analyze(self)

    for node in self.nodes:
        node.analyze_expressions(self)

    self._filter_ternary()
    self._remove_alone_endif()