MonoshiTonmoy/Code_Statement_Prediction_Dataset huggingface dataset:
Project Name: sensepost+objection
Language: Python
Statement Type: API

Source Code:
def cat(args: list = None) -> None:
    """
        Parses a plist on an iOS device and echoes it in a more human
        readable way.

        :param args:
        :return:
    """

    if len(args) <= 0:
        click.secho('Usage: ios plist cat <remote_plist>', bold=True)
        return

    plist = args[0]

    if not os.path.isabs(plist):
        pwd = filemanager.pwd()
        plist = device_state.platform.path_separator.join([pwd, plist])

    api = state_connection.get_api()
    plist_data = api.ios_plist_read(plist)

    click.secho(plist_data, bold=True)

cat(args=['/foo'])

Selected Statement: plist_data = api.ios_plist_read(plist)

Function Input:
args: /foo

Variable Values Before Statement:
plist: '/foo'

Value After Statement Execution: 'foo'

Variable States During Runtime (line, value):
args: 1
/foo
plist: 14
'/foo'
api: 20
<MagicMock name='get_api()' id='140041837108288'>
plist_data: 21
'foo'
Project Name: sensepost+objection
Language: Python
Statement Type: API

Source Code:
def save(args: list) -> None:
    """
        Save the current sessions command history to a file.

        :param args:
        :return:
    """

    if len(args) <= 0:
        click.secho('Usage: commands save <local destination>', bold=True)
        return

    destination = os.path.expanduser(args[0]) if args[0].startswith('~') else args[0]

    with open(destination, 'w') as f:
        for command in app_state.successful_commands:
            f.write('{0}\n'.format(command))

    click.secho('Saved commands to: {0}'.format(destination), fg='green')

save(args=['foo.rc'])

Selected Statement: with open(destination, 'w') as f:

Function Input:
args: foo.rc

Variable Values Before Statement:
destination: 'foo.rc'

Value After Statement Execution: <MagicMock name

Variable States During Runtime (line, value):
args: 1
foo.rc
destination: 13
'foo.rc'
f: 15
<MagicMock name='open().__enter__()' id='140041834114064'>
command: 16
'foo'
16
'bar'
Project Name: sensepost+objection
Language: Python
Statement Type: API

Source Code:
def dump_from_base(args: list) -> None:
    """
        Dump memory from a base address for a specific size to file

        :param args:
        :return:
    """

    if len(clean_argument_flags(args)) < 3:
        click.secho('Usage: memory dump from_base <base_address> <size_to_dump> <local_destination>', bold=True)
        return

    # the destination file to write the dump to
    base_address = args[0]
    memory_size = args[1]
    destination = args[2]

    # Check for file override
    if os.path.exists(destination):
        click.secho('Destination file {dest} already exists'.format(dest=destination), fg='yellow', bold=True)
        if not click.confirm('Override?'):
            return

    click.secho('Dumping {0} from {1} to {2}'.format(sizeof_fmt(int(memory_size)), base_address, destination),
                fg='green', dim=True)

    api = state_connection.get_api()

    # iirc, if you don't cast the return type to a bytearray it uses the sizeof(int) per cell, which is massive
    dump = bytearray()
    chunks = _get_chunks(int(base_address, 16), int(memory_size), BLOCK_SIZE)
    for chunk in chunks:
        dump.extend(bytearray(api.memory_dump(chunk[0], chunk[1])))

    # append the results to the destination file
    with open(destination, 'wb') as f:
        f.write(dump)

    click.secho('Memory dumped to file: {0}'.format(destination), fg='green')

dump_from_base(args=['0x00008000', '200', '/foo'])

Selected Statement: chunks = _get_chunks(int(base_address, 16), int(memory_size), BLOCK_SIZE)

Function Input:
args: 0x00008000, 200, /foo

Variable Values Before Statement:
base_address: '0x00008000'

Value After Statement Execution: [(32768, 200)]

Variable States During Runtime (line, value):
args: 1
0x00008000, 200, /foo
base_address: 14
'0x00008000'
memory_size: 15
'200'
destination: 16
'/foo'
api: 27
<MagicMock name='get_api()' id='140041905169216'>
dump: 30
bytearray(b'')
33
bytearray(b'\x00')
chunks: 31
[(32768, 200)]
chunk: 32
(32768, 200)
f: 36
<MagicMock name='open().__enter__()' id='140041907062336'>
Project Name: sensepost+objection
Language: Python
Statement Type: API

