CURE icon indicating copy to clipboard operation
CURE copied to clipboard

Instruction to train CURE on JavaScript

Open nashid opened this issue 2 years ago • 3 comments

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

  • java_keywords.json
  • java_class.json

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.

nashid avatar Sep 28 '22 06:09 nashid

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?

msintaha avatar Sep 28 '22 06:09 msintaha

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.

jiang719 avatar Oct 05 '22 16:10 jiang719

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

nashid avatar Oct 05 '22 18:10 nashid