Dozens of residents were displaced Saturday after a water pipe burst, flooding at least 30 units at a San Jose apartment complex, officials said.