Judge rules in favor of Stockton and accepts Chapter 9 petition