docs: Fix various issues with incorrect code samples.

bug: 15671968
Change-Id: I3219f9c5e492ee95257439d9f284120dadd277ac
8 files changed