qyliang/CodeNanoFix huggingface dataset:
Buggy code:
case = []
i = j = 0

while True:
    num = int(input())
    if num == 0:
        break
    case.append(num)
    i += 1

while j < i:
    print("Case",end=' ')
    print(j+1,end=': ')
    print(case[j])

Fixed code:
case = []
i = j = 0

while True:
    num = int(input())
    if num == 0:
        break
    case.append(num)
    i += 1

while j < i:
    print("Case",end=' ')
    print(j+1,end=': ')
    print(case[j])
    j += 1
Buggy code:
h = 0
while True:
    x = int(input());
 h += 1
    if x == 0: 
break
    print("Case {}: {}".format(c, x))


Fixed code:
c = 0
while True:
	x = int(input()); c += 1
	if x == 0: break
	print("Case {}: {}".format(c, x))
Buggy code:
c = 0
while True:
    x == int(input())
    if x == 0:
        break;
    c += 1
    print('Case', str(c) = ':', x)

Fixed code:
c = 0
while True:
    x = int(input())
    if x == 0:
        break;

    c += 1
    print('Case', str(c) + ':',  x)
Buggy code:
# coding: utf-8

x=int(input())
i=1
while x!=0:
    print("Case "+str(i)+":"+str(x))
    x=int(input())
    i+=1

Fixed code:
# coding: utf-8

x=int(input())
i=1
while x!=0:
    print("Case "+str(i)+": "+str(x))
    x=int(input())
    i+=1
Buggy code:
def printcase():
    i = 1
    n = int(input())
    while n != 0:
        print("Case",i ,":" ,n)
        n = int(input())
        i = i + 1
    return 0

if __name__ == "__main__":
    ret = printcase()


Fixed code:
def printcase():
    i = 1
    n = int(input())
    while n != 0:
        print("Case %d: %d" %(i ,n))
        n = int(input())
        i = i + 1
    return 0

if __name__ == "__main__":
    ret = printcase()
Buggy code:
i=1
while True:
    x=int(input()) 
    if(x==0):
        break 
    i=i+1
    print(f"Case {i}: {x}")



Fixed code:
i=1
while True:
    a = int(input())
    if a == 0: break
    print(f'Case {i}: {a}')
    i+=1
Buggy code:
a = []
while True:
    n = int(input())
    if n == 0:
        break
    a.append(n)
for i in range(len(a)):
    print("Case", i+1, ":", a[i])

Fixed code:
a = []
while True:
    n = int(input())
    if n == 0:
        break
    a.append(n)
for i in range(len(a)):
    print("Case", str(i+1) + ":", a[i])
Buggy code:
i = 0
lis = []
while True:
    s = input()
    i += 1
    s = int(s)
    lis.append(s)
    if s == 0:
        break

for j in range(i - 1):
    fmt = "case {a}: {b}"
    s = fmt.format(a = j + 1,b = lis[j])
    print(s)

Fixed code:
i = 0
lis = []
while True:
    s = input()
    i += 1
    s = int(s)
    lis.append(s)
    if s == 0:
        break

for j in range(i - 1):
    fmt = "Case {a}: {b}"
    s = fmt.format(a = j + 1,b = lis[j])
    print(s)
Buggy code:
i = int(input())
x = 1
while i != 0:
    print("Case" + str(x) + ": " + str(i))
    x += 1
    i = int(input())



Fixed code:
i = int(input())
x = 1
while i != 0:
    print("Case " + str(x) + ": " + str(i))
    x += 1
    i = int(input())
Buggy code:
for i in range(10000)
  x = int(input())
  if x == 0: break
  print("Case %d: %d" % (i+1, x))

Fixed code:
for i in range(10000):
    x = int(input())
    if x == 0: break
    print("Case %d: %d" % (i+1, x))
Buggy code:
a = int(input())
i = 1
while(a != 0):
    print("Case {0}: {1}".format(1,a))
    i += 1
    a = int(input())


Fixed code:
a = int(input())
i = 1
while(a != 0):
    print("Case {0}: {1}".format(i,a))
    i += 1
    a = int(input())
