MonoshiTonmoy/Code_Statement_Prediction_Dataset huggingface dataset:
Project Name: Kinto+kinto
Language: Python
Statement Type: API

Source Code:
def hmac_digest(secret, message, encoding="utf-8"):
    """Return hex digest of a message HMAC using secret"""
    if isinstance(secret, str):
        secret = secret.encode(encoding)
    return hmac.new(secret, message.encode(encoding), hashlib.sha256).hexdigest()

hmac_digest(secret='secret_hmac_for_userids', message='mat:secret', encoding='utf-8')

Selected Statement: secret = secret.encode(encoding)

Function Input:
secret: 'secret_hmac_for_userids'
message: 'mat:secret'
encoding: 'utf-8'

Variable Values Before Statement:
encoding: 'utf-8'

Value After Statement Execution: b'secret_hmac_for_userids'

Variable States During Runtime (line, value):
secret: 1
'secret_hmac_for_userids'
4
b'secret_hmac_for_userids'
message: 1
'mat:secret'
encoding: 1
'utf-8'
Project Name: jaakkopasanen+AutoEq
Language: Python
Statement Type: API

Source Code:
def parse_csv(csv):
    lines = csv.strip().split('\n')
    lines = [line for line in lines if line.strip()]
    csv = '\n'.join(lines)
    if autoeq_pattern.match(csv):  # Matches AutoEq produced CSV files
        columns = lines[0].split(',')
        return {column: [float(line.split(',')[i]) for line in lines[1:]] for i, column in enumerate(columns)}

    if rew_pattern.match(csv) or crinacle_pattern.match(csv):
        # These two have all sort of junk in them but the first column is frequency and the second SPL, so all good
        csv = '\n'.join([re.sub(r'(?:, ?| |\t)', '\t', line) for line in lines if numeric_start.match(line) and '?' not in line])
        lines = csv.split('\n')

    column_separator, decimal_separator = find_csv_separators(csv)
    columns = find_csv_columns(csv, column_separator)

    # Find indexes of frequency and raw columns
    if columns is None:
        # No header, assume first column is frequency and the second is SPL
        ixs = {'frequency': 0, 'raw': 1}
    else:
        ixs = {'frequency': None, 'raw': None}
        for i, column in enumerate(columns):
            if re.match(r'^freq', column, flags=re.IGNORECASE):
                ixs['frequency'] = i
            if re.match(r'^(?:spl|gain|ampl|raw)', column, flags=re.IGNORECASE):
                ixs['raw'] = i
        if ixs['frequency'] is None:
            if len(columns) == 2:  # Can't find proper columns but there's only two, assuming freq + raw
                ixs = {'frequency': 0, 'raw': 1}
            else:
                raise CsvParseError('Failed to find frequency column')
        if ixs['raw'] is None:
            raise CsvParseError('Failed to find SPL column')

    # Read and parse data lines
    data_line_pattern = re.compile(rf'^-?\d+(?:{column_separator}\d+)?')
    data = {'frequency': [], 'raw': []}
    for line in lines:
        if not data_line_pattern.match(line):
            continue
        cells = line.split(column_separator)
        if decimal_separator == ',':
            cells = [float(cell.replace(',', '.')) for cell in cells]
        else:
            cells = [float(cell) for cell in cells]
        for column, ix in ixs.items():
            data[column].append(cells[ix])
    return data

parse_csv(csv='frequency,raw\n20,0\n1000,3\n20000,0\n')

Selected Statement: csv = '\n'.join(lines)

Function Input:
csv: 'frequency,raw\n20,0\n1000,3\n20000,0\n'

Variable Values Before Statement:
lines: frequency,raw, 20,0, 1000,3, 20000,0

Value After Statement Execution: 'frequency,raw\n20,0\n1000,3\n20000,0'

Variable States During Runtime (line, value):
csv: 1
'frequency,raw\n20,0\n1000,3\n20000,0\n'
4
'frequency,raw\n20,0\n1000,3\n20000,0'
lines: 2
frequency,raw, 20,0, 1000,3, 20000,0
columns: 6
frequency, raw
Project Name: chen0040+pyalgs
Language: Python
Statement Type: API

