A Superior Court judge has ruled primarily in favor of a group of local residents who sued the town over zoning changes that were approved at local referendums in 2010.