Source Code:
def ios_screenshot(args: list = None) -> None:
    """
        Take an iOS screenshot.

        :param args:
        :return:
    """

    if len(args) <= 0:
        click.secho('Usage: ios ui screenshot <local png destination>', bold=True)
        return

    destination = args[0]

    if not destination.endswith('.png'):
        destination = destination + '.png'

    api = state_connection.get_api()
    png = api.ios_ui_screenshot()

    with open(destination, 'wb') as f:
        f.write(png)

    click.secho('Screenshot saved to: {0}'.format(destination), fg='green')

ios_screenshot(args=['foo'])

Selected Statement: with open(destination, 'wb') as f:

Function Input:
args: foo

Variable Values Before Statement:
destination: 'foo.png'

Value After Statement Execution: <MagicMock name

Variable States During Runtime (line, value):
args: 1
foo
destination: 13
'foo'
16
'foo.png'
api: 18
<MagicMock name='get_api()' id='140041828273504'>
png: 19
b'\x00'
f: 21
<MagicMock name='open().__enter__()' id='140041828431664'>
Project Name: darknessomi+musicbox
Language: Python
Statement Type: API

Source Code:
def aes(text, key):
    pad = 16 - len(text) % 16
    text = text + bytearray([pad] * pad)
    encryptor = AES.new(key, 2, b"0102030405060708")
    ciphertext = encryptor.encrypt(text)
    return base64.b64encode(ciphertext)

aes(text=b'{"ids": [347230, 496619464, 405998841, 28012031], "br": 320000, "csrf_token": ""}', key=b'0CoJUm6Qyw8W8jud')

Selected Statement: pad = 16 - len(text) % 16

Function Input:
text: b'{"ids": [347230, 496619464, 405998841, 28012031], "br": 320000, "csrf_token": ""}'
key: b'0CoJUm6Qyw8W8jud'

Variable Values Before Statement:
text: b'{"ids": [347230, 496619464, 405998841, 28012031], "br": 320000, "csrf_token": ""}'

Value After Statement Execution: 15

Variable States During Runtime (line, value):
text: 1
b'{"ids": [347230, 496619464, 405998841, 28012031], "br": 320000, "csrf_token": ""}'
3
b'{"ids": [347230, 496619464, 405998841, 28012031], "br": 320000, "csrf_token": ""}\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f'
key: 1
b'0CoJUm6Qyw8W8jud'
pad: 2
15
encryptor: 4
{_state=<Cryptodome.Util._raw_api.SmartPointer object at 0x7f925764db80>, block_size=16, iv=b'0102030405060708', IV=b'0102030405060708', _next=[<bound method CbcMode.encrypt of <Cryptodome.Cipher._mode_cbc.CbcMode object at 0x7f925764dd60>>, <bound method CbcMode.decrypt of <Cryptodome.Cipher._mode_cbc.CbcMode object at 0x7f925764dd60>>]}
5
{_state=<Cryptodome.Util._raw_api.SmartPointer object at 0x7f925764db80>, block_size=16, iv=b'0102030405060708', IV=b'0102030405060708', _next=[<bound method CbcMode.encrypt of <Cryptodome.Cipher._mode_cbc.CbcMode object at 0x7f925764dd60>>]}
ciphertext: 5
b'}8(\n\x91;\xe9\xca\x03\x0b+\xc3\xb6\xb5\xef\xc2\x06\x0e\xae?i\xd3\x1d\xd2b\x9d\x1c\xea\x80\xf9v\x1c\xac{\x06\xa2YS*\xfd\xbc\xf6*\x8fZS\x12\xec\xe8yZ\x06\x19d\x96\xb6E`\x11G\x01V\xcf\xa7\xcf\xbd\x90{VxT\xe3\x1c\xc4!\x96,p3\xffK\xc7g\x17\xfc\x0c\x11\xdf\\\xff\xa8\x84,\x85j\x12'
Project Name: darknessomi+musicbox
Language: Python
Statement Type: API

Source Code:
def rsa(text, pubkey, modulus):
    text = text[::-1]
    rs = pow(int(binascii.hexlify(text), 16), int(pubkey, 16), int(modulus, 16))
    return format(rs, "x").zfill(256)

