MonoshiTonmoy/Code_Statement_Prediction_Dataset huggingface dataset:
Project Name: alisaifee+pyutrack
Language: Python
Statement Type: Arithmetic Assignment

Source Code:
def __build_func(verb, args, kwargs={}):
        params = ['self']
        params += ['%s' % stringcase.snakecase(k) for k in args]
        params += ['%s=%s' % (stringcase.snakecase(k), v) for k, v in kwargs.items()]
        largs = list(args) + list(kwargs.keys())
        return eval(
            'lambda %s: self._%s(%s)' % (
                ','.join(params), verb, ','.join(['%s=%s' % (k, stringcase.snakecase(k)) for k in largs])
            )
        )

__build_func(verb='get', args=[], kwargs={})

Selected Statement: largs = list(args) + list(kwargs.keys())

Function Input:
verb: 'get'

Variable Values Before Statement:


Variable States During Runtime (line, value):
verb: 1
'get'
args: 1
kwargs: 1
params: 2
self
largs: 5
Project Name: ccxt+ccxt
Language: Python
Statement Type: Arithmetic Assignment

Source Code:
def bits2octets(data, order):
    z1 = bits2int(data, bit_length(order))
    z2 = z1 - order

    if z2 < 0:
        z2 = z1

    return number_to_string_crop(z2, order)

bits2octets(data=b'\xa7?\xcf3\x96@\x92\x92\x07(\x1f\xb8\xe08\x88H\x06\xe2\xeb\x08@\xf2$V\x94\xdb\xba\x1d\\\xc8\x9ee', order=115792089237316195423570985008687907852837564279074904382605163141518161494337)

Selected Statement: z2 = z1 - order

Function Input:
data: b'\xa7?\xcf3\x96@\x92\x92\x07(\x1f\xb8\xe08\x88H\x06\xe2\xeb\x08@\xf2$V\x94\xdb\xba\x1d\\\xc8\x9ee'
order: 115792089237316195423570985008687907852837564279074904382605163141518161494337

Variable Values Before Statement:
z1: 75648987130760998095283026105289635390775519882394219481699348731002280779365
order: 115792089237316195423570985008687907852837564279074904382605163141518161494337

Value After Statement Execution: -40143102106555197328287958903398272462062044396680684900905814410515880714972

Variable States During Runtime (line, value):
data: 1
b'\xa7?\xcf3\x96@\x92\x92\x07(\x1f\xb8\xe08\x88H\x06\xe2\xeb\x08@\xf2$V\x94\xdb\xba\x1d\\\xc8\x9ee'
order: 1
115792089237316195423570985008687907852837564279074904382605163141518161494337
z1: 2
75648987130760998095283026105289635390775519882394219481699348731002280779365
z2: 3
-40143102106555197328287958903398272462062044396680684900905814410515880714972
6
75648987130760998095283026105289635390775519882394219481699348731002280779365
Project Name: ccxt+ccxt
Language: Python
Statement Type: Arithmetic Assignment

Source Code:
def __str__(self):
        self.reduce()
        sign = '-' if self.integer < 0 else ''
        integer_array = list(str(abs(self.integer)).rjust(self.decimals, '0'))
        index = len(integer_array) - self.decimals
        if index == 0:
            item = '0.'
        elif self.decimals < 0:
            item = '0' * (-self.decimals)
        elif self.decimals == 0:
            item = ''
        else:
            item = '.'
        integer_array.insert(index, item)
        return sign + ''.join(integer_array)

__str__(self=Precise(1393.938), self.base=10, self.decimals=3, self.integer=1393938)

Selected Statement: index = len(integer_array) - self.decimals

Function Input:
self: Precise(1393.938)
self.base: 10
self.decimals: 3
self.integer: 1393938

Variable Values Before Statement:

Value After Statement Execution: 4

Variable States During Runtime (line, value):
self: 1
Precise(1393.938)
self.base: 1
10
self.decimals: 1
3
self.integer: 1
1393938
sign: 3
''
integer_array: 4
1, 3, 9, 3, 9, 3, 8
14
1, 3, 9, 3, ., 9, 3, 8
index: 5
4
item: 13
'.'
Project Name: ccxt+ccxt
Language: Python
Statement Type: Arithmetic Assignment

