First, about those warnings to tourists. Foreigners are bound by the law as much as Indonesians, but the stipulation that you cannot be prosecuted for extramarital sex or cohabitation unless a complaint is filed by a child, parent or spouse of the accused makes it very unlikely that tourists will be affected.