Buggy code:
i = 0
while True:
    i++
    x = int(input())
    if x == 0:
        break
    else:
        print('Case {0}: {1}'.format(i, x))

Fixed code:
counts = 0
while True:
    x = int(input())
    if x == 0:
        break
    else:
        counts += 1
    print("Case {}: {}".format(counts,x))
Buggy code:
i = 1
while True:
    case = input()
    if case == "0": 
        break
    print("Case "+str(i)+":"+case)
    i += 1



Fixed code:
i = 1
while True:
    case = input()
    if case == "0": 
        break
    print("Case "+str(i)+": "+case)
    i += 1
Buggy code:

v = 0
i = 0
a = []
while v == 0:
    x = input()
    if 0 == int(x):
        v = 1
    else:
        a.append(int(x))
        i = int(i) + 1

for j in range(int(i)):
    print('case %d: %d' % (int(j)+1,a[int(j)] ))


Fixed code:
v = 0
i = 0
a = []
while v == 0:
    x = input()
    if 0 == int(x):
        v = 1
    else:
        a.append(int(x))
        i = int(i) + 1

for j in range(int(i)):
    print('Case %d: %d' % (int(j)+1,a[int(j)] ))
Buggy code:
import sys

num = 0

while 1:
 x = sys.stdin.readline().strip()
 if x == "0":
  break
 
 num = num + 1
 
 print("case " + str(num) + ": " + x")
 

Fixed code:
import sys
num = 0
while 1:
    x = sys.stdin.readline().strip()
    if x == "0":
        break
    num = num + 1
    print("Case " + str(num) + ": " + x)
Buggy code:
count = 1
while True:
    x = int(input())
    if x == 0:
        break
    print("Case ",count,": ", x, sep="")


Fixed code:
count = 1
while True:
    x = int(input())
    if x == 0:
        break
    print("Case ",count,": ", x, sep="")
    count += 1
Buggy code:
while(1):
    i = 1
    x = int(input())
    if(x == 0):break
    print("Case %d: %d" % (i, x))

Fixed code:
i = 1
while(1):
    x = int(input())
    if(x == 0):break
    print("Case %d: %d" % (i, x))
    i += 1
Buggy code:
import sys
i = 1
while True:
    x = sys.stdin.readline().strip()
    if x == 0:
        break
    print('Case %d: %s' % (i, x))
    i += 1

Fixed code:
import sys
i = 1
while True:
    x = sys.stdin.readline().strip()
    if x == '0':
        break
    print('Case %d: %s' % (i, x))
    i += 1
Buggy code:
n = []
i = 0

while True:
  n.append(int(input()))
  if n[i] == 0:
    break
  i += 1

for j in range(i):
  print("Case " + str(i) + " : " + str(n[j]))

Fixed code:
n = []
i = 0

while True:
  n.append(int(input()))
  if n[i] == 0:
    break
  i += 1

for j in range(i):
  print("Case " + str(j+1) + ": " + str(n[j]))
Buggy code:
x = 1
while True:
    y = int(input())
    if y == 0:
        break
    print('Case {0}:{1}'.format(x, y))
    x += 1



Fixed code:
i = 1
while True:
    x = int(input())
    if x == 0: break
    print("Case {}: {}".format(i, x))
    i += 1
Buggy code:
import sys
c = 1
for i in sys.stdin.readlines().strip() :
    if i == "0" :
        break
    else :
        print("Case " + str(c) + ":" + " " + str(i))
        c = c + 1

Fixed code:
import sys
c = 1
for i in sys.stdin.readlines() :
    if i.strip() == "0" :
        break
    else :
        print("Case " + str(c) + ":" + " " + str(i.strip()))
        c = c + 1
Buggy code:
def testcase(num, x):
    print("Case {}: {}".format(str(num),str(x)))

cnt=0
while True:
    num = int(input())
    cnt+=1
    if num !=0:
        testcase(cnt,num)
    elif num == 0:
        testcase(cnt,num)
        break    


Fixed code:
def testcase(num, x):
    print("Case {}: {}".format(str(num),str(x)))

cnt=0
while True:
    num = int(input())
    cnt+=1
    if num !=0:
        testcase(cnt,num)
    elif num == 0:
        break
Buggy code:
i = 0
while True:
    v = input()
    if v == '0':
        break
    print('Case %d: %s' % (i, v))
    i += 1

Fixed code:
i = 0
while True:
    i += 1
    v = input()
    if v == '0':
        break
    print('Case %d: %s' % (i, v))
Buggy code:
import sys
cnt = 1
while 1:
    x = sys.stdin.readline().strip()
    if x == 0:
        break
    print("Case {}: {}".format(cnt,x))
    cnt += 1

Fixed code:
import sys
cnt = 1
while True:
    x = sys.stdin.readline().strip()
    if x == "0":
        break
    print("Case {}: {}".format(cnt,x))
    cnt += 1
Buggy code:
cnt = 1
while True:
    num = int(input())
    if num == 0:
        break
    print("case", str(cnt) + ":", num, sep = " ")
    cnt += 1

Fixed code:
cnt = 1
while True:
    num = int(input())
    if num == 0:
        break
    print("Case", str(cnt) + ":", num, sep = " ")
    cnt += 1
Buggy code:
import sys

count = 1

for i in sys.stdin.readline().rstrip():
    if i == "0":
        break
    print('Case {}: {}'.format(count, i))
    count += 1

Fixed code:
import sys
 
count = 1
 
for i in sys.stdin:
    i = i.rstrip()
    if i == "0":
        break
    print('Case {0}: {1}'.format(count, i))
    count += 1
Buggy code:
def main():
    data = []
    while 1:
        n = input().split()
        ans = int(n[0])

        if ans == 0:
            data.append(ans)
            break

        data.append(ans)


    length = len(data)
    what_large = length > 10000

    if what_large:
        print("Too Large")
    else:
        for i in range(len(data)):
            d_val = data[i]

            if d_val != 0:
                print("Case {0}: {1}".format(i+1,d_val))
            else:
                break

Fixed code:
def main():
    data = []
    while 1:
        n = input().split()
        ans = int(n[0])

        if ans == 0:
            break

        data.append(ans)


    length = len(data)
    what_large = length > 10000

    if what_large:
        print("Too Large")
    else:
        for i in range(len(data)):
            d_val = data[i]

            if d_val != 0:
                print("Case {0}: {1}".format(i+1,d_val))
            else:
                break

if __name__ == '__main__':
    main()
Buggy code:
num = 0
last = 1
while last != 0:
	t = input()
	if t == "0":
		last = 0
	else:
		num += 1
		print("Case " + str(num) + ":" + str(t) )


Fixed code:
num = 0
last = 1
while last != 0:
	t = input()
	if t == "0":
		last = 0
	else:
		num += 1
		print("Case " + str(num) + ": " + str(t) )
Buggy code:
i = 1
while True:
    x = input()
    if x == "0":
        break
    else:
        print("Case{} : {}".format(i, x))
        i += 1


Fixed code:
i=0
while True:
    x=int(input())
    if x == 0:
        break
    i+=1
    print('Case {0}: {1}'.format(i,x))
Buggy code:
i = 1
while True:
    x = int(input()))
    if(x == 0): 
        break
    print(f"Case {i}: {x}")
    i += 1


