qyliang/CodeNanoFix huggingface dataset:
Buggy code:
while True:	
	H,W = map(int, input().split())
	if H==0 and W==0: break
	for y in range(0,H):
		for x in range(0,W):
			print("#",end="")
			
		print('\n')
	print('\n')


Fixed code:
while True:	
	H,W = map(int, input().split())
	if H==0 and W==0: break
	for y in range(0,H):
		for x in range(0,W):
			print("#",end="")
			
		print()
	print()
Buggy code:
while True:

    W,H = tuple(map(int,input().split()))
    if W==0 & H==0:
        break
    for i in range(W):
        print("#"*H)
    |

Fixed code:
while True:

    W,H = tuple(map(int,input().split()))
    if W==0 & H==0:
        break
    for i in range(W):
        print("#"*H)
    print("")
Buggy code:
while True:

    W,H = tuple(map(int,input().split()))
    if W==0 & H==0:
        break
    for i in range(W):
        print("#"*H)

Fixed code:
while True:
    H,W=map(int,input().split())
    if H==W==0:
        break
    for i in range(H):
        print('#'*W)
    print()
Buggy code:
while True:
    h,w=map(int,input().split())
    if(h==0):
        break
    for i in range(h):
        for j in range(w):
            print("#",end="")
        print()


Fixed code:
while True:
    h, w = map(int, input().split())
    if h == 0 and w == 0:
        break
    for j in range(h):
        for i in range(w):
            print("#", end = "")
        print()
    print()
Buggy code:
while True:
  H,W=map(int,input().split())
  if H==0 and W==0:
      break
  for i in range(H):
      print("#"*W)
  print("\n")


Fixed code:
while True:
  H,W=map(int,input().split())
  if H==0 and W==0:
      break
  for i in range(H):
      print("#"*W)
  print()
Buggy code:
H, W = map(int, input().split())
while 1:
    if H == 0 and W == 0:
        break
    for i in range(H):
        for j in range(W):
            if j == W - 1:
                print("#")
            else:
                print("#", end = "")
    H, W = map(int, input().split())

Fixed code:
while 1:
    H, W = map(int, input().split())
    if H ==0 and W == 0:
        break
    for i in range(H):
        for j in range(W):
            print("#", end="")
        print()
    print()
Buggy code:
while True:
 H,W = list(map(int,input().split()))
 if H==0 and W==0:
   break
 for s in range(H):
    print('#'*W)

Fixed code:
while True:
 H,W = map(int,input().split())
 if H==0 and W==0:
   break
 for s in range(H):
    print('#'*W)
 print()
Buggy code:
import sys
lines=sys.stdin.readlines()
for line in lines:
    H,W=map(int,line.split())
    if H == 0 and W == 0: break
    for i in range(H):
        print('#'*W)
        print('')

Fixed code:
import sys
lines=sys.stdin.readlines()
for line in lines:
    H,W=map(int,line.split())
    if H == W == 0: break
    for i in range(H):
        print('#'*W)
    print('')
Buggy code:
while True:
 H,W = map(int,input().split())
 if H==0 and W==0:
   break
 for s in range(H):
    print('#'*W)
      print()

Fixed code:
while True:        
    H,W=map(int,input().split())
    if H==0 and W==0:
        break
    for i in range(H):
        print("#"*W)
    print()
Buggy code:
import math
H,W = map(int,input().split())

while (H!=0 or W!=0):
    for i in range(H):
        print(W*"#")
    print(" ")
    H,W = map(int,input().split())

Fixed code:
import math
H,W = map(int,input().split())

while (H!=0 or W!=0):
    for i in range(H):
        print(W*"#")
    print()
    H,W = map(int,input().split())
Buggy code:
while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0: break
    for x in range(H):
        print('#'*W)



Fixed code:
while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0: break
    for x in range(H):
        print('#'*W)
    print()
Buggy code:
while True:
    H, W = list(map(int, input().split()))
    if H == 0 and W == 0:
        break
    for i in range(H):
        print("#" * W)
        print()


