GNN2NAG: We describe the implementation details of GNN2NAG [1]}, which is one of the baselines in Sec. . We expand the AST nodes in the order of a depth-first search.
We considered the same six types of edges as [1]}, which consists of Parents, Child, NextSib, NextUse, NextToken, and InhToSyn.
After building the graph, we propagate the information through a Gated Graph Neural Network (GGNN [3]}, [1]}). We obtain a representation for each node after the GGNN propagation.
We then apply an LSTM to go over all the nodes until reaching the node where the goal is to predict the next token. Training is via cross-entropy loss. Note that the biggest difference between our implementation of GNN2NAG and [1]} is the use of an LSTM.
 [1]} assumes that information about which type of edge is responsible for generating the token is available to the model. However, this information is not available in our setup. Thus, we use an LSTM to iterate over all edges in the GNN to obtain the features for prediction.
