News - We apply our approach on Flaky Test Prediction, which gets a 1% performance improvement compared with Flakify: A Black-Box, Language Model-based Predictor for Flaky Tests. You can find the details below.
Reminding that GraphCode2Vec works with Java Bytecode so that all the handled source code should be compiled.
-
Extract Graph tool
- We implement the tool based on Soot. Soot Version is in
pom.xml. - You can freely modify it.
- You can use it to extract graph for your data.
- compile
mvn clean package - run command see the example,
extractGraphs.sh
- We implement the tool based on Soot. Soot Version is in
-
Requirements/Environment
- recommend that you use
conda - see requirements.txt
- recommend that you use
-
Download Dataset from Zenodo
- put all downloaded files to the
sourcefolder - make sure you have enough disk space, around 100G,
bash untar.sh
- put all downloaded files to the
-
Pretrained Model
- https://drive.google.com/file/d/1PGF6e56CQ4XAfZMEU2Jl3w1TW4Q-59MG/view?usp=sharing
- put it into the
sourcefolder and decompress
-
Run experiments
cd source/graphscripts_experiments/- run bash job files
- reminding, it contains all trial experiment jobs. We will clean it later and keep only experiments in the paper.
-
We apply our approach to predict the flaky tests, which gets a 1% performance improvement compared with Flakify: A Black-Box, Language Model-based Predictor for Flaky Tests. Please see the repository, https://github.com/Marvinmw/Flaky .
- We compile all the code.
- We filter the test cases that do not have .class files or failed to extract graphs, which results in losing some flaky tests.
- To compare, we rerun Flakify and make sure we use the same dataset.
- You can find all info in https://github.com/Marvinmw/Flaky .
-
paper link, GraphCode2Vec: Generic Code Embedding via Lexical and Program Dependence Analyses
-
License, Boost Software License 1.0