We present a high-precision , differential elemental abundance analysis of the HAT-P-1 stellar binary based on high-resolution , high signal-to-noise ratio Keck/HIRES spectra . The secondary star in this double system is known to host a transiting giant planet while no planets have yet been detected around the primary star . The derived metallicities ( [ Fe/H ] ) of the primary and secondary stars are identical within the errors : 0.146 \pm 0.014 dex ( \sigma = 0.033 dex ) and 0.155 \pm 0.007 dex ( \sigma = 0.023 dex ) , respectively . Extremely precise differential abundance ratios of 23 elements have been measured ( mean error of \sigma ( [ X/Fe ] ) = 0.013 dex ) and are found to be indistinguishable between the two stars : \Delta [ X/Fe ] ( secondary - primary ) = +0.001 \pm 0.006 dex ( \sigma = 0.008 dex ) . The striking similarity in the chemical composition of the two stellar components in HAT-P-1 is contrary to the possible 0.04 dex level difference seen in 16 Cyg A+B , which also hosts a giant planet , at least 3 times more massive than the one around HAT-P-1 secondary star . We conclude that the presence of giant planets does not necessarily imply differences in the chemical compositions of the host stars . The elemental abundances of each star in HAT-P-1 relative to the Sun show an identical , positive correlation with the condensation temperature of the elements ; their abundance patterns are thus very similar to those observed in the majority of solar twins . In view of the Meléndez et al . ( 24 ) ’ s interpretation of the peculiar solar abundance pattern , we conclude that HAT-P-1 experienced less efficient formation of terrestrial planets than the Sun . This is in line with the expectation that the presence of close-in giant planets preventing the formation or survival of terrestrial planets .