<commit_before>
from .base import SimSootExpr
from ..values import SimSootValue_ArrayRef

import logging
l = logging.getLogger('angr.engines.soot.expressions.newarray')

class SimSootExpr_NewArray(SimSootExpr):

    def __init__(self, expr, state):
        super(SimSootExpr_NewArray, self).__init__(expr, state)

    def _execute(self):
        base_type = self.expr.base_type
        size = self._translate_expr(self.expr.size).expr
        self.expr = self.new_array(self.state, base_type, size)

    @staticmethod
    def new_array(state, base_type, size):
        """
        Allocates a new array in memory and returns the reference of the base element.
        """
        size_bounded = SimSootExpr_NewArray._bound_array_size(state, size)
        # arrays are stored on the heap
        # => create a unique reference 
        javavm_memory = state.get_javavm_view_of_plugin('memory')
        heap_alloc_id = "{type}_array_{uuid}".format(type=base_type,
                                                     uuid=javavm_memory.get_new_uuid())
        # return the reference of the base element
        # => elements as such getting lazy initialized in the javavm memory
        return SimSootValue_ArrayRef(heap_alloc_id, 0, base_type, size_bounded)

    @staticmethod<commit_msg>Fix naming convention of array references<commit_after>
from .base import SimSootExpr
from ..values import SimSootValue_ArrayRef

import logging
l = logging.getLogger('angr.engines.soot.expressions.newarray')

class SimSootExpr_NewArray(SimSootExpr):

    def __init__(self, expr, state):
        super(SimSootExpr_NewArray, self).__init__(expr, state)

    def _execute(self):
        base_type = self.expr.base_type
        size = self._translate_expr(self.expr.size).expr
        self.expr = self.new_array(self.state, base_type, size)

    @staticmethod
    def new_array(state, base_type, size):
        """
        Allocates a new array in memory and returns the reference of the base element.
        """
        size_bounded = SimSootExpr_NewArray._bound_array_size(state, size)
        # arrays are stored on the heap
        # => create a unique reference 
        javavm_memory = state.get_javavm_view_of_plugin('memory')
        heap_alloc_id = "{uuid}.{base_type}_array".format(base_type=base_type,
                                                          uuid=javavm_memory.get_new_uuid())
        # return the reference of the base element
        # => elements as such getting lazy initialized in the javavm memory
        return SimSootValue_ArrayRef(heap_alloc_id, 0, base_type, size_bounded)

    @staticmethod
{'fraction_non_alphanumeric': 0.08139090561711884, 'fraction_numerical': 0.0007642338555598013, 'mean_word_length': 2.9074626865671642, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6633954', 'n_tokens_mistral': 775, 'n_tokens_neox': 753, 'n_words': 188}