Project: 2020SU-COSC6368-Artificial Intelligence
Task: Apply Data Augmentation in Program Domain.
- Python 3.7.4
- javaparser 3.14.5
Given input and output path, create jar and execute jar.
- input = Input directory to the original programs.
- output = Output directory to the augmented programs.
$ cd augment/
$ source run.sh
$ java -jar JavaAugmentation/target/jar/JavaAugmentation.jar $input $output
- Function Augmentation
- Statement Augmentation
- Loop Augmentation
- Switch Augmentation
- Binary Augmentation
( An example of Function Augmentation (left) and Statement Augmentation (right). Check here for other types. )
Dataset | Partition | Best Epoch | Accuracy (%) |
---|---|---|---|
Original | Validation | 7 | 87.11 |
Augmented | Validation | 8 | 90.70 |
Original | Test | 7 | 90.81 |
Augmented | Test | 8 | 93.35 |
• code2vec: https://github.com/tech-srl/code2vec
• SA: https://github.com/bdqnghi/ggnn.tensorflow#code-classification
• javaparser: https://github.com/javaparser/javaparser