rsa(text=b'8f0f5370d2e586d8', pubkey='010001', modulus='00e0b509f6259df8642dbc35662901477df22677ec152b5ff68ace615bb7b725152b3ab17a876aea8a5aa76d2e417629ec4ee341f56135fccf695280104e0312ecbda92557c93870114af6c9d05c4f7f0c3685b7a46bee255932575cce10b424d813cfe4875d3e82047b97ddef52741d546b8e289dc6935b3ece0462db0a22b8e7')

Selected Statement: rs = pow(int(binascii.hexlify(text), 16), int(pubkey, 16), int(modulus, 16))

Function Input:
text: b'8f0f5370d2e586d8'
pubkey: '010001'
modulus: '00e0b509f6259df8642dbc35662901477df22677ec152b5ff68ace615bb7b725152b3ab17a876aea8a5aa76d2e417629ec4ee341f56135fccf695280104e0312ecbda92557c93870114af6c9d05c4f7f0c3685b7a46bee255932575cce10b424d813cfe4875d3e82047b97ddef52741d546b8e289dc6935b3ece0462db0a22b8e7'

Variable Values Before Statement:
pubkey: '010001'

Value After Statement Execution: 41289025236364532763659893484694654271957746525301846225496173810914971221673940219469794803075175772641409601769538690249948382654879184221263545282891541468281379611086448019401240456345998524768441427254251530526498242614378789439179129682525095499524622736788988351523341804681052326293260583730641212123

Variable States During Runtime (line, value):
text: 1
b'8f0f5370d2e586d8'
2
b'8d685e2d0735f0f8'
pubkey: 1
'010001'
modulus: 1
'00e0b509f6259df8642dbc35662901477df22677ec152b5ff68ace615bb7b725152b3ab17a876aea8a5aa76d2e417629ec4ee341f56135fccf695280104e0312ecbda92557c93870114af6c9d05c4f7f0c3685b7a46bee255932575cce10b424d813cfe4875d3e82047b97ddef52741d546b8e289dc6935b3ece0462db0a22b8e7'
rs: 3
41289025236364532763659893484694654271957746525301846225496173810914971221673940219469794803075175772641409601769538690249948382654879184221263545282891541468281379611086448019401240456345998524768441427254251530526498242614378789439179129682525095499524622736788988351523341804681052326293260583730641212123
Project Name: chubin+cheat.sh
Language: Python
Statement Type: API

Source Code:
def __setitem__(self, key, val):
        if key.startswith('path.') and not val.startswith('/'):
            val = self._absolute_path(val)
        dict.__setitem__(self, key, val)

__setitem__(self={}, key='path.workdir', val='/home/jinjun/.cheat.sh')

Selected Statement: dict.__setitem__(self, key, val)

Function Input:
key: 'path.workdir'
val: '/home/jinjun/.cheat.sh'

Variable Values Before Statement:
key: 'path.workdir'
val: '/home/jinjun/.cheat.sh'

Value After Statement Execution: '/home/jinjun/.cheat.sh'

Variable States During Runtime (line, value):
self: 1
4
path.workdir: /home/jinjun/.cheat.sh
key: 1
'path.workdir'
val: 1
'/home/jinjun/.cheat.sh'
self['path.workdir']: 4
'/home/jinjun/.cheat.sh'
Project Name: Lightning-AI+lit-gpt
Language: Python
Statement Type: API

Source Code:
def layer_template(layer_name: str, idx: int) -> Tuple[str, int]:
    split = layer_name.split(".")
    number = int(split[idx])
    split[idx] = "{}"
    from_name = ".".join(split)
    return from_name, number

layer_template(layer_name='model.layers.0.self_attn.q_proj.weight', idx=2)

Selected Statement: from_name = ".".join(split)

Function Input:
layer_name: 'model.layers.0.self_attn.q_proj.weight'
idx: 2

Variable Values Before Statement:
split: model
layers
self_attn
q_proj
weight

Value After Statement Execution: 'model.layers.{}.self_attn.q_proj.weight'