Fixed code:
while True:
    H, W = list(map(int, input().split()))
    if H == 0 and W == 0:
        break
    for i in range(H):
        print("#" * W)
    print()
Buggy code:
while True:
    h, w =map(int,input().split())
    if h == 0 and w==0:
        break
    for i in range(h):
        print('#'*w)
    print(" ")

Fixed code:
while True:
    h,w = map(int, input().split())
     
    if h == 0 and w == 0:
        break
    for i in range(h):
        print('#' * w)
    print()
Buggy code:
square = []
while True:
    data = [int(e) for e in input().split()]
    if data[0]==0 and data[1]==0:
        break
    square.append(data)
    
for i in range(len(square)):
    for j in range(square[i][0]):
        for k in range(square[i][1]):
            print("#", end="")
        print()


Fixed code:
square = []
while True:
    data = [int(e) for e in input().split()]
    if data[0]==0 and data[1]==0:
        break
    square.append(data)
    
for i in range(len(square)):
    for j in range(square[i][0]):
        for k in range(square[i][1]):
            print("#", end="")
        print()
    print()
Buggy code:
x = '#'
while True:
	H,W = map(int,(input().split()))
	if ( H * W == 0):
		break
	for i in range(H):
		print(x*W)



Fixed code:
while True:
    H,W= map(int,input().split())
    if H==0 and W==0:
        break
    for i in range(H):
        print("#"*W)
    print()
Buggy code:
while True:
    a, b = map(int, input().split())
    if a == 0: break
    for i in range(b):
        print("#"*a)


Fixed code:
while True:
    a,b = map(int,input().split())
    if a == 0 and b==0:
        break
    for i in range(a):
        print("#"*b)
    print("")
Buggy code:
import sys
h, w = map(int, input().split())
while h != 0:
    for _ in range(h):
        for _ in range(w):
            sys.stdout.write("#")
        print("\n")
    print()
    h, w = map(int, input().split())


Fixed code:
import sys
h, w = map(int, input().split())
while h != 0:
    for _ in range(h):
        for _ in range(w):
            sys.stdout.write("#")
        print()
    print()
    h, w = map(int, input().split())
Buggy code:
while True:
    H, W = list(map(int, input().split()))
    if H == 0 and W == 0:
        break
    else:
        for i in range(H):
            print('#'*W)
        print(' ')

Fixed code:
while True:
    H,W = map(int,input().split())
    if H == 0 and W == 0:
        break
    for i in range(H):
        print("#"*W)
    print()
Buggy code:
while True:
    h,w = map(int, input().split())
    if h == 0 and w == 0:
        break
    else:
        for i in range(h):
            print("#")
        print()


Fixed code:
while True:
    h,w = map(int, input().split())
    if h == 0 and w == 0:
        break
    else:
        for i in range(h):
            print("#" * w)
        print()
Buggy code:
while True:
  a,b = map(int, input().split())
  if a == 0 and b == 0:
    break
  if a > 0 and b > 0:
    for i in range(a):
      for j in range(b):
        print("#", end="")
      print()


Fixed code:
while True:
    a,b = map(int,input().split())
    if a == b == 0:
        break
    for i in range(a):
        for j in range(b):
            print('#',end="")
        print()
        
    print()
Buggy code:
class square():
    
    def __init__(self, x,y):
        self.x = x
        self.y = y
        
    def draw(self):
        
        for i in range(0,self.x):
            for i in range(0,self.y):
                print('#',end="")
            print('') 
        
while True:
    H,W = map(int,input().split())
    
    if H == 0 and W == 0:
        print('')
        break
        
    s = square(H,W)
    s.draw()

Fixed code:
class square():
    
    def __init__(self, x,y):
        self.x = x
        self.y = y
        
    def draw(self):
        
        for i in range(0,self.x):
            for i in range(0,self.y):
                print('#',end="")
            print('') 
        print('')
        
