# 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)

    else:
        children = self._functionNotParsed["children"]

        self._isImplemented = False
        if len(children) > 1:
            assert len(children) == 2
            block = children[1]
            assert block["name"] == "Block"
            self._is_implemented = True
            self._parse_cfg(block)

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

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

    self._analyze_read_write()
    self._analyze_calls()


# 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)

    else:
        children = self._functionNotParsed["children"]

        self._isImplemented = False
        if len(children) > 1:
            assert len(children) == 2
            block = children[1]
            assert block["name"] == "Block"
            self._is_implemented = True
            self._parse_cfg(block)

    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()

    self._analyze_read_write()
    self._analyze_calls()