Variable States During Runtime (line, value):
layer_name: 1
'model.layers.0.self_attn.q_proj.weight'
idx: 1
2
split: 2
model, layers, 0, self_attn, q_proj, weight
4
model
layers
self_attn
q_proj
weight
number: 3
0
from_name: 5
'model.layers.{}.self_attn.q_proj.weight'
Project Name: Lightning-AI+lit-gpt
Language: Python
Statement Type: API

Source Code:
def test_generate(monkeypatch, generated, stop_tokens, expected):
    import chat.base as chat
    import generate.base as generate

    input_idx = torch.tensor([5, 3])
    max_returned_tokens = len(input_idx) + 8
    model = MagicMock()
    model.config.block_size = 100
    model.max_seq_length = 100
    it = iter(generated)

    def multinomial(*_, **__):
        out = next(it)
        return torch.tensor([out])

    monkeypatch.setattr(generate, "multinomial_num_samples_1", multinomial)
    actual = chat.generate(model, input_idx, max_returned_tokens, stop_tokens=stop_tokens)
    actual = list(actual)

    assert len(actual) == len(expected)
    if not actual:
        assert actual == expected
    else:
        for t in actual:
            assert t.dtype == torch.long
        assert torch.cat(actual).tolist() == expected

test_generate(monkeypatch={_setattr=[], _setitem=[], _cwd=None, _savesyspath=None}, generated=repeat(1), stop_tokens=(), expected=[1, 1, 1, 1, 1, 1, 1, 1])

Selected Statement: assert torch.cat(actual).tolist() == expected

Function Input:
monkeypatch: {_setattr=[], _setitem=[], _cwd=None, _savesyspath=None}
generated: repeat(1)
stop_tokens: ()
expected: [1, 1, 1, 1, 1, 1, 1, 1]

Variable Values Before Statement:
actual: [tensor([1]), tensor([1]), tensor([1]), tensor([1]), tensor([1]), tensor([1]), tensor([1]), tensor([1])]

Value After Statement Execution: None

Variable States During Runtime (line, value):
monkeypatch: 1
{_setattr=[], _setitem=[], _cwd=None, _savesyspath=None}
16
{_setattr=[(<module 'generate.base' from '/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/Lightning-AI+lit-gpt/Lightning-AI+lit-gpt/generate/base.py'>, 'multinomial_num_samples_1', <function multinomial_num_samples_1 at 0x7f805238a160>)], _setitem=[], _cwd=None, _savesyspath=None}
generated: 1
repeat(1)
stop_tokens: 1
()
expected: 1
[1, 1, 1, 1, 1, 1, 1, 1]
chat: 2
<module 'chat.base' from '/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/Lightning-AI+lit-gpt/Lightning-AI+lit-gpt/chat/base.py'>
generate: 3
<module 'generate.base' from '/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/Lightning-AI+lit-gpt/Lightning-AI+lit-gpt/generate/base.py'>
input_idx: 5
tensor([5, 3])
max_returned_tokens: 6
10
model: 7
<MagicMock id='140188337253248'>
it: 10
repeat(1)
multinomial: 12
<function test_generate.<locals>.multinomial at 0x7f7fd0f7e430>
actual: 17
<generator object generate at 0x7f803c55ff90>
18
[tensor([1]), tensor([1]), tensor([1]), tensor([1]), tensor([1]), tensor([1]), tensor([1]), tensor([1])]
@py_assert2: 20
None
@py_assert7: 20
None
@py_assert4: 20
None
t: 24
tensor([1])
@py_assert1: 25
None
@py_assert5: 25
None
@py_assert3: 25
None
@py_assert6: 26
None
@py_assert8: 26
None
@py_assert10: 26
None
Project Name: burnash+gspread
Language: Python
Statement Type: API

Source Code:
def rowcol_to_a1(row, col):
    """Translates a row and column cell address to A1 notation.

    :param row: The row of the cell to be converted.
        Rows start at index 1.
    :type row: int, str

    :param col: The column of the cell to be converted.
        Columns start at index 1.
    :type row: int, str

    :returns: a string containing the cell's coordinates in A1 notation.

    Example:

    >>> rowcol_to_a1(1, 1)
    A1

    """
    row = int(row)
    col = int(col)

    if row < 1 or col < 1:
        raise IncorrectCellLabel("({}, {})".format(row, col))

    div = col
    column_label = ""

    while div:
        (div, mod) = divmod(div, 26)
        if mod == 0:
            mod = 26
            div -= 1
        column_label = chr(mod + MAGIC_NUMBER) + column_label

    label = "{}{}".format(column_label, row)

    return label

