The Bay State’s economy has benefited from a decade-long surge in defense spending, but that sector’s labor force is now threatened by massive military budget cuts that are set for next year, the author of a new study warned Monday.“It could be up to 30,000 jobs at risk,” said Marty Romitti, director of economic and public policy research at the University of Massachusetts’ UMass Donahue Institute, which prepared the report for the Defense Technology Initiative.“If it ends up being that significant, what you’ve done is you’ve essentially taken away all the jobs that have been gained by the Massachusetts recovery over the last several years.”