while True:
    H,W = map(int,input().split())
    
    if H == 0 and W == 0:
        break
        
    s = square(H,W)
    s.draw()
Buggy code:
while True:
    H,W=map(int, input().split())
    if H ==0 and W ==0:
        break
    else:
        for i in range(0,H):
            for j in range (0,W):
                print("#", end="")
            print("")
        

Fixed code:
while True:
    H,W = map(int,input().split())
    if H == 0 and W == 0:
        break
    for i in range(H):
        for j in range(W):
            print('#', end = '')
        print()
        
    print()
Buggy code:
while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    for i in range(H):
        print('#' * W)
        print('')

Fixed code:
while True:
    H,W = map(int,input().split())
    for i in range(H):
        print("#"*W)
    if H == 0 and W == 0:
        break
    print()
Buggy code:
while True:
    line = ""
    H, W = map(int, input().split())
    if H == 0 and W ==0:
        break
    else:
        for i in range (0, W):
            i = "#"
            line += i
        for i in range(0, H):
            print (line)
            print("")

Fixed code:
while True:
    line = ""
    H, W = map(int, input().split())
    if H == 0 and W ==0:
        break
    else:
        for i in range (0, W):
            i = "#"
            line += i
        for i in range(0, H):
            print (line)
        print("")
Buggy code:
while True:
    H,W = [int(x) for x in input().split( )]
    if H == 0 and W == 0: 
        break
    for i in range(H):
        print('#'*W)



Fixed code:
while True:
    H,W = [int(x) for x in input().split( )]
    if H == 0 and W == 0: 
        break
    for i in range(H):
        print('#'*W)
    print()
Buggy code:
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    while True:
        a = numinput()
        if a[0] == 0 and a[1] == 0: break
        H = a[0];  W = a[1]
        for i in range(H):
            bar = ""
            for j in range(W):
                bar += "*"
            if i < H - 1: print(bar)
            else: print(bar + '\n')

if __name__ == "__main__":
    main()


Fixed code:
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a
 
def main():
    while True:
        a = numinput()
        if a[0] == 0 and a[1] == 0: break
        H = a[0];  W = a[1]
        for i in range(H):
            bar = ""
            for j in range(W):
                bar += "#"
            if i < H - 1: print(bar)
            else: print(bar + '\n')
 
if __name__ == "__main__":
    main()
Buggy code:
while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    print("\n".join(["".join(["#" for w in range(W)]) for h in range(H)]), "\n")

Fixed code:
while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    print("\n".join(["".join(["#" for w in range(W)]) for h in range(H)])+"\n")
Buggy code:
#coding:utf-8

while True:
    H,W = input().split()
    H = int(H)
    W = int(W)
    if (H == W == 0):
        break
    else:
        for j in range(H):
            for i in range(W):
                print("#", end='')
            print(" ")

Fixed code:
#coding:utf-8

while True:
    H,W = input().split()
    H = int(H)
    W = int(W)
    if (H == W == 0):
        break
    else:
        for j in range(H):
            for i in range(W):
                print("#", end='')
            print()
        print()
Buggy code:
while True:
    H,W = input().split()
    H = int(H)
    W = int(W)
    if (H == W == 0):
        break
    else:
        for j in range(H):
            for i in range(W):
                print("#", end='')
            print()

Fixed code:
while True:
    H, W = map(int, input().split())
    if (H == W == 0):
        break
    else:
        for j in range(H):
            for i in range(W):
                print("#", end='')
            print()
        print()
Buggy code:
while True:
    H, W = [int(i) for i in input().split()]
    if H == W == 0:
        break
    line = "#" * W
    for i in range(H):
        print(line)

Fixed code:
while True:
    H, W = [int(i) for i in input().split()]
    if H == W == 0:
        break
    line = "#" * W
    for i in range(H):
        print(line)
    print()
Buggy code:
while True:
  h,w=map(int,input().split())
  if h==w==0:
      break

  for i in range(h):
      print("#"*w)


print()