Source Code:
def _sort(a, aux, lo, hi):
        if lo >= hi:
            return

        if hi - lo + 1 < MergeSort.CUTOFF:
            InsertionSort.sort(a, lo, hi)
            return

        mid = lo + (hi - lo) // 2
        MergeSort._sort(a, aux, lo, mid)
        MergeSort._sort(a, aux, mid + 1, hi)
        MergeSort._merge(a, aux, lo, mid, hi)

_sort(a=[4, 2, 1, 23, 4, 5, 6, 7, 8, 9, 20, 11, 13, 34, 66], aux=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], lo=0, hi=7)

Selected Statement: MergeSort._merge(a, aux, lo, mid, hi)

Function Input:
a: [4, 2, 1, 23, 4, 5, 6, 7, 8, 9, 20, 11, 13, 34, 66]
aux: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
lo: 0
hi: 7

Variable Values Before Statement:
a: [1, 2, 4, 4, 5, 6, 7, 23, 8, 9, 20, 11, 13, 34, 66]
aux: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
lo: 0
mid: 3
hi: 7

Value After Statement Execution: [1, 2, 4, 4, 5, 6, 7, 23, 0, 0, 0, 0, 0, 0, 0]

Variable States During Runtime (line, value):
a: 1
[4, 2, 1, 23, 4, 5, 6, 7, 8, 9, 20, 11, 13, 34, 66]
10
[1, 2, 4, 23, 4, 5, 6, 7, 8, 9, 20, 11, 13, 34, 66]
11
[1, 2, 4, 4, 5, 6, 7, 23, 8, 9, 20, 11, 13, 34, 66]
aux: 1
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
12
[1, 2, 4, 4, 5, 6, 7, 23, 0, 0, 0, 0, 0, 0, 0]
lo: 1
0
hi: 1
7
mid: 9
3
Project Name: chen0040+pyalgs
Language: Python
Statement Type: API

Source Code:
def partition(a, lo, hi):
        i = lo
        j = hi

        while True:
            while not util.less(a[lo], a[i]):
                i += 1
                if i >= hi:
                    break

            while util.less(a[lo], a[j]):
                j -= 1
                if j <= lo:
                    break

            if i >= j:
                break

            util.exchange(a, i, j)

        util.exchange(a, lo, j)
        return j

partition(a=[4, 2, 1, 23, 4, 5, 6, 7, 8, 9, 20, 11, 13, 34, 66], lo=0, hi=14)

Selected Statement: util.exchange(a, i, j)

Function Input:
a: [4, 2, 1, 23, 4, 5, 6, 7, 8, 9, 20, 11, 13, 34, 66]
lo: 0
hi: 14

Variable Values Before Statement:
a: [4, 2, 1, 23, 4, 5, 6, 7, 8, 9, 20, 11, 13, 34, 66]
i: 4
j: 3

Value After Statement Execution: [4, 2, 1, 4, 23, 5, 6, 7, 8, 9, 20, 11, 13, 34, 66]

Variable States During Runtime (line, value):
a: 1
[4, 2, 1, 23, 4, 5, 6, 7, 8, 9, 20, 11, 13, 34, 66]
19
[4, 2, 1, 4, 23, 5, 6, 7, 8, 9, 20, 11, 13, 34, 66]
lo: 1
0
hi: 1
14
i: 2
0
7
1
7
2
7
3
7
4
j: 3
14
12
13
12
12
12
11
12
10
12
9
12
8
12
7
12
6
12
5
12
4
12
3
Project Name: lra+mackup
Language: Python
Statement Type: API

Source Code:
def get_google_drive_folder_location():
    """
    Try to locate the Google Drive folder.

    Returns:
        (str) Full path to the current Google Drive folder
    """
    gdrive_db_path = "Library/Application Support/Google/Drive/sync_config.db"
    yosemite_gdrive_db_path = (
        "Library/Application Support/Google/Drive/" "user_default/sync_config.db"
    )
    yosemite_gdrive_db = os.path.join(os.environ["HOME"], yosemite_gdrive_db_path)
    if os.path.isfile(yosemite_gdrive_db):
        gdrive_db_path = yosemite_gdrive_db

    googledrive_home = None

    gdrive_db = os.path.join(os.environ["HOME"], gdrive_db_path)
    if os.path.isfile(gdrive_db):
        con = sqlite3.connect(gdrive_db)
        if con:
            cur = con.cursor()
            query = (
                "SELECT data_value "
                "FROM data "
                "WHERE entry_key = 'local_sync_root_path';"
            )
            cur.execute(query)
            data = cur.fetchone()
            googledrive_home = str(data[0])
            con.close()

    if not googledrive_home:
        error(
            constants.ERROR_UNABLE_TO_FIND_STORAGE.format(
                provider="Google Drive install"
            )
        )

    return googledrive_home

