-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I've found that many of the code snippets in ConCode reference methods that aren't defined in the memberFunctions field. An example is line 13 of test_shuffled.json, printed below. The code references a function called search(), but it's not defined in the metadata. I'm assuming that what happened here is that the file this was taken from statically imported the (static) search() method from some other class, but I just wanted to check that this is indeed why this happens and that you're aware of this feature of the dataset.
{
"memberVariables": {
"middle": "TSTNode",
"data": "char",
"left": "TSTNode",
"root": "TSTNode",
"right": "TSTNode",
"al": "ArrayList<String>",
"is_End_Of_String": "boolean"
},
"code": [
"boolean",
"function",
"(",
"String",
"word",
")",
"{",
"return",
"search",
"(",
"root",
",",
"word",
".",
"toCharArray",
"(",
")",
",",
"0",
")",
";",
"}"
],
"memberFunctions": {
"traverse": [
[
"void",
"TSTNode key",
"String str"
]
],
"makeEmpty": [
[
"void"
]
],
"isEmpty": [
[
"boolean"
]
],
"insert": [
[
"void",
"String word"
],
[
"TSTNode",
"TSTNode key",
"char[] word",
"int pos"
]
],
"toString": [
[
"String"
]
],
"main": [
[
"void",
"String[] args"
]
],
"delete": [
[
"void",
"String word"
],
[
"void",
"TSTNode key",
"char[] word",
"int pos"
]
]
},
"repo": "repo_24058027",
"className": "TernarySearchTree",
"renamed": [
"boolean",
"function",
"(",
"String",
"arg0",
")",
"{",
"return",
"search",
"(",
"root",
",",
"arg0",
".",
"toCharArray",
"(",
")",
",",
"0",
")",
";",
"}"
],
"nl": "function to search for a word",
"nlToks": [
"function",
"to",
"search",
"for",
"a",
"word"
]
}Metadata
Metadata
Assignees
Labels
No labels