In Aus if immigration suspects you are marrying just for a visa it is very quickly cancelled if you are caught out. I imagine most other countries would take a similar position including Indonesia. The application for a visa with marriage requires substantial evidence that the marriage is genuine including referees, photos and other supporting material.Not the first time I hear somebody seriously speaking about marrying a local to obtain a visa.
.........
Not even speaking about the ethical aspect...i mean, would we appreciate that some wanabee immigrant marries a girl in our countries just for the sake of the visa ?