No need to muck around with the code - it's a config in an environment variable. Look for: export MB_JETTY_PORT=<12345>
in this nice section Running Metabase on Debian as a service with nginx provided by a community member.
edit: that by the way got to my attention because @dncpax added a link to it in WIKI: Setup and configuration in different environments (so - yes ... the first drop of Wiki-works-as-a-Wiki )