Source Code:
def div(self, other, precision=18):
        distance = precision - self.decimals + other.decimals
        if distance == 0:
            numerator = self.integer
        elif distance < 0:
            exponent = self.base ** -distance
            numerator = self.integer // exponent
        else:
            exponent = self.base ** distance
            numerator = self.integer * exponent
        result, mod = divmod(numerator, other.integer)
        # python floors negative numbers down instead of truncating
        # if mod is zero it will be floored to itself so we do not add one
        result = result + 1 if result < 0 and mod else result
        return Precise(result, precision)

div(self=Precise(0.00000002), other=Precise(69696900000), precision=1, self.base=10, self.decimals=8, self.integer=2)

Selected Statement: distance = precision - self.decimals + other.decimals

Function Input:
self: Precise(0.00000002)
other: Precise(69696900000)
precision: 1
self.base: 10
self.decimals: 8
self.integer: 2

Variable Values Before Statement:

Value After Statement Execution: -12

Variable States During Runtime (line, value):
self: 1
Precise(0.00000002)
other: 1
Precise(69696900000)
precision: 1
1
self.base: 1
10
self.decimals: 1
8
self.integer: 1
2
distance: 2
-12
exponent: 6
1000000000000
numerator: 7
0
result: 11
0
mod: 11
0
Project Name: qubvel+segmentation_models.pytorch
Language: Python
Statement Type: Arithmetic Assignment

Source Code:
def _get_channels(self, mode, width_mult):
        if mode == "small":
            channels = [16, 16, 24, 48, 576]
        else:
            channels = [16, 24, 40, 112, 960]
        channels = [
            3,
        ] + [_make_divisible(x * width_mult) for x in channels]
        return tuple(channels)

_get_channels(self=MobileNetV3Encoder(), mode='large', width_mult=0.75, self._backward_hooks=OrderedDict(), self._backward_pre_hooks=OrderedDict(), self._buffers=OrderedDict(), self._depth=3, self._forward_hooks=OrderedDict(), self._forward_hooks_always_called=OrderedDict(), self._forward_hooks_with_kwargs=OrderedDict(), self._forward_pre_hooks=OrderedDict(), self._forward_pre_hooks_with_kwargs=OrderedDict(), self._is_full_backward_hook=None, self._load_state_dict_post_hooks=OrderedDict(), self._load_state_dict_pre_hooks=OrderedDict(), self._mode='large', self._modules=OrderedDict(), self._non_persistent_buffers_set=set(), self._parameters=OrderedDict(), self._state_dict_hooks=OrderedDict(), self._state_dict_pre_hooks=OrderedDict(), self.training=True)