Fixed code:
while True:
  h, w = map(int, input().split())
  if h == 0 and w == 0:
    break
  for i in range(h):
    print("#"*w)
  print()
Buggy code:
for i in range(10000):
    H,W=input().split())
    if H=="0" and W=="0":
        break
    s = ""
    for j in range(int(W)):
        s = s + "#"
    for k in range(int(H)):
        print(s)
    print("")


Fixed code:
for i in range(10000):
    H,W=input().split()
    if H=="0" and W=="0":
        break
    s = ""
    for j in range(int(W)):
        s = s + "#"
    for k in range(int(H)):
        print(s)
    print("")
Buggy code:
while True:
    
    H, W = map(int, raw_input().split())
	
    if H == 0 and W == 0:
    	break

    for i in range(0,H):
        print "#" * W

	print ""

Fixed code:
while True :
    H,W=map(int,input().split())
    if H==0 and W==0 :
        break
    for i in range (H):
        print("#"*W)
    print()
Buggy code:
a, b = map(int,input().split())
while a != 0:
    for i in range(a):
        print('#'*b)
        print()
        a, b = map(int,input().split())


Fixed code:
a, b = map(int,input().split())
while a != 0:
    for i in range(a):
        print('#'*b)
    print()
    a, b = map(int,input().split())
Buggy code:
while True:
    H, W = map(int, input().split())
    if H == W == 0:
        break
    for _ in range(H):
        print("#" * W)

Fixed code:
while True:
    H, W = map(int, input().split())
    if H == W == 0:
        break
    for _ in range(H):
        print('#' * W)
    print()
Buggy code:
while True:
    h,w = map(int,input().split())
    if h == 0 and w == 0:
        break
    else:
        for i in range(h):
            print("#",end="")
            for j in range(1,w):
                print("#",end="")
            print(" ")
        print(" ")



Fixed code:
while True:
    h,w = map(int,input().split())
    if h == 0 and w == 0:
        break
    else:
        for i in range(h):
            for j in range(w):
                print("#",end="")
            print()
        print()
Buggy code:
while 1:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    else:
        for i in range(H):
            print("#" * W)

Fixed code:
while 1:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    else:
        for i in range(H):
            print("#" * W)
        print()
Buggy code:
while True:
    h, w = map(int, input().split())
    if (w == 0) and (h == 0):
        break
    for i in range(h):
        print("#" * w)



Fixed code:
while 1:
    h,w=map(int,input().split())
    if h==0 and w==0 : break
    for i in range(h):
        print("#"*w)
    print("")
Buggy code:
while True:
    w, h = map(int, input().split())
    if w == 0:
        break
    for i in range(w):
        print("#" * h)



Fixed code:
while True:
    h, w = map(int, input().split())
    if h + w == 0:
        break
    line = '#' * w
    for i in range(h):
        print(line)
    print('')
Buggy code:
while True:
  H,W=map(int, input().split())
  
  if H==0 and W==0:
    break
  for i in range(H):
    for j in range(W):
      print('#', end='')
    print(' ')
  print(' ')


Fixed code:
while True:
  H,W=map(int, input().split())
  
  if H==0 and W==0:
    break
  for i in range(H):
    for j in range(W):
      print('#', end='')
    print('')
  print('')
Buggy code:
while True:
    y,x = [int(i) for i in input().split()]
    if y,x == 0:
        break
    for i in range(y):
        print('#'*x)
    print()

Fixed code:
while True:
    y,x = [int(i) for i in input().split()]
    if y == 0:
        break
    for i in range(y):
        print('#'*x)
    print()
Buggy code:
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:
        break
    for i in range(a):
        print('#' * b)
    print(' ')

Fixed code:
while True:
    a,b = map(int,input().split())
    if a == 0 and b == 0:
        break
    for i in range(a):
        print('#' * b)
    print()
Buggy code:
while True:
    rec = list(map(int,input().split(" ")))
    if rec[0] ==0 and rec[1] ==0: break
    for i in range(rec[0]):
        for j in range(rec[1]):
            print("#",end="")
        print("")