rowcol_to_a1(row=4, col=4)

Selected Statement: (div, mod) = divmod(div, 26)

Function Input:
row: 4
col: 4

Variable Values Before Statement:
div: 4

Value After Statement Execution: 4

Variable States During Runtime (line, value):
row: 1
4
col: 1
4
div: 26
4
30
0
column_label: 27
''
34
'D'
mod: 30
4
label: 36
'D4'
Project Name: burnash+gspread
Language: Python
Statement Type: API

Source Code:
def a1_to_rowcol(label):
    """Translates a cell's address in A1 notation to a tuple of integers.

    :param str label: A cell label in A1 notation, e.g. 'B1'.
        Letter case is ignored.
    :returns: a tuple containing `row` and `column` numbers. Both indexed
              from 1 (one).
    :rtype: tuple

    Example:

    >>> a1_to_rowcol('A1')
    (1, 1)

    """
    m = CELL_ADDR_RE.match(label)
    if m:
        column_label = m.group(1).upper()
        row = int(m.group(2))

        col = 0
        for i, c in enumerate(reversed(column_label)):
            col += (ord(c) - MAGIC_NUMBER) * (26**i)
    else:
        raise IncorrectCellLabel(label)

    return (row, col)

a1_to_rowcol(label='B1')

Selected Statement: m = CELL_ADDR_RE.match(label)

Function Input:
label: 'B1'

Variable Values Before Statement:
label: 'B1'

Value After Statement Execution: <re.Match object; span

Variable States During Runtime (line, value):
label: 1
'B1'
m: 16
<re.Match object; span=(0, 2), match='B1'>
column_label: 18
'B'
row: 19
1
col: 21
0
23
2
i: 22
0
c: 22
'B'
Project Name: burnash+gspread
Language: Python
Statement Type: API

Source Code:
def _a1_to_rowcol_unbounded(label):
    """Translates a cell's address in A1 notation to a tuple of integers.

    Same as `a1_to_rowcol()` but allows for missing row or column part
    (e.g. "A" for the first column)

    :returns: a tuple containing `row` and `column` numbers. Both indexed
        from 1 (one).
    :rtype: tuple

    Example:

    >>> _a1_to_rowcol_unbounded('A1')
    (1, 1)

    >>> _a1_to_rowcol_unbounded('A')
    (inf, 1)

    >>> _a1_to_rowcol_unbounded('1')
    (1, inf)

    >>> _a1_to_rowcol_unbounded('ABC123')
    (123, 731)

    >>> _a1_to_rowcol_unbounded('ABC')
    (inf, 731)

    >>> _a1_to_rowcol_unbounded('123')
    (123, inf)

    >>> _a1_to_rowcol_unbounded('1A')
    Traceback (most recent call last):
        ...
    gspread.exceptions.IncorrectCellLabel: 1A

    >>> _a1_to_rowcol_unbounded('')
    (inf, inf)

    """
    m = A1_ADDR_ROW_COL_RE.match(label)
    if m:
        column_label, row = m.groups()

        if column_label:
            col = 0
            for i, c in enumerate(reversed(column_label.upper())):
                col += (ord(c) - MAGIC_NUMBER) * (26**i)
        else:
            col = inf

        if row:
            row = int(row)
        else:
            row = inf
    else:
        raise IncorrectCellLabel(label)

    return (row, col)

_a1_to_rowcol_unbounded(label='A1')

Selected Statement: col += (ord(c) - MAGIC_NUMBER) * (26**i)

Function Input:
label: 'A1'

Variable Values Before Statement:
c: 'A'

Value After Statement Execution: 1

Variable States During Runtime (line, value):
label: 1
'A1'
m: 40
<re.Match object; span=(0, 2), match='A1'>
column_label: 42
'A'
row: 42
'1'
52
1
col: 45
0
47
1
i: 46
0
c: 46
'A'
Project Name: berkeleylab+als.milo
Language: Python
Statement Type: API

