MonoshiTonmoy/Code_Statement_Prediction_Dataset huggingface dataset:
Project Name: ccxt+ccxt
Language: Python
Statement Type: 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: 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: numerator = self.integer // exponent

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

Variable Values Before Statement:
exponent: 1000000000000

Value After Statement Execution: 0

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: PyFilesystem+pyfilesystem2
Language: Python
Statement Type: 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: Hasenpfote+fpq
Language: Python
Statement Type: 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: getsentry+responses
Language: Python
Statement Type: Assignment

Source Code:
def _clean_unicode(url: str) -> str:
    """Clean up URLs, which use punycode to handle unicode chars.

    Applies percent encoding to URL path and query if required.

    Parameters
    ----------
    url : str
        URL that should be cleaned from unicode

    Returns
    -------
    str
        Cleaned URL

    """
    urllist = list(urlsplit(url))
    netloc = urllist[1]
    if _has_unicode(netloc):
        domains = netloc.split(".")
        for i, d in enumerate(domains):
            if _has_unicode(d):
                d = "xn--" + d.encode("punycode").decode("ascii")
                domains[i] = d
        urllist[1] = ".".join(domains)
        url = urlunsplit(urllist)

    # Clean up path/query/params, which use url-encoding to handle unicode chars
    chars = list(url)
    for i, x in enumerate(chars):
        if ord(x) > 128:
            chars[i] = quote(x)

    return "".join(chars)

_clean_unicode(url='http://example.com/test?type=2&ie=utf8&query=汉字')

Selected Statement: netloc = urllist[1]

Function Input:
url: 'http://example.com/test?type=2&ie=utf8&query=汉字'

Variable Values Before Statement:
urllist: http
example.com
/test
type=2&ie=utf8&query=汉字

Value After Statement Execution: 'example.com'

Variable States During Runtime (line, value):
url: 1
'http://example.com/test?type=2&ie=utf8&query=汉字'
urllist: 17
http
example.com
/test
type=2&ie=utf8&query=汉字
netloc: 18
'example.com'
chars: 29
h
t
t
p
:
/
/
e
x
a
m
p
l
e
.
c
o
m
/
t
e
s
t
?
t
y
p
e
=
2
&
i
e
=
u
t
f
8
&
q
u
e
r
y
=
汉
字
32
h
t
t
p
:
/
/
e
x
a
m
p
l
e
.
c
o
m
/
t
e
s
t
?
t
y
p
e
=
2
&
i
e
=
u
t
f
8
&
q
u
e
r
y
=
%E6%B1%89
字
32
h
t
t
p
:
/
/
e
x
a
m
p
l
e
.
c
o
m
/
t
e
s
t
?
t
y
p
e
=
2
&
i
e
=
u
t
f
8
&
q
u
e
r
y
=
%E6%B1%89
%E5%AD%97
i: 30
0
30
1
30
2
30
3
30
4
30
5
30
6
30
7
30
8
30
9
30
10
30
11
30
12
30
13
30
14
30
15
30
16
30
17
30
18
30
19
30
20
30
21
30
22
30
23
30
24
30
25
30
26
30
27
30
28
30
29
30
30
30
31
30
32
30
33
30
34
30
35
30
36
30
37
30
38
30
39
30
40
30
41
30
42
30
43
30
44
30
45
30
46
x: 30
'h'
30
't'
30
'p'
30
':'
30
'/'
30
'e'
30
'x'
30
'a'
30
'm'
30
'p'
30
'l'
30
'e'
30
'.'
30
'c'
30
'o'
30
'm'
30
'/'
30
't'
30
'e'
30
's'
30
't'
30
'?'
30
't'
30
'y'
30
'p'
30
'e'
30
'='
30
'2'
30
'&'
30
'i'
30
'e'
30
'='
30
'u'
30
't'
30
'f'
30
'8'
30
'&'
30
'q'
30
'u'
30
'e'
30
'r'
30
'y'
30
'='
30
'汉'
30
'字'
Project Name: davedittrich+python_secrets
Language: Python
Statement Type: Branch

