From 0fdcc5f3a40d1c022f4d7a1c53386c2c017b76be Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Tue, 18 Jun 2024 00:00:45 +0300 Subject: [PATCH] Add ArkIR dumps for tests --- .../src/test/resources/arkir/basic.ts.json | 4787 +++++++++++++++++ .../src/test/resources/arkir/taint.ts.json | 817 +++ 2 files changed, 5604 insertions(+) create mode 100644 jacodb-panda-dynamic/src/test/resources/arkir/basic.ts.json create mode 100644 jacodb-panda-dynamic/src/test/resources/arkir/taint.ts.json diff --git a/jacodb-panda-dynamic/src/test/resources/arkir/basic.ts.json b/jacodb-panda-dynamic/src/test/resources/arkir/basic.ts.json new file mode 100644 index 000000000..1473ac2ff --- /dev/null +++ b/jacodb-panda-dynamic/src/test/resources/arkir/basic.ts.json @@ -0,0 +1,4787 @@ +{ + "name": "basic.ts", + "namespaces": [], + "classes": [ + { + "signature": { + "name": "AnonymousClass-basic.ts-0" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-basic.ts-0" + }, + "name": "content", + "fieldType": "Type" + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false, + "initializer": null + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-basic.ts-0" + }, + "name": "constructor", + "parameters": [ + { + "name": "value", + "type": "Type", + "isOptional": false + } + ], + "returnType": "unknown" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "value", + "type": "unknown" + }, + { + "name": "this", + "type": "@save/basic: AnonymousClass-basic.ts-0" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "value", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": "Type" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: AnonymousClass-basic.ts-0" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: AnonymousClass-basic.ts-0" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": "@save/basic: AnonymousClass-basic.ts-0" + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-basic.ts-0" + }, + "name": "content", + "fieldType": "Type" + } + }, + "right": { + "_": "Constant", + "value": "undefined", + "type": "undefined" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": "@save/basic: AnonymousClass-basic.ts-0" + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "content", + "fieldType": "unknown" + } + }, + "right": { + "_": "Local", + "name": "value", + "type": "unknown" + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "_DEFAULT_ARK_CLASS" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "_DEFAULT_ARK_METHOD", + "parameters": [], + "returnType": "unknown" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + }, + { + "name": "someClass", + "type": "@save/basic: AnonymousClass-basic.ts-0" + }, + { + "name": "m", + "type": "unknown" + }, + { + "name": "$temp1", + "type": "unknown" + }, + { + "name": "$temp2", + "type": "unknown" + }, + { + "name": "x", + "type": "number" + }, + { + "name": "$temp3", + "type": "unknown" + }, + { + "name": "soo", + "type": "unknown" + }, + { + "name": "$temp4", + "type": "unknown" + }, + { + "name": "forLoopTest", + "type": "unknown" + }, + { + "name": "test", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "someClass", + "type": "@save/basic: AnonymousClass-basic.ts-0" + }, + "right": { + "_": "Local", + "name": "AnonymousClass-basic.ts-0", + "type": "@save/basic: AnonymousClass-basic.ts-0" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp2", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "\"Hello, world\"", + "type": "string" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + }, + "right": { + "_": "NewExpr", + "type": "@_UnkownProjectName/_UnkownFileName: someClass" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "someClass" + }, + "name": "constructor", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp2", + "type": "unknown" + } + ] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "m", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "1", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "x", + "type": "number" + }, + "right": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "123", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "soo", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "" + }, + "name": "forLoopTest", + "parameters": [], + "returnType": "unknown" + }, + "args": [] + } + }, + { + "_": "CallStmt", + "expr": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "" + }, + "name": "test", + "parameters": [], + "returnType": "unknown" + }, + "args": [] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "forLoopTest", + "parameters": [], + "returnType": "unknown" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + }, + { + "name": "myPerson", + "type": "unknown" + }, + { + "name": "$temp1", + "type": "unknown" + }, + { + "name": "$temp2", + "type": "unknown" + }, + { + "name": "i", + "type": "unknown" + }, + { + "name": "$temp3", + "type": "unknown" + }, + { + "name": "$temp4", + "type": "unknown" + }, + { + "name": "newAge", + "type": "unknown" + }, + { + "name": "$temp5", + "type": "unknown" + }, + { + "name": "logger", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [ + 1 + ], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp2", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "10", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + }, + "right": { + "_": "NewExpr", + "type": "@_UnkownProjectName/_UnkownFileName: Person" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "Person" + }, + "name": "constructor", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp2", + "type": "unknown" + } + ] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "myPerson", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + } + } + ] + }, + { + "id": 1, + "successors": [ + 2, + 3 + ], + "predecessors": [ + 0 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "10", + "type": "number" + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": ">=", + "left": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "1", + "type": "number" + } + } + } + ] + }, + { + "id": 2, + "successors": [], + "predecessors": [ + 1, + 3 + ], + "stmts": [ + { + "_": "ReturnVoidStmt" + } + ] + }, + { + "id": 3, + "successors": [ + 2 + ], + "predecessors": [ + 1 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp5", + "type": "unknown" + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "myPerson", + "type": "unknown" + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "age", + "fieldType": "unknown" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "newAge", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "$temp5", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "i", + "type": "unknown" + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "newAge", + "type": "unknown" + } + ] + } + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "test", + "parameters": [], + "returnType": "unknown" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + }, + { + "name": "sampleData", + "type": "(number)[]" + }, + { + "name": "$temp1", + "type": "(number)[]" + }, + { + "name": "i", + "type": "unknown" + }, + { + "name": "$temp2", + "type": "unknown" + }, + { + "name": "$temp3", + "type": "unknown" + }, + { + "name": "$temp4", + "type": "unknown" + }, + { + "name": "$temp5", + "type": "unknown" + }, + { + "name": "$temp6", + "type": "unknown" + }, + { + "name": "$temp7", + "type": "unknown" + }, + { + "name": "$temp8", + "type": "unknown" + }, + { + "name": "$temp9", + "type": "unknown" + }, + { + "name": "logger", + "type": "unknown" + }, + { + "name": "$temp10", + "type": "unknown" + }, + { + "name": "$temp11", + "type": "unknown" + }, + { + "name": "$temp12", + "type": "unknown" + }, + { + "name": "$temp13", + "type": "unknown" + }, + { + "name": "$temp14", + "type": "unknown" + }, + { + "name": "$temp15", + "type": "unknown" + }, + { + "name": "$temp16", + "type": "unknown" + }, + { + "name": "$temp17", + "type": "unknown" + }, + { + "name": "$temp18", + "type": "unknown" + }, + { + "name": "count", + "type": "unknown" + }, + { + "name": "$temp19", + "type": "unknown" + }, + { + "name": "$temp20", + "type": "unknown" + }, + { + "name": "$temp21", + "type": "unknown" + }, + { + "name": "j", + "type": "unknown" + }, + { + "name": "$temp22", + "type": "unknown" + }, + { + "name": "$temp23", + "type": "unknown" + }, + { + "name": "$temp24", + "type": "unknown" + }, + { + "name": "$temp25", + "type": "unknown" + }, + { + "name": "k", + "type": "unknown" + }, + { + "name": "$temp26", + "type": "unknown" + }, + { + "name": "$temp27", + "type": "unknown" + }, + { + "name": "$temp28", + "type": "unknown" + }, + { + "name": "$temp29", + "type": "unknown" + }, + { + "name": "$temp30", + "type": "unknown" + }, + { + "name": "$temp31", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [ + 1 + ], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": "(number)[]" + }, + "right": { + "_": "NewArrayExpr", + "type": "number", + "size": { + "_": "Constant", + "value": "5", + "type": "number" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp1", + "type": "(number)[]" + }, + "index": { + "_": "Constant", + "value": "0", + "type": "number" + }, + "type": "number" + }, + "right": { + "_": "Constant", + "value": "1", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp1", + "type": "(number)[]" + }, + "index": { + "_": "Constant", + "value": "1", + "type": "number" + }, + "type": "number" + }, + "right": { + "_": "Constant", + "value": "2", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp1", + "type": "(number)[]" + }, + "index": { + "_": "Constant", + "value": "2", + "type": "number" + }, + "type": "number" + }, + "right": { + "_": "Constant", + "value": "3", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp1", + "type": "(number)[]" + }, + "index": { + "_": "Constant", + "value": "3", + "type": "number" + }, + "type": "number" + }, + "right": { + "_": "Constant", + "value": "4", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp1", + "type": "(number)[]" + }, + "index": { + "_": "Constant", + "value": "4", + "type": "number" + }, + "type": "number" + }, + "right": { + "_": "Constant", + "value": "5", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "sampleData", + "type": "(number)[]" + }, + "right": { + "_": "Local", + "name": "$temp1", + "type": "(number)[]" + } + } + ] + }, + { + "id": 1, + "successors": [ + 2, + 3 + ], + "predecessors": [ + 0 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp2", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp2", + "type": "unknown" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "sampleData", + "type": "(number)[]" + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "length", + "fieldType": "unknown" + } + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": ">=", + "left": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "1", + "type": "number" + } + } + } + ] + }, + { + "id": 2, + "successors": [], + "predecessors": [ + 1, + 10, + 11 + ], + "stmts": [ + { + "_": "ReturnVoidStmt" + } + ] + }, + { + "id": 3, + "successors": [ + 4, + 20 + ], + "predecessors": [ + 1 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "2", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp5", + "type": "unknown" + }, + "right": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "sampleData", + "type": "(number)[]" + }, + "index": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp6", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp7", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "%", + "left": { + "_": "Local", + "name": "$temp5", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + } + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": "!==", + "left": { + "_": "Local", + "name": "$temp7", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp6", + "type": "unknown" + } + } + } + ] + }, + { + "id": 4, + "successors": [ + 5 + ], + "predecessors": [ + 3 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp10", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "sampleData", + "type": "(number)[]" + }, + "index": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "type": "number" + }, + "right": { + "_": "Constant", + "value": " 是奇数", + "type": "string" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp11", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Constant", + "value": "", + "type": "string" + }, + "right": { + "_": "Local", + "name": "$temp10", + "type": "unknown" + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp11", + "type": "unknown" + } + ] + } + } + ] + }, + { + "id": 5, + "successors": [ + 6, + 17, + 18, + 19 + ], + "predecessors": [ + 4, + 20 + ], + "stmts": [] + }, + { + "id": 6, + "successors": [ + 7 + ], + "predecessors": [ + 5 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp18", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "\"无法判断\"", + "type": "string" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp18", + "type": "unknown" + } + ] + } + } + ] + }, + { + "id": 7, + "successors": [ + 8 + ], + "predecessors": [ + 6 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp19", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "count", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp19", + "type": "unknown" + } + } + ] + }, + { + "id": 8, + "successors": [ + 9, + 16 + ], + "predecessors": [ + 7 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp20", + "type": "unknown" + }, + "right": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "sampleData", + "type": "(number)[]" + }, + "index": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "type": "number" + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": ">=", + "left": { + "_": "Local", + "name": "count", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp20", + "type": "unknown" + } + } + } + ] + }, + { + "id": 9, + "successors": [ + 10, + 13 + ], + "predecessors": [ + 8, + 15, + 16 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp22", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "j", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp22", + "type": "unknown" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp23", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "5", + "type": "number" + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": ">=", + "left": { + "_": "Local", + "name": "j", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp23", + "type": "unknown" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "j", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "j", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "1", + "type": "number" + } + } + } + ] + }, + { + "id": 10, + "successors": [ + 2, + 11 + ], + "predecessors": [ + 9, + 14 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp26", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "k", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp26", + "type": "unknown" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp27", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "3", + "type": "number" + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": ">=", + "left": { + "_": "Local", + "name": "k", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp27", + "type": "unknown" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "k", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "k", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "1", + "type": "number" + } + } + } + ] + }, + { + "id": 11, + "successors": [ + 2, + 12 + ], + "predecessors": [ + 10 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp28", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Constant", + "value": "外层循环计数: ", + "type": "string" + }, + "right": { + "_": "Local", + "name": "k", + "type": "unknown" + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp28", + "type": "unknown" + } + ] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp29", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "'Department name: '", + "type": "string" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp30", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "$temp29", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "k", + "type": "unknown" + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp30", + "type": "unknown" + } + ] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp31", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "1", + "type": "number" + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": "!==", + "left": { + "_": "Local", + "name": "k", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp31", + "type": "unknown" + } + } + } + ] + }, + { + "id": 12, + "successors": [], + "predecessors": [ + 11 + ], + "stmts": [ + { + "_": "GotoStmt" + } + ] + }, + { + "id": 13, + "successors": [ + 14, + 15 + ], + "predecessors": [ + 9 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp24", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "2", + "type": "number" + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": "!==", + "left": { + "_": "Local", + "name": "j", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp24", + "type": "unknown" + } + } + } + ] + }, + { + "id": 14, + "successors": [ + 10 + ], + "predecessors": [ + 13 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp25", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Constant", + "value": "当前内层循环计数: ", + "type": "string" + }, + "right": { + "_": "Local", + "name": "j", + "type": "unknown" + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp25", + "type": "unknown" + } + ] + } + } + ] + }, + { + "id": 15, + "successors": [ + 9 + ], + "predecessors": [ + 13 + ], + "stmts": [ + { + "_": "GotoStmt" + } + ] + }, + { + "id": 16, + "successors": [ + 9 + ], + "predecessors": [ + 8 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp21", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Constant", + "value": "当前计数: ", + "type": "string" + }, + "right": { + "_": "Local", + "name": "count", + "type": "unknown" + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp21", + "type": "unknown" + } + ] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "count", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "count", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "1", + "type": "number" + } + } + } + ] + }, + { + "id": 17, + "successors": [], + "predecessors": [ + 5 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp16", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "sampleData", + "type": "(number)[]" + }, + "index": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "type": "number" + }, + "right": { + "_": "Constant", + "value": " 除以 3 余 2", + "type": "string" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp17", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Constant", + "value": "", + "type": "string" + }, + "right": { + "_": "Local", + "name": "$temp16", + "type": "unknown" + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp17", + "type": "unknown" + } + ] + } + }, + { + "_": "GotoStmt" + } + ] + }, + { + "id": 18, + "successors": [], + "predecessors": [ + 5 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp14", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "sampleData", + "type": "(number)[]" + }, + "index": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "type": "number" + }, + "right": { + "_": "Constant", + "value": " 除以 3 余 1", + "type": "string" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp15", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Constant", + "value": "", + "type": "string" + }, + "right": { + "_": "Local", + "name": "$temp14", + "type": "unknown" + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp15", + "type": "unknown" + } + ] + } + }, + { + "_": "GotoStmt" + } + ] + }, + { + "id": 19, + "successors": [], + "predecessors": [ + 5 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp12", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "sampleData", + "type": "(number)[]" + }, + "index": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "type": "number" + }, + "right": { + "_": "Constant", + "value": " 可被 3 整除", + "type": "string" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp13", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Constant", + "value": "", + "type": "string" + }, + "right": { + "_": "Local", + "name": "$temp12", + "type": "unknown" + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp13", + "type": "unknown" + } + ] + } + }, + { + "_": "GotoStmt" + } + ] + }, + { + "id": 20, + "successors": [ + 5 + ], + "predecessors": [ + 3 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp8", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "sampleData", + "type": "(number)[]" + }, + "index": { + "_": "Local", + "name": "i", + "type": "unknown" + }, + "type": "number" + }, + "right": { + "_": "Constant", + "value": " 是偶数", + "type": "string" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp9", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Constant", + "value": "", + "type": "string" + }, + "right": { + "_": "Local", + "name": "$temp8", + "type": "unknown" + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp9", + "type": "unknown" + } + ] + } + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "classMethodTest", + "parameters": [], + "returnType": "unknown" + }, + "modifiers": [ + "ExportKeyword" + ], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + }, + { + "name": "notPerson", + "type": "unknown" + }, + { + "name": "$temp1", + "type": "unknown" + }, + { + "name": "$temp2", + "type": "unknown" + }, + { + "name": "x", + "type": "unknown" + }, + { + "name": "$temp3", + "type": "unknown" + }, + { + "name": "z", + "type": "unknown" + }, + { + "name": "$temp4", + "type": "unknown" + }, + { + "name": "y", + "type": "unknown" + }, + { + "name": "test", + "type": "unknown" + }, + { + "name": "a", + "type": "unknown" + }, + { + "name": "Person", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp2", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "10", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + }, + "right": { + "_": "NewExpr", + "type": "@_UnkownProjectName/_UnkownFileName: Person" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "Person" + }, + "name": "constructor", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp2", + "type": "unknown" + } + ] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "notPerson", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + }, + "right": { + "_": "NewExpr", + "type": "@_UnkownProjectName/_UnkownFileName: Map" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "Map" + }, + "name": "constructor", + "parameters": [], + "returnType": "unknown" + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "x", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + }, + "right": { + "_": "NewExpr", + "type": "@_UnkownProjectName/_UnkownFileName: Error" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "Error" + }, + "name": "constructor", + "parameters": [], + "returnType": "unknown" + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "z", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "y", + "type": "unknown" + }, + "right": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "" + }, + "name": "test", + "parameters": [], + "returnType": "unknown" + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "a", + "type": "unknown" + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "notPerson", + "type": "unknown" + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "age", + "fieldType": "unknown" + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "notPerson", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "growOld", + "parameters": [], + "returnType": "unknown" + }, + "args": [] + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "Person", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "wooooof", + "parameters": [], + "returnType": "unknown" + }, + "args": [] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "foo", + "parameters": [ + { + "name": "x", + "type": "number", + "isOptional": false + } + ], + "returnType": "number" + }, + "modifiers": [ + "ExportKeyword" + ], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "x", + "type": "unknown" + }, + { + "name": "this", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + }, + { + "name": "y", + "type": "unknown" + }, + { + "name": "$temp2", + "type": "unknown" + }, + { + "name": "k", + "type": "unknown" + }, + { + "name": "$temp3", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [ + 1 + ], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "x", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp2", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "y", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp2", + "type": "unknown" + } + } + ] + }, + { + "id": 1, + "successors": [ + 2, + 3 + ], + "predecessors": [ + 0 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "k", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": ">=", + "left": { + "_": "Local", + "name": "k", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "x", + "type": "unknown" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "k", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "k", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "1", + "type": "number" + } + } + } + ] + }, + { + "id": 2, + "successors": [], + "predecessors": [ + 1, + 3 + ], + "stmts": [ + { + "_": "ReturnStmt", + "arg": { + "_": "Local", + "name": "y", + "type": "unknown" + } + } + ] + }, + { + "id": 3, + "successors": [ + 2 + ], + "predecessors": [ + 1 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "y", + "type": "unknown" + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "y", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "k", + "type": "unknown" + } + } + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "listParameters", + "parameters": [ + { + "name": "u", + "type": "number", + "isOptional": false + }, + { + "name": "v", + "type": "number", + "isOptional": false + }, + { + "name": "w", + "type": "string", + "isOptional": false + } + ], + "returnType": "@save/basic: AnonymousClass-basic.ts-1" + }, + "modifiers": [ + "ExportKeyword" + ], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "u", + "type": "unknown" + }, + { + "name": "v", + "type": "unknown" + }, + { + "name": "w", + "type": "unknown" + }, + { + "name": "this", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + }, + { + "name": "$temp4", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "u", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "v", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 1, + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "w", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 2, + "type": "string" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + }, + "right": { + "_": "NewExpr", + "type": "@save/basic: AnonymousClass$listParameters$0" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass$listParameters$0" + }, + "name": "constructor", + "parameters": [], + "returnType": "unknown" + }, + "args": [] + } + }, + { + "_": "ReturnStmt", + "arg": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + } + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "Person" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "Person" + }, + "name": "x", + "fieldType": "number" + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false, + "initializer": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "signature": { + "enclosingClass": { + "name": "Person" + }, + "name": "growOld", + "fieldType": "UNDEFINED" + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false, + "initializer": { + "_": "Constant", + "value": "", + "type": "unknown" + } + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Person" + }, + "name": "constructor", + "parameters": [ + { + "name": "age", + "type": "number", + "isOptional": false + } + ], + "returnType": "unknown" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "age", + "type": "unknown" + }, + { + "name": "this", + "type": "@save/basic: Person" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "age", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: Person" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: Person" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": "@save/basic: Person" + }, + "field": { + "enclosingClass": { + "name": "Person" + }, + "name": "x", + "fieldType": "number" + } + }, + "right": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Person" + }, + "name": "getAge", + "parameters": [], + "returnType": "unknown" + }, + "modifiers": [ + "PublicKeyword" + ], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/basic: Person" + }, + { + "name": "$temp1", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: Person" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: Person" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": "@save/basic: Person" + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "age", + "fieldType": "unknown" + } + } + }, + { + "_": "ReturnStmt", + "arg": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + } + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Person" + }, + "name": "wooooof", + "parameters": [], + "returnType": "unknown" + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/basic: Person" + }, + { + "name": "$temp1", + "type": "unknown" + }, + { + "name": "logger", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: Person" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: Person" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "\"not a person sound\"", + "type": "string" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp1", + "type": "unknown" + } + ] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "Alarm" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Alarm" + }, + "name": "alert", + "parameters": [], + "returnType": "void" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/basic: Alarm" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: Alarm" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: Alarm" + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "Alarm2" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Alarm2" + }, + "name": "alert2", + "parameters": [], + "returnType": "void" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/basic: Alarm2" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: Alarm2" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: Alarm2" + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "Door" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [], + "methods": [] + }, + { + "signature": { + "name": "Adder" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "Adder" + }, + "name": "add", + "fieldType": "UNDEFINED" + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false, + "initializer": { + "_": "Constant", + "value": "", + "type": "unknown" + } + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Adder" + }, + "name": "constructor", + "parameters": [ + { + "name": "a", + "type": "number", + "isOptional": false + } + ], + "returnType": "unknown" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "a", + "type": "unknown" + }, + { + "name": "this", + "type": "@save/basic: Adder" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "a", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: Adder" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: Adder" + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "ExtendedAdder" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "Adder", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "ExtendedAdder" + }, + "name": "superAdd", + "fieldType": "UNDEFINED" + }, + "modifiers": [ + "PrivateKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false, + "initializer": { + "_": "InstanceFieldRef", + "instance": { + "_": "Constant", + "value": "", + "type": "unknown" + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "add", + "fieldType": "unknown" + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "ExtendedAdder" + }, + "name": "add", + "fieldType": "UNDEFINED" + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false, + "initializer": { + "_": "Constant", + "value": "", + "type": "unknown" + } + } + ], + "methods": [] + }, + { + "signature": { + "name": "AnonymousClass$listParameters$0" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [], + "methods": [] + }, + { + "signature": { + "name": "SecurityDoor" + }, + "modifiers": [ + "ExportKeyword" + ], + "typeParameters": [], + "superClassName": "Door", + "implementedInterfaceNames": [ + "Alarm", + "Alarm2" + ], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "x", + "fieldType": "number" + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false, + "initializer": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "y", + "fieldType": "string" + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false, + "initializer": { + "_": "Constant", + "value": "''", + "type": "string" + } + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "Members", + "fieldType": "UNDEFINED" + }, + "modifiers": [ + "PublicKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false, + "initializer": { + "_": "Constant", + "value": "", + "type": "unknown" + } + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "alert", + "parameters": [], + "returnType": "void" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + { + "name": "$temp1", + "type": "unknown" + }, + { + "name": "logger", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: SecurityDoor" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "\"SecurityDoor alert\"", + "type": "string" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp1", + "type": "unknown" + } + ] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "alert2", + "parameters": [], + "returnType": "void" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + { + "name": "$temp1", + "type": "unknown" + }, + { + "name": "logger", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: SecurityDoor" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "\"SecurityDoor alert2\"", + "type": "string" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp1", + "type": "unknown" + } + ] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "fooo", + "parameters": [], + "returnType": "unknown" + }, + "modifiers": [ + "PublicKeyword" + ], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + { + "name": "$temp1", + "type": "unknown" + }, + { + "name": "logger", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: SecurityDoor" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "\"This is fooo!\"", + "type": "string" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp1", + "type": "unknown" + } + ] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "constructor", + "parameters": [ + { + "name": "x", + "type": "number", + "isOptional": false + }, + { + "name": "y", + "type": "string", + "isOptional": false + } + ], + "returnType": "unknown" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "x", + "type": "unknown" + }, + { + "name": "y", + "type": "unknown" + }, + { + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + { + "name": "super", + "type": "unknown" + }, + { + "name": "$temp3", + "type": "unknown" + }, + { + "name": "logger", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "x", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "y", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 1, + "type": "string" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: SecurityDoor" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + "field": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "x", + "fieldType": "number" + } + }, + "right": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + "field": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "y", + "fieldType": "string" + } + }, + "right": { + "_": "Constant", + "value": "''", + "type": "string" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + "field": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "Members", + "fieldType": "UNDEFINED" + } + }, + "right": { + "_": "Constant", + "value": "", + "type": "unknown" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "" + }, + "name": "super", + "parameters": [], + "returnType": "unknown" + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "x", + "fieldType": "unknown" + } + }, + "right": { + "_": "Local", + "name": "x", + "type": "unknown" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": "@save/basic: SecurityDoor" + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "y", + "fieldType": "unknown" + } + }, + "right": { + "_": "Local", + "name": "y", + "type": "unknown" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "\"This is a constrctor!\"", + "type": "string" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp3", + "type": "unknown" + } + ] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "Animal" + }, + "modifiers": [ + "AbstractKeyword" + ], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "Animal" + }, + "name": "name", + "fieldType": "UNDEFINED" + }, + "modifiers": [ + "PublicKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false, + "initializer": null + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Animal" + }, + "name": "constructor", + "parameters": [ + { + "name": "name", + "type": "string", + "isOptional": false + } + ], + "returnType": "unknown" + }, + "modifiers": [ + "PublicKeyword" + ], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "name", + "type": "unknown" + }, + { + "name": "this", + "type": "@save/basic: Animal" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "name", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": "string" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: Animal" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: Animal" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": "@save/basic: Animal" + }, + "field": { + "enclosingClass": { + "name": "Animal" + }, + "name": "name", + "fieldType": "UNDEFINED" + } + }, + "right": { + "_": "Constant", + "value": "undefined", + "type": "undefined" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": "@save/basic: Animal" + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "name", + "fieldType": "unknown" + } + }, + "right": { + "_": "Local", + "name": "name", + "type": "unknown" + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Animal" + }, + "name": "sayHi", + "parameters": [], + "returnType": "void" + }, + "modifiers": [ + "PublicKeyword", + "AbstractKeyword" + ], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/basic: Animal" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: Animal" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: Animal" + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "StringValidator" + }, + "modifiers": [ + "ExportKeyword" + ], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "StringValidator" + }, + "name": "color", + "fieldType": "string" + }, + "modifiers": [], + "typeParameters": [], + "questionToken": true, + "exclamationToken": false, + "initializer": null + }, + { + "signature": { + "enclosingClass": { + "name": "StringValidator" + }, + "name": "width", + "fieldType": "number" + }, + "modifiers": [], + "typeParameters": [], + "questionToken": true, + "exclamationToken": false, + "initializer": null + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "StringValidator" + }, + "name": "isAcceptable", + "parameters": [ + { + "name": "s", + "type": "string", + "isOptional": true + } + ], + "returnType": "boolean" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "s", + "type": "unknown" + }, + { + "name": "this", + "type": "@save/basic: StringValidator" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "s", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": "string" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/basic: StringValidator" + }, + "right": { + "_": "ThisRef", + "type": "@save/basic: StringValidator" + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + } + ], + "importInfos": [], + "exportInfos": [ + { + "exportClauseName": "classMethodTest", + "exportClauseType": "Method", + "isDefault": false, + "modifiers": [ + "ExportKeyword" + ], + "originTsPosition": { + "line": -1, + "col": -1 + } + }, + { + "exportClauseName": "foo", + "exportClauseType": "Method", + "isDefault": false, + "modifiers": [ + "ExportKeyword" + ], + "originTsPosition": { + "line": -1, + "col": -1 + } + }, + { + "exportClauseName": "listParameters", + "exportClauseType": "Method", + "isDefault": false, + "modifiers": [ + "ExportKeyword" + ], + "originTsPosition": { + "line": -1, + "col": -1 + } + }, + { + "exportClauseName": "SecurityDoor", + "exportClauseType": "Class", + "isDefault": false, + "modifiers": [ + "ExportKeyword" + ], + "originTsPosition": { + "line": -1, + "col": -1 + } + }, + { + "exportClauseName": "StringValidator", + "exportClauseType": "Class", + "isDefault": false, + "modifiers": [ + "ExportKeyword" + ], + "originTsPosition": { + "line": -1, + "col": -1 + } + }, + { + "exportClauseName": "ExtAdder", + "exportClauseType": "NamedExports", + "nameBeforeAs": "ExtendedAdder", + "isDefault": false, + "modifiers": [], + "originTsPosition": { + "line": 193, + "col": 1 + } + }, + { + "exportClauseName": "ExtendedAdder", + "exportClauseType": "NamedExports", + "isDefault": false, + "modifiers": [], + "originTsPosition": { + "line": 193, + "col": 1 + } + } + ] +} \ No newline at end of file diff --git a/jacodb-panda-dynamic/src/test/resources/arkir/taint.ts.json b/jacodb-panda-dynamic/src/test/resources/arkir/taint.ts.json new file mode 100644 index 000000000..4a5d404cf --- /dev/null +++ b/jacodb-panda-dynamic/src/test/resources/arkir/taint.ts.json @@ -0,0 +1,817 @@ +{ + "name": "taint.ts", + "namespaces": [], + "classes": [ + { + "signature": { + "name": "_DEFAULT_ARK_CLASS" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "_DEFAULT_ARK_METHOD", + "parameters": [], + "returnType": "unknown" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "source", + "parameters": [], + "returnType": "number|null" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + }, + { + "name": "$temp1", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "null", + "type": "null" + } + }, + { + "_": "ReturnStmt", + "arg": { + "_": "Local", + "name": "$temp1", + "type": "unknown" + } + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "pass", + "parameters": [ + { + "name": "data", + "type": "number|null", + "isOptional": false + } + ], + "returnType": "number|null" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "data", + "type": "unknown" + }, + { + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "data", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": "number|null" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "ReturnStmt", + "arg": { + "_": "Local", + "name": "data", + "type": "unknown" + } + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "validate", + "parameters": [ + { + "name": "data", + "type": "number|null", + "isOptional": false + } + ], + "returnType": "number" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "data", + "type": "unknown" + }, + { + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + }, + { + "name": "$temp2", + "type": "unknown" + }, + { + "name": "$temp3", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [ + 1, + 2 + ], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "data", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": "number|null" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp2", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "null", + "type": "null" + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": "!=", + "left": { + "_": "Local", + "name": "data", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp2", + "type": "unknown" + } + } + } + ] + }, + { + "id": 1, + "successors": [], + "predecessors": [ + 0, + 2 + ], + "stmts": [ + { + "_": "ReturnStmt", + "arg": { + "_": "Local", + "name": "data", + "type": "unknown" + } + } + ] + }, + { + "id": 2, + "successors": [ + 1 + ], + "predecessors": [ + 0 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "0", + "type": "number" + } + }, + { + "_": "ReturnStmt", + "arg": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + } + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "sink", + "parameters": [ + { + "name": "data", + "type": "number|null", + "isOptional": false + } + ], + "returnType": "unknown" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "data", + "type": "unknown" + }, + { + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + }, + { + "name": "$temp2", + "type": "unknown" + }, + { + "name": "$temp3", + "type": "unknown" + }, + { + "name": "$temp4", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [ + 1, + 2 + ], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "data", + "type": "unknown" + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": "number|null" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp2", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "null", + "type": "null" + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": "!=", + "left": { + "_": "Local", + "name": "data", + "type": "unknown" + }, + "right": { + "_": "Local", + "name": "$temp2", + "type": "unknown" + } + } + } + ] + }, + { + "id": 1, + "successors": [], + "predecessors": [ + 0, + 2 + ], + "stmts": [ + { + "_": "ReturnVoidStmt" + } + ] + }, + { + "id": 2, + "successors": [ + 1 + ], + "predecessors": [ + 0 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp4", + "type": "unknown" + }, + "right": { + "_": "Constant", + "value": "\"Error!\"", + "type": "string" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + }, + "right": { + "_": "NewExpr", + "type": "@_UnkownProjectName/_UnkownFileName: Error" + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + }, + "method": { + "enclosingClass": { + "name": "Error" + }, + "name": "constructor", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "$temp4", + "type": "unknown" + } + ] + } + }, + { + "_": "ThrowStmt", + "arg": { + "_": "Local", + "name": "$temp3", + "type": "unknown" + } + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "bad", + "parameters": [], + "returnType": "unknown" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + }, + { + "name": "data", + "type": "unknown" + }, + { + "name": "source", + "type": "unknown" + }, + { + "name": "pass", + "type": "unknown" + }, + { + "name": "sink", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "data", + "type": "unknown" + }, + "right": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "" + }, + "name": "source", + "parameters": [], + "returnType": "unknown" + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "data", + "type": "unknown" + }, + "right": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "" + }, + "name": "pass", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "data", + "type": "unknown" + } + ] + } + }, + { + "_": "CallStmt", + "expr": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "" + }, + "name": "sink", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "data", + "type": "unknown" + } + ] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "good", + "parameters": [], + "returnType": "unknown" + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + }, + { + "name": "data", + "type": "unknown" + }, + { + "name": "source", + "type": "unknown" + }, + { + "name": "validate", + "type": "unknown" + }, + { + "name": "sink", + "type": "unknown" + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + }, + "right": { + "_": "ThisRef", + "type": "@save/taint: _DEFAULT_ARK_CLASS" + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "data", + "type": "unknown" + }, + "right": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "" + }, + "name": "source", + "parameters": [], + "returnType": "unknown" + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "data", + "type": "unknown" + }, + "right": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "" + }, + "name": "validate", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "data", + "type": "unknown" + } + ] + } + }, + { + "_": "CallStmt", + "expr": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "" + }, + "name": "sink", + "parameters": [], + "returnType": "unknown" + }, + "args": [ + { + "_": "Local", + "name": "data", + "type": "unknown" + } + ] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + } + ], + "importInfos": [], + "exportInfos": [] +}