lin-tan / CURE

Artefact for our ICSE 2021 paper CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
Other
50 stars 17 forks source link

Instruction to train CURE on JavaScript #8

Open nashid opened 2 years ago

nashid commented 2 years ago

We are working on to extend CURE for JavaScript. From our understanding it appears we have to prepare the following equivalent files for JS:

Furthermore, we need to generate Output.json on the following format for the test datapoints:

{"buggy line":"n = x;",
"imports":["java.util.ArrayList"],
"identifiers":["Test","x","y","m","n"],
"context":"Test(int x, double y) {\n    n = x;\n    double t = y + x;\n    m = t;\n}"}

Is this all we require? We would appreciate your feedback on this.

msintaha commented 2 years ago

Is the java_class.json created from within the dataset? Should it contain all the built-in java classes? Also, is the java_keywords contain the top 100 keywords within the dataset?

jiang719 commented 1 year ago

These two files are prepared from JDK.

For keywords, I think you can search online for JavaScript keywords.

For Java class, we crawled the JDK8 to extract this. You can do similar thing for JavaScript.

nashid commented 1 year ago

great, thanks for the pointer @jiang719. We really appreciate it.