Fixed code:
while True:
    rec = list(map(int,input().split(" ")))
    if rec[0] ==0 and rec[1] ==0: break
    for i in range(rec[0]):
        for j in range(rec[1]):
            print("#",end="")
        print("")
    print("")
Buggy code:
while True:
  H,W=map(int, input().split())
  
  if H==0 and W==0:
    break
  for i in range(H):
    for j in range(W):
      print('#')
    print(' ')
  print(' ')


Fixed code:

while True:
    H,W=map(int,input().split())
    if H==0 and W==0:
        break
    for i in range(H):    
        print('#'*W)
    print()
Buggy code:
H, W = map(int, input().split())

while True:
    if (H + W == 0) : break
    
    for i in range(H):
        print('#' * W)

    print("")



Fixed code:
while True:
    H, W = map(int, input().split())

    if (H + W == 0) : break
    
    for i in range(H):
        print('#' * W)

    print()
Buggy code:
for i in range (0,100000000):
    txt = input("")
    txt1,txt2 = txt.split(" ")
    a = int(txt1)
    b = int(txt2)
    if(a==0&b==0):
        break
    for i in range(0,a):
        for j in range(0,b):
            print("#", end="")
        print("")



Fixed code:
for i in range (0,100000000):
    txt = input("")
    txt1,txt2 = txt.split(" ")
    a = int(txt1)
    b = int(txt2)
    if(a==0&b==0):
        break
    for i in range(0,a):
        for j in range(0,b):
            print("#", end="")
        print("")
    print("")
Buggy code:
while True:
    h,w = map(int,input().split())
    if h == 0 and w == 0:
        break
    else:
        for j in range(h):
            for i in range(w):
                print("#",end="")
            print()


Fixed code:
while True:
    h, w = map(int, input().split())
    if h == 0 and w == 0:
        break
    else:
        for i in range(h):
            for v in range(w):
                print('#', end="")
            print()
        print()
Buggy code:
while True:
    H,W = (int(x) for x in input().split())
    
    if H == 0 and W == 0:
        break
    
    i = 0 
    while i < H:
        j = 0 
        while j < W:
            print ("#", end='')
            j += 1
        print ('')
        i += 1


Fixed code:
while True:
    H,W = (int(x) for x in input().split())
    
    if H == 0 and W == 0:
        break
    
    i = 0 
    while i < H:
        j = 0 
        while j < W:
            print ("#", end='')
            j += 1
        print ('')
        i += 1
    print ('')
Buggy code:
while True:
    h, w = map(int, input().split())
    if h==0 and w==0:
        break
    for i in range(h):
        print('#'*w)


Fixed code:
while True:
    h, w = map(int, input().split())
    if h==0 and w==0:
        break
    for i in range(h):
        print('#'*w)
    print()
Buggy code:
import sys
while True:
	x,y = map(int,input().split())
	if (x==0) and (y==0):
		break
	for i in range(0,x):
		for j in range(0,y):
			sys.stdout.write("#")	
		sys.stdout.write("\n")

Fixed code:
import sys
while True:
	x,y = map(int,input().split())
	if (x==0) and (y==0):
		break
	for i in range(0,x):
		for j in range(0,y):
			sys.stdout.write("#")	
		sys.stdout.write("\n")
	sys.stdout.write("\n")
Buggy code:
while True:
  H, W = map(int, input().split())
  if H == W == 0: break
  print(('#' * W + '/n') * H)

Fixed code:
while True:
  H, W = map(int, input().split())
  if H == W == 0: break
  print(('#' * W + '\n') * H)
Buggy code:
first = True
while(True):
    H, W = map(int, input().split())
    if(H == W == 0):
        break
    if(first == False):
        print()
    first = False
    for i in range(H):
        print("*" * W)

Fixed code:
while(True):
    H, W = map(int, input().split())
    if(H == W == 0):
        break
    first = False
    for i in range(H):
        print("#" * W)
    print()
