GoalScope — atoi (Qwen2.5-Coder-32B-Instruct) — hover a token to see the patched verbalization
↵
<code>↵
def atoi(s):↵
"""Converts a string to an integer."""↵
s = s.strip()↵
if not s:↵
return 0↵
sign = -1 if s[0] == '-' else 1↵
start = 1 if s[0] in '+-' else 0↵
result = 0↵
for i in range(start, len(s)):↵
if not s[i].isdigit():↵
break↵
result = result * 10 + int(s[i])↵
return sign * result↵
</code>