Source Code:
def secrets_dir(env=os.getenv('D2_ENVIRONMENT', None),
                basedir=os.getenv('D2_SECRETS_BASEDIR', None)):
    if env is not None:
        env_str = str(env)
    else:
        cwd = os.getcwd()
        default_file = os.path.join(cwd, '.python_secrets_environment')
        if os.path.exists(default_file):
            with open(default_file, 'r') as f:
                env_str = f.read().strip()
        else:
            env_str = os.path.basename(cwd)
    if basedir is None:
        basedir = os.path.join(
                HOME,
                'secrets' if sys.platform.startswith('win') else '.secrets')
    return os.path.join(basedir, env_str)

secrets_dir(env=None, basedir=None)

Selected Statement: if basedir is None:

Function Input:
env: None
basedir: None

Variable Values Before Statement:
basedir: None

Value After Statement Execution: Yes

Variable States During Runtime (line, value):
env: 1
None
basedir: 1
None
14
'/home/jinjun/.secrets'
cwd: 6
'/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/davedittrich+python_secrets/davedittrich+python_secrets'
default_file: 7
'/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/davedittrich+python_secrets/davedittrich+python_secrets/.python_secrets_environment'
env_str: 12
'davedittrich+python_secrets'
Project Name: davedittrich+python_secrets
Language: Python
Statement Type: Branch

Source Code:
def _identify_environment(environment=None):
    """
    Returns the environment identifier.

    There are multiple ways to define the default environment (in order
    of priority):

    1. The --environment command line option;
    2. The content of the file .python_secrets_environment in the current
       working directory;
    3. The value specified by environment variable D2_ENVIRONMENT; or
    4. The basename of the current working directory.
    """
    cwd = os.getcwd()
    if environment is None:
        env_file = os.path.join(cwd, '.python_secrets_environment')
        if os.path.exists(env_file):
            with open(env_file, 'r') as f:
                environment = f.read().replace('\n', '')
        else:
            environment = os.getenv('D2_ENVIRONMENT',
                                    os.path.basename(cwd))
    return environment

_identify_environment(environment=None)

Selected Statement: if environment is None:

Function Input:
environment: None

Variable Values Before Statement:
environment: None

Value After Statement Execution: Yes

Variable States During Runtime (line, value):
environment: 1
None
21
'davedittrich+python_secrets'
cwd: 14
'/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/davedittrich+python_secrets/davedittrich+python_secrets'
env_file: 16
'/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/davedittrich+python_secrets/davedittrich+python_secrets/.python_secrets_environment'
Project Name: davedittrich+python_secrets
Language: Python
Statement Type: Branch

Source Code:
def find(lst, key, value):
    for i, dic in enumerate(lst):
        if dic[key] == value:
            return i
    return None

find(lst=[{'Variable': 'jenkins_admin_password', 'Type': 'password'}, {'Variable': 'ca_rootca_password', 'Type': 'password'}], key='Variable', value='something_not_there')

Selected Statement: if dic[key] == value:

Function Input:
lst: Variable: jenkins_admin_password
Type: password
Variable: ca_rootca_password
Type: password
key: 'Variable'
value: 'something_not_there'

Variable Values Before Statement:
value: 'something_not_there'

Value After Statement Execution: No

Variable States During Runtime (line, value):
lst: 1
Variable: jenkins_admin_password
Type: password
Variable: ca_rootca_password
Type: password
key: 1
'Variable'
value: 1
'something_not_there'
i: 2
0
2
1
dic: 2
Variable: jenkins_admin_password
Type: password
2
Variable: ca_rootca_password
Type: password
Project Name: Storj+storjkademlia
Language: Python
Statement Type: Branch

