There is often no spec, just the old code, copied with the old bugs and with new ones sprinkled on top.