The intuition here is that in natural language, context is defined locally. If you want to know whether a 'they' refers to a male or female, for example, you look at the nearby text. In contrast, the flow of data and control through code is highly non-local, which is a lot of why techniques like N-grams don't work.
This has been a very active area of research in academia since we started Kite in 2014. (Suggested google searches: [big code], [ml on code], etc.)
All that said I don't have data on how our approach would compare to N-grams, but I'm guessing if you look at some of the academic research, you'll find that NLP techniques were abandoned, despite the early papers' focus on them.