Source Code:
def mknode(id=None, ip=None, port=None, intid=None):
    """
    Make a node.  Created a random id if not specified.
    """
    if intid is not None:
        id = pack('>l', intid)
    id = id or hashlib.sha1(str(random.getrandbits(255))).digest()
    return Node(id, ip, port)

mknode(id=None, ip=None, port=None, intid=0)

Selected Statement: if intid is not None:

Function Input:
id: None
ip: None
port: None
intid: 0

Variable Values Before Statement:
intid: 0

Value After Statement Execution: Yes

Variable States During Runtime (line, value):
id: 1
None
6
b'\x00\x00\x00\x00'
ip: 1
None
port: 1
None
intid: 1
0
Project Name: geopy+geopy
Language: Python
Statement Type: Branch

Source Code:
def _normalize_proxies(proxies):
    """Normalize user-supplied `proxies`:

    - For `None` -- retrieve System proxies using
      :func:`urllib.request.getproxies`
    - Add `http://` scheme to proxy urls if missing.
    """
    if proxies is None:  # Use system proxy settings
        proxies = getproxies()
    if not proxies:
        return {}  # Disable proxies

    normalized = {}
    for scheme, url in proxies.items():
        if url and "://" not in url:
            # Without the scheme there are errors:
            # from aiohttp:
            #   ValueError: Only http proxies are supported
            # from requests (in some envs):
            #   urllib3.exceptions.ProxySchemeUnknown: Not supported
            #   proxy scheme localhost
            url = "http://%s" % url
        normalized[scheme] = url
    return normalized

_normalize_proxies(proxies=None)

Selected Statement: if proxies is None:  # Use system proxy settings

Function Input:
proxies: None

Variable Values Before Statement:
proxies: None

Value After Statement Execution: Yes

Variable States During Runtime (line, value):
proxies: 1
None
9
Project Name: geopy+geopy
Language: Python
Statement Type: Branch

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: if altitude is None:

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:
altitude: None

Value After Statement Execution: Yes

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: djerbic+xlrd-ignore-writeaccess-corruption
Language: Python
Statement Type: Branch

Source Code:
def xldate_as_tuple(xldate, datemode):
    if datemode not in (0, 1):
        raise XLDateBadDatemode(datemode)
    if xldate == 0.00:
        return (0, 0, 0, 0, 0, 0)
    if xldate < 0.00:
        raise XLDateNegative(xldate)
    xldays = int(xldate)
    frac = xldate - xldays
    seconds = int(round(frac * 86400.0))
    assert 0 <= seconds <= 86400
    if seconds == 86400:
        hour = minute = second = 0
        xldays += 1
    else:
        # second = seconds % 60; minutes = seconds // 60
        minutes, second = divmod(seconds, 60)
        # minute = minutes % 60; hour    = minutes // 60
        hour, minute = divmod(minutes, 60)
    if xldays >= _XLDAYS_TOO_LARGE[datemode]:
        raise XLDateTooLarge(xldate)

    if xldays == 0:
        return (0, 0, 0, hour, minute, second)

    if xldays < 61 and datemode == 0:
        raise XLDateAmbiguous(xldate)

    jdn = xldays + _JDN_delta[datemode]
    yreg = (ifd(ifd(jdn * 4 + 274277, 146097) * 3, 4) + jdn + 1363) * 4 + 3
    mp = ifd(yreg % 1461, 4) * 535 + 333
    d = ifd(mp % 16384, 535) + 1
    # mp /= 16384
    mp >>= 14
    if mp >= 10:
        return (ifd(yreg, 1461) - 4715, mp - 9, d, hour, minute, second)
    else:
        return (ifd(yreg, 1461) - 4716, mp + 3, d, hour, minute, second)

xldate_as_tuple(xldate=2741.0, datemode=0)

Selected Statement: if xldays >= _XLDAYS_TOO_LARGE[datemode]:

