If your code is repetitive, you should deal with that by abstracting it, not by using a probabilistic black box to generate more.
That's sometimes easy, sometimes not so easy due to the boilerplate requirements of the language/framework/library one uses. Other times it introduces a trade-off between repetition and code complexity/readability, so it's not the silver bullet your comment suggests it to be.