get_google_drive_folder_location()

Selected Statement: con = sqlite3.connect(gdrive_db)

Function Input:

Variable Values Before Statement:
gdrive_db: '/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/lra+mackup/lra+mackup/tests/fixtures/Library/Application Support/Google/Drive/sync_config.db'

Value After Statement Execution: REPR FAILED

Variable States During Runtime (line, value):
gdrive_db_path: 8
'Library/Application Support/Google/Drive/sync_config.db'
yosemite_gdrive_db_path: 9
'Library/Application Support/Google/Drive/user_default/sync_config.db'
yosemite_gdrive_db: 12
'/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/lra+mackup/lra+mackup/tests/fixtures/Library/Application Support/Google/Drive/user_default/sync_config.db'
googledrive_home: 16
None
30
'/Users/whatever/Google Drive'
gdrive_db: 18
'/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/lra+mackup/lra+mackup/tests/fixtures/Library/Application Support/Google/Drive/sync_config.db'
con: 20
REPR FAILED
cur: 22
REPR FAILED
query: 23
"SELECT data_value FROM data WHERE entry_key = 'local_sync_root_path';"
data: 29
('/Users/whatever/Google Drive',)
Project Name: lra+mackup
Language: Python
Statement Type: API

Source Code:
def can_file_be_synced_on_current_platform(path):
    """
    Check if the given path can be synced locally.

    Check if it makes sense to sync the file at the given path on the current
    platform.
    For now we don't sync any file in the ~/Library folder on GNU/Linux.
    There might be other exceptions in the future.

    Args:
        (str): Path to the file or folder to check. If relative, prepend it
               with the home folder.
               'abc' becomes '~/abc'
               '/def' stays '/def'

    Returns:
        (bool): True if given file can be synced
    """
    can_be_synced = True

    # If the given path is relative, prepend home
    fullpath = os.path.join(os.environ["HOME"], path)

    # Compute the ~/Library path on macOS
    # End it with a slash because we are looking for this specific folder and
    # not any file/folder named LibrarySomething
    library_path = os.path.join(os.environ["HOME"], "Library/")

    if platform.system() == constants.PLATFORM_LINUX:
        if fullpath.startswith(library_path):
            can_be_synced = False

    return can_be_synced

can_file_be_synced_on_current_platform(path='some/file')

Selected Statement: fullpath = os.path.join(os.environ["HOME"], path)

Function Input:
path: 'some/file'

Variable Values Before Statement:
path: 'some/file'

Value After Statement Execution: '/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/lra+mackup/lra+mackup/tests/fixtures/some/file'

Variable States During Runtime (line, value):
path: 1
'some/file'
can_be_synced: 19
True
fullpath: 22
'/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/lra+mackup/lra+mackup/tests/fixtures/some/file'
library_path: 27
'/local/rcs/jinjun/code/pytrace-collector/logs/self_collected/tried/lra+mackup/lra+mackup/tests/fixtures/Library/'
Project Name: cyril-s+aptly-ctl
Language: Python
Statement Type: API

Source Code:
def _compare_parts(self, a, b, decimal):
        if decimal:
            if a == "": a = "0"
            if b == "": b = "0"
            return int(a) - int(b)
        else:
            i = 0
            while i < (min(len(a), len(b)) + 1):
                res = self._order(self._get_empty_str_on_index_error(a, i)) \
                        - self._order(self._get_empty_str_on_index_error(b, i))
                if res != 0:
                    return res
                i += 1
            else:
                return 0

_compare_parts(self=2.2.0~rc5, a='', b='', decimal=False, self.epoch=0, self.revision='0', self.revision_allowed_chars=('.', '+', '~'), self.upstream_version='2.2.0~rc5', self.upstream_version_allowed_chars=('.', '+', '~', '-', ':'), self.version='2.2.0~rc5')

Selected Statement: res = self._order(self._get_empty_str_on_index_error(a, i)) \

Function Input:
self: 2.2.0~rc5
a: ''
b: ''
decimal: False
self.epoch: 0
self.revision: '0'
self.revision_allowed_chars: ('.', '+', '~')
self.upstream_version: '2.2.0~rc5'
self.upstream_version_allowed_chars: ('.', '+', '~', '-', ':')
self.version: '2.2.0~rc5'