Selected Statement: channels = [

Function Input:
self: MobileNetV3Encoder()
mode: 'large'
width_mult: 0.75
self._backward_hooks: OrderedDict()
self._backward_pre_hooks: OrderedDict()
self._buffers: OrderedDict()
self._depth: 3
self._forward_hooks: OrderedDict()
self._forward_hooks_always_called: OrderedDict()
self._forward_hooks_with_kwargs: OrderedDict()
self._forward_pre_hooks: OrderedDict()
self._forward_pre_hooks_with_kwargs: OrderedDict()
self._is_full_backward_hook: None
self._load_state_dict_post_hooks: OrderedDict()
self._load_state_dict_pre_hooks: OrderedDict()
self._mode: 'large'
self._modules: OrderedDict()
self._non_persistent_buffers_set: set()
self._parameters: OrderedDict()
self._state_dict_hooks: OrderedDict()
self._state_dict_pre_hooks: OrderedDict()
self.training: True

Variable Values Before Statement:

Value After Statement Execution: [3, 16, 24, 32, 88, 720]

Variable States During Runtime (line, value):
self: 1
MobileNetV3Encoder()
mode: 1
'large'
width_mult: 1
0.75
self._backward_hooks: 1
OrderedDict()
self._backward_pre_hooks: 1
OrderedDict()
self._buffers: 1
OrderedDict()
self._depth: 1
3
self._forward_hooks: 1
OrderedDict()
self._forward_hooks_always_called: 1
OrderedDict()
self._forward_hooks_with_kwargs: 1
OrderedDict()
self._forward_pre_hooks: 1
OrderedDict()
self._forward_pre_hooks_with_kwargs: 1
OrderedDict()
self._is_full_backward_hook: 1
None
self._load_state_dict_post_hooks: 1
OrderedDict()
self._load_state_dict_pre_hooks: 1
OrderedDict()
self._mode: 1
'large'
self._modules: 1
OrderedDict()
self._non_persistent_buffers_set: 1
set()
self._parameters: 1
OrderedDict()
self._state_dict_hooks: 1
OrderedDict()
self._state_dict_pre_hooks: 1
OrderedDict()
self.training: 1
True
channels: 5
[16, 24, 40, 112, 960]
6
[3, 16, 24, 32, 88, 720]
Project Name: PyFilesystem+pyfilesystem2
Language: Python
Statement Type: Arithmetic Assignment

Source Code:
def _to_str(size, suffixes, base):
    # type: (SupportsInt, Iterable[Text], int) -> Text
    try:
        size = int(size)
    except ValueError:
        raise TypeError("filesize requires a numeric value, not {!r}".format(size))
    if size == 1:
        return "1 byte"
    elif size < base:
        return "{:,} bytes".format(size)

    for i, suffix in enumerate(suffixes, 2):
        unit = base ** i
        if size < unit:
            break
    return "{:,.1f} {}".format((base * size / unit), suffix)

_to_str(size=1024, suffixes=('KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB'), base=1024)

Selected Statement: unit = base ** i

Function Input:
size: 1024
suffixes: ('KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB')
base: 1024

Variable Values Before Statement:
base: 1024
i: 2

Value After Statement Execution: 1048576

Variable States During Runtime (line, value):
size: 1
1024
suffixes: 1
('KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB')
base: 1
1024
i: 12
2
suffix: 12
'KiB'
unit: 13
1048576
Project Name: YugaByte+cassandra-python-driver
Language: Python
Statement Type: Arithmetic Assignment

Source Code:
def _insert(self, key, value):
        flat_key = self._serialize_key(key)
        i = self._index.get(flat_key, -1)
        if i >= 0:
            self._items[i] = (key, value)
        else:
            self._items.append((key, value))
            self._index[flat_key] = len(self._items) - 1

_insert(self=OrderedMapSerializedKey([]), key='みbob', value=199)

Selected Statement: self._index[flat_key] = len(self._items) - 1

Function Input:
self: OrderedMapSerializedKey([])
key: 'みbob'
value: 199

Variable Values Before Statement:

Value After Statement Execution: 199

Variable States During Runtime (line, value):
self: 1
OrderedMapSerializedKey([])
7
OrderedMapSerializedKey([('みbob', 199)])
key: 1
'みbob'
value: 1
199
flat_key: 2
b'\xe3\x81\xbfbob'
i: 3
-1
self['みbob']: 8
199
Project Name: Hasenpfote+fpq
Language: Python
Statement Type: Arithmetic Assignment

Source Code:
def quat_from_axis_angle(axis, angle):
        axis_ = np.array(axis, dtype=np.float64)
        half_angle = angle * 0.5
        ret = np.empty(4)
        ret[0] = math.cos(half_angle)
        ret[1:4] = math.sin(half_angle) * axis_
        return ret

quat_from_axis_angle(axis=[1.0, 0.0, 0.0], angle=6.1086523819801535)

Selected Statement: half_angle = angle * 0.5

Function Input:
axis: [1.0, 0.0, 0.0]
angle: 6.1086523819801535

Variable Values Before Statement:
angle: 6.1086523819801535

Value After Statement Execution: 3.0543261909900767

Variable States During Runtime (line, value):
axis: 1
[1.0, 0.0, 0.0]
angle: 1
6.1086523819801535
axis_: 2
array([1., 0., 0.])
half_angle: 3
3.0543261909900767
ret: 4
array([4.65265954e-310, 0.00000000e+000, 1.58101007e-322, 6.90572610e-310])
5
array([-9.96194698e-001,  0.00000000e+000,  1.58101007e-322,        6.90572610e-310])
6
array([-0.9961947 ,  0.08715574,  0.        ,  0.        ])
Project Name: jpadilla+pyjwt
Language: Python
Statement Type: Arithmetic Assignment

Source Code:
def base64url_decode(input: Union[bytes, str]) -> bytes:
    input_bytes = force_bytes(input)

    rem = len(input_bytes) % 4

    if rem > 0:
        input_bytes += b"=" * (4 - rem)

    return base64.urlsafe_b64decode(input_bytes)

base64url_decode(input='hJtXIZ2uSN5kbQfbtTNWbpdmhkV8FJG-Onbc6mxCcYg')

Selected Statement: rem = len(input_bytes) % 4

Function Input:
input: 'hJtXIZ2uSN5kbQfbtTNWbpdmhkV8FJG-Onbc6mxCcYg'

Variable Values Before Statement:

Value After Statement Execution: 3

Variable States During Runtime (line, value):
input: 1
'hJtXIZ2uSN5kbQfbtTNWbpdmhkV8FJG-Onbc6mxCcYg'
input_bytes: 2
b'hJtXIZ2uSN5kbQfbtTNWbpdmhkV8FJG-Onbc6mxCcYg'
7
b'hJtXIZ2uSN5kbQfbtTNWbpdmhkV8FJG-Onbc6mxCcYg='
rem: 4
3
Project Name: Dreem-Organization+benderopt
Language: Python
Statement Type: Arithmetic Assignment

Source Code:
def generate_samples_loguniform(low, high, step, base, size=1):
    """Generate sample for (discrete)uniform density."""

    samples = base ** (random.uniform(low=logb(low, base), high=logb(high, base), size=size))
    if step:
        samples = step * np.floor(samples / step)
    return samples

generate_samples_loguniform(low=5.8884365535558836e-08, high=2.6977394324449206e-07, step=None, base=10, size=100000)

Selected Statement: samples = base ** (random.uniform(low=logb(low, base), high=logb(high, base), size=size))

Function Input:
low: 5.8884365535558836e-08
high: 2.6977394324449206e-07
step: None
base: 10
size: 100000

Variable Values Before Statement:
base: 10

Value After Statement Execution: array([8.36400364e-08, 2.64090744e-07, 2.64351674e-07, ...,       6.02217873e-08, 1.13953435e-07, 8.52185827e-08])

Variable States During Runtime (line, value):
low: 1
5.8884365535558836e-08
high: 1
2.6977394324449206e-07
step: 1
None
base: 1
10
size: 1
100000
samples: 4
array([8.36400364e-08, 2.64090744e-07, 2.64351674e-07, ...,       6.02217873e-08, 1.13953435e-07, 8.52185827e-08])
Project Name: aperezdc+omni
Language: Python
Statement Type: Constant Assignment

Source Code:
def parse_route_template(template):
    rbuilder = ["^"]
    fbuilder = []
    position = 0
    schema = {}

    for match in template_var_re_finditer(template):
        param_name = match.group("name")
        param_type = match.group("type") or "id"
        # TODO: Handle KeyError, maybe we want to use a custom error here.
        param_formatchar, param_re, param_schema = _schema_map[param_type]
        schema[param_name] = param_schema

        rbuilder.append(re.escape(template[position:match.start()]))
        rbuilder.append(param_re.format(param_name))

        fbuilder.append(template[position:match.start()])
        fbuilder.append("{")
        fbuilder.append(param_name)
        fbuilder.append(":")
        fbuilder.append(param_formatchar)
        fbuilder.append("}")

        position = match.end()

    rbuilder.append(re.escape(template[position:]))
    rbuilder.append("$")
    fbuilder.append(template[position:])

    return (valid.Schema(schema),
            re.compile("".join(rbuilder)),
            u"".join(fbuilder).format)

parse_route_template(template='get/{variable}')

Selected Statement: position = 0

Function Input:
template: 'get/{variable}'

Variable Values Before Statement:
Constant: 0

Value After Statement Execution: 0

Variable States During Runtime (line, value):
template: 1
'get/{variable}'
rbuilder: 2
^
14
^, get/
15
^
get/
(?P<variable>[_a-zA-Z][_\w]*)
26
^
get/
(?P<variable>[_a-zA-Z][_\w]*)
27
^
get/
(?P<variable>[_a-zA-Z][_\w]*)
$
fbuilder: 3
17
get/
18
get/
{
19
get/
{
variable
20
get/
{
variable
:
21
get/
{
variable
:
s
22
get/
{
variable
:
s
}
28
get/
{
variable
:
s
}
position: 4
0
24
14
schema: 5
12
{'variable': And(<class 'str'>, <function Match at 0x7f0c58d64940>)}
match: 7
<re.Match object; span=(4, 14), match='{variable}'>
param_name: 8
'variable'
param_type: 9
'id'
param_formatchar: 11
's'
param_re: 11
'(?P<{}>[_a-zA-Z][_\\w]*)'
param_schema: 11
And(<class 'str'>, <function Match at 0x7f0c58d64940>)
Project Name: geopy+geopy
Language: Python
Statement Type: Constant Assignment

Source Code:
def kilometers(meters=0, miles=0, feet=0, nautical=0):
    """
    Convert distance to kilometers.
    """
    ret = 0.
    if meters:
        ret += meters / 1000.
    if feet:
        ret += feet / ft(1.)
    if nautical:
        ret += nautical / nm(1.)
    ret += miles * 1.609344
    return ret

kilometers(meters=0, miles=0, feet=0, nautical=0)

Selected Statement: ret = 0.

Function Input:
meters: 0
miles: 0
feet: 0
nautical: 0

Variable Values Before Statement:
Constant: 0.

Value After Statement Execution: 0.

Variable States During Runtime (line, value):
meters: 1
0
miles: 1
0
feet: 1
0
nautical: 1
0
ret: 5
0.0
Project Name: geopy+geopy
Language: Python
Statement Type: Constant Assignment

Source Code:
def feet(kilometers=0, meters=0, miles=0, nautical=0):
    """
    Convert distance to feet.
    """
    ret = 0.
    if nautical:
        kilometers += nautical / nm(1.)
    if meters:
        kilometers += meters / 1000.
    if kilometers:
        miles += mi(kilometers=kilometers)
    ret += miles * 5280
    return ret

feet(kilometers=1.0, meters=0, miles=0, nautical=0)

Selected Statement: ret = 0.

Function Input:
kilometers: 1.0
meters: 0
miles: 0
nautical: 0

Variable Values Before Statement:
Constant: 0.

Value After Statement Execution: 0.

Variable States During Runtime (line, value):
kilometers: 1
1.0
meters: 1
0
miles: 1
0
11
0.621371192237334
nautical: 1
0
ret: 5
0.0
12
3280.839895013123
Project Name: geopy+geopy
Language: Python
Statement Type: Constant Assignment

Source Code:
def nautical(kilometers=0, meters=0, miles=0, feet=0):
    """
    Convert distance to nautical miles.
    """
    ret = 0.
    if feet:
        kilometers += feet / ft(1.)
    if miles:
        kilometers += km(miles=miles)
    if meters:
        kilometers += meters / 1000.
    ret += kilometers / 1.852
    return ret

nautical(kilometers=1.0, meters=0, miles=0, feet=0)

Selected Statement: ret = 0.

Function Input:
kilometers: 1.0
meters: 0
miles: 0
feet: 0

Variable Values Before Statement:
Constant: 0.

Value After Statement Execution: 0.

Variable States During Runtime (line, value):
kilometers: 1
1.0
meters: 1
0
miles: 1
0
feet: 1
0
ret: 5
0.0
12
0.5399568034557235
Project Name: geopy+geopy
Language: Python
Statement Type: Constant Assignment

Source Code:
def format_decimal(self, altitude=None):
        """
        Format decimal degrees with altitude::

            >>> p = Point(41.5, -81.0, 12.3)
            >>> p.format_decimal()
            '41.5, -81.0, 12.3km'
            >>> p = Point(41.5, 0, 0)
            >>> p.format_decimal()
            '41.5, 0.0'

        :param bool altitude: Whether to include ``altitude`` value.
            By default it is automatically included if it is non-zero.
        """
        coordinates = [str(self.latitude), str(self.longitude)]

        if altitude is None:
            altitude = bool(self.altitude)
        if altitude:
            if not isinstance(altitude, str):
                altitude = 'km'
            coordinates.append(self.format_altitude(altitude))

        return ", ".join(coordinates)

format_decimal(self=Point(41.5, 81.0, 2.5), altitude=None, self.altitude=2.5, self.latitude=41.5, self.longitude=81.0)

Selected Statement: altitude = 'km'

Function Input:
self: Point(41.5, 81.0, 2.5)
altitude: None
self.altitude: 2.5
self.latitude: 41.5
self.longitude: 81.0

Variable Values Before Statement:
Constant: 'km'

Value After Statement Execution: 'km'

Variable States During Runtime (line, value):
self: 1
Point(41.5, 81.0, 2.5)
altitude: 1
None
18
True
21
'km'
self.altitude: 1
2.5
self.latitude: 1
41.5
self.longitude: 1
81.0
coordinates: 15
41.5, 81.0
22
41.5, 81.0, 2.5km
Project Name: KillianLucas+open-interpreter
Language: Python
Statement Type: Constant Assignment

Source Code:
def add_active_line_prints(code):
    """
    Add print statements indicating line numbers to a python string.
    """
    # Replace newlines and comments with pass statements, so the line numbers are accurate (ast will remove them otherwise)
    code_lines = code.split("\n")
    in_multiline_string = False
    for i in range(len(code_lines)):
        line = code_lines[i]
        if '"""' in line or "'''" in line:
            in_multiline_string = not in_multiline_string
        if not in_multiline_string and (line.strip().startswith("#") or line == ""):
            whitespace = len(line) - len(line.lstrip(" "))
            code_lines[i] = " " * whitespace + "pass"
    processed_code = "\n".join(code_lines)
    try:
        tree = ast.parse(processed_code)
    except:
        # If you can't parse the processed version, try the unprocessed version before giving up
        tree = ast.parse(code)
    transformer = AddLinePrints()
    new_tree = transformer.visit(tree)
    return ast.unparse(new_tree)

add_active_line_prints(code="import matplotlib\n        matplotlib.use('Agg')")

Selected Statement: in_multiline_string = False

Function Input:
code: "import matplotlib\n        matplotlib.use('Agg')"

Variable Values Before Statement:
Constant: False

Value After Statement Execution: False

Variable States During Runtime (line, value):
code: 1
"import matplotlib\n        matplotlib.use('Agg')"
code_lines: 6
import matplotlib
        matplotlib.use('Agg')
in_multiline_string: 7
False
i: 8
0
8
1
line: 9
'import matplotlib'
9
"        matplotlib.use('Agg')"
processed_code: 15
"import matplotlib\n        matplotlib.use('Agg')"
Project Name: altair-viz+altair
Language: Python
Statement Type: Constant Assignment

Source Code:
def _check_if_valid_subspec(spec: Union[dict, core.SchemaBase], classname: str) -> None:
    """Check if the spec is a valid sub-spec.

    If it is not, then raise a ValueError
    """
    err = (
        'Objects with "{0}" attribute cannot be used within {1}. '
        "Consider defining the {0} attribute in the {1} object instead."
    )

    if not isinstance(spec, (core.SchemaBase, dict)):
        raise ValueError("Only chart objects can be used in {0}.".format(classname))
    for attr in TOPLEVEL_ONLY_KEYS:
        if isinstance(spec, core.SchemaBase):
            val = getattr(spec, attr, Undefined)
        else:
            val = spec.get(attr, Undefined)
        if val is not Undefined:
            raise ValueError(err.format(attr, classname))

_check_if_valid_subspec(spec=alt.Chart(...), classname='LayerChart')

Selected Statement: err = (

Function Input:
spec: alt.Chart(...)
classname: 'LayerChart'

Variable Values Before Statement:
Constant: ( # [STATE] err = 'Objects with "{0}" attribute cannot be used within {1}. Consider defining the {0} attribute in the {1} object instead.' [/STATE]
        'Objects with "{0}" attribute cannot be used within {1}. '
        "Consider defining the {0} attribute in the {1} object instead."
    )

Value After Statement Execution: ( # [STATE] err = 'Objects with "{0}" attribute cannot be used within {1}. Consider defining the {0} attribute in the {1} object instead.' [/STATE]
        'Objects with "{0}" attribute cannot be used within {1}. '
        "Consider defining the {0} attribute in the {1} object instead."
    )

Variable States During Runtime (line, value):
spec: 1
alt.Chart(...)
classname: 1
'LayerChart'
err: 6
'Objects with "{0}" attribute cannot be used within {1}. Consider defining the {0} attribute in the {1} object instead.'
attr: 13
'autosize'
13
'background'
13
'$schema'
13
'config'
13
'padding'
val: 15
Undefined
Project Name: BlackLight+platypush
Language: Python
Statement Type: Constant Assignment

Source Code:
def _generate_id():
        """ Generate a unique event ID """
        id = ''
        for i in range(0, 16):
            id += '%.2x' % random.randint(0, 255)
        return id

_generate_id()

Selected Statement: id = ''

Function Input:

Variable Values Before Statement:
Constant: ''

Value After Statement Execution: ''

Variable States During Runtime (line, value):
id: 3
''
5
'2a'
5
'2acb'
5
'2acb45'
5
'2acb458f'
5
'2acb458f5d'
5
'2acb458f5d18'
5
'2acb458f5d180c'
5
'2acb458f5d180c43'
5
'2acb458f5d180c435e'
5
'2acb458f5d180c435e47'
5
'2acb458f5d180c435e474a'
5
'2acb458f5d180c435e474a04'
5
'2acb458f5d180c435e474a042d'
5
'2acb458f5d180c435e474a042dd8'
5
'2acb458f5d180c435e474a042dd85c'
5
'2acb458f5d180c435e474a042dd85c80'
i: 4
0
4
1
4
2
4
3
4
4
4
5
4
6
4
7
4
8
4
9
4
10
4
11
4
12
4
13
4
14
4
15