Fixed code:
i = 1
while True:
    x = int(input())
    if(x == 0): 
        break
    print(f"Case {i}: {x}")
    i += 1
Buggy code:
i=1
x = input()
while(x != 0):
   print("Case {0}: {1}".format(i, x)) 
   i += 1
   x = input()

Fixed code:
i=1
x = input()
while(x != "0"):
   print("Case {0}: {1}".format(i, x)) 
   i += 1
   x = input()
Buggy code:
import sys
i=1
while True:
    x=sys.stdin.readline().strip()
    if x==0:
        break
    print("Case %d: %s"%(i,x))
    i+=1

Fixed code:
import sys
i=1
while True:
    x=sys.stdin.readline().strip()
    if x=="0":
        break
    print("Case %d: %s"%(i,x))
    i+=1
Buggy code:
for i in range(1,10000):
    x = int(input())
    if x == 0:
        break:
    else:
        print("Case %d: %d" % (i, x))


Fixed code:
for i in range(1,10001):
    x = int(input())
    if x == 0:
        break
    else:
        print("Case %d: %d" % (i, x))
Buggy code:
import sys
c = 0
while True:
	x = int(sys.stdin.readline())
	if x == 0:
		break
	c+=1
	print ('Case'+ str(c)+':', x)

Fixed code:
import sys
c = 0
while True:
	x = int(sys.stdin.readline())
	if x == 0:
		break
	c+=1
	print ('Case ' + str(c)+':', x)