Variable Values Before Statement:
a: ''
i: 0

Value After Statement Execution: 0

Variable States During Runtime (line, value):
self: 1
2.2.0~rc5
a: 1
''
b: 1
''
decimal: 1
False
self.epoch: 1
0
self.revision: 1
'0'
self.revision_allowed_chars: 1
('.', '+', '~')
self.upstream_version: 1
'2.2.0~rc5'
self.upstream_version_allowed_chars: 1
('.', '+', '~', '-', ':')
self.version: 1
'2.2.0~rc5'
i: 7
0
13
1
res: 9
0
Project Name: combatopera+aridity
Language: Python
Statement Type: API

Source Code:
def getorcreatesubcontext(self, path):
        for name in path:
            that = self.resolvables.get(name)
            if that is None:
                self.resolvables[name] = that = Context(self)
            self = that
        return self

getorcreatesubcontext(self=Context(SuperContext(), False), path=('woo',), self.islist=False, self.parent=SuperContext(), self.resolvables=OrderedDict())

Selected Statement: self.resolvables[name] = that = Context(self)

Function Input:
self: Context(SuperContext(), False)
path: ('woo',)
self.islist: False
self.parent: SuperContext()
self.resolvables: OrderedDict()

Variable Values Before Statement:
self: Context(SuperContext(), False)

Value After Statement Execution: Context(Context(SuperContext(), False), False)

Variable States During Runtime (line, value):
self: 1
Context(SuperContext(), False)
6
Context(Context(SuperContext(), False), False)
path: 1
('woo',)
self.islist: 1
False
self.parent: 1
SuperContext()
6
Context(SuperContext(), False)
self.resolvables: 1
OrderedDict()
5
OrderedDict([('woo', Context(Context(SuperContext(), False), False))])
6
OrderedDict()
name: 2
'woo'
that: 3
None
5
Context(Context(SuperContext(), False), False)
Project Name: combatopera+aridity
Language: Python
Statement Type: API

Source Code:
def execute(self, entry):
        directives = []
        for i, word in enumerate(entry.words()):
            def append(resolvable):
                directives.append((resolvable.directivevalue, i))
                raise self.Enough
            try:
                self.getresolvables(word.cat(), append)
            except (AttributeError, CatNotSupportedException, self.Enough):
                pass
        if 1 != len(directives):
            raise UnsupportedEntryException("Expected 1 directive but %s found: %s" % (directives, entry))
        d, i = directives[0]
        d(entry.subentry(0, i), entry.phrase(i + 1), self)

execute(self=Context(SuperContext(), False), entry=Entry([Text('ns'), Text('woo'), Blank(' '), Text('='), Blank(' '), Text('yay')]), self.islist=False, self.parent=SuperContext(), self.resolvables=OrderedDict([('here', Text('/tmp'))]))

Selected Statement: d(entry.subentry(0, i), entry.phrase(i + 1), self)

Function Input:
self: Context(SuperContext(), False)
entry: Entry([Text('ns'), Text('woo'), Blank(' '), Text('='), Blank(' '), Text('yay')])
self.islist: False
self.parent: SuperContext()
self.resolvables: OrderedDict([('here', Text('/tmp'))])

Variable Values Before Statement:
i: 2

Value After Statement Execution: OrderedDict([('here', Text('/tmp')), ('ns', Context(Context(SuperContext(), False), False))])

Variable States During Runtime (line, value):
self: 1
Context(SuperContext(), False)
entry: 1
Entry([Text('ns'), Text('woo'), Blank(' '), Text('='), Blank(' '), Text('yay')])
self.islist: 1
False
self.parent: 1
SuperContext()
self.resolvables: 1
OrderedDict([('here', Text('/tmp'))])
14
OrderedDict([('here', Text('/tmp')), ('ns', Context(Context(SuperContext(), False), False))])
directives: 2
8
[(<aridimpl.directives.Equals object at 0x7fe13ba8cd60>, 2)]
word: 3
Text('ns')
3
Text('woo')
3
Text('=')
3
Text('yay')
i: 3
0
3
1
3
2
3
3
13
2
append: 4
<function AbstractContext.execute.<locals>.append at 0x7fe139b030d0>
4
<function AbstractContext.execute.<locals>.append at 0x7fe139c4a790>
4
<function AbstractContext.execute.<locals>.append at 0x7fe139b035e0>
4
<function AbstractContext.execute.<locals>.append at 0x7fe139c4a790>
d: 13
Project Name: google+flax
Language: Python
Statement Type: API

