A nice technique for debugging unfamiliar codebases is to exploit the symmetries. That is, if you don’t know the correct output, find cases where the outputs should relate given certain related inputs. Then do more running the code than reading it to test your expectations.