This repository contains GGNN(Gated Graph Neural Network1) based code recommendation models implemented in PyTorch and Tensorflow 1.0, which can generate API or token predictions for incomplete code snippets.
There are three packages inside the project:
- basic_ggnn_model
-
tf_version
The model under this package is a duplicate implementation of GGNN model in Tensorflow in another repository: gated-graph-neural-network-samples2. A small modification is to merge the DenseGGNNChemModel and ChemModel in the original version into DenseGGNNModel for easy reading.
-
torch_version
A re-implemented PyTorch GGNN model based on the Tensorflow version(gated-graph-neural-network-samples2). Currently there is no dataset loading method️ for this implementation, and all the input data is randomly generated.
- code_rec_api_level
-
torch_version_1
An unofficial implementation of Java API recommendation model for the paper Holistic Combination of Structural and Textual Code Information for Context based API Recommendation3. This model is inspired by another two repository: ggnn.pytorch4 and GGNN_Reasoning5.
-
torch_version_2
This is also an unofficial implementation of the above paper. Please note that it is based on the model under the
basic_ggnn_model/torch_version
package.
- code_rec_token_level
-
tf_version
Token-level Code recommentation model inspired by the paper Holistic Combination of Structural and Textual Code Information for Context based API Recommendation.
[1] Gated Graph Sequence Neural Networks.
[2] GitHub - microsoft/gated-graph-neural-network-samples: Sample Code for Gated Graph Neural Networks