Hydrocarbon detection via ion implantation in metal–insulator–semiconductor devices