But the police, many of whom had a reputation for hostility toward gay men, often carried out perfunctory investigations that overlooked the possibility of homicide, former officials and police officers say.