Function Input:
xldate: 2741.0
datemode: 0

Variable Values Before Statement:
xldays: 2741

Value After Statement Execution: No

Variable States During Runtime (line, value):
xldate: 1
2741.0
datemode: 1
0
xldays: 8
2741
frac: 9
0.0
seconds: 10
0
second: 17
0
minutes: 17
0
hour: 19
0
minute: 19
0
jdn: 29
2417760
yreg: 30
9676699
mp: 31
66673
34
4
d: 32
3
Project Name: dailymuse+oz
Language: Python
Statement Type: Branch

Source Code:
def get_frames(tback, is_breakpoint):
    """Builds a list of ErrorFrame objects from a traceback"""

    frames = []

    while tback is not None:
        if tback.tb_next is None and is_breakpoint:
            break

        filename = tback.tb_frame.f_code.co_filename
        function = tback.tb_frame.f_code.co_name
        context = tback.tb_frame.f_locals
        lineno = tback.tb_lineno - 1
        tback_id = id(tback)
        pre_context_lineno, pre_context, context_line, post_context = get_lines_from_file(filename, lineno + 1, 7)
        frames.append(ErrorFrame(tback, filename, function, lineno, context, tback_id, pre_context, context_line, post_context, pre_context_lineno))
        tback = tback.tb_next

    return frames

get_frames(tback=REPR FAILED, is_breakpoint=False)

Selected Statement: if tback.tb_next is None and is_breakpoint:

Function Input:
tback: REPR FAILED
is_breakpoint: False

Variable Values Before Statement:
is_breakpoint: False

Value After Statement Execution: No

Variable States During Runtime (line, value):
tback: 1
REPR FAILED
17
None
is_breakpoint: 1
False
frames: 4
16
[<oz.error_pages.ErrorFrame object at 0x7f85da9e7a30>]
16
[<oz.error_pages.ErrorFrame object at 0x7f85da9e7a30>, <oz.error_pages.ErrorFrame object at 0x7f85da9e7c70>]
filename: 10
'/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/dailymuse+oz/dailymuse+oz/tests/error_pages/test_core.py'
10
'/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/dailymuse+oz/dailymuse+oz/oz/error_pages/__init__.py'
function: 11
'test_get_frames_debug'
11
'debug'
context: 12
{'self': <tests.error_pages.test_core.ErrorPagesCoreTestCase testMethod=test_get_frames_debug>, 'e': DebugBreakException(), '_': DebugBreakException(), 'tback': <traceback object at 0x7f85da895600>}
12
lineno: 13
44
13
19
tback_id: 14
140212873811456
14
140212874253504
pre_context_lineno: 15
38
15
13
pre_context: 15
            self.assertEqual(len(frames), 1)
            for frame in frames:
                self.assertTrue(isinstance(frame, oz.error_pages.ErrorFrame))
    def test_get_frames_debug(self):
        try:
15
class DebugBreakException(Exception):
    """Raise this to break into the debugger during an HTTP request"""
    pass
def debug():
    """Used to create debug breakpoints in code"""
context_line: 15
'            oz.error_pages.debug()'
15
'    raise DebugBreakException()'
post_context: 15
        except Exception as e:
            _, _, tback = sys.exc_info()
            frames = oz.error_pages.get_frames(tback, False)
            self.assertEqual(len(frames), 2)
15
class ErrorFrame(object):
    """Holds information about a function call in a traceback"""
    def __init__(self, tback, filename, function, lineno, vars, id, pre_context, context_line, post_context, pre_context_lineno):
        self.tback = tback
Project Name: tensorlayer+TensorLayer
Language: Python
Statement Type: Branch

Source Code:
def _add_notice_to_docstring(doc, no_doc_str, notice):
    """Adds a deprecation notice to a docstring."""
    if not doc:
        lines = [no_doc_str]

    else:
        lines = _normalize_docstring(doc).splitlines()

    notice = [''] + notice

    if len(lines) > 1:
        # Make sure that we keep our distance from the main body
        if lines[1].strip():
            notice.append('')

        lines[1:1] = notice
    else:
        lines += notice

    return '\n'.join(lines)

