I'm also playing with RNNs for text generation - currently trying to make a Haiku writer that'll actually "make sense". In case anyone else is interested: https://speakerdeck.com/herval/creating-creative-machines-v0 (shared the code of the experiments too)
Or train it to predict code in a code base conditioned on the rest of the code in that same code base. That way, when you condition it on your current code base, it might be able to generate sensible completions that could actually be useful.