Source Code:
def render_pep440_feature(pieces):
    """Build up version string, used within "feature" branch of repository.

    Our goal: MERGE-POINT.post.devN+gHEX.BRANCH-NAME.M[.dirty]
        +) MERGE-POINT = Most recent common ancestor for `develop` and `master`
          *) Does not yet handle branch from `release-*`
        +) N = DISTANCE from the MERGE-POINT of `develop` and `master`
        +) M = DISTANCE from the MERGE-POINT of "feature" and `develop`

    Exceptions:
    1: no tags. 0.post.devDISTANCE+gHEX[.dirty]
    """
    if pieces["closest-tag"] and pieces["develop"]:
        rendered = pieces["closest-tag"]
        distance_to_develop = pieces["distance-to-develop"]
        distance_to_merge = pieces["distance-to-master"]
        distance_merge_to_tag = (pieces["distance"] - distance_to_merge)
        distance_dev_to_merge = (distance_to_merge - distance_to_develop)
        if (distance_merge_to_tag > 0):
            rendered += ".%d" % distance_merge_to_tag
        rendered += ".post.dev%d" % distance_dev_to_merge
        rendered += plus_or_dot(pieces)
        rendered += "g%s" % pieces["short"]
        rendered += ".%s" % pieces["branch"]
        rendered += ".%d" % distance_to_develop
    else:
        # exception #1
        rendered = "0.post.dev%d" % (pieces["distance"] - 1)
        rendered += plus_or_dot(pieces)
        rendered += "g%s" % pieces["short"]
    if pieces["dirty"]:
        rendered += ".dirty"
    return rendered

render_pep440_feature(pieces={'long': 'e60d005d389cb31b6e99f937e35adbe3fccb7aaf', 'short': 'e60d005', 'error': None, 'dirty': False, 'closest-tag': '0.8', 'distance': 3, 'branch': 'HEAD', 'distance-to-master': 0, 'develop': None, 'distance-to-develop': None, 'date': '2018-05-05T22:17:58-0700', 'authors': ['Padraic Shafer']})

Selected Statement: rendered += plus_or_dot(pieces)

Function Input:
pieces: {'long': 'e60d005d389cb31b6e99f937e35adbe3fccb7aaf', 'short': 'e60d005', 'error': None, 'dirty': False, 'closest-tag': '0.8', 'distance': 3, 'branch': 'HEAD', 'distance-to-master': 0, 'develop': None, 'distance-to-develop': None, 'date': '2018-05-05T22:17:58-0700', 'authors': ['Padraic Shafer']}

Variable Values Before Statement:
pieces: {'long': 'e60d005d389cb31b6e99f937e35adbe3fccb7aaf', 'short': 'e60d005', 'error': None, 'dirty': False, 'closest-tag': '0.8', 'distance': 3, 'branch': 'HEAD', 'distance-to-master': 0, 'develop': None, 'distance-to-develop': None, 'date': '2018-05-05T22:17:58-0700', 'authors': ['Padraic Shafer']}

Value After Statement Execution: '0.post.dev2+'

Variable States During Runtime (line, value):
pieces: 1
{'long': 'e60d005d389cb31b6e99f937e35adbe3fccb7aaf', 'short': 'e60d005', 'error': None, 'dirty': False, 'closest-tag': '0.8', 'distance': 3, 'branch': 'HEAD', 'distance-to-master': 0, 'develop': None, 'distance-to-develop': None, 'date': '2018-05-05T22:17:58-0700', 'authors': ['Padraic Shafer']}
rendered: 28
'0.post.dev2'
29
'0.post.dev2+'
30
'0.post.dev2+ge60d005'
Project Name: Cjkkkk+Pyflow
Language: Python
Statement Type: API

Source Code:
def compute_loc(idx, shape):
    loc = [0] * len(shape)
    for i in range(len(shape)):
        prod = int(np.prod(shape[i + 1:]))
        loc[i] = idx // prod
        idx = idx % prod
    return tuple(loc)

compute_loc(idx=0, shape=(2, 4))

Selected Statement: loc = [0] * len(shape)

Function Input:
idx: 0
shape: (2, 4)

Variable Values Before Statement:
shape: (2, 4)

Value After Statement Execution: [0, 0]

Variable States During Runtime (line, value):
idx: 1
0
shape: 1
(2, 4)
loc: 2
[0, 0]
i: 3
0
3
1
prod: 4
4
4
1
Project Name: alisaifee+pyutrack
Language: Python
Statement Type: API

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