_add_notice_to_docstring(doc=None, no_doc_str='DEPRECATED FUNCTION', notice=['\n            .. warning::\n                **THIS FUNCTION IS DEPRECATED:** It will be removed after after 2018-09-30.\n                *Instructions for updating:* This API is deprecated. Please use as `tl.logging.warning`.\n        '])

Selected Statement: if not doc:

Function Input:
doc: None
no_doc_str: 'DEPRECATED FUNCTION'
notice: 
            .. warning::
                **THIS FUNCTION IS DEPRECATED:** It will be removed after after 2018-09-30.
                *Instructions for updating:* This API is deprecated. Please use as `tl.logging.warning`.
        

Variable Values Before Statement:
doc: None

Value After Statement Execution: Yes

Variable States During Runtime (line, value):
doc: 1
None
no_doc_str: 1
'DEPRECATED FUNCTION'
notice: 1

            .. warning::
                **THIS FUNCTION IS DEPRECATED:** It will be removed after after 2018-09-30.
                *Instructions for updating:* This API is deprecated. Please use as `tl.logging.warning`.
        
9

            .. warning::
                **THIS FUNCTION IS DEPRECATED:** It will be removed after after 2018-09-30.
                *Instructions for updating:* This API is deprecated. Please use as `tl.logging.warning`.
        
lines: 4
DEPRECATED FUNCTION
18
DEPRECATED FUNCTION

            .. warning::
                **THIS FUNCTION IS DEPRECATED:** It will be removed after after 2018-09-30.
                *Instructions for updating:* This API is deprecated. Please use as `tl.logging.warning`.
Project Name: andsor+pydevs
Language: Python
Statement Type: Branch

Source Code:
def git_versions_from_vcs(tag_prefix, root, verbose=False):
    # this runs 'git' from the root of the source tree. This only gets called
    # if the git-archive 'subst' keywords were *not* expanded, and
    # _version.py hasn't already been rewritten with a short version string,
    # meaning we're inside a checked out source tree.

    if not os.path.exists(os.path.join(root, ".git")):
        if verbose:
            print("no .git in %s" % root)
        return {}

    GITS = ["git"]
    if sys.platform == "win32":
        GITS = ["git.cmd", "git.exe"]
    stdout = run_command(GITS, ["describe", "--tags", "--dirty", "--always"],
                         cwd=root)
    if stdout is None:
        return {}
    if not stdout.startswith(tag_prefix):
        if verbose:
            print("tag '%s' doesn't start with prefix '%s'"
                  % (stdout, tag_prefix))
        return {}
    tag = stdout[len(tag_prefix):]
    stdout = run_command(GITS, ["rev-parse", "HEAD"], cwd=root)
    if stdout is None:
        return {}
    full = stdout.strip()
    if tag.endswith("-dirty"):
        full += "-dirty"
    return {"version": tag, "full": full}

git_versions_from_vcs(tag_prefix='v', root='/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/andsor+pydevs/andsor+pydevs', verbose=False)

Selected Statement: if stdout is None:

Function Input:
tag_prefix: 'v'
root: '/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/andsor+pydevs/andsor+pydevs'
verbose: False

Variable Values Before Statement:
stdout: 'v0.1.2'

Value After Statement Execution: No

Variable States During Runtime (line, value):
tag_prefix: 1
'v'
root: 1
'/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/andsor+pydevs/andsor+pydevs'
verbose: 1
False
GITS: 12
git
stdout: 15
'v0.1.2'
25
'1ef835aee49f536a5a499db71927deac87f4152e'
tag: 24
'0.1.2'
full: 28
'1ef835aee49f536a5a499db71927deac87f4152e'