A Manhattan federal judge has dismissed the bulk of Pennsylvania's lawsuit accusing oil companies of polluting the state's groundwater with a harmful gasoline additive.