Source Code:
def static_bool_env(varname: str, default: bool) -> bool:
  """Read an environment variable and interpret it as a boolean.

  This is deprecated. Please use bool_flag() unless your flag
  will be used in a static method and does not require runtime updates.

  True values are (case insensitive): 'y', 'yes', 't', 'true', 'on', and '1';
  false values are 'n', 'no', 'f', 'false', 'off', and '0'.
  Args:
    varname: the name of the variable
    default: the default boolean value
  Returns:
    boolean return value derived from defaults and environment.
  Raises: ValueError if the environment variable is anything else.
  """
  val = os.getenv(varname, str(default))
  val = val.lower()
  if val in ('y', 'yes', 't', 'true', 'on', '1'):
    return True
  elif val in ('n', 'no', 'f', 'false', 'off', '0'):
    return False
  else:
    raise ValueError(
      'invalid truth value {!r} for environment {!r}'.format(val, varname)
    )

static_bool_env(varname='FLAX_LAZY_RNG', default=True)

Selected Statement: val = os.getenv(varname, str(default))

Function Input:
varname: 'FLAX_LAZY_RNG'
default: True

Variable Values Before Statement:
varname: 'FLAX_LAZY_RNG'

Value After Statement Execution: 'True'

Variable States During Runtime (line, value):
varname: 1
'FLAX_LAZY_RNG'
default: 1
True
val: 16
'True'
17
'true'
Project Name: JGoutin+rfs
Language: Python
Statement Type: API

Source Code:
def splitdrive(path):
    """
    Split the path into a pair (drive, tail) where drive is either a
    mount point or the empty string. On systems which do not use drive
    specifications, drive will always be the empty string.

    In all cases, drive + tail will be the same as path.

    Equivalent to "os.path.splitdrive".

    Args:
        path (path-like object): Path or URL.

    Returns:
        tuple of str: drive, tail.
    """
    relative = get_instance(path).relpath(path)
    drive = path.rsplit(relative, 1)[0]
    if drive and not drive[-2:] == '//':
        # Keep "/" tail side
        relative = '/' + relative
        drive = drive.rstrip('/')
    return drive, relative

splitdrive(path='dummy://dir1/dir2/dir3')

Selected Statement: relative = get_instance(path).relpath(path)

Function Input:
path: 'dummy://dir1/dir2/dir3'

Variable Values Before Statement:
path: 'dummy://dir1/dir2/dir3'

Value After Statement Execution: 'dir1/dir2/dir3'

Variable States During Runtime (line, value):
path: 1
'dummy://dir1/dir2/dir3'
relative: 17
'dir1/dir2/dir3'
drive: 18
'dummy://'
Project Name: JGoutin+rfs
Language: Python
Statement Type: API

Source Code:
def _copy(src, dst, src_is_storage, dst_is_storage):
    """
    Copies file from source to destination

    Args:
        src (str or file-like object): Source file.
        dst (str or file-like object): Destination file.
        src_is_storage (bool): Source is storage.
        dst_is_storage (bool): Destination is storage.
    """
    # If both storage: Tries to perform same storage direct copy
    if src_is_storage and dst_is_storage:
        system = get_instance(src)
        if system is get_instance(dst):

            # Checks if same file
            if system.relpath(src) == system.relpath(dst):
                raise same_file_error(
                    "'%s' and '%s' are the same file" % (src, dst))

            # Tries to copy
            try:
                return system.copy(src, dst)
            except (UnsupportedOperation, ObjectException):
                pass

    # At least one storage object: copies streams
    with cos_open(src, 'rb') as fsrc:
        with cos_open(dst, 'wb') as fdst:

            # Get stream buffer size
            for stream in (fdst, fsrc):
                try:
                    buffer_size = getattr(stream, '_buffer_size')
                    break
                except AttributeError:
                    continue
            else:
                buffer_size = 16384

            # Read and write
            copyfileobj(fsrc, fdst, buffer_size)

_copy(src='dummy_read://file.txt', dst='/tmp/pytest-of-jinjun/pytest-198/test_cos_open0/file_dst.txt', src_is_storage=True, dst_is_storage=False)

