spaghetti code

Code with a complex and tangled control structure, especially one using many GOTOs, exceptions, or other "unstructured" branching constructs. Pejorative. The synonym "kangaroo code" has been reported, doubtless because such code has so many jumps in it.