ChangeVectorCollector is a tool that uses GumTree to differentiate two code between a change.
- Takes a csv file that holds target commits and the target changed line.
You can use the results from BugPatchCollector to find difference of code when BIC occurs. - Blames the changed line to get the commit before it is changed.
- Extracts the files that is before and after the change.
- Compares the change of files using GumTree distribution from https://github.com/GumTreeDiff/gumtree
- Difference of code is vectorized with the attribute counts of changes w.r.t AST node types.
- The output file is in the form of arff format.
- Different correlation coefficients can be computed to the change vectors.
$ ./gradlew distZip or
$ gradle distZip After the command do follwing to unzip the distZip:
unzip /build/distributions/change-vector-collector.zip The executable file is in build/distributions/change-vector-collector/bin
If you have trouble to build using gradlew, enter
$ gradle wrapRequired options
- -u (url) The url of the target GitHub repository.
- -i (input) file path of the input file.
- -o (output) file path of the output file.
Must choose one of the following options
- -r (repo) from target commit, collect before change from repo.
-i is the file path with target commit's SHA and path in the repo and the target line number.
-o is the file path and the file name you want to store the change-vector arff. - -l (local) if you already have information of before changes.
-i is the file path with the information of before and after the change
-o is the same as above. - -c (correlation) computes correlations after retriveing the change vectors.
-i is the file path of the change vector arff.
-o is the folder path where you want to store the correlation csvs.
-r -u "https://github.com/apache/zookeeper" -i "./assets/BIC_zookeeper.csv" -o "./assets/CVC_zookeper.arff" -l -u "https://github.com/apache/zookeeper" -i "./assets/BBIC_zookeeper.csv" -o "./assets/CVC_zookeper.arff" -c -u "https://github.com/apache/zookeeper" -i "./assets/cvc.arff" -o "./assets/correlation/"