Table 2 AST Nodes Categories.
Categories | AST Nodes | Notes |
---|---|---|
Class instance creations/ Method invocations | Method Invocation Super Method Invocation Object creation Recursive function | Methods and Class instances are recorded as explicit text in the source code. Each contains only one statement of a method invocation or instance creation. |
Declarations | Method Declaration Class Declaration Constructor Declaration Variable Declaration Package Declaration Interface Declaration | Besides the invocation, the declaration of AST node types are more valuable since they can present additional semantic information. |
Control flow | If Statement Do Statement For Statement Break Statement Enhanced For Statement Continue Statement While Statement Try Statement Return Statement Throw Statement Switch Statement Switch Statement Case Block Statement Statement Expression Try Resource Catch Clause Catch Clause Parameter | Although it is essential to recognize the AST invocation and declaration nodes, each method declaration node only has one method invocation node. As a result, a representation with only one request within is unlikely to be buggy in all instances. Compared to utilizing method names, employing the AST node types control flow provides more useful semantic information. |
Others | Formal Parameter Basic Type Member Reference Super Member Reference Reference Type Assert Statement Synchronized Statement | Node types are used to record control-flow nodes. In addition, the nodes of Member Reference, Assertion Statement, etc., are kept as their values. |