Buggy code:
count=0
while True:
    x=int(input())
    if x ==0 :
        break
    print("Case {0}: {1}".format(count,x))
    count += 1

Fixed code:
count=1
while True:
    x=int(input())
    if x ==0 :
        break
    print("Case {0}: {1}".format(count,x))
    count += 1
Buggy code:
x = input()
i=1
while (x! = "0"):
    print("Case {0}: {1}".format(i,x));
    i+=1;
    x=input()


Fixed code:
x=input()
i=1
while (x!='0'):
    print("Case {0}: {1}".format(i,x));
    i+=1;
    x=input()
Buggy code:
num = []
count = 0
while True:
    x = int(input())
    if x ==0:
        break
    num.append(x)
    count +=1
for i,j in zip(range(1,count+1),num):
    print('case '+str(i)+': '+str(j))

Fixed code:
num = []
count = 0
while True:
    x = int(input())
    if x ==0:
        break
    num.append(x)
    count +=1
for i,j in zip(range(1,count+1),num):
    print('Case '+str(i)+': '+str(j))
Buggy code:
from __future__ import division, print_function
from sys import stdin

i = 1
for line in stdin:
    x = int(line)
    if not x:
       break
    print 'Case {}: {}'.format(i, x)
    i += 1

Fixed code:
from __future__ import division, print_function
from sys import stdin

i = 1
for line in stdin:
    x = int(line)
    if not x:
       break
    print ('Case {}: {}'.format(i, x))
    i += 1
Buggy code:
from __future__ import division, print_function
from sys import stdin

i = 1
for line in stdin:
    x = int(line)
    if not x:
       break
    print "Case %d: %d" % (i, x)
    i += 1

Fixed code:
from __future__ import division, print_function
from sys import stdin

i = 1
for line in stdin:
    x = int(line)
    if x == 0:
       break
    print ("Case %d: %d" % (i, x))
    i += 1
Buggy code:
import sys
i = 0
for x in sys.stdin.readlines():
    if x == "0":
        break
    i += 1
    print("Case "+ str(i)+" : "+ x)

Fixed code:
import sys
i = 0
for x in sys.stdin.readlines():
    x = x.rstrip()
    if x == "0":
        break
    i += 1
    print("Case "+ str(i)+": "+ x)
Buggy code:
import sys
a = 1

for x in sys.stdin.read().strip():
        if x == "0":
                break;
        print("Case {}: {}".format(a,x))
        a += 1

Fixed code:
import sys
a = 1

for i in sys.stdin:
        x = i.strip()
        if x == "0":
                break;
        print("Case {0}: {1}".format(a,x))
        a += 1
Buggy code:
buffer = []
while True:
    a = int(input())
    if a == 0:
        break
    buffer.append(a)
for num in range(len(buffer)):
    print('Case '+ str(num) +': '+ str(buffer[num]))    


Fixed code:
buffer = []
while True:
    a = int(input())
    if a == 0:
        break
    buffer.append(a)
for num in range(len(buffer)):
    print('Case '+ str(num+1) +': '+ str(buffer[num]))
Buggy code:
import sys, itertools
 