Buggy code:
while(True):
  h,w=map(int,input().split())
  if h==0 and w==0:
    break
  rect=('#'*w+'\n')*h
  print(rect+'\n')

Fixed code:
while(True):
  h,w=map(int,input().split())
  if h==0 and w==0:
    break
  rect=('#'*w+'\n')*h
  print(rect)
Buggy code:
while True:
    i = list(map(int, input().split()))
    if i[0] == 0 and i[1] == 0:
        break
    else:
        for j in range(i[0]):
            for k in range(i[1]):
                print("#", end='')


Fixed code:
while True:
    i = list(map(int, input().split()))
    if i[0] == 0 and i[1] == 0:
        break
    else:
        for j in range(i[0]):
            for k in range(i[1]):
                print("#", end='')
            print("\n", end='')
        print("\n", end='')
Buggy code:
while(True):
    H, W = map(int, input().split())
    if(H == 0 and W == 0):
        break
    for i in range(H):
        for k in range(W):
            print("#", end = "")
        print("")


Fixed code:
while True:
  H, W = map(int, input().split())
  if H == 0 and W == 0:
    break
  for i in range(H):
    for j in range(W):
      print("#", end="")
    print()
  print()
Buggy code:
while True:
    H, W = map(int, input().split())
    if H == W == 0:
        break
    for _ in range(H):
        print('#'*W)



Fixed code:
while True:
    H, W = map(int, input().split())
    if H == 0:
        break
    for i in range(H):
        print('#' * W)
    print()
Buggy code:
l = []
while True:
  h,w = map(int,input().split())
  if (h,w) == (0,0):
    break
  else:
    l.append([h,w])
for i in l:
  for j in range(i[0]):
    print('#'*i[1])
  print('\n')

Fixed code:
l = []
while True:
  h,w = map(int,input().split())
  if (h,w) == (0,0):
    break
  else:
    l.append([h,w])
for i in l:
  for j in range(i[0]):
    print('#'*i[1])
  print()
Buggy code:
while True:
    tate, side = map(int, input().split())
    if tate == side == 0 : break
    print((tate * "#" + "\n") * side)

Fixed code:
while True:
    tate, side = map(int, input().split())
    if tate == side == 0 : break
    print((side * "#" + "\n") * tate)
Buggy code:
a = []
while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    a.append([H, W])
for i in range(len(a)):
    b = a[i]
    for j in range(b[0]):
        print('#' * b[1])


Fixed code:
a = []
while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    a.append([H, W])
for i in range(len(a)):
    b = a[i]
    for j in range(b[0]):
        print('#' * b[1])
    print('')
Buggy code:
while True:
    h, w = [int(x) for x in input().split()]
    if h == w == 0:
        break
    for i in range(0, h):
        print('#' * w)

Fixed code:
while True:
    h, w = [int(x) for x in input().split()]
    if h == w == 0:
        break
    for i in range(h):
        print('#' * w)
    print()
Buggy code:
I = input().split()
H = int(I[0])
W = int(I[1])
h = H
w = W
while H != 0 or W != 0:
    while h > 0:
        w = W
        while w > 0:
            print('#', end = '')
            w -= 1
        print()
        h -= 1
    I = input().split()
    H = int(I[0])
    W = int(I[1])
    h = H
    w = W

Fixed code:
I = input().split()
H = int(I[0])
W = int(I[1])
h = H
w = W
while H != 0 or W != 0:
    while h > 0:
        w = W
        while w > 0:
            print('#', end = '')
            w -= 1
        print()
        h -= 1
    I = input().split()
    H = int(I[0])
    W = int(I[1])
    h = H
    w = W
    print()
Buggy code:
while True:
    H,W = tuple(int(n) for n in input().split())
    if H == 0 and W == 0:
        break
    for h in range(H):
        print("#"*W)
    print(" ")


Fixed code:
while True:
    H,W = tuple(int(n) for n in input().split())
    if H == 0 and W == 0:
        break
    for h in range(H):
        print("#"*W)
    print("")