A NSW judge's scathing decision saves former Port Stephens mayor's company up to $12 million