Are there existing examples of using neural networks for static code analysis?
There's certainly literature on a related topic: code smell detection.

A "code smell" is a sign that code has a maintenance problem, and hints at the presence of technical debt. It is reasonable to suppose that code with a lot of smells is lower quality. Code smells include things like giant classes, high cyclomatic complexity, and more.

Fontana et al. have a good 2016 survey comparing different ML methods for detecting code smells. A reverse citation search on that paper uncovers many other papers that seem relevant, including:


Rasool et al. 2015, A review of code smell mining techniques
da Silva Maldonado et al. 2017 Using Natural Language Processing to Automatically Detect Self-Admitted Technical Debt
Maneerat &amp; Muenchaisri, 2011, Bad-smell prediction from software design model using machine learning techniques
Mansoor et al. 2017, Multi-objective code-smells detection using good and bad design examples


This seems like a pretty well-studied area. I wasn't able to find a cross-language model though, but I suspect one may well exist.