for count, input in zip(itertools.count(1), sys.stdin):
    if int(input) == 0:
        break
    print('Case {0}: {1}'.format(count, input)

Fixed code:
import sys, itertools
  
for count, input in zip(itertools.count(1), sys.stdin):
    if int(input) == 0: break
    print('Case {0}: {1}'.format(count, input), end='')
Buggy code:
i = 1
while True:
    input = input()
    if input == '0':
        break
    print("Case {}: {}".format(i, input))
    i += 1

Fixed code:
i = 0
while True:
    x = int(input())
    i += 1
    if x == 0:
        break
    print("Case {}: {}".format(i,x))
Buggy code:
for i in range(10000):
 x = int(input())
  if (x == 0):
    break
  print("Case ",i+1, ": ",x)


Fixed code:
for i in range(10000):
  x = int(input())
  if (x == 0):
    break
  print("Case " + str(i+1) + ": " + str(x))
Buggy code:
l = []
while True:
  i = str(input())
  if i == '0':
    break
  else:
    l.append(i)
t = 0
for i in l:
  print('Case '+str(t)+': '+i)

Fixed code:
l = []
while True:
  i = str(input())
  if i == '0':
    break
  else:
    l.append(i)
t = 0
for i in l:
  t += 1
  print('Case '+str(t)+': '+i)
Buggy code:
data = ""
count = 1
end = True
while end:
    data = int(input())
    if data == 0:
        end = False
    else:
        print("Case",count,":",data)
        count += 1

Fixed code:
data = ""
count = 1
end = True
while end:
    data = int(input())
    if data == 0:
        end = False
    else:
        print("Case",str(count)+":",data)
        count += 1
Buggy code:
i = 0
while True:
    i += 1
    n = input()
    if (n == 0): break
    print("Case " + str(i) + ": " + str(n))


Fixed code:
i = 0
while True:
    i += 1
    n = input()
    if (n == "0"): break
    print("Case " + str(i) + ": " + n)
Buggy code:
array = []
x = input()

while x != "0" :
    array.append(x)
    x = input()

for i in range(len(array)):
    print("Case" + str(i + 1) + ':' + array[i])

Fixed code:
array = []
x = input()

while x != "0" :
    array.append(x)
    x = input()

for i in range(len(array)):
    print("Case " + str(i + 1) + ": " + array[i])
Buggy code:
for i in range(10001):
    x=int(input())
    if x==0:
        break
    else:
        print('Case'+' '+str(i)+':'+' '+str(x))

Fixed code:
for i in range(1,10001):
    x=int(input())
    if x==0:
        break
    else:
        print('Case'+' '+str(i)+':'+' '+str(x))
Buggy code:
import sys
while True:
    x = sys.stdin.readline().strip()
    if x == "0":
        break
    print("Case %d: %s"%(i, x))
    i += 1

Fixed code:
import sys
i = 1
while True:
    x = sys.stdin.readline().strip()
    if x == "0":
        break
    print("Case %d: %s"%(i, x))
    i += 1
Buggy code:
i = 0
while True:
    x = int(input())
    if x != 0:
        i += 1
        print('Case {}:{}'.format(i,x))
    else:
        break

Fixed code:
i = 0
while True:
    x = int(input())
    i += 1
    if x == 0:
        break
    print("Case {}: {}".format(i, x))
Buggy code:
i=0
while True:
    Indata = int(input())
    if Indata == 0:
        break
    else:
        i=i+1
        print("Case" +str(i) + ": " + str(Indata))


Fixed code:
i=0
while True:
    Indata = int(input())
    if Indata == 0:
        break
    else:
        i=i+1
        print("Case " +str(i) + ": " + str(Indata))
Buggy code:
n=[]
line=''
i=0
while line != '0':
    line=input()
    if line != '0':
        n.append(int(line))
        i=i+1
        print(i)
for x in range(len(n)):
    print('Case %d: %d'%(x, n[x]))

Fixed code:
n=[]
line=''
while line != '0':
    line=input()
    if line != '0': n.append(int(line))
for x in range(len(n)): print('Case %d: %d'%(x+1, n[x]))
Buggy code:
i=0
while(1):
    x = int(input())
    if x == 0:break
    i+=1
    print("Case {} : {}".format(i,x))


Fixed code:
i = 0
while True:
    x = int(input()); i += 1
    if x == 0:
        break
    print("Case {}: {}".format(i, x))
Buggy code:
c = 1
x = input()
while x != "0":
    print("Case{}: {}".format(c, x))
    x = input()
    c += 1

Fixed code:
c = 1
x = input()
while x != "0":
    print("Case {}: {}".format(c, x))
    x = input()
    c += 1
Buggy code:
x = []
while(1):
    inp = int(input())
    if inp !=0:
        x.append(inp)
    else:
        x.append(inp)
        break

j=0
while(1):
    if(x[j]!=0):
        print("Case {} : {}".format(j+1,x[j]))
        j+=1
    else:
        break


Fixed code:
x = []
while(1):
    inp = int(input())
    if inp !=0:
        x.append(inp)
    else:
        x.append(inp)
        break

j=0
while(1):
    if(x[j]!=0):
        print("Case {}: {}".format(j+1,x[j]))
        j+=1
    else:
        break
Buggy code:
def solve(test):

    for i in range(len(test)):
        print("Case {0}: {1}".format(i,test[i]))

    
 

def answer():
    
    test =[]
    while True :
        n = input()
        if n=='0':
            break
        else:

            test.append(n)
    solve(test)


   

if __name__ =='__main__':
    answer()


Fixed code:
def solve(test):

    for i in range(len(test)):
        print("Case {0}: {1}".format(i+1,test[i]))

    
 

def answer():
    
    test =[]
    while True :
        n = input()
        if n=='0':
            break
        else:

            test.append(n)
    solve(test)


   

if __name__ =='__main__':
    answer()
Buggy code:
n=0
i = int(input())
while i != 0:
    n+=1
    print("Case " + str(n) + ":" +str(i))
    i = int(input())


Fixed code:
n=0
i = int(input())
while i != 0:
    n+=1
    print("Case " + str(n) + ": " +str(i))
    i = int(input())
Buggy code:
i=1
while True:
    x=int(input())
    if(x==0):
        break
    print(f"Case {i}: {x}")
    i++



Fixed code:
i=1

while True:
    x = int(input())
    if x == 0:
        break
    print(f"Case {i}: {x}")
    i+=1
Buggy code:
# coding: utf-8
# Your code here!
# TP1_3_B

# N=input()
# print(N)
N=-1
# while N != 0:
#     N=int(input())
#     print(N)
for i in range(1,100):
    N=int(input())
    if N == 0:
        break
    print('Case {0}:{1}'.format(i,N))


Fixed code:
# coding: utf-8
# Your code here!
# TP1_3_B

# N=input()
# print(N)
N=-1
# while N != 0:
#     N=int(input())
#     print(N)
for i in range(1,10001):
    N=int(input())
    if N == 0:
        break
    print('Case {0}: {1}'.format(i,N))
Buggy code:
count = 0

while True:

	count += 1
	num = int(input())

	if num == 0:

		break

	print("Case" + str(count) + ":", num)

Fixed code:
count = 0

while True:

	count += 1
	num = int(input())

	if num == 0:

		break

	print("Case", str(count) + ":", num)
Buggy code:
i = 1
while True:
    x = int(input())
    if x == 0: break
    print("Case {}: {}".format(i, n))
    i += 1


Fixed code:
i=0
while True:
    x=int(input())
    i+=1
    if x==0:
        break
    else:print('Case {}: {}'.format(i,x))
Buggy code:
#x = []
i = 0
while True:
	x = int(input())
	if x == 0:
		break
	print("Case" + str(i+1) + ": " + str(x))
	i += 1
	
	
	

Fixed code:
#x = []
i = 0
while True:
	x = int(input())
	if x == 0:
		break
	print("Case " + str(i+1) + ": " + str(x))
	i += 1
Buggy code:
count = 0
while true:
    count += 1
    n = int(input())
    if n == 0:
        break
    print('Case ' + str(count) + ' :' + str(n))

Fixed code:
count = 0
while 1:
    count += 1
    n = int(input())
    if n == 0:
        break
    print('Case ' + str(count) + ': ' + str(n))
Buggy code:
cnt = 0
while True:
	a = input()
	if a == '0':
		break
	cnt += 1
	print('Case {0}:{1}'.format(cnt,a))

Fixed code:
cnt = 0
while True:
	a = input()
	if a == '0':
		break
	cnt += 1
	print('Case {0}: {1}'.format(cnt,a))
Buggy code:
x = 10000
i = 1
while x:
    x = input()
    if x == 0:
        break
    print("Case {}: {}".format(i, x))
    i += 1

Fixed code:
x = 10000
i = 1
while x:
    x = input()
    if x == "0":
        break
    print("Case {}: {}".format(i, x))
    i += 1
Buggy code:
import sys
sum = 1;
for i in sys.stdin.strip():
    if i != "0":
        print('Case {}: {}'.format(sum, i))
        sum+= 1
    else:
        break

Fixed code:
import sys
sum = 1;
for i in sys.stdin:
    x = i.strip()
    if x != "0":
        print('Case {}: {}'.format(sum, x))
        sum+= 1
    else:
        break
Buggy code:
i=1
while True:
x=int(input())
if x==0: break
print("Case {}: {}".format(i,x))
i+=1


Fixed code:
i = 1

while True:
  x = int(input())
  if x == 0:
    break
  print('Case {}: {}'.format(i, x))
  i = i + 1
Buggy code:
import sys
for m, n in enumerate(sys.stdin):
    if int(n) == 0:
        break
    print('Case {}: {}'.format(m+1, n))

Fixed code:
import sys
for m, n in enumerate(sys.stdin):
    if int(n) == 0:
        break
    print('Case {}: {}'.format(m+1, int(n)))
Buggy code:
list = []
while True:
    a = int(input())
    if(a == 0): break
    else: list.append(a)
    

for i in range(len(list)):
    print("Case %d: %d" %(i,list[i]))


Fixed code:
list = []
while True:
    a = int(input())
    if(a == 0): break
    else: list.append(a)
    

for i in range(len(list)):
    print("Case %d: %d" %(i+1,list[i]))
Buggy code:
while 1:
 i=1
 j=int(input())
 if j==0:
  break
 print("Case",str(i)+":",j)
 i+=1

Fixed code:
i=1
while 1:
 j=int(input())
 if j==0:
  break
 print("Case",str(i)+":",j)
 i+=1
Buggy code:
a = []
while True:
    n = int(input())
    if n == 0:
        break
    a.append(n)
y = 0
z = len(a)
for  y in range(0,z):
    w = y + 1
    print("Case"+str(w)+":",a[y])
    

Fixed code:
a = []
while True:
    n = int(input())
    if n == 0:
        break
    a.append(n)
y = 0
z = len(a)
for  y in range(0,z):
    w = y + 1
    print("Case",str(w)+":",a[y])
Buggy code:
for i in range(1,100000000000)
    x = int(input())
    if x == 0:
        break
    print("Case " + str(i) + ": " + str(x))

Fixed code:
for i in range(1,10005):
    x = int(input())
    if x == 0:
        break
    print("Case " + str(i) + ": " + str(x))
Buggy code:

import sys 
cnt =1
while 1:
    x = sys.stdin.readline().strip()
    if x == "0":
        break:
    print("Case %d: %s"%(cnt,x))
    cnt+=1

Fixed code:
import sys 

cnt =1

while 1:
    x = sys.stdin.readline().strip()
    if x == "0":
        break

    print("Case %d: %s"%(cnt,x))
    cnt+=1
Buggy code:
while True:
    x,y=sorted([int(x) for x in input().split])
    if x==0 and y==0: break
    print(x,y)



Fixed code:
while True:
    x,y=sorted([int(x) for x in input().split()])
    if x==0 and y==0: break
    print(x,y)
Buggy code:
while True:
 a,b=sorted([int(x) for x in input().split])
 if a==0 and b == 0 : break
 print(a,b)


Fixed code:
while True:
 a,b=sorted([int(x) for x in input().split()])
 if a==0 and b == 0 : break
 print(a,b)