Selected Statement: with cos_open(dst, 'wb') as fdst:

Function Input:
src: 'dummy_read://file.txt'
dst: '/tmp/pytest-of-jinjun/pytest-198/test_cos_open0/file_dst.txt'
src_is_storage: True
dst_is_storage: False

Variable Values Before Statement:
dst: '/tmp/pytest-of-jinjun/pytest-198/test_cos_open0/file_dst.txt'

Value After Statement Execution: <_io.BufferedWriter name

Variable States During Runtime (line, value):
src: 1
'dummy_read://file.txt'
dst: 1
'/tmp/pytest-of-jinjun/pytest-198/test_cos_open0/file_dst.txt'
src_is_storage: 1
True
dst_is_storage: 1
False
fsrc: 28
fdst: 29
<_io.BufferedWriter name='/tmp/pytest-of-jinjun/pytest-198/test_cos_open0/file_dst.txt'>
stream: 32
<_io.BufferedWriter name='/tmp/pytest-of-jinjun/pytest-198/test_cos_open0/file_dst.txt'>
32
buffer_size: 39
16384
Project Name: JGoutin+rfs
Language: Python
Statement Type: API

Source Code:
def _getmtime_from_header(header):
        """
        Return the time from header

        Args:
            header (dict): Object header.

        Returns:
            float: The number of seconds since the epoch
        """
        # By default, assumes that information are in a standard HTTP header
        for key in ('Last-Modified', 'last-modified'):
            try:
                return mktime(parsedate(header.pop(key)))
            except KeyError:
                continue
        else:
            raise UnsupportedOperation('getmtime')

_getmtime_from_header(header={'Accept-Ranges': 'bytes', 'Content-Length': '100', 'Last-Modified': 'Wed, 03 Apr 2024 20:18:10 GMT'})

Selected Statement: return mktime(parsedate(header.pop(key)))

Function Input:
header: Accept-Ranges: bytes
Content-Length: 100
Last-Modified: Wed, 03 Apr 2024 20:18:10 GMT

Variable Values Before Statement:
key: 'Last-Modified'

Value After Statement Execution: Accept-Ranges: bytes
Content-Length: 100

Variable States During Runtime (line, value):
header: 1
Accept-Ranges: bytes
Content-Length: 100
Last-Modified: Wed, 03 Apr 2024 20:18:10 GMT
14
Accept-Ranges: bytes
Content-Length: 100
key: 12
'Last-Modified'
Project Name: JGoutin+rfs
Language: Python
Statement Type: API

Source Code:
def _getsize_from_header(header):
        """
        Return the size from header

        Args:
            header (dict): Object header.

        Returns:
            int: Size in bytes.
        """
        # By default, assumes that information are in a standard HTTP header
        for key in ('Content-Length', 'content-length'):
            try:
                return int(header.pop(key))
            except KeyError:
                continue
        else:
            raise UnsupportedOperation('getsize')

_getsize_from_header(header={'Accept-Ranges': 'bytes', 'Content-Length': '100'})

Selected Statement: return int(header.pop(key))

Function Input:
header: Accept-Ranges: bytes
Content-Length: 100

Variable Values Before Statement:
key: 'Content-Length'

Value After Statement Execution: Accept-Ranges: bytes

Variable States During Runtime (line, value):
header: 1
Accept-Ranges: bytes
Content-Length: 100
14
Accept-Ranges: bytes
key: 12
'Content-Length'
Project Name: JGoutin+rfs
Language: Python
Statement Type: API

Source Code:
def put_object(key=None, data=None, **_):
            """Check arguments and returns fake value"""
            assert key.startswith(key_value)
            if key[-1] == '/':
                assert data == b''
            else:
                assert len(data) == len(ossobject._write_buffer)
            put_object_called.append(1)

put_object(key='key/', data=b'', _={}, key_value='key', ossobject=None, put_object_called=[])

Selected Statement: assert key.startswith(key_value)

Function Input:
key: 'key/'
data: b''
key_value: 'key'
ossobject: None

Variable Values Before Statement:
key_value: 'key'

Value After Statement Execution: None

Variable States During Runtime (line, value):
key: 1
'key/'
data: 1
b''
_: 1
key_value: 1
'key'
ossobject: 1
None
put_object_called: 1
8
[1]
@py_assert1: 3
None
@py_assert4: 3
None
@py_assert2: 5
None