From f8753dc12705d1ea71bcd29c6b9d7d5485702e08 Mon Sep 17 00:00:00 2001 From: Alexander Bezzubov Date: Mon, 6 May 2019 13:36:31 +0200 Subject: [PATCH 1/2] sem: switch Obj->Fields in MethodDeclaration->Modiferes mapping Signed-off-by: Alexander Bezzubov --- driver/normalizer/normalizer.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/driver/normalizer/normalizer.go b/driver/normalizer/normalizer.go index 1d365b5..4112c3b 100644 --- a/driver/normalizer/normalizer.go +++ b/driver/normalizer/normalizer.go @@ -143,16 +143,16 @@ var Normalizers = []Mapping{ "modifiers": Var("ann"), // TODO: it's an array, we should expand it somewhere "name": Var("name"), "body": Var("body"), - "parameters": Each("args", Obj{ - uast.KeyType: String("SingleVariableDeclaration"), - uast.KeyPos: Var("apos"), - "extraDimensions2": Is(nil), - "initializer": Var("ainit"), - "modifiers": Is(nil), - "name": Var("aname"), - "type": Var("atype"), - "varargs": Cases("varg", String("false"), String("true")), - "varargsAnnotations": Is(nil), + "parameters": Each("args", Fields{ + {Name: uast.KeyType, Op: String("SingleVariableDeclaration")}, + {Name: uast.KeyPos, Op: Var("apos")}, + {Name: "extraDimensions2", Op: Is(nil)}, + {Name: "initializer", Op: Var("ainit")}, + {Name: "modifiers", Op: Is(nil)}, + {Name: "name", Op: Var("aname")}, + {Name: "type", Op: Var("atype")}, + {Name: "varargs", Op: Cases("varg", String("false"), String("true"))}, + {Name: "varargsAnnotations", Op: Is(nil)}, }), "receiverQualifier": Var("recv_name"), "receiverType": Cases("recv", From 031a1fc01a88d608fce9cbb8c2922b32d185b64c Mon Sep 17 00:00:00 2001 From: Alexander Bezzubov Date: Mon, 6 May 2019 13:37:20 +0200 Subject: [PATCH 2/2] sem: drop MethodDeclaration->parameters->modifiers Instead of failing whole trasformation by assuming it's always nil, when it's not. Signed-off-by: Alexander Bezzubov --- driver/normalizer/normalizer.go | 2 +- fixtures/issue104_final_args.java | 6 + fixtures/issue104_final_args.java.native | 402 +++++++++++++++++++ fixtures/issue104_final_args.java.sem.uast | 374 ++++++++++++++++++ fixtures/issue104_final_args.java.uast | 425 +++++++++++++++++++++ 5 files changed, 1208 insertions(+), 1 deletion(-) create mode 100644 fixtures/issue104_final_args.java create mode 100644 fixtures/issue104_final_args.java.native create mode 100644 fixtures/issue104_final_args.java.sem.uast create mode 100644 fixtures/issue104_final_args.java.uast diff --git a/driver/normalizer/normalizer.go b/driver/normalizer/normalizer.go index 4112c3b..bc1f6db 100644 --- a/driver/normalizer/normalizer.go +++ b/driver/normalizer/normalizer.go @@ -148,7 +148,7 @@ var Normalizers = []Mapping{ {Name: uast.KeyPos, Op: Var("apos")}, {Name: "extraDimensions2", Op: Is(nil)}, {Name: "initializer", Op: Var("ainit")}, - {Name: "modifiers", Op: Is(nil)}, + {Name: "modifiers", Op: Any(), Drop: true}, // FIXME: preserve this array {Name: "name", Op: Var("aname")}, {Name: "type", Op: Var("atype")}, {Name: "varargs", Op: Cases("varg", String("false"), String("true"))}, diff --git a/fixtures/issue104_final_args.java b/fixtures/issue104_final_args.java new file mode 100644 index 0000000..82555c6 --- /dev/null +++ b/fixtures/issue104_final_args.java @@ -0,0 +1,6 @@ +package pkg; + +class C { + public void m1(final String str1) {} + public void m2(String str2) {} +} diff --git a/fixtures/issue104_final_args.java.native b/fixtures/issue104_final_args.java.native new file mode 100644 index 0000000..6058758 --- /dev/null +++ b/fixtures/issue104_final_args.java.native @@ -0,0 +1,402 @@ +{ + CompilationUnit: { '@type': "CompilationUnit", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 98, + col: 0, + }, + }, + imports: ~, + package: { '@type': "PackageDeclaration", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 12, + line: 1, + col: 13, + }, + }, + annotations: ~, + javadoc: ~, + name: { '@type': "SimpleName", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 8, + line: 1, + col: 9, + }, + end: { '@type': "uast:Position", + offset: 11, + line: 1, + col: 12, + }, + }, + identifier: "pkg", + }, + }, + types: [ + { '@type': "TypeDeclaration", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 14, + line: 3, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 97, + line: 6, + col: 2, + }, + }, + bodyDeclarations: [ + { '@type': "MethodDeclaration", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 26, + line: 4, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 62, + line: 4, + col: 39, + }, + }, + body: { '@type': "Block", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 60, + line: 4, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 62, + line: 4, + col: 39, + }, + }, + statements: ~, + }, + constructor: "false", + 'extraDimensions2': ~, + javadoc: ~, + modifiers: [ + { '@type': "Modifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 26, + line: 4, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 32, + line: 4, + col: 9, + }, + }, + keyword: "public", + }, + ], + name: { '@type': "SimpleName", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 38, + line: 4, + col: 15, + }, + end: { '@type': "uast:Position", + offset: 40, + line: 4, + col: 17, + }, + }, + identifier: "m1", + }, + parameters: [ + { '@type': "SingleVariableDeclaration", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 41, + line: 4, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 58, + line: 4, + col: 35, + }, + }, + 'extraDimensions2': ~, + initializer: ~, + modifiers: [ + { '@type': "Modifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 41, + line: 4, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 46, + line: 4, + col: 23, + }, + }, + keyword: "final", + }, + ], + name: { '@type': "SimpleName", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 54, + line: 4, + col: 31, + }, + end: { '@type': "uast:Position", + offset: 58, + line: 4, + col: 35, + }, + }, + identifier: "str1", + }, + type: { '@type': "SimpleType", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 47, + line: 4, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 53, + line: 4, + col: 30, + }, + }, + annotations: ~, + name: { '@type': "SimpleName", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 47, + line: 4, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 53, + line: 4, + col: 30, + }, + }, + identifier: "String", + }, + }, + varargs: "false", + varargsAnnotations: ~, + }, + ], + receiverQualifier: ~, + receiverType: ~, + 'returnType2': { '@type': "PrimitiveType", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 33, + line: 4, + col: 10, + }, + end: { '@type': "uast:Position", + offset: 37, + line: 4, + col: 14, + }, + }, + annotations: ~, + primitiveTypeCode: "void", + }, + thrownExceptionTypes: ~, + typeParameters: ~, + }, + { '@type': "MethodDeclaration", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 65, + line: 5, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 95, + line: 5, + col: 33, + }, + }, + body: { '@type': "Block", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 93, + line: 5, + col: 31, + }, + end: { '@type': "uast:Position", + offset: 95, + line: 5, + col: 33, + }, + }, + statements: ~, + }, + constructor: "false", + 'extraDimensions2': ~, + javadoc: ~, + modifiers: [ + { '@type': "Modifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 65, + line: 5, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 71, + line: 5, + col: 9, + }, + }, + keyword: "public", + }, + ], + name: { '@type': "SimpleName", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 77, + line: 5, + col: 15, + }, + end: { '@type': "uast:Position", + offset: 79, + line: 5, + col: 17, + }, + }, + identifier: "m2", + }, + parameters: [ + { '@type': "SingleVariableDeclaration", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 80, + line: 5, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 91, + line: 5, + col: 29, + }, + }, + 'extraDimensions2': ~, + initializer: ~, + modifiers: ~, + name: { '@type': "SimpleName", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 87, + line: 5, + col: 25, + }, + end: { '@type': "uast:Position", + offset: 91, + line: 5, + col: 29, + }, + }, + identifier: "str2", + }, + type: { '@type': "SimpleType", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 80, + line: 5, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 86, + line: 5, + col: 24, + }, + }, + annotations: ~, + name: { '@type': "SimpleName", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 80, + line: 5, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 86, + line: 5, + col: 24, + }, + }, + identifier: "String", + }, + }, + varargs: "false", + varargsAnnotations: ~, + }, + ], + receiverQualifier: ~, + receiverType: ~, + 'returnType2': { '@type': "PrimitiveType", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 72, + line: 5, + col: 10, + }, + end: { '@type': "uast:Position", + offset: 76, + line: 5, + col: 14, + }, + }, + annotations: ~, + primitiveTypeCode: "void", + }, + thrownExceptionTypes: ~, + typeParameters: ~, + }, + ], + interface: "false", + javadoc: ~, + modifiers: ~, + name: { '@type': "SimpleName", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 20, + line: 3, + col: 7, + }, + end: { '@type': "uast:Position", + offset: 21, + line: 3, + col: 8, + }, + }, + identifier: "C", + }, + superInterfaceTypes: ~, + superclassType: ~, + typeParameters: ~, + }, + ], + }, +} \ No newline at end of file diff --git a/fixtures/issue104_final_args.java.sem.uast b/fixtures/issue104_final_args.java.sem.uast new file mode 100644 index 0000000..8bed193 --- /dev/null +++ b/fixtures/issue104_final_args.java.sem.uast @@ -0,0 +1,374 @@ +{ '@type': "java:CompilationUnit", + '@role': [File], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 98, + col: 0, + }, + }, + imports: ~, + package: { '@type': "java:PackageDeclaration", + '@token': "package", + '@role': [Declaration, Package], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 12, + line: 1, + col: 13, + }, + }, + annotations: ~, + javadoc: ~, + name: { '@type': "uast:Identifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 8, + line: 1, + col: 9, + }, + end: { '@type': "uast:Position", + offset: 11, + line: 1, + col: 12, + }, + }, + Name: "pkg", + }, + }, + types: [ + { '@type': "java:TypeDeclaration", + '@role': [Declaration, Package, Type, Visibility], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 14, + line: 3, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 97, + line: 6, + col: 2, + }, + }, + bodyDeclarations: [ + { '@type': "uast:FunctionGroup", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 26, + line: 4, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 62, + line: 4, + col: 39, + }, + }, + Nodes: [ + ~, + [ + { '@type': "java:Modifier", + '@token': "public", + '@role': [Visibility, World], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 26, + line: 4, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 32, + line: 4, + col: 9, + }, + }, + }, + ], + { '@type': "uast:Alias", + Name: { '@type': "uast:Identifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 38, + line: 4, + col: 15, + }, + end: { '@type': "uast:Position", + offset: 40, + line: 4, + col: 17, + }, + }, + Name: "m1", + }, + Node: { '@type': "uast:Function", + Body: { '@type': "uast:Block", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 60, + line: 4, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 62, + line: 4, + col: 39, + }, + }, + Statements: ~, + }, + Type: { '@type': "uast:FunctionType", + Arguments: [ + { '@type': "uast:Argument", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 41, + line: 4, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 58, + line: 4, + col: 35, + }, + }, + Init: ~, + MapVariadic: false, + Name: { '@type': "uast:Identifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 54, + line: 4, + col: 31, + }, + end: { '@type': "uast:Position", + offset: 58, + line: 4, + col: 35, + }, + }, + Name: "str1", + }, + Receiver: false, + Type: { '@type': "java:SimpleType", + '@role': [Type], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 47, + line: 4, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 53, + line: 4, + col: 30, + }, + }, + annotations: ~, + name: { '@type': "uast:Identifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 47, + line: 4, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 53, + line: 4, + col: 30, + }, + }, + Name: "String", + }, + }, + Variadic: false, + }, + ], + Returns: ~, + }, + }, + }, + { + constructor: "false", + thrownExceptionTypes: ~, + typeParameters: ~, + }, + ], + }, + { '@type': "uast:FunctionGroup", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 65, + line: 5, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 95, + line: 5, + col: 33, + }, + }, + Nodes: [ + ~, + [ + { '@type': "java:Modifier", + '@token': "public", + '@role': [Visibility, World], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 65, + line: 5, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 71, + line: 5, + col: 9, + }, + }, + }, + ], + { '@type': "uast:Alias", + Name: { '@type': "uast:Identifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 77, + line: 5, + col: 15, + }, + end: { '@type': "uast:Position", + offset: 79, + line: 5, + col: 17, + }, + }, + Name: "m2", + }, + Node: { '@type': "uast:Function", + Body: { '@type': "uast:Block", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 93, + line: 5, + col: 31, + }, + end: { '@type': "uast:Position", + offset: 95, + line: 5, + col: 33, + }, + }, + Statements: ~, + }, + Type: { '@type': "uast:FunctionType", + Arguments: [ + { '@type': "uast:Argument", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 80, + line: 5, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 91, + line: 5, + col: 29, + }, + }, + Init: ~, + MapVariadic: false, + Name: { '@type': "uast:Identifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 87, + line: 5, + col: 25, + }, + end: { '@type': "uast:Position", + offset: 91, + line: 5, + col: 29, + }, + }, + Name: "str2", + }, + Receiver: false, + Type: { '@type': "java:SimpleType", + '@role': [Type], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 80, + line: 5, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 86, + line: 5, + col: 24, + }, + }, + annotations: ~, + name: { '@type': "uast:Identifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 80, + line: 5, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 86, + line: 5, + col: 24, + }, + }, + Name: "String", + }, + }, + Variadic: false, + }, + ], + Returns: ~, + }, + }, + }, + { + constructor: "false", + thrownExceptionTypes: ~, + typeParameters: ~, + }, + ], + }, + ], + interface: "false", + javadoc: ~, + modifiers: ~, + name: { '@type': "uast:Identifier", + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 20, + line: 3, + col: 7, + }, + end: { '@type': "uast:Position", + offset: 21, + line: 3, + col: 8, + }, + }, + Name: "C", + }, + superInterfaceTypes: ~, + superclassType: ~, + typeParameters: ~, + }, + ], +} \ No newline at end of file diff --git a/fixtures/issue104_final_args.java.uast b/fixtures/issue104_final_args.java.uast new file mode 100644 index 0000000..ade5b11 --- /dev/null +++ b/fixtures/issue104_final_args.java.uast @@ -0,0 +1,425 @@ +{ '@type': "CompilationUnit", + '@role': [File], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 98, + col: 0, + }, + }, + imports: ~, + package: { '@type': "PackageDeclaration", + '@token': "package", + '@role': [Declaration, Package], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 0, + line: 1, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 12, + line: 1, + col: 13, + }, + }, + annotations: ~, + javadoc: ~, + name: { '@type': "SimpleName", + '@token': "pkg", + '@role': [Expression, Identifier], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 8, + line: 1, + col: 9, + }, + end: { '@type': "uast:Position", + offset: 11, + line: 1, + col: 12, + }, + }, + }, + }, + types: [ + { '@type': "TypeDeclaration", + '@role': [Declaration, Package, Type, Visibility], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 14, + line: 3, + col: 1, + }, + end: { '@type': "uast:Position", + offset: 97, + line: 6, + col: 2, + }, + }, + bodyDeclarations: [ + { '@type': "MethodDeclaration", + '@role': [Declaration, Function, Visibility, World], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 26, + line: 4, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 62, + line: 4, + col: 39, + }, + }, + body: { '@type': "Block", + '@role': [Block, Body, Function, Scope, Statement], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 60, + line: 4, + col: 37, + }, + end: { '@type': "uast:Position", + offset: 62, + line: 4, + col: 39, + }, + }, + statements: ~, + }, + constructor: "false", + 'extraDimensions2': ~, + javadoc: ~, + modifiers: [ + { '@type': "Modifier", + '@token': "public", + '@role': [Visibility, World], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 26, + line: 4, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 32, + line: 4, + col: 9, + }, + }, + }, + ], + name: { '@type': "SimpleName", + '@token': "m1", + '@role': [Expression, Function, Identifier, Name], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 38, + line: 4, + col: 15, + }, + end: { '@type': "uast:Position", + offset: 40, + line: 4, + col: 17, + }, + }, + }, + parameters: [ + { '@type': "SingleVariableDeclaration", + '@role': [Argument, Declaration, Function, Variable], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 41, + line: 4, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 58, + line: 4, + col: 35, + }, + }, + 'extraDimensions2': ~, + initializer: ~, + modifiers: [ + { '@type': "Modifier", + '@token': "final", + '@role': [Incomplete], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 41, + line: 4, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 46, + line: 4, + col: 23, + }, + }, + }, + ], + name: { '@type': "SimpleName", + '@token': "str1", + '@role': [Argument, Expression, Function, Identifier, Name], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 54, + line: 4, + col: 31, + }, + end: { '@type': "uast:Position", + offset: 58, + line: 4, + col: 35, + }, + }, + }, + type: { '@type': "SimpleType", + '@role': [Type], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 47, + line: 4, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 53, + line: 4, + col: 30, + }, + }, + annotations: ~, + name: { '@type': "SimpleName", + '@token': "String", + '@role': [Expression, Identifier], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 47, + line: 4, + col: 24, + }, + end: { '@type': "uast:Position", + offset: 53, + line: 4, + col: 30, + }, + }, + }, + }, + varargs: "false", + varargsAnnotations: ~, + }, + ], + receiverQualifier: ~, + receiverType: ~, + 'returnType2': { '@type': "PrimitiveType", + '@token': "void", + '@role': [Primitive, Type], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 33, + line: 4, + col: 10, + }, + end: { '@type': "uast:Position", + offset: 37, + line: 4, + col: 14, + }, + }, + annotations: ~, + }, + thrownExceptionTypes: ~, + typeParameters: ~, + }, + { '@type': "MethodDeclaration", + '@role': [Declaration, Function, Visibility, World], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 65, + line: 5, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 95, + line: 5, + col: 33, + }, + }, + body: { '@type': "Block", + '@role': [Block, Body, Function, Scope, Statement], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 93, + line: 5, + col: 31, + }, + end: { '@type': "uast:Position", + offset: 95, + line: 5, + col: 33, + }, + }, + statements: ~, + }, + constructor: "false", + 'extraDimensions2': ~, + javadoc: ~, + modifiers: [ + { '@type': "Modifier", + '@token': "public", + '@role': [Visibility, World], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 65, + line: 5, + col: 3, + }, + end: { '@type': "uast:Position", + offset: 71, + line: 5, + col: 9, + }, + }, + }, + ], + name: { '@type': "SimpleName", + '@token': "m2", + '@role': [Expression, Function, Identifier, Name], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 77, + line: 5, + col: 15, + }, + end: { '@type': "uast:Position", + offset: 79, + line: 5, + col: 17, + }, + }, + }, + parameters: [ + { '@type': "SingleVariableDeclaration", + '@role': [Argument, Declaration, Function, Variable], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 80, + line: 5, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 91, + line: 5, + col: 29, + }, + }, + 'extraDimensions2': ~, + initializer: ~, + modifiers: ~, + name: { '@type': "SimpleName", + '@token': "str2", + '@role': [Argument, Expression, Function, Identifier, Name], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 87, + line: 5, + col: 25, + }, + end: { '@type': "uast:Position", + offset: 91, + line: 5, + col: 29, + }, + }, + }, + type: { '@type': "SimpleType", + '@role': [Type], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 80, + line: 5, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 86, + line: 5, + col: 24, + }, + }, + annotations: ~, + name: { '@type': "SimpleName", + '@token': "String", + '@role': [Expression, Identifier], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 80, + line: 5, + col: 18, + }, + end: { '@type': "uast:Position", + offset: 86, + line: 5, + col: 24, + }, + }, + }, + }, + varargs: "false", + varargsAnnotations: ~, + }, + ], + receiverQualifier: ~, + receiverType: ~, + 'returnType2': { '@type': "PrimitiveType", + '@token': "void", + '@role': [Primitive, Type], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 72, + line: 5, + col: 10, + }, + end: { '@type': "uast:Position", + offset: 76, + line: 5, + col: 14, + }, + }, + annotations: ~, + }, + thrownExceptionTypes: ~, + typeParameters: ~, + }, + ], + interface: "false", + javadoc: ~, + modifiers: ~, + name: { '@type': "SimpleName", + '@token': "C", + '@role': [Expression, Identifier], + '@pos': { '@type': "uast:Positions", + start: { '@type': "uast:Position", + offset: 20, + line: 3, + col: 7, + }, + end: { '@type': "uast:Position", + offset: 21, + line: 3, + col: 8, + }, + }, + }, + superInterfaceTypes: ~, + superclassType: ~, + typeParameters: ~, + }, + ], +} \ No newline at end of file