In vaccine studies for infectious diseases such as human immunodeficiency virus (HIV), the frequency and type of contacts between study participants and infectious sources are among the most informative risk factors, but are often not adequately adjusted for in standard analyses. Such adjustment can improve the assessment of vaccine efficacy as well as the assessment of risk factors. It can be attained by modeling transmission per contact with infectious sources. However, information about contacts that rely on self-reporting by study participants are subject to nontrivial measurement error in many studies. We develop a Bayesian hierarchical model fitted using Markov chain Monte Carlo (MCMC) sampling to estimate the vaccine efficacy controlled for exposure to infection, while adjusting for measurement error in contact-related factors. Our method is used to re-analyze two recent HIV vaccine studies, and the results are compared with the published primary analyses that used standard methods. The proposed method could also be used for other vaccines where contact information is collected, such as human papilloma virus vaccines.