San Jose police were investigating two homicides among four shootings that occurred just hours apart in different parts of the city Tuesday, according to the police department.