Stockton seems to have a worse reputation in Sacramento than the Bay Area. My theory about this has been that Sacramento and Stockton share the same local TV market, so many Sacramento residents receive a steady diet of crime stories (with a side of political dysfunction) through local TV news that Bay Area residents do not see. In contrast, commuting and migration patterns show stronger economic and social connections between Stockton and the Bay Area than Stockton and Sacramento.
Thus, Sacramento residents are more likely to generate their impression of the City through media, whereas San Jose residents are more likely to generate an impression through personal experience. The marketing study, as reported by the Central Valley Business Journal in the following quote, appears to provide some objective data to support my anecdotes.
One area some local leaders found surprising was how much more positively Stockton is viewed among people in San Jose than in Sacramento.
When asked if they thought Stockton was improving, declining or staying the same, about 41 percent of people in San Jose said Stockton was improving, compared to just 14 percent of people in Sacramento.
People in San Jose were also more likely than those in Sacramento to recognize Stockton as a place that is affordable, diverse and beautiful.
The research also found that people in the Bay Area are more likely to visit Stockton to see family or friends.
P.S. This is not to say that Stockton is being treated unfairly by the local press. The City certainly has had and still has many serious and newsworthy problems. One could reasonably argue that the average Sacramento resident is better informed about Stockton than the average San Jose resident. In fact, most of my media complaints related to Stockton have been about national media stories (i.e. city ranking lists with dubious statistical methods), not local.