id
int32
0
12.9k
code
sequencelengths
2
264k
4,400
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "interface", "IDocElement", "{", "}", "</s>" ]
4,401
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ContinueStatement", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "LABEL_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ContinueStatement", ".", "class", ",", "\"label\"", ",", "SimpleName", ".", "class", ",", "OPTIONAL", ",", "NO_CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "ContinueStatement", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "LABEL_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "SimpleName", "optionalLabel", "=", "null", ";", "ContinueStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "LABEL_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getLabel", "(", ")", ";", "}", "else", "{", "setLabel", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "CONTINUE_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "ContinueStatement", "result", "=", "new", "ContinueStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "result", ".", "setLabel", "(", "(", "SimpleName", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getLabel", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getLabel", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "SimpleName", "getLabel", "(", ")", "{", "return", "this", ".", "optionalLabel", ";", "}", "public", "void", "setLabel", "(", "SimpleName", "label", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalLabel", ";", "preReplaceChild", "(", "oldChild", ",", "label", ",", "LABEL_PROPERTY", ")", ";", "this", ".", "optionalLabel", "=", "label", ";", "postReplaceChild", "(", "oldChild", ",", "label", ",", "LABEL_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalLabel", "==", "null", "?", "0", ":", "getLabel", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,402
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ImportDeclaration", "extends", "ASTNode", "{", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ImportDeclaration", ".", "class", ",", "\"name\"", ",", "Name", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "ON_DEMAND_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "ImportDeclaration", ".", "class", ",", "\"onDemand\"", ",", "boolean", ".", "class", ",", "MANDATORY", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "STATIC_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "ImportDeclaration", ".", "class", ",", "\"static\"", ",", "boolean", ".", "class", ",", "MANDATORY", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "ImportDeclaration", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "ON_DEMAND_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "properyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "ImportDeclaration", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "STATIC_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "ON_DEMAND_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "Name", "importName", "=", "null", ";", "private", "boolean", "onDemand", "=", "false", ";", "private", "boolean", "isStatic", "=", "false", ";", "ImportDeclaration", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "boolean", "internalGetSetBooleanProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "boolean", "value", ")", "{", "if", "(", "property", "==", "ON_DEMAND_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "isOnDemand", "(", ")", ";", "}", "else", "{", "setOnDemand", "(", "value", ")", ";", "return", "false", ";", "}", "}", "if", "(", "property", "==", "STATIC_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "isStatic", "(", ")", ";", "}", "else", "{", "setStatic", "(", "value", ")", ";", "return", "false", ";", "}", "}", "return", "super", ".", "internalGetSetBooleanProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "Name", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "IMPORT_DECLARATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "ImportDeclaration", "result", "=", "new", "ImportDeclaration", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setOnDemand", "(", "isOnDemand", "(", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "setStatic", "(", "isStatic", "(", ")", ")", ";", "}", "result", ".", "setName", "(", "(", "Name", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Name", "getName", "(", ")", "{", "if", "(", "this", ".", "importName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "importName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "importName", "=", "this", ".", "ast", ".", "newQualifiedName", "(", "new", "SimpleName", "(", "this", ".", "ast", ")", ",", "new", "SimpleName", "(", "this", ".", "ast", ")", ")", ";", "postLazyInit", "(", "this", ".", "importName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "importName", ";", "}", "public", "void", "setName", "(", "Name", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "importName", ";", "preReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "this", ".", "importName", "=", "name", ";", "postReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "}", "public", "boolean", "isOnDemand", "(", ")", "{", "return", "this", ".", "onDemand", ";", "}", "public", "void", "setOnDemand", "(", "boolean", "onDemand", ")", "{", "preValueChange", "(", "ON_DEMAND_PROPERTY", ")", ";", "this", ".", "onDemand", "=", "onDemand", ";", "postValueChange", "(", "ON_DEMAND_PROPERTY", ")", ";", "}", "public", "boolean", "isStatic", "(", ")", "{", "unsupportedIn2", "(", ")", ";", "return", "this", ".", "isStatic", ";", "}", "public", "void", "setStatic", "(", "boolean", "isStatic", ")", "{", "unsupportedIn2", "(", ")", ";", "preValueChange", "(", "STATIC_PROPERTY", ")", ";", "this", ".", "isStatic", "=", "isStatic", ";", "postValueChange", "(", "STATIC_PROPERTY", ")", ";", "}", "public", "IBinding", "resolveBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveImport", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "3", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "importName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,403
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "Initializer", "extends", "BodyDeclaration", "{", "public", "static", "final", "ChildPropertyDescriptor", "JAVADOC_PROPERTY", "=", "internalJavadocPropertyFactory", "(", "Initializer", ".", "class", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "MODIFIERS_PROPERTY", "=", "internalModifiersPropertyFactory", "(", "Initializer", ".", "class", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "MODIFIERS2_PROPERTY", "=", "internalModifiers2PropertyFactory", "(", "Initializer", ".", "class", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "BODY_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "Initializer", ".", "class", ",", "\"body\"", ",", "Block", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "Initializer", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "JAVADOC_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "MODIFIERS_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "BODY_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "properyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "Initializer", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "JAVADOC_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "MODIFIERS2_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "BODY_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "Block", "body", "=", "null", ";", "Initializer", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "int", "internalGetSetIntProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "int", "value", ")", "{", "if", "(", "property", "==", "MODIFIERS_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getModifiers", "(", ")", ";", "}", "else", "{", "internalSetModifiers", "(", "value", ")", ";", "return", "0", ";", "}", "}", "return", "super", ".", "internalGetSetIntProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "JAVADOC_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getJavadoc", "(", ")", ";", "}", "else", "{", "setJavadoc", "(", "(", "Javadoc", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "BODY_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getBody", "(", ")", ";", "}", "else", "{", "setBody", "(", "(", "Block", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "MODIFIERS2_PROPERTY", ")", "{", "return", "modifiers", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "ChildPropertyDescriptor", "internalJavadocProperty", "(", ")", "{", "return", "JAVADOC_PROPERTY", ";", "}", "final", "ChildListPropertyDescriptor", "internalModifiers2Property", "(", ")", "{", "return", "MODIFIERS2_PROPERTY", ";", "}", "final", "SimplePropertyDescriptor", "internalModifiersProperty", "(", ")", "{", "return", "MODIFIERS_PROPERTY", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "INITIALIZER", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "Initializer", "result", "=", "new", "Initializer", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "result", ".", "internalSetModifiers", "(", "getModifiers", "(", ")", ")", ";", "}", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "modifiers", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "modifiers", "(", ")", ")", ")", ";", "}", "result", ".", "setJavadoc", "(", "(", "Javadoc", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getJavadoc", "(", ")", ")", ")", ";", "result", ".", "setBody", "(", "(", "Block", ")", "getBody", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getJavadoc", "(", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "modifiers", ")", ";", "}", "acceptChild", "(", "visitor", ",", "getBody", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Block", "getBody", "(", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "body", "=", "new", "Block", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "body", ",", "BODY_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "body", ";", "}", "public", "void", "setBody", "(", "Block", "body", ")", "{", "if", "(", "body", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "body", ";", "preReplaceChild", "(", "oldChild", ",", "body", ",", "BODY_PROPERTY", ")", ";", "this", ".", "body", "=", "body", ";", "postReplaceChild", "(", "oldChild", ",", "body", ",", "BODY_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalDocComment", "==", "null", "?", "0", ":", "getJavadoc", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "modifiers", "==", "null", "?", "0", ":", "this", ".", "modifiers", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "body", "==", "null", "?", "0", ":", "getBody", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,404
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "SuperMethodInvocation", "extends", "Expression", "{", "public", "static", "final", "ChildPropertyDescriptor", "QUALIFIER_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "SuperMethodInvocation", ".", "class", ",", "\"qualifier\"", ",", "Name", ".", "class", ",", "OPTIONAL", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "TYPE_ARGUMENTS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "SuperMethodInvocation", ".", "class", ",", "\"\"", ",", "Type", ".", "class", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "SuperMethodInvocation", ".", "class", ",", "\"name\"", ",", "SimpleName", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "ARGUMENTS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "SuperMethodInvocation", ".", "class", ",", "\"arguments\"", ",", "Expression", ".", "class", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "SuperMethodInvocation", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "QUALIFIER_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "ARGUMENTS_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "propertyList", "=", "new", "ArrayList", "(", "5", ")", ";", "createPropertyList", "(", "SuperMethodInvocation", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "QUALIFIER_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "TYPE_ARGUMENTS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "ARGUMENTS_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "Name", "optionalQualifier", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "typeArguments", "=", "null", ";", "private", "SimpleName", "methodName", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "arguments", "=", "new", "ASTNode", ".", "NodeList", "(", "ARGUMENTS_PROPERTY", ")", ";", "SuperMethodInvocation", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "if", "(", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "this", ".", "typeArguments", "=", "new", "ASTNode", ".", "NodeList", "(", "TYPE_ARGUMENTS_PROPERTY", ")", ";", "}", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "QUALIFIER_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getQualifier", "(", ")", ";", "}", "else", "{", "setQualifier", "(", "(", "Name", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "ARGUMENTS_PROPERTY", ")", "{", "return", "arguments", "(", ")", ";", "}", "if", "(", "property", "==", "TYPE_ARGUMENTS_PROPERTY", ")", "{", "return", "typeArguments", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "SUPER_METHOD_INVOCATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "SuperMethodInvocation", "result", "=", "new", "SuperMethodInvocation", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setName", "(", "(", "SimpleName", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setQualifier", "(", "(", "Name", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getQualifier", "(", ")", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "typeArguments", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "typeArguments", "(", ")", ")", ")", ";", "}", "result", ".", "arguments", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "arguments", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getQualifier", "(", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "typeArguments", ")", ";", "}", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "arguments", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Name", "getQualifier", "(", ")", "{", "return", "this", ".", "optionalQualifier", ";", "}", "public", "boolean", "isResolvedTypeInferredFromExpectedType", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "isResolvedTypeInferredFromExpectedType", "(", "this", ")", ";", "}", "public", "void", "setQualifier", "(", "Name", "name", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalQualifier", ";", "preReplaceChild", "(", "oldChild", ",", "name", ",", "QUALIFIER_PROPERTY", ")", ";", "this", ".", "optionalQualifier", "=", "name", ";", "postReplaceChild", "(", "oldChild", ",", "name", ",", "QUALIFIER_PROPERTY", ")", ";", "}", "public", "List", "typeArguments", "(", ")", "{", "if", "(", "this", ".", "typeArguments", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "return", "this", ".", "typeArguments", ";", "}", "public", "SimpleName", "getName", "(", ")", "{", "if", "(", "this", ".", "methodName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "methodName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "methodName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "methodName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "methodName", ";", "}", "public", "void", "setName", "(", "SimpleName", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "methodName", ";", "preReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "this", ".", "methodName", "=", "name", ";", "postReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "}", "public", "List", "arguments", "(", ")", "{", "return", "this", ".", "arguments", ";", "}", "public", "IMethodBinding", "resolveMethodBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveMethod", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "4", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalQualifier", "==", "null", "?", "0", ":", "getQualifier", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "typeArguments", "==", "null", "?", "0", ":", "this", ".", "typeArguments", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "methodName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "arguments", "==", "null", "?", "0", ":", "this", ".", "arguments", ".", "listSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,405
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "final", "class", "MarkerAnnotation", "extends", "Annotation", "{", "public", "static", "final", "ChildPropertyDescriptor", "TYPE_NAME_PROPERTY", "=", "internalTypeNamePropertyFactory", "(", "MarkerAnnotation", ".", "class", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "MarkerAnnotation", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "TYPE_NAME_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "MarkerAnnotation", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "unsupportedIn2", "(", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "TYPE_NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getTypeName", "(", ")", ";", "}", "else", "{", "setTypeName", "(", "(", "Name", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "ChildPropertyDescriptor", "internalTypeNameProperty", "(", ")", "{", "return", "TYPE_NAME_PROPERTY", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "MARKER_ANNOTATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "MarkerAnnotation", "result", "=", "new", "MarkerAnnotation", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setTypeName", "(", "(", "Name", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getTypeName", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getTypeName", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "typeName", "==", "null", "?", "0", ":", "getTypeName", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,406
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "public", "abstract", "class", "ASTVisitor", "{", "private", "boolean", "visitDocTags", ";", "public", "ASTVisitor", "(", ")", "{", "this", "(", "false", ")", ";", "}", "public", "ASTVisitor", "(", "boolean", "visitDocTags", ")", "{", "this", ".", "visitDocTags", "=", "visitDocTags", ";", "}", "public", "void", "preVisit", "(", "ASTNode", "node", ")", "{", "}", "public", "boolean", "preVisit2", "(", "ASTNode", "node", ")", "{", "preVisit", "(", "node", ")", ";", "return", "true", ";", "}", "public", "void", "postVisit", "(", "ASTNode", "node", ")", "{", "}", "public", "boolean", "visit", "(", "AnnotationTypeDeclaration", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "AnnotationTypeMemberDeclaration", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "AnonymousClassDeclaration", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ArrayAccess", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ArrayCreation", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ArrayInitializer", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ArrayType", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "AssertStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "Assignment", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "Block", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "BlockComment", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "BooleanLiteral", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "BreakStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "CastExpression", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "CatchClause", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "CharacterLiteral", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ClassInstanceCreation", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "CompilationUnit", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ConditionalExpression", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ConstructorInvocation", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ContinueStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "DoStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "EmptyStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "EnhancedForStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "EnumConstantDeclaration", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "EnumDeclaration", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ExpressionStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "FieldAccess", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "FieldDeclaration", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ForStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "IfStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ImportDeclaration", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "InfixExpression", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "InstanceofExpression", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "Initializer", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "Javadoc", "node", ")", "{", "return", "this", ".", "visitDocTags", ";", "}", "public", "boolean", "visit", "(", "LabeledStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "LineComment", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "MarkerAnnotation", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "MemberRef", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "MemberValuePair", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "MethodRef", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "MethodRefParameter", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "MethodDeclaration", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "MethodInvocation", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "Modifier", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "NormalAnnotation", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "NullLiteral", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "NumberLiteral", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "PackageDeclaration", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ParameterizedType", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ParenthesizedExpression", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "PostfixExpression", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "PrefixExpression", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "PrimitiveType", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "QualifiedName", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "QualifiedType", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ReturnStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "SimpleName", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "SimpleType", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "SingleMemberAnnotation", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "SingleVariableDeclaration", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "StringLiteral", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "SuperConstructorInvocation", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "SuperFieldAccess", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "SuperMethodInvocation", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "SwitchCase", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "SwitchStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "SynchronizedStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "TagElement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "TextElement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ThisExpression", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "ThrowStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "TryStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "TypeDeclaration", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "TypeDeclarationStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "TypeLiteral", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "TypeParameter", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "UnionType", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "VariableDeclarationExpression", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "VariableDeclarationStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "VariableDeclarationFragment", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "WhileStatement", "node", ")", "{", "return", "true", ";", "}", "public", "boolean", "visit", "(", "WildcardType", "node", ")", "{", "return", "true", ";", "}", "public", "void", "endVisit", "(", "AnnotationTypeDeclaration", "node", ")", "{", "}", "public", "void", "endVisit", "(", "AnnotationTypeMemberDeclaration", "node", ")", "{", "}", "public", "void", "endVisit", "(", "AnonymousClassDeclaration", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ArrayAccess", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ArrayCreation", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ArrayInitializer", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ArrayType", "node", ")", "{", "}", "public", "void", "endVisit", "(", "AssertStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "Assignment", "node", ")", "{", "}", "public", "void", "endVisit", "(", "Block", "node", ")", "{", "}", "public", "void", "endVisit", "(", "BlockComment", "node", ")", "{", "}", "public", "void", "endVisit", "(", "BooleanLiteral", "node", ")", "{", "}", "public", "void", "endVisit", "(", "BreakStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "CastExpression", "node", ")", "{", "}", "public", "void", "endVisit", "(", "CatchClause", "node", ")", "{", "}", "public", "void", "endVisit", "(", "CharacterLiteral", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ClassInstanceCreation", "node", ")", "{", "}", "public", "void", "endVisit", "(", "CompilationUnit", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ConditionalExpression", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ConstructorInvocation", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ContinueStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "DoStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "EmptyStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "EnhancedForStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "EnumConstantDeclaration", "node", ")", "{", "}", "public", "void", "endVisit", "(", "EnumDeclaration", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ExpressionStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "FieldAccess", "node", ")", "{", "}", "public", "void", "endVisit", "(", "FieldDeclaration", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ForStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "IfStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ImportDeclaration", "node", ")", "{", "}", "public", "void", "endVisit", "(", "InfixExpression", "node", ")", "{", "}", "public", "void", "endVisit", "(", "InstanceofExpression", "node", ")", "{", "}", "public", "void", "endVisit", "(", "Initializer", "node", ")", "{", "}", "public", "void", "endVisit", "(", "Javadoc", "node", ")", "{", "}", "public", "void", "endVisit", "(", "LabeledStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "LineComment", "node", ")", "{", "}", "public", "void", "endVisit", "(", "MarkerAnnotation", "node", ")", "{", "}", "public", "void", "endVisit", "(", "MemberRef", "node", ")", "{", "}", "public", "void", "endVisit", "(", "MemberValuePair", "node", ")", "{", "}", "public", "void", "endVisit", "(", "MethodRef", "node", ")", "{", "}", "public", "void", "endVisit", "(", "MethodRefParameter", "node", ")", "{", "}", "public", "void", "endVisit", "(", "MethodDeclaration", "node", ")", "{", "}", "public", "void", "endVisit", "(", "MethodInvocation", "node", ")", "{", "}", "public", "void", "endVisit", "(", "Modifier", "node", ")", "{", "}", "public", "void", "endVisit", "(", "NormalAnnotation", "node", ")", "{", "}", "public", "void", "endVisit", "(", "NullLiteral", "node", ")", "{", "}", "public", "void", "endVisit", "(", "NumberLiteral", "node", ")", "{", "}", "public", "void", "endVisit", "(", "PackageDeclaration", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ParameterizedType", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ParenthesizedExpression", "node", ")", "{", "}", "public", "void", "endVisit", "(", "PostfixExpression", "node", ")", "{", "}", "public", "void", "endVisit", "(", "PrefixExpression", "node", ")", "{", "}", "public", "void", "endVisit", "(", "PrimitiveType", "node", ")", "{", "}", "public", "void", "endVisit", "(", "QualifiedName", "node", ")", "{", "}", "public", "void", "endVisit", "(", "QualifiedType", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ReturnStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "SimpleName", "node", ")", "{", "}", "public", "void", "endVisit", "(", "SimpleType", "node", ")", "{", "}", "public", "void", "endVisit", "(", "SingleMemberAnnotation", "node", ")", "{", "}", "public", "void", "endVisit", "(", "SingleVariableDeclaration", "node", ")", "{", "}", "public", "void", "endVisit", "(", "StringLiteral", "node", ")", "{", "}", "public", "void", "endVisit", "(", "SuperConstructorInvocation", "node", ")", "{", "}", "public", "void", "endVisit", "(", "SuperFieldAccess", "node", ")", "{", "}", "public", "void", "endVisit", "(", "SuperMethodInvocation", "node", ")", "{", "}", "public", "void", "endVisit", "(", "SwitchCase", "node", ")", "{", "}", "public", "void", "endVisit", "(", "SwitchStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "SynchronizedStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "TagElement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "TextElement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ThisExpression", "node", ")", "{", "}", "public", "void", "endVisit", "(", "ThrowStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "TryStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "TypeDeclaration", "node", ")", "{", "}", "public", "void", "endVisit", "(", "TypeDeclarationStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "TypeLiteral", "node", ")", "{", "}", "public", "void", "endVisit", "(", "TypeParameter", "node", ")", "{", "}", "public", "void", "endVisit", "(", "UnionType", "node", ")", "{", "}", "public", "void", "endVisit", "(", "VariableDeclarationExpression", "node", ")", "{", "}", "public", "void", "endVisit", "(", "VariableDeclarationStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "VariableDeclarationFragment", "node", ")", "{", "}", "public", "void", "endVisit", "(", "WhileStatement", "node", ")", "{", "}", "public", "void", "endVisit", "(", "WildcardType", "node", ")", "{", "}", "}", "</s>" ]
4,407
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "Util", ";", "public", "final", "class", "TextElement", "extends", "ASTNode", "implements", "IDocElement", "{", "public", "static", "final", "SimplePropertyDescriptor", "TEXT_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "TextElement", ".", "class", ",", "\"text\"", ",", "String", ".", "class", ",", "MANDATORY", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "TextElement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "TEXT_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "String", "text", "=", "Util", ".", "EMPTY_STRING", ";", "TextElement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "Object", "internalGetSetObjectProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "Object", "value", ")", "{", "if", "(", "property", "==", "TEXT_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getText", "(", ")", ";", "}", "else", "{", "setText", "(", "(", "String", ")", "value", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetObjectProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "TEXT_ELEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "TextElement", "result", "=", "new", "TextElement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setText", "(", "getText", "(", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "visitor", ".", "visit", "(", "this", ")", ";", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "String", "getText", "(", ")", "{", "return", "this", ".", "text", ";", "}", "public", "void", "setText", "(", "String", "text", ")", "{", "if", "(", "text", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "text", ".", "indexOf", "(", "\"*/\"", ")", ">", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "preValueChange", "(", "TEXT_PROPERTY", ")", ";", "this", ".", "text", "=", "text", ";", "postValueChange", "(", "TEXT_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "int", "size", "=", "BASE_NODE_SIZE", "+", "1", "*", "4", ";", "if", "(", "this", ".", "text", "!=", "Util", ".", "EMPTY_STRING", ")", "{", "size", "+=", "stringSize", "(", "this", ".", "text", ")", ";", "}", "return", "size", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", ";", "}", "}", "</s>" ]
4,408
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "List", ";", "public", "abstract", "class", "AbstractTypeDeclaration", "extends", "BodyDeclaration", "{", "SimpleName", "typeName", "=", "null", ";", "ASTNode", ".", "NodeList", "bodyDeclarations", ";", "abstract", "ChildListPropertyDescriptor", "internalBodyDeclarationsProperty", "(", ")", ";", "public", "final", "ChildListPropertyDescriptor", "getBodyDeclarationsProperty", "(", ")", "{", "return", "internalBodyDeclarationsProperty", "(", ")", ";", "}", "abstract", "ChildPropertyDescriptor", "internalNameProperty", "(", ")", ";", "public", "final", "ChildPropertyDescriptor", "getNameProperty", "(", ")", "{", "return", "internalNameProperty", "(", ")", ";", "}", "static", "final", "ChildListPropertyDescriptor", "internalBodyDeclarationPropertyFactory", "(", "Class", "nodeClass", ")", "{", "return", "new", "ChildListPropertyDescriptor", "(", "nodeClass", ",", "\"\"", ",", "BodyDeclaration", ".", "class", ",", "CYCLE_RISK", ")", ";", "}", "static", "final", "ChildPropertyDescriptor", "internalNamePropertyFactory", "(", "Class", "nodeClass", ")", "{", "return", "new", "ChildPropertyDescriptor", "(", "nodeClass", ",", "\"name\"", ",", "SimpleName", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "}", "AbstractTypeDeclaration", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "this", ".", "bodyDeclarations", "=", "new", "ASTNode", ".", "NodeList", "(", "internalBodyDeclarationsProperty", "(", ")", ")", ";", "}", "public", "SimpleName", "getName", "(", ")", "{", "if", "(", "this", ".", "typeName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "typeName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "typeName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "typeName", ",", "internalNameProperty", "(", ")", ")", ";", "}", "}", "}", "return", "this", ".", "typeName", ";", "}", "public", "void", "setName", "(", "SimpleName", "typeName", ")", "{", "if", "(", "typeName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ChildPropertyDescriptor", "p", "=", "internalNameProperty", "(", ")", ";", "ASTNode", "oldChild", "=", "this", ".", "typeName", ";", "preReplaceChild", "(", "oldChild", ",", "typeName", ",", "p", ")", ";", "this", ".", "typeName", "=", "typeName", ";", "postReplaceChild", "(", "oldChild", ",", "typeName", ",", "p", ")", ";", "}", "public", "List", "bodyDeclarations", "(", ")", "{", "return", "this", ".", "bodyDeclarations", ";", "}", "public", "boolean", "isPackageMemberTypeDeclaration", "(", ")", "{", "ASTNode", "parent", "=", "getParent", "(", ")", ";", "return", "(", "parent", "instanceof", "CompilationUnit", ")", ";", "}", "public", "boolean", "isMemberTypeDeclaration", "(", ")", "{", "ASTNode", "parent", "=", "getParent", "(", ")", ";", "return", "(", "parent", "instanceof", "AbstractTypeDeclaration", ")", "||", "(", "parent", "instanceof", "AnonymousClassDeclaration", ")", ";", "}", "public", "boolean", "isLocalTypeDeclaration", "(", ")", "{", "ASTNode", "parent", "=", "getParent", "(", ")", ";", "return", "(", "parent", "instanceof", "TypeDeclarationStatement", ")", ";", "}", "public", "final", "ITypeBinding", "resolveBinding", "(", ")", "{", "return", "internalResolveBinding", "(", ")", ";", "}", "abstract", "ITypeBinding", "internalResolveBinding", "(", ")", ";", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "2", "*", "4", ";", "}", "}", "</s>" ]
4,409
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IBuffer", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ISourceRange", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ITypeRoot", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaModelException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ToolFactory", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "IScanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "ITerminalSymbols", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "InvalidInputException", ";", "public", "final", "class", "NodeFinder", "{", "private", "static", "class", "NodeFinderVisitor", "extends", "ASTVisitor", "{", "private", "int", "fStart", ";", "private", "int", "fEnd", ";", "private", "ASTNode", "fCoveringNode", ";", "private", "ASTNode", "fCoveredNode", ";", "NodeFinderVisitor", "(", "int", "offset", ",", "int", "length", ")", "{", "super", "(", "true", ")", ";", "this", ".", "fStart", "=", "offset", ";", "this", ".", "fEnd", "=", "offset", "+", "length", ";", "}", "public", "boolean", "preVisit2", "(", "ASTNode", "node", ")", "{", "int", "nodeStart", "=", "node", ".", "getStartPosition", "(", ")", ";", "int", "nodeEnd", "=", "nodeStart", "+", "node", ".", "getLength", "(", ")", ";", "if", "(", "nodeEnd", "<", "this", ".", "fStart", "||", "this", ".", "fEnd", "<", "nodeStart", ")", "{", "return", "false", ";", "}", "if", "(", "nodeStart", "<=", "this", ".", "fStart", "&&", "this", ".", "fEnd", "<=", "nodeEnd", ")", "{", "this", ".", "fCoveringNode", "=", "node", ";", "}", "if", "(", "this", ".", "fStart", "<=", "nodeStart", "&&", "nodeEnd", "<=", "this", ".", "fEnd", ")", "{", "if", "(", "this", ".", "fCoveringNode", "==", "node", ")", "{", "this", ".", "fCoveredNode", "=", "node", ";", "return", "true", ";", "}", "else", "if", "(", "this", ".", "fCoveredNode", "==", "null", ")", "{", "this", ".", "fCoveredNode", "=", "node", ";", "}", "return", "false", ";", "}", "return", "true", ";", "}", "public", "ASTNode", "getCoveredNode", "(", ")", "{", "return", "this", ".", "fCoveredNode", ";", "}", "public", "ASTNode", "getCoveringNode", "(", ")", "{", "return", "this", ".", "fCoveringNode", ";", "}", "}", "public", "static", "ASTNode", "perform", "(", "ASTNode", "root", ",", "int", "start", ",", "int", "length", ")", "{", "NodeFinder", "finder", "=", "new", "NodeFinder", "(", "root", ",", "start", ",", "length", ")", ";", "ASTNode", "result", "=", "finder", ".", "getCoveredNode", "(", ")", ";", "if", "(", "result", "==", "null", "||", "result", ".", "getStartPosition", "(", ")", "!=", "start", "||", "result", ".", "getLength", "(", ")", "!=", "length", ")", "{", "return", "finder", ".", "getCoveringNode", "(", ")", ";", "}", "return", "result", ";", "}", "public", "static", "ASTNode", "perform", "(", "ASTNode", "root", ",", "ISourceRange", "range", ")", "{", "return", "perform", "(", "root", ",", "range", ".", "getOffset", "(", ")", ",", "range", ".", "getLength", "(", ")", ")", ";", "}", "public", "static", "ASTNode", "perform", "(", "ASTNode", "root", ",", "int", "start", ",", "int", "length", ",", "ITypeRoot", "source", ")", "throws", "JavaModelException", "{", "NodeFinder", "finder", "=", "new", "NodeFinder", "(", "root", ",", "start", ",", "length", ")", ";", "ASTNode", "result", "=", "finder", ".", "getCoveredNode", "(", ")", ";", "if", "(", "result", "==", "null", ")", "return", "null", ";", "int", "nodeStart", "=", "result", ".", "getStartPosition", "(", ")", ";", "if", "(", "start", "<=", "nodeStart", "&&", "(", "(", "nodeStart", "+", "result", ".", "getLength", "(", ")", ")", "<=", "(", "start", "+", "length", ")", ")", ")", "{", "IBuffer", "buffer", "=", "source", ".", "getBuffer", "(", ")", ";", "if", "(", "buffer", "!=", "null", ")", "{", "IScanner", "scanner", "=", "ToolFactory", ".", "createScanner", "(", "false", ",", "false", ",", "false", ",", "false", ")", ";", "try", "{", "scanner", ".", "setSource", "(", "buffer", ".", "getText", "(", "start", ",", "length", ")", ".", "toCharArray", "(", ")", ")", ";", "int", "token", "=", "scanner", ".", "getNextToken", "(", ")", ";", "if", "(", "token", "!=", "ITerminalSymbols", ".", "TokenNameEOF", ")", "{", "int", "tStart", "=", "scanner", ".", "getCurrentTokenStartPosition", "(", ")", ";", "if", "(", "tStart", "==", "result", ".", "getStartPosition", "(", ")", "-", "start", ")", "{", "scanner", ".", "resetTo", "(", "tStart", "+", "result", ".", "getLength", "(", ")", ",", "length", "-", "1", ")", ";", "token", "=", "scanner", ".", "getNextToken", "(", ")", ";", "if", "(", "token", "==", "ITerminalSymbols", ".", "TokenNameEOF", ")", "return", "result", ";", "}", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "}", "catch", "(", "IndexOutOfBoundsException", "e", ")", "{", "return", "null", ";", "}", "}", "}", "return", "finder", ".", "getCoveringNode", "(", ")", ";", "}", "private", "ASTNode", "fCoveringNode", ";", "private", "ASTNode", "fCoveredNode", ";", "public", "NodeFinder", "(", "ASTNode", "root", ",", "int", "start", ",", "int", "length", ")", "{", "NodeFinderVisitor", "nodeFinderVisitor", "=", "new", "NodeFinderVisitor", "(", "start", ",", "length", ")", ";", "root", ".", "accept", "(", "nodeFinderVisitor", ")", ";", "this", ".", "fCoveredNode", "=", "nodeFinderVisitor", ".", "getCoveredNode", "(", ")", ";", "this", ".", "fCoveringNode", "=", "nodeFinderVisitor", ".", "getCoveringNode", "(", ")", ";", "}", "public", "ASTNode", "getCoveredNode", "(", ")", "{", "return", "this", ".", "fCoveredNode", ";", "}", "public", "ASTNode", "getCoveringNode", "(", ")", "{", "return", "this", ".", "fCoveringNode", ";", "}", "}", "</s>" ]
4,410
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "DoStatement", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "DoStatement", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "BODY_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "DoStatement", ".", "class", ",", "\"body\"", ",", "Statement", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "DoStatement", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "BODY_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Expression", "expression", "=", "null", ";", "private", "Statement", "body", "=", "null", ";", "DoStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "BODY_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getBody", "(", ")", ";", "}", "else", "{", "setBody", "(", "(", "Statement", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "DO_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "DoStatement", "result", "=", "new", "DoStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "getExpression", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setBody", "(", "(", "Statement", ")", "getBody", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getBody", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "expression", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "expression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "expression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "expression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "public", "Statement", "getBody", "(", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "body", "=", "new", "Block", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "body", ",", "BODY_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "body", ";", "}", "public", "void", "setBody", "(", "Statement", "statement", ")", "{", "if", "(", "statement", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "body", ";", "preReplaceChild", "(", "oldChild", ",", "statement", ",", "BODY_PROPERTY", ")", ";", "this", ".", "body", "=", "statement", ";", "postReplaceChild", "(", "oldChild", ",", "statement", ",", "BODY_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "2", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "expression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "body", "==", "null", "?", "0", ":", "getBody", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,411
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "InvalidInputException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "Scanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "TerminalTokens", ";", "public", "class", "NumberLiteral", "extends", "Expression", "{", "public", "static", "final", "SimplePropertyDescriptor", "TOKEN_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "NumberLiteral", ".", "class", ",", "\"token\"", ",", "String", ".", "class", ",", "MANDATORY", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "NumberLiteral", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "TOKEN_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "String", "tokenValue", "=", "\"0\"", ";", "NumberLiteral", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "Object", "internalGetSetObjectProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "Object", "value", ")", "{", "if", "(", "property", "==", "TOKEN_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getToken", "(", ")", ";", "}", "else", "{", "setToken", "(", "(", "String", ")", "value", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetObjectProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "NUMBER_LITERAL", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "NumberLiteral", "result", "=", "new", "NumberLiteral", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setToken", "(", "getToken", "(", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "visitor", ".", "visit", "(", "this", ")", ";", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "String", "getToken", "(", ")", "{", "return", "this", ".", "tokenValue", ";", "}", "public", "void", "setToken", "(", "String", "token", ")", "{", "if", "(", "token", "==", "null", "||", "token", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "Scanner", "scanner", "=", "this", ".", "ast", ".", "scanner", ";", "char", "[", "]", "source", "=", "token", ".", "toCharArray", "(", ")", ";", "scanner", ".", "setSource", "(", "source", ")", ";", "scanner", ".", "resetTo", "(", "0", ",", "source", ".", "length", ")", ";", "scanner", ".", "tokenizeComments", "=", "false", ";", "scanner", ".", "tokenizeWhiteSpace", "=", "false", ";", "try", "{", "int", "tokenType", "=", "scanner", ".", "getNextToken", "(", ")", ";", "switch", "(", "tokenType", ")", "{", "case", "TerminalTokens", ".", "TokenNameDoubleLiteral", ":", "case", "TerminalTokens", ".", "TokenNameIntegerLiteral", ":", "case", "TerminalTokens", ".", "TokenNameFloatingPointLiteral", ":", "case", "TerminalTokens", ".", "TokenNameLongLiteral", ":", "break", ";", "case", "TerminalTokens", ".", "TokenNameMINUS", ":", "tokenType", "=", "scanner", ".", "getNextToken", "(", ")", ";", "switch", "(", "tokenType", ")", "{", "case", "TerminalTokens", ".", "TokenNameDoubleLiteral", ":", "case", "TerminalTokens", ".", "TokenNameIntegerLiteral", ":", "case", "TerminalTokens", ".", "TokenNameFloatingPointLiteral", ":", "case", "TerminalTokens", ".", "TokenNameLongLiteral", ":", "break", ";", "default", ":", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "token", "+", "\"<\"", ")", ";", "}", "break", ";", "default", ":", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "token", "+", "\"<\"", ")", ";", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "finally", "{", "scanner", ".", "tokenizeComments", "=", "true", ";", "scanner", ".", "tokenizeWhiteSpace", "=", "true", ";", "}", "preValueChange", "(", "TOKEN_PROPERTY", ")", ";", "this", ".", "tokenValue", "=", "token", ";", "postValueChange", "(", "TOKEN_PROPERTY", ")", ";", "}", "void", "internalSetToken", "(", "String", "token", ")", "{", "preValueChange", "(", "TOKEN_PROPERTY", ")", ";", "this", ".", "tokenValue", "=", "token", ";", "postValueChange", "(", "TOKEN_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "int", "size", "=", "BASE_NODE_SIZE", "+", "1", "*", "4", "+", "stringSize", "(", "this", ".", "tokenValue", ")", ";", "return", "size", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", ";", "}", "}", "</s>" ]
4,412
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaElement", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "Constant", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ElementValuePair", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeIds", ";", "class", "MemberValuePairBinding", "implements", "IMemberValuePairBinding", "{", "static", "final", "MemberValuePairBinding", "[", "]", "NoPair", "=", "new", "MemberValuePairBinding", "[", "0", "]", ";", "private", "static", "final", "Object", "NoValue", "=", "new", "Object", "(", ")", ";", "private", "static", "final", "Object", "[", "]", "EmptyArray", "=", "new", "Object", "[", "0", "]", ";", "private", "ElementValuePair", "internalPair", ";", "protected", "Object", "value", "=", "null", ";", "protected", "BindingResolver", "bindingResolver", ";", "static", "void", "appendValue", "(", "Object", "value", ",", "StringBuffer", "buffer", ")", "{", "if", "(", "value", "instanceof", "Object", "[", "]", ")", "{", "Object", "[", "]", "values", "=", "(", "Object", "[", "]", ")", "value", ";", "buffer", ".", "append", "(", "'{'", ")", ";", "for", "(", "int", "i", "=", "0", ",", "l", "=", "values", ".", "length", ";", "i", "<", "l", ";", "i", "++", ")", "{", "if", "(", "i", "!=", "0", ")", "buffer", ".", "append", "(", "\",", "\"", ")", ";", "appendValue", "(", "values", "[", "i", "]", ",", "buffer", ")", ";", "}", "buffer", ".", "append", "(", "'}'", ")", ";", "}", "else", "if", "(", "value", "instanceof", "ITypeBinding", ")", "{", "buffer", ".", "append", "(", "(", "(", "ITypeBinding", ")", "value", ")", ".", "getName", "(", ")", ")", ";", "buffer", ".", "append", "(", "\".class\"", ")", ";", "}", "else", "{", "buffer", ".", "append", "(", "value", ")", ";", "}", "}", "static", "Object", "buildDOMValue", "(", "final", "Object", "internalObject", ",", "BindingResolver", "resolver", ")", "{", "if", "(", "internalObject", "==", "null", ")", "return", "null", ";", "if", "(", "internalObject", "instanceof", "Constant", ")", "{", "Constant", "constant", "=", "(", "Constant", ")", "internalObject", ";", "switch", "(", "constant", ".", "typeID", "(", ")", ")", "{", "case", "TypeIds", ".", "T_boolean", ":", "return", "Boolean", ".", "valueOf", "(", "constant", ".", "booleanValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_byte", ":", "return", "new", "Byte", "(", "constant", ".", "byteValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_char", ":", "return", "new", "Character", "(", "constant", ".", "charValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_double", ":", "return", "new", "Double", "(", "constant", ".", "doubleValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_float", ":", "return", "new", "Float", "(", "constant", ".", "floatValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_int", ":", "return", "new", "Integer", "(", "constant", ".", "intValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_long", ":", "return", "new", "Long", "(", "constant", ".", "longValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_short", ":", "return", "new", "Short", "(", "constant", ".", "shortValue", "(", ")", ")", ";", "default", ":", "return", "constant", ".", "stringValue", "(", ")", ";", "}", "}", "else", "if", "(", "internalObject", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "{", "return", "resolver", ".", "getTypeBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "internalObject", ")", ";", "}", "else", "if", "(", "internalObject", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "AnnotationBinding", ")", "{", "return", "resolver", ".", "getAnnotationInstance", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "AnnotationBinding", ")", "internalObject", ")", ";", "}", "else", "if", "(", "internalObject", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ")", "{", "return", "resolver", ".", "getVariableBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ")", "internalObject", ")", ";", "}", "else", "if", "(", "internalObject", "instanceof", "Object", "[", "]", ")", "{", "Object", "[", "]", "elements", "=", "(", "Object", "[", "]", ")", "internalObject", ";", "int", "length", "=", "elements", ".", "length", ";", "Object", "[", "]", "values", "=", "length", "==", "0", "?", "EmptyArray", ":", "new", "Object", "[", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "values", "[", "i", "]", "=", "buildDOMValue", "(", "elements", "[", "i", "]", ",", "resolver", ")", ";", "return", "values", ";", "}", "return", "null", ";", "}", "MemberValuePairBinding", "(", "ElementValuePair", "pair", ",", "BindingResolver", "resolver", ")", "{", "this", ".", "internalPair", "=", "pair", ";", "this", ".", "bindingResolver", "=", "resolver", ";", "}", "public", "IAnnotationBinding", "[", "]", "getAnnotations", "(", ")", "{", "return", "AnnotationBinding", ".", "NoAnnotations", ";", "}", "public", "IJavaElement", "getJavaElement", "(", ")", "{", "return", "null", ";", "}", "public", "String", "getKey", "(", ")", "{", "return", "null", ";", "}", "public", "int", "getKind", "(", ")", "{", "return", "IBinding", ".", "MEMBER_VALUE_PAIR", ";", "}", "public", "IMethodBinding", "getMethodBinding", "(", ")", "{", "return", "this", ".", "bindingResolver", ".", "getMethodBinding", "(", "this", ".", "internalPair", ".", "getMethodBinding", "(", ")", ")", ";", "}", "public", "int", "getModifiers", "(", ")", "{", "return", "Modifier", ".", "NONE", ";", "}", "public", "String", "getName", "(", ")", "{", "if", "(", "this", ".", "internalPair", "==", "null", ")", "return", "null", ";", "final", "char", "[", "]", "membername", "=", "this", ".", "internalPair", ".", "getName", "(", ")", ";", "return", "membername", "==", "null", "?", "null", ":", "new", "String", "(", "membername", ")", ";", "}", "public", "Object", "getValue", "(", ")", "{", "if", "(", "this", ".", "value", "==", "null", ")", "init", "(", ")", ";", "return", "this", ".", "value", "==", "NoValue", "?", "null", ":", "this", ".", "value", ";", "}", "private", "void", "init", "(", ")", "{", "this", ".", "value", "=", "buildDOMValue", "(", "this", ".", "internalPair", ".", "getValue", "(", ")", ",", "this", ".", "bindingResolver", ")", ";", "if", "(", "this", ".", "value", "==", "null", ")", "this", ".", "value", "=", "NoValue", ";", "IMethodBinding", "methodBinding", "=", "getMethodBinding", "(", ")", ";", "if", "(", "methodBinding", ".", "getReturnType", "(", ")", ".", "isArray", "(", ")", "&&", "!", "this", ".", "value", ".", "getClass", "(", ")", ".", "isArray", "(", ")", ")", "{", "this", ".", "value", "=", "new", "Object", "[", "]", "{", "this", ".", "value", "}", ";", "}", "}", "char", "[", "]", "internalName", "(", ")", "{", "return", "this", ".", "internalPair", "==", "null", "?", "null", ":", "this", ".", "internalPair", ".", "getName", "(", ")", ";", "}", "public", "boolean", "isDefault", "(", ")", "{", "Object", "value2", "=", "getValue", "(", ")", ";", "Object", "defaultValue", "=", "getMethodBinding", "(", ")", ".", "getDefaultValue", "(", ")", ";", "if", "(", "value2", "instanceof", "IBinding", ")", "{", "if", "(", "defaultValue", "instanceof", "IBinding", ")", "{", "return", "(", "(", "IBinding", ")", "value2", ")", ".", "isEqualTo", "(", "(", "IBinding", ")", "defaultValue", ")", ";", "}", "return", "false", ";", "}", "if", "(", "defaultValue", "==", "null", ")", "return", "false", ";", "return", "defaultValue", ".", "equals", "(", "value2", ")", ";", "}", "public", "boolean", "isDeprecated", "(", ")", "{", "MethodBinding", "methodBinding", "=", "this", ".", "internalPair", ".", "getMethodBinding", "(", ")", ";", "return", "methodBinding", "==", "null", "?", "false", ":", "methodBinding", ".", "isDeprecated", "(", ")", ";", "}", "public", "boolean", "isEqualTo", "(", "IBinding", "binding", ")", "{", "if", "(", "this", "==", "binding", ")", "return", "true", ";", "if", "(", "binding", ".", "getKind", "(", ")", "!=", "IBinding", ".", "MEMBER_VALUE_PAIR", ")", "return", "false", ";", "IMemberValuePairBinding", "otherMemberValuePairBinding", "=", "(", "IMemberValuePairBinding", ")", "binding", ";", "if", "(", "!", "getMethodBinding", "(", ")", ".", "isEqualTo", "(", "otherMemberValuePairBinding", ".", "getMethodBinding", "(", ")", ")", ")", "{", "return", "false", ";", "}", "Object", "otherValue", "=", "otherMemberValuePairBinding", ".", "getValue", "(", ")", ";", "Object", "currentValue", "=", "getValue", "(", ")", ";", "if", "(", "currentValue", "==", "null", ")", "{", "return", "otherValue", "==", "null", ";", "}", "if", "(", "currentValue", "instanceof", "IBinding", ")", "{", "if", "(", "otherValue", "instanceof", "IBinding", ")", "{", "return", "(", "(", "IBinding", ")", "currentValue", ")", ".", "isEqualTo", "(", "(", "IBinding", ")", "otherValue", ")", ";", "}", "return", "false", ";", "}", "if", "(", "currentValue", ".", "getClass", "(", ")", ".", "isArray", "(", ")", ")", "{", "if", "(", "!", "otherValue", ".", "getClass", "(", ")", ".", "isArray", "(", ")", ")", "{", "return", "false", ";", "}", "Object", "[", "]", "currentValues", "=", "(", "Object", "[", "]", ")", "currentValue", ";", "Object", "[", "]", "otherValues", "=", "(", "Object", "[", "]", ")", "otherValue", ";", "final", "int", "length", "=", "currentValues", ".", "length", ";", "if", "(", "length", "!=", "otherValues", ".", "length", ")", "{", "return", "false", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "Object", "current", "=", "currentValues", "[", "i", "]", ";", "Object", "other", "=", "otherValues", "[", "i", "]", ";", "if", "(", "current", "instanceof", "IBinding", ")", "{", "if", "(", "!", "(", "other", "instanceof", "IBinding", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "(", "(", "IBinding", ")", "current", ")", ".", "isEqualTo", "(", "(", "IBinding", ")", "other", ")", ")", "{", "return", "false", ";", "}", "}", "else", "if", "(", "!", "current", ".", "equals", "(", "other", ")", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "else", "{", "return", "currentValue", ".", "equals", "(", "otherValue", ")", ";", "}", "}", "public", "boolean", "isRecovered", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isSynthetic", "(", ")", "{", "return", "false", ";", "}", "public", "String", "toString", "(", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "buffer", ".", "append", "(", "getName", "(", ")", ")", ";", "buffer", ".", "append", "(", "\"", "=", "\"", ")", ";", "appendValue", "(", "getValue", "(", ")", ",", "buffer", ")", ";", "return", "buffer", ".", "toString", "(", ")", ";", "}", "}", "</s>" ]
4,413
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "NullLiteral", "extends", "Expression", "{", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "1", ")", ";", "createPropertyList", "(", "NullLiteral", ".", "class", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "NullLiteral", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "NULL_LITERAL", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "NullLiteral", "result", "=", "new", "NullLiteral", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "visitor", ".", "visit", "(", "this", ")", ";", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", ";", "}", "}", "</s>" ]
4,414
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ThrowStatement", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ThrowStatement", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "ThrowStatement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Expression", "expression", "=", "null", ";", "ThrowStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "THROW_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "ThrowStatement", "result", "=", "new", "ThrowStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "getExpression", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "expression", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "expression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "expression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "expression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "expression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,415
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "AnnotationTypeMemberDeclaration", "extends", "BodyDeclaration", "{", "public", "static", "final", "ChildPropertyDescriptor", "JAVADOC_PROPERTY", "=", "internalJavadocPropertyFactory", "(", "AnnotationTypeMemberDeclaration", ".", "class", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "MODIFIERS2_PROPERTY", "=", "internalModifiers2PropertyFactory", "(", "AnnotationTypeMemberDeclaration", ".", "class", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "AnnotationTypeMemberDeclaration", ".", "class", ",", "\"name\"", ",", "SimpleName", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "TYPE_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "AnnotationTypeMemberDeclaration", ".", "class", ",", "\"type\"", ",", "Type", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "DEFAULT_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "AnnotationTypeMemberDeclaration", ".", "class", ",", "\"default\"", ",", "Expression", ".", "class", ",", "OPTIONAL", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "6", ")", ";", "createPropertyList", "(", "AnnotationTypeMemberDeclaration", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "JAVADOC_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "MODIFIERS2_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "TYPE_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "DEFAULT_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "SimpleName", "memberName", "=", "null", ";", "private", "Type", "memberType", "=", "null", ";", "private", "Expression", "optionalDefaultValue", "=", "null", ";", "AnnotationTypeMemberDeclaration", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "unsupportedIn2", "(", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "JAVADOC_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getJavadoc", "(", ")", ";", "}", "else", "{", "setJavadoc", "(", "(", "Javadoc", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "TYPE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getType", "(", ")", ";", "}", "else", "{", "setType", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "DEFAULT_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getDefault", "(", ")", ";", "}", "else", "{", "setDefault", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "MODIFIERS2_PROPERTY", ")", "{", "return", "modifiers", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "ChildPropertyDescriptor", "internalJavadocProperty", "(", ")", "{", "return", "JAVADOC_PROPERTY", ";", "}", "final", "ChildListPropertyDescriptor", "internalModifiers2Property", "(", ")", "{", "return", "MODIFIERS2_PROPERTY", ";", "}", "final", "SimplePropertyDescriptor", "internalModifiersProperty", "(", ")", "{", "return", "null", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "ANNOTATION_TYPE_MEMBER_DECLARATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "AnnotationTypeMemberDeclaration", "result", "=", "new", "AnnotationTypeMemberDeclaration", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setJavadoc", "(", "(", "Javadoc", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getJavadoc", "(", ")", ")", ")", ";", "result", ".", "modifiers", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "modifiers", "(", ")", ")", ")", ";", "result", ".", "setType", "(", "(", "Type", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getType", "(", ")", ")", ")", ";", "result", ".", "setName", "(", "(", "SimpleName", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setDefault", "(", "(", "Expression", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getDefault", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getJavadoc", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "modifiers", ")", ";", "acceptChild", "(", "visitor", ",", "getType", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getDefault", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "SimpleName", "getName", "(", ")", "{", "if", "(", "this", ".", "memberName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "memberName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "memberName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "memberName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "memberName", ";", "}", "public", "void", "setName", "(", "SimpleName", "memberName", ")", "{", "if", "(", "memberName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "memberName", ";", "preReplaceChild", "(", "oldChild", ",", "memberName", ",", "NAME_PROPERTY", ")", ";", "this", ".", "memberName", "=", "memberName", ";", "postReplaceChild", "(", "oldChild", ",", "memberName", ",", "NAME_PROPERTY", ")", ";", "}", "public", "Type", "getType", "(", ")", "{", "if", "(", "this", ".", "memberType", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "memberType", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "memberType", "=", "this", ".", "ast", ".", "newPrimitiveType", "(", "PrimitiveType", ".", "INT", ")", ";", "postLazyInit", "(", "this", ".", "memberType", ",", "TYPE_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "memberType", ";", "}", "public", "void", "setType", "(", "Type", "type", ")", "{", "if", "(", "type", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "memberType", ";", "preReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "this", ".", "memberType", "=", "type", ";", "postReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "}", "public", "Expression", "getDefault", "(", ")", "{", "return", "this", ".", "optionalDefaultValue", ";", "}", "public", "void", "setDefault", "(", "Expression", "defaultValue", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalDefaultValue", ";", "preReplaceChild", "(", "oldChild", ",", "defaultValue", ",", "DEFAULT_PROPERTY", ")", ";", "this", ".", "optionalDefaultValue", "=", "defaultValue", ";", "postReplaceChild", "(", "oldChild", ",", "defaultValue", ",", "DEFAULT_PROPERTY", ")", ";", "}", "public", "IMethodBinding", "resolveBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveMember", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "3", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalDocComment", "==", "null", "?", "0", ":", "getJavadoc", "(", ")", ".", "treeSize", "(", ")", ")", "+", "this", ".", "modifiers", ".", "listSize", "(", ")", "+", "(", "this", ".", "memberName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "memberType", "==", "null", "?", "0", ":", "getType", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "optionalDefaultValue", "==", "null", "?", "0", ":", "getDefault", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,416
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "InvalidInputException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "Scanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "TerminalTokens", ";", "public", "class", "StringLiteral", "extends", "Expression", "{", "public", "static", "final", "SimplePropertyDescriptor", "ESCAPED_VALUE_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "StringLiteral", ".", "class", ",", "\"escapedValue\"", ",", "String", ".", "class", ",", "MANDATORY", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "StringLiteral", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "ESCAPED_VALUE_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "String", "escapedValue", "=", "\"\\\"\\\"\"", ";", "StringLiteral", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "Object", "internalGetSetObjectProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "Object", "value", ")", "{", "if", "(", "property", "==", "ESCAPED_VALUE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getEscapedValue", "(", ")", ";", "}", "else", "{", "setEscapedValue", "(", "(", "String", ")", "value", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetObjectProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "STRING_LITERAL", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "StringLiteral", "result", "=", "new", "StringLiteral", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setEscapedValue", "(", "getEscapedValue", "(", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "visitor", ".", "visit", "(", "this", ")", ";", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "String", "getEscapedValue", "(", ")", "{", "return", "this", ".", "escapedValue", ";", "}", "public", "void", "setEscapedValue", "(", "String", "token", ")", "{", "if", "(", "token", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "Scanner", "scanner", "=", "this", ".", "ast", ".", "scanner", ";", "char", "[", "]", "source", "=", "token", ".", "toCharArray", "(", ")", ";", "scanner", ".", "setSource", "(", "source", ")", ";", "scanner", ".", "resetTo", "(", "0", ",", "source", ".", "length", ")", ";", "try", "{", "int", "tokenType", "=", "scanner", ".", "getNextToken", "(", ")", ";", "switch", "(", "tokenType", ")", "{", "case", "TerminalTokens", ".", "TokenNameStringLiteral", ":", "break", ";", "default", ":", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "token", "+", "\"<\"", ")", ";", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "token", "+", "\"<\"", ")", ";", "}", "preValueChange", "(", "ESCAPED_VALUE_PROPERTY", ")", ";", "this", ".", "escapedValue", "=", "token", ";", "postValueChange", "(", "ESCAPED_VALUE_PROPERTY", ")", ";", "}", "void", "internalSetEscapedValue", "(", "String", "token", ")", "{", "preValueChange", "(", "ESCAPED_VALUE_PROPERTY", ")", ";", "this", ".", "escapedValue", "=", "token", ";", "postValueChange", "(", "ESCAPED_VALUE_PROPERTY", ")", ";", "}", "public", "String", "getLiteralValue", "(", ")", "{", "String", "s", "=", "getEscapedValue", "(", ")", ";", "int", "len", "=", "s", ".", "length", "(", ")", ";", "if", "(", "len", "<", "2", "||", "s", ".", "charAt", "(", "0", ")", "!=", "'\\\"'", "||", "s", ".", "charAt", "(", "len", "-", "1", ")", "!=", "'\\\"'", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "Scanner", "scanner", "=", "this", ".", "ast", ".", "scanner", ";", "char", "[", "]", "source", "=", "s", ".", "toCharArray", "(", ")", ";", "scanner", ".", "setSource", "(", "source", ")", ";", "scanner", ".", "resetTo", "(", "0", ",", "source", ".", "length", ")", ";", "try", "{", "int", "tokenType", "=", "scanner", ".", "getNextToken", "(", ")", ";", "switch", "(", "tokenType", ")", "{", "case", "TerminalTokens", ".", "TokenNameStringLiteral", ":", "return", "scanner", ".", "getCurrentStringLiteral", "(", ")", ";", "default", ":", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "public", "void", "setLiteralValue", "(", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "int", "len", "=", "value", ".", "length", "(", ")", ";", "StringBuffer", "b", "=", "new", "StringBuffer", "(", "len", "+", "2", ")", ";", "b", ".", "append", "(", "\"\\\"\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "len", ";", "i", "++", ")", "{", "char", "c", "=", "value", ".", "charAt", "(", "i", ")", ";", "switch", "(", "c", ")", "{", "case", "'\\b'", ":", "b", ".", "append", "(", "\"\\\\b\"", ")", ";", "break", ";", "case", "'\\t'", ":", "b", ".", "append", "(", "\"\\\\t\"", ")", ";", "break", ";", "case", "'\\n'", ":", "b", ".", "append", "(", "\"\\\\n\"", ")", ";", "break", ";", "case", "'\\f'", ":", "b", ".", "append", "(", "\"\\\\f\"", ")", ";", "break", ";", "case", "'\\r'", ":", "b", ".", "append", "(", "\"\\\\r\"", ")", ";", "break", ";", "case", "'\\\"'", ":", "b", ".", "append", "(", "\"\\\\\\\"\"", ")", ";", "break", ";", "case", "'\\\\'", ":", "b", ".", "append", "(", "\"\\\\\\\\\"", ")", ";", "break", ";", "case", "'\\0'", ":", "b", ".", "append", "(", "\"\\\\0\"", ")", ";", "break", ";", "case", "'\\1'", ":", "b", ".", "append", "(", "\"\\\\1\"", ")", ";", "break", ";", "case", "'\\2'", ":", "b", ".", "append", "(", "\"\\\\2\"", ")", ";", "break", ";", "case", "'\\3'", ":", "b", ".", "append", "(", "\"\\\\3\"", ")", ";", "break", ";", "case", "'\\4'", ":", "b", ".", "append", "(", "\"\\\\4\"", ")", ";", "break", ";", "case", "'\\5'", ":", "b", ".", "append", "(", "\"\\\\5\"", ")", ";", "break", ";", "case", "'\\6'", ":", "b", ".", "append", "(", "\"\\\\6\"", ")", ";", "break", ";", "case", "'\\7'", ":", "b", ".", "append", "(", "\"\\\\7\"", ")", ";", "break", ";", "default", ":", "b", ".", "append", "(", "c", ")", ";", "}", "}", "b", ".", "append", "(", "\"\\\"\"", ")", ";", "setEscapedValue", "(", "b", ".", "toString", "(", ")", ")", ";", "}", "int", "memSize", "(", ")", "{", "int", "size", "=", "BASE_NODE_SIZE", "+", "1", "*", "4", "+", "stringSize", "(", "this", ".", "escapedValue", ")", ";", "return", "size", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", ";", "}", "}", "</s>" ]
4,417
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "rewrite", ";", "import", "java", ".", "util", ".", "Collections", ";", "import", "java", ".", "util", ".", "List", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "ASTNode", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "Block", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "ChildListPropertyDescriptor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "FieldDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "Statement", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "StructuralPropertyDescriptor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "ListRewriteEvent", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "NodeInfoStore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "RewriteEvent", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "RewriteEventStore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "RewriteEventStore", ".", "CopySourceInfo", ";", "import", "org", ".", "eclipse", ".", "text", ".", "edits", ".", "TextEditGroup", ";", "public", "final", "class", "ListRewrite", "{", "private", "ASTNode", "parent", ";", "private", "StructuralPropertyDescriptor", "childProperty", ";", "private", "ASTRewrite", "rewriter", ";", "ListRewrite", "(", "ASTRewrite", "rewriter", ",", "ASTNode", "parent", ",", "StructuralPropertyDescriptor", "childProperty", ")", "{", "this", ".", "rewriter", "=", "rewriter", ";", "this", ".", "parent", "=", "parent", ";", "this", ".", "childProperty", "=", "childProperty", ";", "}", "private", "RewriteEventStore", "getRewriteStore", "(", ")", "{", "return", "this", ".", "rewriter", ".", "getRewriteEventStore", "(", ")", ";", "}", "private", "ListRewriteEvent", "getEvent", "(", ")", "{", "return", "getRewriteStore", "(", ")", ".", "getListEvent", "(", "this", ".", "parent", ",", "this", ".", "childProperty", ",", "true", ")", ";", "}", "public", "ASTNode", "getParent", "(", ")", "{", "return", "this", ".", "parent", ";", "}", "public", "StructuralPropertyDescriptor", "getLocationInParent", "(", ")", "{", "return", "this", ".", "childProperty", ";", "}", "public", "void", "remove", "(", "ASTNode", "node", ",", "TextEditGroup", "editGroup", ")", "{", "if", "(", "node", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "RewriteEvent", "event", "=", "getEvent", "(", ")", ".", "removeEntry", "(", "node", ")", ";", "if", "(", "editGroup", "!=", "null", ")", "{", "getRewriteStore", "(", ")", ".", "setEventEditGroup", "(", "event", ",", "editGroup", ")", ";", "}", "}", "public", "ASTRewrite", "getASTRewrite", "(", ")", "{", "return", "this", ".", "rewriter", ";", "}", "public", "void", "replace", "(", "ASTNode", "node", ",", "ASTNode", "replacement", ",", "TextEditGroup", "editGroup", ")", "{", "if", "(", "node", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "RewriteEvent", "event", "=", "getEvent", "(", ")", ".", "replaceEntry", "(", "node", ",", "replacement", ")", ";", "if", "(", "editGroup", "!=", "null", ")", "{", "getRewriteStore", "(", ")", ".", "setEventEditGroup", "(", "event", ",", "editGroup", ")", ";", "}", "}", "public", "void", "insertAfter", "(", "ASTNode", "node", ",", "ASTNode", "element", ",", "TextEditGroup", "editGroup", ")", "{", "if", "(", "node", "==", "null", "||", "element", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "int", "index", "=", "getEvent", "(", ")", ".", "getIndex", "(", "element", ",", "ListRewriteEvent", ".", "BOTH", ")", ";", "if", "(", "index", "==", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "internalInsertAt", "(", "node", ",", "index", "+", "1", ",", "true", ",", "editGroup", ")", ";", "}", "public", "void", "insertBefore", "(", "ASTNode", "node", ",", "ASTNode", "element", ",", "TextEditGroup", "editGroup", ")", "{", "if", "(", "node", "==", "null", "||", "element", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "int", "index", "=", "getEvent", "(", ")", ".", "getIndex", "(", "element", ",", "ListRewriteEvent", ".", "BOTH", ")", ";", "if", "(", "index", "==", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "internalInsertAt", "(", "node", ",", "index", ",", "false", ",", "editGroup", ")", ";", "}", "public", "void", "insertFirst", "(", "ASTNode", "node", ",", "TextEditGroup", "editGroup", ")", "{", "if", "(", "node", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "internalInsertAt", "(", "node", ",", "0", ",", "false", ",", "editGroup", ")", ";", "}", "public", "void", "insertLast", "(", "ASTNode", "node", ",", "TextEditGroup", "editGroup", ")", "{", "if", "(", "node", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "internalInsertAt", "(", "node", ",", "-", "1", ",", "true", ",", "editGroup", ")", ";", "}", "public", "void", "insertAt", "(", "ASTNode", "node", ",", "int", "index", ",", "TextEditGroup", "editGroup", ")", "{", "if", "(", "node", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "internalInsertAt", "(", "node", ",", "index", ",", "isInsertBoundToPreviousByDefault", "(", "node", ")", ",", "editGroup", ")", ";", "}", "private", "void", "internalInsertAt", "(", "ASTNode", "node", ",", "int", "index", ",", "boolean", "boundToPrevious", ",", "TextEditGroup", "editGroup", ")", "{", "RewriteEvent", "event", "=", "getEvent", "(", ")", ".", "insert", "(", "node", ",", "index", ")", ";", "if", "(", "boundToPrevious", ")", "{", "getRewriteStore", "(", ")", ".", "setInsertBoundToPrevious", "(", "node", ")", ";", "}", "if", "(", "editGroup", "!=", "null", ")", "{", "getRewriteStore", "(", ")", ".", "setEventEditGroup", "(", "event", ",", "editGroup", ")", ";", "}", "}", "private", "ASTNode", "createTargetNode", "(", "ASTNode", "first", ",", "ASTNode", "last", ",", "boolean", "isMove", ",", "ASTNode", "replacingNode", ",", "TextEditGroup", "editGroup", ")", "{", "if", "(", "first", "==", "null", "||", "last", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "NodeInfoStore", "nodeStore", "=", "this", ".", "rewriter", ".", "getNodeStore", "(", ")", ";", "ASTNode", "placeholder", "=", "nodeStore", ".", "newPlaceholderNode", "(", "first", ".", "getNodeType", "(", ")", ")", ";", "if", "(", "placeholder", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "first", ".", "getClass", "(", ")", ".", "getName", "(", ")", ")", ";", "}", "Block", "internalPlaceHolder", "=", "nodeStore", ".", "createCollapsePlaceholder", "(", ")", ";", "CopySourceInfo", "info", "=", "getRewriteStore", "(", ")", ".", "createRangeCopy", "(", "this", ".", "parent", ",", "this", ".", "childProperty", ",", "first", ",", "last", ",", "isMove", ",", "internalPlaceHolder", ",", "replacingNode", ",", "editGroup", ")", ";", "nodeStore", ".", "markAsCopyTarget", "(", "placeholder", ",", "info", ")", ";", "return", "placeholder", ";", "}", "public", "final", "ASTNode", "createCopyTarget", "(", "ASTNode", "first", ",", "ASTNode", "last", ")", "{", "if", "(", "first", "==", "last", ")", "{", "return", "this", ".", "rewriter", ".", "createCopyTarget", "(", "first", ")", ";", "}", "else", "{", "return", "createTargetNode", "(", "first", ",", "last", ",", "false", ",", "null", ",", "null", ")", ";", "}", "}", "public", "final", "ASTNode", "createMoveTarget", "(", "ASTNode", "first", ",", "ASTNode", "last", ")", "{", "return", "createMoveTarget", "(", "first", ",", "last", ",", "null", ",", "null", ")", ";", "}", "public", "final", "ASTNode", "createMoveTarget", "(", "ASTNode", "first", ",", "ASTNode", "last", ",", "ASTNode", "replacingNode", ",", "TextEditGroup", "editGroup", ")", "{", "if", "(", "first", "==", "last", ")", "{", "replace", "(", "first", ",", "replacingNode", ",", "editGroup", ")", ";", "return", "this", ".", "rewriter", ".", "createMoveTarget", "(", "first", ")", ";", "}", "else", "{", "return", "createTargetNode", "(", "first", ",", "last", ",", "true", ",", "replacingNode", ",", "editGroup", ")", ";", "}", "}", "private", "boolean", "isInsertBoundToPreviousByDefault", "(", "ASTNode", "node", ")", "{", "return", "(", "node", "instanceof", "Statement", "||", "node", "instanceof", "FieldDeclaration", ")", ";", "}", "public", "List", "getOriginalList", "(", ")", "{", "List", "list", "=", "(", "List", ")", "getEvent", "(", ")", ".", "getOriginalValue", "(", ")", ";", "return", "Collections", ".", "unmodifiableList", "(", "list", ")", ";", "}", "public", "List", "getRewrittenList", "(", ")", "{", "List", "list", "=", "(", "List", ")", "getEvent", "(", ")", ".", "getNewValue", "(", ")", ";", "return", "Collections", ".", "unmodifiableList", "(", "list", ")", ";", "}", "}", "</s>" ]
4,418
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "rewrite", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "Iterator", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IClassFile", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ICompilationUnit", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ITypeRoot", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaCore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaModelException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "AST", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "ASTNode", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "ASTParser", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "Block", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "ChildListPropertyDescriptor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "CompilationUnit", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "StructuralPropertyDescriptor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "RecoveryScannerData", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "ASTRewriteAnalyzer", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "LineInformation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "NodeInfoStore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "NodeRewriteEvent", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "RewriteEventStore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "TrackedNodePosition", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "RewriteEventStore", ".", "CopySourceInfo", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "RewriteEventStore", ".", "PropertyLocation", ";", "import", "org", ".", "eclipse", ".", "jface", ".", "text", ".", "IDocument", ";", "import", "org", ".", "eclipse", ".", "jface", ".", "text", ".", "TextUtilities", ";", "import", "org", ".", "eclipse", ".", "text", ".", "edits", ".", "MultiTextEdit", ";", "import", "org", ".", "eclipse", ".", "text", ".", "edits", ".", "TextEdit", ";", "import", "org", ".", "eclipse", ".", "text", ".", "edits", ".", "TextEditGroup", ";", "public", "class", "ASTRewrite", "{", "private", "final", "AST", "ast", ";", "private", "final", "RewriteEventStore", "eventStore", ";", "private", "final", "NodeInfoStore", "nodeStore", ";", "private", "TargetSourceRangeComputer", "targetSourceRangeComputer", "=", "null", ";", "private", "Object", "property1", "=", "null", ";", "private", "Object", "property2", "=", "null", ";", "public", "static", "ASTRewrite", "create", "(", "AST", "ast", ")", "{", "return", "new", "ASTRewrite", "(", "ast", ")", ";", "}", "protected", "ASTRewrite", "(", "AST", "ast", ")", "{", "this", ".", "ast", "=", "ast", ";", "this", ".", "eventStore", "=", "new", "RewriteEventStore", "(", ")", ";", "this", ".", "nodeStore", "=", "new", "NodeInfoStore", "(", "ast", ")", ";", "}", "public", "final", "AST", "getAST", "(", ")", "{", "return", "this", ".", "ast", ";", "}", "protected", "final", "RewriteEventStore", "getRewriteEventStore", "(", ")", "{", "return", "this", ".", "eventStore", ";", "}", "protected", "final", "NodeInfoStore", "getNodeStore", "(", ")", "{", "return", "this", ".", "nodeStore", ";", "}", "public", "TextEdit", "rewriteAST", "(", "IDocument", "document", ",", "Map", "options", ")", "throws", "IllegalArgumentException", "{", "if", "(", "document", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "rootNode", "=", "getRootNode", "(", ")", ";", "if", "(", "rootNode", "==", "null", ")", "{", "return", "new", "MultiTextEdit", "(", ")", ";", "}", "char", "[", "]", "content", "=", "document", ".", "get", "(", ")", ".", "toCharArray", "(", ")", ";", "LineInformation", "lineInfo", "=", "LineInformation", ".", "create", "(", "document", ")", ";", "String", "lineDelim", "=", "TextUtilities", ".", "getDefaultLineDelimiter", "(", "document", ")", ";", "ASTNode", "astRoot", "=", "rootNode", ".", "getRoot", "(", ")", ";", "List", "commentNodes", "=", "astRoot", "instanceof", "CompilationUnit", "?", "(", "(", "CompilationUnit", ")", "astRoot", ")", ".", "getCommentList", "(", ")", ":", "null", ";", "Map", "currentOptions", "=", "options", "==", "null", "?", "JavaCore", ".", "getOptions", "(", ")", ":", "options", ";", "return", "internalRewriteAST", "(", "content", ",", "lineInfo", ",", "lineDelim", ",", "commentNodes", ",", "currentOptions", ",", "rootNode", ",", "(", "RecoveryScannerData", ")", "(", "(", "CompilationUnit", ")", "astRoot", ")", ".", "getStatementsRecoveryData", "(", ")", ")", ";", "}", "public", "TextEdit", "rewriteAST", "(", ")", "throws", "JavaModelException", ",", "IllegalArgumentException", "{", "ASTNode", "rootNode", "=", "getRootNode", "(", ")", ";", "if", "(", "rootNode", "==", "null", ")", "{", "return", "new", "MultiTextEdit", "(", ")", ";", "}", "ASTNode", "root", "=", "rootNode", ".", "getRoot", "(", ")", ";", "if", "(", "!", "(", "root", "instanceof", "CompilationUnit", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "CompilationUnit", "astRoot", "=", "(", "CompilationUnit", ")", "root", ";", "ITypeRoot", "typeRoot", "=", "astRoot", ".", "getTypeRoot", "(", ")", ";", "if", "(", "typeRoot", "==", "null", "||", "typeRoot", ".", "getBuffer", "(", ")", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "char", "[", "]", "content", "=", "typeRoot", ".", "getBuffer", "(", ")", ".", "getCharacters", "(", ")", ";", "LineInformation", "lineInfo", "=", "LineInformation", ".", "create", "(", "astRoot", ")", ";", "String", "lineDelim", "=", "typeRoot", ".", "findRecommendedLineSeparator", "(", ")", ";", "Map", "options", "=", "typeRoot", ".", "getJavaProject", "(", ")", ".", "getOptions", "(", "true", ")", ";", "return", "internalRewriteAST", "(", "content", ",", "lineInfo", ",", "lineDelim", ",", "astRoot", ".", "getCommentList", "(", ")", ",", "options", ",", "rootNode", ",", "(", "RecoveryScannerData", ")", "astRoot", ".", "getStatementsRecoveryData", "(", ")", ")", ";", "}", "private", "TextEdit", "internalRewriteAST", "(", "char", "[", "]", "content", ",", "LineInformation", "lineInfo", ",", "String", "lineDelim", ",", "List", "commentNodes", ",", "Map", "options", ",", "ASTNode", "rootNode", ",", "RecoveryScannerData", "recoveryScannerData", ")", "{", "TextEdit", "result", "=", "new", "MultiTextEdit", "(", ")", ";", "TargetSourceRangeComputer", "sourceRangeComputer", "=", "getExtendedSourceRangeComputer", "(", ")", ";", "this", ".", "eventStore", ".", "prepareMovedNodes", "(", "sourceRangeComputer", ")", ";", "ASTRewriteAnalyzer", "visitor", "=", "new", "ASTRewriteAnalyzer", "(", "content", ",", "lineInfo", ",", "lineDelim", ",", "result", ",", "this", ".", "eventStore", ",", "this", ".", "nodeStore", ",", "commentNodes", ",", "options", ",", "sourceRangeComputer", ",", "recoveryScannerData", ")", ";", "rootNode", ".", "accept", "(", "visitor", ")", ";", "this", ".", "eventStore", ".", "revertMovedNodes", "(", ")", ";", "return", "result", ";", "}", "private", "ASTNode", "getRootNode", "(", ")", "{", "ASTNode", "node", "=", "null", ";", "int", "start", "=", "-", "1", ";", "int", "end", "=", "-", "1", ";", "for", "(", "Iterator", "iter", "=", "getRewriteEventStore", "(", ")", ".", "getChangeRootIterator", "(", ")", ";", "iter", ".", "hasNext", "(", ")", ";", ")", "{", "ASTNode", "curr", "=", "(", "ASTNode", ")", "iter", ".", "next", "(", ")", ";", "if", "(", "!", "RewriteEventStore", ".", "isNewNode", "(", "curr", ")", ")", "{", "int", "currStart", "=", "curr", ".", "getStartPosition", "(", ")", ";", "int", "currEnd", "=", "currStart", "+", "curr", ".", "getLength", "(", ")", ";", "if", "(", "node", "==", "null", "||", "currStart", "<", "start", "&&", "currEnd", ">", "end", ")", "{", "start", "=", "currStart", ";", "end", "=", "currEnd", ";", "node", "=", "curr", ";", "}", "else", "if", "(", "currStart", "<", "start", ")", "{", "start", "=", "currStart", ";", "}", "else", "if", "(", "currEnd", ">", "end", ")", "{", "end", "=", "currEnd", ";", "}", "}", "}", "if", "(", "node", "!=", "null", ")", "{", "int", "currStart", "=", "node", ".", "getStartPosition", "(", ")", ";", "int", "currEnd", "=", "currStart", "+", "node", ".", "getLength", "(", ")", ";", "while", "(", "start", "<", "currStart", "||", "end", ">", "currEnd", ")", "{", "node", "=", "node", ".", "getParent", "(", ")", ";", "currStart", "=", "node", ".", "getStartPosition", "(", ")", ";", "currEnd", "=", "currStart", "+", "node", ".", "getLength", "(", ")", ";", "}", "ASTNode", "parent", "=", "node", ".", "getParent", "(", ")", ";", "while", "(", "parent", "!=", "null", "&&", "parent", ".", "getStartPosition", "(", ")", "==", "node", ".", "getStartPosition", "(", ")", "&&", "parent", ".", "getLength", "(", ")", "==", "node", ".", "getLength", "(", ")", ")", "{", "node", "=", "parent", ";", "parent", "=", "node", ".", "getParent", "(", ")", ";", "}", "}", "return", "node", ";", "}", "public", "final", "void", "remove", "(", "ASTNode", "node", ",", "TextEditGroup", "editGroup", ")", "{", "if", "(", "node", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "StructuralPropertyDescriptor", "property", ";", "ASTNode", "parent", ";", "if", "(", "RewriteEventStore", ".", "isNewNode", "(", "node", ")", ")", "{", "PropertyLocation", "location", "=", "this", ".", "eventStore", ".", "getPropertyLocation", "(", "node", ",", "RewriteEventStore", ".", "NEW", ")", ";", "if", "(", "location", "!=", "null", ")", "{", "property", "=", "location", ".", "getProperty", "(", ")", ";", "parent", "=", "location", ".", "getParent", "(", ")", ";", "}", "else", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "}", "else", "{", "property", "=", "node", ".", "getLocationInParent", "(", ")", ";", "parent", "=", "node", ".", "getParent", "(", ")", ";", "}", "if", "(", "property", ".", "isChildListProperty", "(", ")", ")", "{", "getListRewrite", "(", "parent", ",", "(", "ChildListPropertyDescriptor", ")", "property", ")", ".", "remove", "(", "node", ",", "editGroup", ")", ";", "}", "else", "{", "set", "(", "parent", ",", "property", ",", "null", ",", "editGroup", ")", ";", "}", "}", "public", "final", "void", "replace", "(", "ASTNode", "node", ",", "ASTNode", "replacement", ",", "TextEditGroup", "editGroup", ")", "{", "if", "(", "node", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "StructuralPropertyDescriptor", "property", ";", "ASTNode", "parent", ";", "if", "(", "RewriteEventStore", ".", "isNewNode", "(", "node", ")", ")", "{", "PropertyLocation", "location", "=", "this", ".", "eventStore", ".", "getPropertyLocation", "(", "node", ",", "RewriteEventStore", ".", "NEW", ")", ";", "if", "(", "location", "!=", "null", ")", "{", "property", "=", "location", ".", "getProperty", "(", ")", ";", "parent", "=", "location", ".", "getParent", "(", ")", ";", "}", "else", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "}", "else", "{", "property", "=", "node", ".", "getLocationInParent", "(", ")", ";", "parent", "=", "node", ".", "getParent", "(", ")", ";", "}", "if", "(", "property", ".", "isChildListProperty", "(", ")", ")", "{", "getListRewrite", "(", "parent", ",", "(", "ChildListPropertyDescriptor", ")", "property", ")", ".", "replace", "(", "node", ",", "replacement", ",", "editGroup", ")", ";", "}", "else", "{", "set", "(", "parent", ",", "property", ",", "replacement", ",", "editGroup", ")", ";", "}", "}", "public", "final", "void", "set", "(", "ASTNode", "node", ",", "StructuralPropertyDescriptor", "property", ",", "Object", "value", ",", "TextEditGroup", "editGroup", ")", "{", "if", "(", "node", "==", "null", "||", "property", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "validateIsCorrectAST", "(", "node", ")", ";", "validatePropertyType", "(", "property", ",", "value", ")", ";", "validateIsPropertyOfNode", "(", "property", ",", "node", ")", ";", "NodeRewriteEvent", "nodeEvent", "=", "this", ".", "eventStore", ".", "getNodeEvent", "(", "node", ",", "property", ",", "true", ")", ";", "nodeEvent", ".", "setNewValue", "(", "value", ")", ";", "if", "(", "editGroup", "!=", "null", ")", "{", "this", ".", "eventStore", ".", "setEventEditGroup", "(", "nodeEvent", ",", "editGroup", ")", ";", "}", "}", "public", "Object", "get", "(", "ASTNode", "node", ",", "StructuralPropertyDescriptor", "property", ")", "{", "if", "(", "node", "==", "null", "||", "property", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "property", ".", "isChildListProperty", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "return", "this", ".", "eventStore", ".", "getNewValue", "(", "node", ",", "property", ")", ";", "}", "public", "final", "ListRewrite", "getListRewrite", "(", "ASTNode", "node", ",", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "node", "==", "null", "||", "property", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "validateIsCorrectAST", "(", "node", ")", ";", "validateIsListProperty", "(", "property", ")", ";", "validateIsPropertyOfNode", "(", "property", ",", "node", ")", ";", "return", "new", "ListRewrite", "(", "this", ",", "node", ",", "property", ")", ";", "}", "public", "final", "Object", "getProperty", "(", "String", "propertyName", ")", "{", "if", "(", "propertyName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "this", ".", "property1", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "this", ".", "property1", "instanceof", "String", ")", "{", "if", "(", "propertyName", ".", "equals", "(", "this", ".", "property1", ")", ")", "{", "return", "this", ".", "property2", ";", "}", "else", "{", "return", "null", ";", "}", "}", "Map", "m", "=", "(", "Map", ")", "this", ".", "property1", ";", "return", "m", ".", "get", "(", "propertyName", ")", ";", "}", "public", "final", "ITrackedNodePosition", "track", "(", "ASTNode", "node", ")", "{", "if", "(", "node", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "TextEditGroup", "group", "=", "this", ".", "eventStore", ".", "getTrackedNodeData", "(", "node", ")", ";", "if", "(", "group", "==", "null", ")", "{", "group", "=", "new", "TextEditGroup", "(", "\"internal\"", ")", ";", "this", ".", "eventStore", ".", "setTrackedNodeData", "(", "node", ",", "group", ")", ";", "}", "return", "new", "TrackedNodePosition", "(", "group", ",", "node", ")", ";", "}", "private", "void", "validateIsExistingNode", "(", "ASTNode", "node", ")", "{", "if", "(", "node", ".", "getStartPosition", "(", ")", "==", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "}", "private", "void", "validateIsCorrectAST", "(", "ASTNode", "node", ")", "{", "if", "(", "node", ".", "getAST", "(", ")", "!=", "getAST", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "}", "private", "void", "validateIsListProperty", "(", "StructuralPropertyDescriptor", "property", ")", "{", "if", "(", "!", "property", ".", "isChildListProperty", "(", ")", ")", "{", "String", "message", "=", "property", ".", "getId", "(", ")", "+", "\"\"", ";", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}", "}", "private", "void", "validateIsPropertyOfNode", "(", "StructuralPropertyDescriptor", "property", ",", "ASTNode", "node", ")", "{", "if", "(", "!", "property", ".", "getNodeClass", "(", ")", ".", "isInstance", "(", "node", ")", ")", "{", "String", "message", "=", "property", ".", "getId", "(", ")", "+", "\"\"", "+", "node", ".", "getClass", "(", ")", ".", "getName", "(", ")", ";", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}", "}", "private", "void", "validatePropertyType", "(", "StructuralPropertyDescriptor", "prop", ",", "Object", "node", ")", "{", "if", "(", "prop", ".", "isChildListProperty", "(", ")", ")", "{", "String", "message", "=", "\"\"", ";", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}", "}", "public", "final", "ASTNode", "createStringPlaceholder", "(", "String", "code", ",", "int", "nodeType", ")", "{", "if", "(", "code", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "placeholder", "=", "getNodeStore", "(", ")", ".", "newPlaceholderNode", "(", "nodeType", ")", ";", "if", "(", "placeholder", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "nodeType", ")", ";", "}", "getNodeStore", "(", ")", ".", "markAsStringPlaceholder", "(", "placeholder", ",", "code", ")", ";", "return", "placeholder", ";", "}", "public", "final", "ASTNode", "createGroupNode", "(", "ASTNode", "[", "]", "targetNodes", ")", "{", "if", "(", "targetNodes", "==", "null", "||", "targetNodes", ".", "length", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "Block", "res", "=", "getNodeStore", "(", ")", ".", "createCollapsePlaceholder", "(", ")", ";", "ListRewrite", "listRewrite", "=", "getListRewrite", "(", "res", ",", "Block", ".", "STATEMENTS_PROPERTY", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "targetNodes", ".", "length", ";", "i", "++", ")", "{", "listRewrite", ".", "insertLast", "(", "targetNodes", "[", "i", "]", ",", "null", ")", ";", "}", "return", "res", ";", "}", "private", "ASTNode", "createTargetNode", "(", "ASTNode", "node", ",", "boolean", "isMove", ")", "{", "if", "(", "node", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "validateIsExistingNode", "(", "node", ")", ";", "validateIsCorrectAST", "(", "node", ")", ";", "CopySourceInfo", "info", "=", "getRewriteEventStore", "(", ")", ".", "markAsCopySource", "(", "node", ".", "getParent", "(", ")", ",", "node", ".", "getLocationInParent", "(", ")", ",", "node", ",", "isMove", ")", ";", "ASTNode", "placeholder", "=", "getNodeStore", "(", ")", ".", "newPlaceholderNode", "(", "node", ".", "getNodeType", "(", ")", ")", ";", "if", "(", "placeholder", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "node", ".", "getClass", "(", ")", ".", "getName", "(", ")", ")", ";", "}", "getNodeStore", "(", ")", ".", "markAsCopyTarget", "(", "placeholder", ",", "info", ")", ";", "return", "placeholder", ";", "}", "public", "final", "ASTNode", "createCopyTarget", "(", "ASTNode", "node", ")", "{", "return", "createTargetNode", "(", "node", ",", "false", ")", ";", "}", "public", "final", "ASTNode", "createMoveTarget", "(", "ASTNode", "node", ")", "{", "return", "createTargetNode", "(", "node", ",", "true", ")", ";", "}", "public", "final", "TargetSourceRangeComputer", "getExtendedSourceRangeComputer", "(", ")", "{", "if", "(", "this", ".", "targetSourceRangeComputer", "==", "null", ")", "{", "this", ".", "targetSourceRangeComputer", "=", "new", "TargetSourceRangeComputer", "(", ")", ";", "}", "return", "this", ".", "targetSourceRangeComputer", ";", "}", "public", "final", "void", "setProperty", "(", "String", "propertyName", ",", "Object", "data", ")", "{", "if", "(", "propertyName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "this", ".", "property1", "==", "null", ")", "{", "if", "(", "data", "==", "null", ")", "{", "return", ";", "}", "this", ".", "property1", "=", "propertyName", ";", "this", ".", "property2", "=", "data", ";", "return", ";", "}", "if", "(", "this", ".", "property1", "instanceof", "String", ")", "{", "if", "(", "propertyName", ".", "equals", "(", "this", ".", "property1", ")", ")", "{", "if", "(", "data", "==", "null", ")", "{", "this", ".", "property1", "=", "null", ";", "this", ".", "property2", "=", "null", ";", "}", "else", "{", "this", ".", "property2", "=", "data", ";", "}", "return", ";", "}", "if", "(", "data", "==", "null", ")", "{", "return", ";", "}", "Map", "m", "=", "new", "HashMap", "(", "3", ")", ";", "m", ".", "put", "(", "this", ".", "property1", ",", "this", ".", "property2", ")", ";", "m", ".", "put", "(", "propertyName", ",", "data", ")", ";", "this", ".", "property1", "=", "m", ";", "this", ".", "property2", "=", "null", ";", "return", ";", "}", "Map", "m", "=", "(", "Map", ")", "this", ".", "property1", ";", "if", "(", "data", "==", "null", ")", "{", "m", ".", "remove", "(", "propertyName", ")", ";", "if", "(", "m", ".", "size", "(", ")", "==", "1", ")", "{", "Map", ".", "Entry", "[", "]", "entries", "=", "(", "Map", ".", "Entry", "[", "]", ")", "m", ".", "entrySet", "(", ")", ".", "toArray", "(", "new", "Map", ".", "Entry", "[", "1", "]", ")", ";", "this", ".", "property1", "=", "entries", "[", "0", "]", ".", "getKey", "(", ")", ";", "this", ".", "property2", "=", "entries", "[", "0", "]", ".", "getValue", "(", ")", ";", "}", "return", ";", "}", "else", "{", "m", ".", "put", "(", "propertyName", ",", "data", ")", ";", "return", ";", "}", "}", "public", "final", "void", "setTargetSourceRangeComputer", "(", "TargetSourceRangeComputer", "computer", ")", "{", "this", ".", "targetSourceRangeComputer", "=", "computer", ";", "}", "public", "String", "toString", "(", ")", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", ")", ";", "buf", ".", "append", "(", "\"Events:n\"", ")", ";", "if", "(", "this", ".", "eventStore", "!=", "null", ")", "{", "buf", ".", "append", "(", "this", ".", "eventStore", ".", "toString", "(", ")", ")", ";", "}", "return", "buf", ".", "toString", "(", ")", ";", "}", "}", "</s>" ]
4,419
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "rewrite", ";", "public", "interface", "ITrackedNodePosition", "{", "public", "int", "getStartPosition", "(", ")", ";", "public", "int", "getLength", "(", ")", ";", "}", "</s>" ]
4,420
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "rewrite", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "CoreException", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "NullProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "SubProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "Flags", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ICompilationUnit", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IImportDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ITypeRoot", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaCore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaModelException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "Signature", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "ImportRewriteAnalyzer", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Messages", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ";", "import", "org", ".", "eclipse", ".", "text", ".", "edits", ".", "MultiTextEdit", ";", "import", "org", ".", "eclipse", ".", "text", ".", "edits", ".", "TextEdit", ";", "public", "final", "class", "ImportRewrite", "{", "public", "static", "abstract", "class", "ImportRewriteContext", "{", "public", "final", "static", "int", "RES_NAME_FOUND", "=", "1", ";", "public", "final", "static", "int", "RES_NAME_UNKNOWN", "=", "2", ";", "public", "final", "static", "int", "RES_NAME_CONFLICT", "=", "3", ";", "public", "final", "static", "int", "KIND_TYPE", "=", "1", ";", "public", "final", "static", "int", "KIND_STATIC_FIELD", "=", "2", ";", "public", "final", "static", "int", "KIND_STATIC_METHOD", "=", "3", ";", "public", "abstract", "int", "findInContext", "(", "String", "qualifier", ",", "String", "name", ",", "int", "kind", ")", ";", "}", "private", "static", "final", "char", "STATIC_PREFIX", "=", "'s'", ";", "private", "static", "final", "char", "NORMAL_PREFIX", "=", "'n'", ";", "private", "final", "ImportRewriteContext", "defaultContext", ";", "private", "final", "ICompilationUnit", "compilationUnit", ";", "private", "final", "CompilationUnit", "astRoot", ";", "private", "final", "boolean", "restoreExistingImports", ";", "private", "final", "List", "existingImports", ";", "private", "final", "Map", "importsKindMap", ";", "private", "String", "[", "]", "importOrder", ";", "private", "int", "importOnDemandThreshold", ";", "private", "int", "staticImportOnDemandThreshold", ";", "private", "List", "addedImports", ";", "private", "List", "removedImports", ";", "private", "String", "[", "]", "createdImports", ";", "private", "String", "[", "]", "createdStaticImports", ";", "private", "boolean", "filterImplicitImports", ";", "private", "boolean", "useContextToFilterImplicitImports", ";", "public", "static", "ImportRewrite", "create", "(", "ICompilationUnit", "cu", ",", "boolean", "restoreExistingImports", ")", "throws", "JavaModelException", "{", "if", "(", "cu", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "List", "existingImport", "=", "null", ";", "if", "(", "restoreExistingImports", ")", "{", "existingImport", "=", "new", "ArrayList", "(", ")", ";", "IImportDeclaration", "[", "]", "imports", "=", "cu", ".", "getImports", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "imports", ".", "length", ";", "i", "++", ")", "{", "IImportDeclaration", "curr", "=", "imports", "[", "i", "]", ";", "char", "prefix", "=", "Flags", ".", "isStatic", "(", "curr", ".", "getFlags", "(", ")", ")", "?", "STATIC_PREFIX", ":", "NORMAL_PREFIX", ";", "existingImport", ".", "add", "(", "prefix", "+", "curr", ".", "getElementName", "(", ")", ")", ";", "}", "}", "return", "new", "ImportRewrite", "(", "cu", ",", "null", ",", "existingImport", ")", ";", "}", "public", "static", "ImportRewrite", "create", "(", "CompilationUnit", "astRoot", ",", "boolean", "restoreExistingImports", ")", "{", "if", "(", "astRoot", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "ITypeRoot", "typeRoot", "=", "astRoot", ".", "getTypeRoot", "(", ")", ";", "if", "(", "!", "(", "typeRoot", "instanceof", "ICompilationUnit", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "List", "existingImport", "=", "null", ";", "if", "(", "restoreExistingImports", ")", "{", "existingImport", "=", "new", "ArrayList", "(", ")", ";", "List", "imports", "=", "astRoot", ".", "imports", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "imports", ".", "size", "(", ")", ";", "i", "++", ")", "{", "ImportDeclaration", "curr", "=", "(", "ImportDeclaration", ")", "imports", ".", "get", "(", "i", ")", ";", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", ")", ";", "buf", ".", "append", "(", "curr", ".", "isStatic", "(", ")", "?", "STATIC_PREFIX", ":", "NORMAL_PREFIX", ")", ".", "append", "(", "curr", ".", "getName", "(", ")", ".", "getFullyQualifiedName", "(", ")", ")", ";", "if", "(", "curr", ".", "isOnDemand", "(", ")", ")", "{", "if", "(", "buf", ".", "length", "(", ")", ">", "1", ")", "buf", ".", "append", "(", "'.'", ")", ";", "buf", ".", "append", "(", "'*'", ")", ";", "}", "existingImport", ".", "add", "(", "buf", ".", "toString", "(", ")", ")", ";", "}", "}", "return", "new", "ImportRewrite", "(", "(", "ICompilationUnit", ")", "typeRoot", ",", "astRoot", ",", "existingImport", ")", ";", "}", "private", "ImportRewrite", "(", "ICompilationUnit", "cu", ",", "CompilationUnit", "astRoot", ",", "List", "existingImports", ")", "{", "this", ".", "compilationUnit", "=", "cu", ";", "this", ".", "astRoot", "=", "astRoot", ";", "if", "(", "existingImports", "!=", "null", ")", "{", "this", ".", "existingImports", "=", "existingImports", ";", "this", ".", "restoreExistingImports", "=", "!", "existingImports", ".", "isEmpty", "(", ")", ";", "}", "else", "{", "this", ".", "existingImports", "=", "new", "ArrayList", "(", ")", ";", "this", ".", "restoreExistingImports", "=", "false", ";", "}", "this", ".", "filterImplicitImports", "=", "true", ";", "this", ".", "useContextToFilterImplicitImports", "=", "false", ";", "this", ".", "defaultContext", "=", "new", "ImportRewriteContext", "(", ")", "{", "public", "int", "findInContext", "(", "String", "qualifier", ",", "String", "name", ",", "int", "kind", ")", "{", "return", "findInImports", "(", "qualifier", ",", "name", ",", "kind", ")", ";", "}", "}", ";", "this", ".", "addedImports", "=", "null", ";", "this", ".", "removedImports", "=", "null", ";", "this", ".", "createdImports", "=", "null", ";", "this", ".", "createdStaticImports", "=", "null", ";", "this", ".", "importOrder", "=", "CharOperation", ".", "NO_STRINGS", ";", "this", ".", "importOnDemandThreshold", "=", "99", ";", "this", ".", "staticImportOnDemandThreshold", "=", "99", ";", "this", ".", "importsKindMap", "=", "new", "HashMap", "(", ")", ";", "}", "public", "void", "setImportOrder", "(", "String", "[", "]", "order", ")", "{", "if", "(", "order", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "this", ".", "importOrder", "=", "order", ";", "}", "public", "void", "setOnDemandImportThreshold", "(", "int", "threshold", ")", "{", "if", "(", "threshold", "<=", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "this", ".", "importOnDemandThreshold", "=", "threshold", ";", "}", "public", "void", "setStaticOnDemandImportThreshold", "(", "int", "threshold", ")", "{", "if", "(", "threshold", "<=", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "this", ".", "staticImportOnDemandThreshold", "=", "threshold", ";", "}", "public", "ICompilationUnit", "getCompilationUnit", "(", ")", "{", "return", "this", ".", "compilationUnit", ";", "}", "public", "ImportRewriteContext", "getDefaultImportRewriteContext", "(", ")", "{", "return", "this", ".", "defaultContext", ";", "}", "public", "void", "setFilterImplicitImports", "(", "boolean", "filterImplicitImports", ")", "{", "this", ".", "filterImplicitImports", "=", "filterImplicitImports", ";", "}", "public", "void", "setUseContextToFilterImplicitImports", "(", "boolean", "useContextToFilterImplicitImports", ")", "{", "this", ".", "useContextToFilterImplicitImports", "=", "useContextToFilterImplicitImports", ";", "}", "private", "static", "int", "compareImport", "(", "char", "prefix", ",", "String", "qualifier", ",", "String", "name", ",", "String", "curr", ")", "{", "if", "(", "curr", ".", "charAt", "(", "0", ")", "!=", "prefix", "||", "!", "curr", ".", "endsWith", "(", "name", ")", ")", "{", "return", "ImportRewriteContext", ".", "RES_NAME_UNKNOWN", ";", "}", "curr", "=", "curr", ".", "substring", "(", "1", ")", ";", "if", "(", "curr", ".", "length", "(", ")", "==", "name", ".", "length", "(", ")", ")", "{", "if", "(", "qualifier", ".", "length", "(", ")", "==", "0", ")", "{", "return", "ImportRewriteContext", ".", "RES_NAME_FOUND", ";", "}", "return", "ImportRewriteContext", ".", "RES_NAME_CONFLICT", ";", "}", "int", "dotPos", "=", "curr", ".", "length", "(", ")", "-", "name", ".", "length", "(", ")", "-", "1", ";", "if", "(", "curr", ".", "charAt", "(", "dotPos", ")", "!=", "'.'", ")", "{", "return", "ImportRewriteContext", ".", "RES_NAME_UNKNOWN", ";", "}", "if", "(", "qualifier", ".", "length", "(", ")", "!=", "dotPos", "||", "!", "curr", ".", "startsWith", "(", "qualifier", ")", ")", "{", "return", "ImportRewriteContext", ".", "RES_NAME_CONFLICT", ";", "}", "return", "ImportRewriteContext", ".", "RES_NAME_FOUND", ";", "}", "final", "int", "findInImports", "(", "String", "qualifier", ",", "String", "name", ",", "int", "kind", ")", "{", "boolean", "allowAmbiguity", "=", "(", "kind", "==", "ImportRewriteContext", ".", "KIND_STATIC_METHOD", ")", "||", "(", "name", ".", "length", "(", ")", "==", "1", "&&", "name", ".", "charAt", "(", "0", ")", "==", "'*'", ")", ";", "List", "imports", "=", "this", ".", "existingImports", ";", "char", "prefix", "=", "(", "kind", "==", "ImportRewriteContext", ".", "KIND_TYPE", ")", "?", "NORMAL_PREFIX", ":", "STATIC_PREFIX", ";", "for", "(", "int", "i", "=", "imports", ".", "size", "(", ")", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "String", "curr", "=", "(", "String", ")", "imports", ".", "get", "(", "i", ")", ";", "int", "res", "=", "compareImport", "(", "prefix", ",", "qualifier", ",", "name", ",", "curr", ")", ";", "if", "(", "res", "!=", "ImportRewriteContext", ".", "RES_NAME_UNKNOWN", ")", "{", "if", "(", "!", "allowAmbiguity", "||", "res", "==", "ImportRewriteContext", ".", "RES_NAME_FOUND", ")", "{", "if", "(", "prefix", "!=", "STATIC_PREFIX", ")", "{", "return", "res", ";", "}", "Object", "currKind", "=", "this", ".", "importsKindMap", ".", "get", "(", "curr", ".", "substring", "(", "1", ")", ")", ";", "if", "(", "currKind", "!=", "null", "&&", "currKind", ".", "equals", "(", "this", ".", "importsKindMap", ".", "get", "(", "qualifier", "+", "'.'", "+", "name", ")", ")", ")", "{", "return", "res", ";", "}", "}", "}", "}", "if", "(", "this", ".", "filterImplicitImports", "&&", "this", ".", "useContextToFilterImplicitImports", ")", "{", "String", "fPackageName", "=", "this", ".", "compilationUnit", ".", "getParent", "(", ")", ".", "getElementName", "(", ")", ";", "String", "mainTypeSimpleName", "=", "JavaCore", ".", "removeJavaLikeExtension", "(", "this", ".", "compilationUnit", ".", "getElementName", "(", ")", ")", ";", "String", "fMainTypeName", "=", "Util", ".", "concatenateName", "(", "fPackageName", ",", "mainTypeSimpleName", ",", "'.'", ")", ";", "if", "(", "kind", "==", "ImportRewriteContext", ".", "KIND_TYPE", "&&", "(", "qualifier", ".", "equals", "(", "fPackageName", ")", "||", "fMainTypeName", ".", "equals", "(", "Util", ".", "concatenateName", "(", "qualifier", ",", "name", ",", "'.'", ")", ")", ")", ")", "return", "ImportRewriteContext", ".", "RES_NAME_FOUND", ";", "}", "return", "ImportRewriteContext", ".", "RES_NAME_UNKNOWN", ";", "}", "public", "Type", "addImportFromSignature", "(", "String", "typeSig", ",", "AST", "ast", ")", "{", "return", "addImportFromSignature", "(", "typeSig", ",", "ast", ",", "this", ".", "defaultContext", ")", ";", "}", "public", "Type", "addImportFromSignature", "(", "String", "typeSig", ",", "AST", "ast", ",", "ImportRewriteContext", "context", ")", "{", "if", "(", "typeSig", "==", "null", "||", "typeSig", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "int", "sigKind", "=", "Signature", ".", "getTypeSignatureKind", "(", "typeSig", ")", ";", "switch", "(", "sigKind", ")", "{", "case", "Signature", ".", "BASE_TYPE_SIGNATURE", ":", "return", "ast", ".", "newPrimitiveType", "(", "PrimitiveType", ".", "toCode", "(", "Signature", ".", "toString", "(", "typeSig", ")", ")", ")", ";", "case", "Signature", ".", "ARRAY_TYPE_SIGNATURE", ":", "Type", "elementType", "=", "addImportFromSignature", "(", "Signature", ".", "getElementType", "(", "typeSig", ")", ",", "ast", ",", "context", ")", ";", "return", "ast", ".", "newArrayType", "(", "elementType", ",", "Signature", ".", "getArrayCount", "(", "typeSig", ")", ")", ";", "case", "Signature", ".", "CLASS_TYPE_SIGNATURE", ":", "String", "erasureSig", "=", "Signature", ".", "getTypeErasure", "(", "typeSig", ")", ";", "String", "erasureName", "=", "Signature", ".", "toString", "(", "erasureSig", ")", ";", "if", "(", "erasureSig", ".", "charAt", "(", "0", ")", "==", "Signature", ".", "C_RESOLVED", ")", "{", "erasureName", "=", "internalAddImport", "(", "erasureName", ",", "context", ")", ";", "}", "Type", "baseType", "=", "ast", ".", "newSimpleType", "(", "ast", ".", "newName", "(", "erasureName", ")", ")", ";", "String", "[", "]", "typeArguments", "=", "Signature", ".", "getTypeArguments", "(", "typeSig", ")", ";", "if", "(", "typeArguments", ".", "length", ">", "0", ")", "{", "ParameterizedType", "type", "=", "ast", ".", "newParameterizedType", "(", "baseType", ")", ";", "List", "argNodes", "=", "type", ".", "typeArguments", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "typeArguments", ".", "length", ";", "i", "++", ")", "{", "String", "curr", "=", "typeArguments", "[", "i", "]", ";", "if", "(", "containsNestedCapture", "(", "curr", ")", ")", "{", "argNodes", ".", "add", "(", "ast", ".", "newWildcardType", "(", ")", ")", ";", "}", "else", "{", "argNodes", ".", "add", "(", "addImportFromSignature", "(", "curr", ",", "ast", ",", "context", ")", ")", ";", "}", "}", "return", "type", ";", "}", "return", "baseType", ";", "case", "Signature", ".", "TYPE_VARIABLE_SIGNATURE", ":", "return", "ast", ".", "newSimpleType", "(", "ast", ".", "newSimpleName", "(", "Signature", ".", "toString", "(", "typeSig", ")", ")", ")", ";", "case", "Signature", ".", "WILDCARD_TYPE_SIGNATURE", ":", "WildcardType", "wildcardType", "=", "ast", ".", "newWildcardType", "(", ")", ";", "char", "ch", "=", "typeSig", ".", "charAt", "(", "0", ")", ";", "if", "(", "ch", "!=", "Signature", ".", "C_STAR", ")", "{", "Type", "bound", "=", "addImportFromSignature", "(", "typeSig", ".", "substring", "(", "1", ")", ",", "ast", ",", "context", ")", ";", "wildcardType", ".", "setBound", "(", "bound", ",", "ch", "==", "Signature", ".", "C_EXTENDS", ")", ";", "}", "return", "wildcardType", ";", "case", "Signature", ".", "CAPTURE_TYPE_SIGNATURE", ":", "return", "addImportFromSignature", "(", "typeSig", ".", "substring", "(", "1", ")", ",", "ast", ",", "context", ")", ";", "default", ":", "throw", "new", "IllegalArgumentException", "(", "\"\"", "+", "typeSig", ")", ";", "}", "}", "public", "String", "addImport", "(", "ITypeBinding", "binding", ")", "{", "return", "addImport", "(", "binding", ",", "this", ".", "defaultContext", ")", ";", "}", "public", "String", "addImport", "(", "ITypeBinding", "binding", ",", "ImportRewriteContext", "context", ")", "{", "if", "(", "binding", ".", "isPrimitive", "(", ")", "||", "binding", ".", "isTypeVariable", "(", ")", "||", "binding", ".", "isRecovered", "(", ")", ")", "{", "return", "binding", ".", "getName", "(", ")", ";", "}", "ITypeBinding", "normalizedBinding", "=", "normalizeTypeBinding", "(", "binding", ")", ";", "if", "(", "normalizedBinding", "==", "null", ")", "{", "return", "\"invalid\"", ";", "}", "if", "(", "normalizedBinding", ".", "isWildcardType", "(", ")", ")", "{", "StringBuffer", "res", "=", "new", "StringBuffer", "(", "\"?\"", ")", ";", "ITypeBinding", "bound", "=", "normalizedBinding", ".", "getBound", "(", ")", ";", "if", "(", "bound", "!=", "null", "&&", "!", "bound", ".", "isWildcardType", "(", ")", "&&", "!", "bound", ".", "isCapture", "(", ")", ")", "{", "if", "(", "normalizedBinding", ".", "isUpperbound", "(", ")", ")", "{", "res", ".", "append", "(", "\"", "extends", "\"", ")", ";", "}", "else", "{", "res", ".", "append", "(", "\"", "super", "\"", ")", ";", "}", "res", ".", "append", "(", "addImport", "(", "bound", ",", "context", ")", ")", ";", "}", "return", "res", ".", "toString", "(", ")", ";", "}", "if", "(", "normalizedBinding", ".", "isArray", "(", ")", ")", "{", "StringBuffer", "res", "=", "new", "StringBuffer", "(", "addImport", "(", "normalizedBinding", ".", "getElementType", "(", ")", ",", "context", ")", ")", ";", "for", "(", "int", "i", "=", "normalizedBinding", ".", "getDimensions", "(", ")", ";", "i", ">", "0", ";", "i", "--", ")", "{", "res", ".", "append", "(", "\"[]\"", ")", ";", "}", "return", "res", ".", "toString", "(", ")", ";", "}", "String", "qualifiedName", "=", "getRawQualifiedName", "(", "normalizedBinding", ")", ";", "if", "(", "qualifiedName", ".", "length", "(", ")", ">", "0", ")", "{", "String", "str", "=", "internalAddImport", "(", "qualifiedName", ",", "context", ")", ";", "ITypeBinding", "[", "]", "typeArguments", "=", "normalizedBinding", ".", "getTypeArguments", "(", ")", ";", "if", "(", "typeArguments", ".", "length", ">", "0", ")", "{", "StringBuffer", "res", "=", "new", "StringBuffer", "(", "str", ")", ";", "res", ".", "append", "(", "'<'", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "typeArguments", ".", "length", ";", "i", "++", ")", "{", "if", "(", "i", ">", "0", ")", "{", "res", ".", "append", "(", "','", ")", ";", "}", "ITypeBinding", "curr", "=", "typeArguments", "[", "i", "]", ";", "if", "(", "containsNestedCapture", "(", "curr", ",", "false", ")", ")", "{", "res", ".", "append", "(", "'?'", ")", ";", "}", "else", "{", "res", ".", "append", "(", "addImport", "(", "curr", ",", "context", ")", ")", ";", "}", "}", "res", ".", "append", "(", "'>'", ")", ";", "return", "res", ".", "toString", "(", ")", ";", "}", "return", "str", ";", "}", "return", "getRawName", "(", "normalizedBinding", ")", ";", "}", "private", "boolean", "containsNestedCapture", "(", "ITypeBinding", "binding", ",", "boolean", "isNested", ")", "{", "if", "(", "binding", "==", "null", "||", "binding", ".", "isPrimitive", "(", ")", "||", "binding", ".", "isTypeVariable", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "binding", ".", "isCapture", "(", ")", ")", "{", "if", "(", "isNested", ")", "{", "return", "true", ";", "}", "return", "containsNestedCapture", "(", "binding", ".", "getWildcard", "(", ")", ",", "true", ")", ";", "}", "if", "(", "binding", ".", "isWildcardType", "(", ")", ")", "{", "return", "containsNestedCapture", "(", "binding", ".", "getBound", "(", ")", ",", "true", ")", ";", "}", "if", "(", "binding", ".", "isArray", "(", ")", ")", "{", "return", "containsNestedCapture", "(", "binding", ".", "getElementType", "(", ")", ",", "true", ")", ";", "}", "ITypeBinding", "[", "]", "typeArguments", "=", "binding", ".", "getTypeArguments", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "typeArguments", ".", "length", ";", "i", "++", ")", "{", "if", "(", "containsNestedCapture", "(", "typeArguments", "[", "i", "]", ",", "true", ")", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}", "private", "boolean", "containsNestedCapture", "(", "String", "signature", ")", "{", "return", "signature", ".", "length", "(", ")", ">", "1", "&&", "signature", ".", "indexOf", "(", "Signature", ".", "C_CAPTURE", ",", "1", ")", "!=", "-", "1", ";", "}", "private", "static", "ITypeBinding", "normalizeTypeBinding", "(", "ITypeBinding", "binding", ")", "{", "if", "(", "binding", "!=", "null", "&&", "!", "binding", ".", "isNullType", "(", ")", "&&", "!", "\"void\"", ".", "equals", "(", "binding", ".", "getName", "(", ")", ")", ")", "{", "if", "(", "binding", ".", "isAnonymous", "(", ")", ")", "{", "ITypeBinding", "[", "]", "baseBindings", "=", "binding", ".", "getInterfaces", "(", ")", ";", "if", "(", "baseBindings", ".", "length", ">", "0", ")", "{", "return", "baseBindings", "[", "0", "]", ";", "}", "return", "binding", ".", "getSuperclass", "(", ")", ";", "}", "if", "(", "binding", ".", "isCapture", "(", ")", ")", "{", "return", "binding", ".", "getWildcard", "(", ")", ";", "}", "return", "binding", ";", "}", "return", "null", ";", "}", "public", "Type", "addImport", "(", "ITypeBinding", "binding", ",", "AST", "ast", ")", "{", "return", "addImport", "(", "binding", ",", "ast", ",", "this", ".", "defaultContext", ")", ";", "}", "public", "Type", "addImport", "(", "ITypeBinding", "binding", ",", "AST", "ast", ",", "ImportRewriteContext", "context", ")", "{", "if", "(", "binding", ".", "isPrimitive", "(", ")", ")", "{", "return", "ast", ".", "newPrimitiveType", "(", "PrimitiveType", ".", "toCode", "(", "binding", ".", "getName", "(", ")", ")", ")", ";", "}", "ITypeBinding", "normalizedBinding", "=", "normalizeTypeBinding", "(", "binding", ")", ";", "if", "(", "normalizedBinding", "==", "null", ")", "{", "return", "ast", ".", "newSimpleType", "(", "ast", ".", "newSimpleName", "(", "\"invalid\"", ")", ")", ";", "}", "if", "(", "normalizedBinding", ".", "isTypeVariable", "(", ")", ")", "{", "return", "ast", ".", "newSimpleType", "(", "ast", ".", "newSimpleName", "(", "binding", ".", "getName", "(", ")", ")", ")", ";", "}", "if", "(", "normalizedBinding", ".", "isWildcardType", "(", ")", ")", "{", "WildcardType", "wcType", "=", "ast", ".", "newWildcardType", "(", ")", ";", "ITypeBinding", "bound", "=", "normalizedBinding", ".", "getBound", "(", ")", ";", "if", "(", "bound", "!=", "null", "&&", "!", "bound", ".", "isWildcardType", "(", ")", "&&", "!", "bound", ".", "isCapture", "(", ")", ")", "{", "Type", "boundType", "=", "addImport", "(", "bound", ",", "ast", ",", "context", ")", ";", "wcType", ".", "setBound", "(", "boundType", ",", "normalizedBinding", ".", "isUpperbound", "(", ")", ")", ";", "}", "return", "wcType", ";", "}", "if", "(", "normalizedBinding", ".", "isArray", "(", ")", ")", "{", "Type", "elementType", "=", "addImport", "(", "normalizedBinding", ".", "getElementType", "(", ")", ",", "ast", ",", "context", ")", ";", "return", "ast", ".", "newArrayType", "(", "elementType", ",", "normalizedBinding", ".", "getDimensions", "(", ")", ")", ";", "}", "String", "qualifiedName", "=", "getRawQualifiedName", "(", "normalizedBinding", ")", ";", "if", "(", "qualifiedName", ".", "length", "(", ")", ">", "0", ")", "{", "String", "res", "=", "internalAddImport", "(", "qualifiedName", ",", "context", ")", ";", "ITypeBinding", "[", "]", "typeArguments", "=", "normalizedBinding", ".", "getTypeArguments", "(", ")", ";", "if", "(", "typeArguments", ".", "length", ">", "0", ")", "{", "Type", "erasureType", "=", "ast", ".", "newSimpleType", "(", "ast", ".", "newName", "(", "res", ")", ")", ";", "ParameterizedType", "paramType", "=", "ast", ".", "newParameterizedType", "(", "erasureType", ")", ";", "List", "arguments", "=", "paramType", ".", "typeArguments", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "typeArguments", ".", "length", ";", "i", "++", ")", "{", "ITypeBinding", "curr", "=", "typeArguments", "[", "i", "]", ";", "if", "(", "containsNestedCapture", "(", "curr", ",", "false", ")", ")", "{", "arguments", ".", "add", "(", "ast", ".", "newWildcardType", "(", ")", ")", ";", "}", "else", "{", "arguments", ".", "add", "(", "addImport", "(", "curr", ",", "ast", ",", "context", ")", ")", ";", "}", "}", "return", "paramType", ";", "}", "return", "ast", ".", "newSimpleType", "(", "ast", ".", "newName", "(", "res", ")", ")", ";", "}", "return", "ast", ".", "newSimpleType", "(", "ast", ".", "newName", "(", "getRawName", "(", "normalizedBinding", ")", ")", ")", ";", "}", "public", "String", "addImport", "(", "String", "qualifiedTypeName", ",", "ImportRewriteContext", "context", ")", "{", "int", "angleBracketOffset", "=", "qualifiedTypeName", ".", "indexOf", "(", "'<'", ")", ";", "if", "(", "angleBracketOffset", "!=", "-", "1", ")", "{", "return", "internalAddImport", "(", "qualifiedTypeName", ".", "substring", "(", "0", ",", "angleBracketOffset", ")", ",", "context", ")", "+", "qualifiedTypeName", ".", "substring", "(", "angleBracketOffset", ")", ";", "}", "int", "bracketOffset", "=", "qualifiedTypeName", ".", "indexOf", "(", "'['", ")", ";", "if", "(", "bracketOffset", "!=", "-", "1", ")", "{", "return", "internalAddImport", "(", "qualifiedTypeName", ".", "substring", "(", "0", ",", "bracketOffset", ")", ",", "context", ")", "+", "qualifiedTypeName", ".", "substring", "(", "bracketOffset", ")", ";", "}", "return", "internalAddImport", "(", "qualifiedTypeName", ",", "context", ")", ";", "}", "public", "String", "addImport", "(", "String", "qualifiedTypeName", ")", "{", "return", "addImport", "(", "qualifiedTypeName", ",", "this", ".", "defaultContext", ")", ";", "}", "public", "String", "addStaticImport", "(", "IBinding", "binding", ")", "{", "return", "addStaticImport", "(", "binding", ",", "this", ".", "defaultContext", ")", ";", "}", "public", "String", "addStaticImport", "(", "IBinding", "binding", ",", "ImportRewriteContext", "context", ")", "{", "if", "(", "Modifier", ".", "isStatic", "(", "binding", ".", "getModifiers", "(", ")", ")", ")", "{", "if", "(", "binding", "instanceof", "IVariableBinding", ")", "{", "IVariableBinding", "variableBinding", "=", "(", "IVariableBinding", ")", "binding", ";", "if", "(", "variableBinding", ".", "isField", "(", ")", ")", "{", "ITypeBinding", "declaringType", "=", "variableBinding", ".", "getDeclaringClass", "(", ")", ";", "return", "addStaticImport", "(", "getRawQualifiedName", "(", "declaringType", ")", ",", "binding", ".", "getName", "(", ")", ",", "true", ",", "context", ")", ";", "}", "}", "else", "if", "(", "binding", "instanceof", "IMethodBinding", ")", "{", "ITypeBinding", "declaringType", "=", "(", "(", "IMethodBinding", ")", "binding", ")", ".", "getDeclaringClass", "(", ")", ";", "return", "addStaticImport", "(", "getRawQualifiedName", "(", "declaringType", ")", ",", "binding", ".", "getName", "(", ")", ",", "false", ",", "context", ")", ";", "}", "}", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "public", "String", "addStaticImport", "(", "String", "declaringTypeName", ",", "String", "simpleName", ",", "boolean", "isField", ")", "{", "return", "addStaticImport", "(", "declaringTypeName", ",", "simpleName", ",", "isField", ",", "this", ".", "defaultContext", ")", ";", "}", "public", "String", "addStaticImport", "(", "String", "declaringTypeName", ",", "String", "simpleName", ",", "boolean", "isField", ",", "ImportRewriteContext", "context", ")", "{", "String", "key", "=", "declaringTypeName", "+", "'.'", "+", "simpleName", ";", "if", "(", "declaringTypeName", ".", "indexOf", "(", "'.'", ")", "==", "-", "1", ")", "{", "return", "key", ";", "}", "if", "(", "context", "==", "null", ")", "{", "context", "=", "this", ".", "defaultContext", ";", "}", "int", "kind", "=", "isField", "?", "ImportRewriteContext", ".", "KIND_STATIC_FIELD", ":", "ImportRewriteContext", ".", "KIND_STATIC_METHOD", ";", "this", ".", "importsKindMap", ".", "put", "(", "key", ",", "new", "Integer", "(", "kind", ")", ")", ";", "int", "res", "=", "context", ".", "findInContext", "(", "declaringTypeName", ",", "simpleName", ",", "kind", ")", ";", "if", "(", "res", "==", "ImportRewriteContext", ".", "RES_NAME_CONFLICT", ")", "{", "return", "key", ";", "}", "if", "(", "res", "==", "ImportRewriteContext", ".", "RES_NAME_UNKNOWN", ")", "{", "addEntry", "(", "STATIC_PREFIX", "+", "key", ")", ";", "}", "return", "simpleName", ";", "}", "private", "String", "internalAddImport", "(", "String", "fullTypeName", ",", "ImportRewriteContext", "context", ")", "{", "int", "idx", "=", "fullTypeName", ".", "lastIndexOf", "(", "'.'", ")", ";", "String", "typeContainerName", ",", "typeName", ";", "if", "(", "idx", "!=", "-", "1", ")", "{", "typeContainerName", "=", "fullTypeName", ".", "substring", "(", "0", ",", "idx", ")", ";", "typeName", "=", "fullTypeName", ".", "substring", "(", "idx", "+", "1", ")", ";", "}", "else", "{", "typeContainerName", "=", "\"\"", ";", "typeName", "=", "fullTypeName", ";", "}", "if", "(", "typeContainerName", ".", "length", "(", ")", "==", "0", "&&", "PrimitiveType", ".", "toCode", "(", "typeName", ")", "!=", "null", ")", "{", "return", "fullTypeName", ";", "}", "if", "(", "context", "==", "null", ")", "context", "=", "this", ".", "defaultContext", ";", "int", "res", "=", "context", ".", "findInContext", "(", "typeContainerName", ",", "typeName", ",", "ImportRewriteContext", ".", "KIND_TYPE", ")", ";", "if", "(", "res", "==", "ImportRewriteContext", ".", "RES_NAME_CONFLICT", ")", "{", "return", "fullTypeName", ";", "}", "if", "(", "res", "==", "ImportRewriteContext", ".", "RES_NAME_UNKNOWN", ")", "{", "addEntry", "(", "NORMAL_PREFIX", "+", "fullTypeName", ")", ";", "}", "return", "typeName", ";", "}", "private", "void", "addEntry", "(", "String", "entry", ")", "{", "this", ".", "existingImports", ".", "add", "(", "entry", ")", ";", "if", "(", "this", ".", "removedImports", "!=", "null", ")", "{", "if", "(", "this", ".", "removedImports", ".", "remove", "(", "entry", ")", ")", "{", "return", ";", "}", "}", "if", "(", "this", ".", "addedImports", "==", "null", ")", "{", "this", ".", "addedImports", "=", "new", "ArrayList", "(", ")", ";", "}", "this", ".", "addedImports", ".", "add", "(", "entry", ")", ";", "}", "private", "boolean", "removeEntry", "(", "String", "entry", ")", "{", "if", "(", "this", ".", "existingImports", ".", "remove", "(", "entry", ")", ")", "{", "if", "(", "this", ".", "addedImports", "!=", "null", ")", "{", "if", "(", "this", ".", "addedImports", ".", "remove", "(", "entry", ")", ")", "{", "return", "true", ";", "}", "}", "if", "(", "this", ".", "removedImports", "==", "null", ")", "{", "this", ".", "removedImports", "=", "new", "ArrayList", "(", ")", ";", "}", "this", ".", "removedImports", ".", "add", "(", "entry", ")", ";", "return", "true", ";", "}", "return", "false", ";", "}", "public", "boolean", "removeImport", "(", "String", "qualifiedName", ")", "{", "return", "removeEntry", "(", "NORMAL_PREFIX", "+", "qualifiedName", ")", ";", "}", "public", "boolean", "removeStaticImport", "(", "String", "qualifiedName", ")", "{", "return", "removeEntry", "(", "STATIC_PREFIX", "+", "qualifiedName", ")", ";", "}", "private", "static", "String", "getRawName", "(", "ITypeBinding", "normalizedBinding", ")", "{", "return", "normalizedBinding", ".", "getTypeDeclaration", "(", ")", ".", "getName", "(", ")", ";", "}", "private", "static", "String", "getRawQualifiedName", "(", "ITypeBinding", "normalizedBinding", ")", "{", "return", "normalizedBinding", ".", "getTypeDeclaration", "(", ")", ".", "getQualifiedName", "(", ")", ";", "}", "public", "final", "TextEdit", "rewriteImports", "(", "IProgressMonitor", "monitor", ")", "throws", "CoreException", "{", "if", "(", "monitor", "==", "null", ")", "{", "monitor", "=", "new", "NullProgressMonitor", "(", ")", ";", "}", "try", "{", "monitor", ".", "beginTask", "(", "Messages", ".", "bind", "(", "Messages", ".", "importRewrite_processDescription", ")", ",", "2", ")", ";", "if", "(", "!", "hasRecordedChanges", "(", ")", ")", "{", "this", ".", "createdImports", "=", "CharOperation", ".", "NO_STRINGS", ";", "this", ".", "createdStaticImports", "=", "CharOperation", ".", "NO_STRINGS", ";", "return", "new", "MultiTextEdit", "(", ")", ";", "}", "CompilationUnit", "usedAstRoot", "=", "this", ".", "astRoot", ";", "if", "(", "usedAstRoot", "==", "null", ")", "{", "ASTParser", "parser", "=", "ASTParser", ".", "newParser", "(", "AST", ".", "JLS4", ")", ";", "parser", ".", "setSource", "(", "this", ".", "compilationUnit", ")", ";", "parser", ".", "setFocalPosition", "(", "0", ")", ";", "parser", ".", "setResolveBindings", "(", "false", ")", ";", "usedAstRoot", "=", "(", "CompilationUnit", ")", "parser", ".", "createAST", "(", "new", "SubProgressMonitor", "(", "monitor", ",", "1", ")", ")", ";", "}", "ImportRewriteAnalyzer", "computer", "=", "new", "ImportRewriteAnalyzer", "(", "this", ".", "compilationUnit", ",", "usedAstRoot", ",", "this", ".", "importOrder", ",", "this", ".", "importOnDemandThreshold", ",", "this", ".", "staticImportOnDemandThreshold", ",", "this", ".", "restoreExistingImports", ",", "this", ".", "useContextToFilterImplicitImports", ")", ";", "computer", ".", "setFilterImplicitImports", "(", "this", ".", "filterImplicitImports", ")", ";", "if", "(", "this", ".", "addedImports", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "addedImports", ".", "size", "(", ")", ";", "i", "++", ")", "{", "String", "curr", "=", "(", "String", ")", "this", ".", "addedImports", ".", "get", "(", "i", ")", ";", "computer", ".", "addImport", "(", "curr", ".", "substring", "(", "1", ")", ",", "STATIC_PREFIX", "==", "curr", ".", "charAt", "(", "0", ")", ")", ";", "}", "}", "if", "(", "this", ".", "removedImports", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "removedImports", ".", "size", "(", ")", ";", "i", "++", ")", "{", "String", "curr", "=", "(", "String", ")", "this", ".", "removedImports", ".", "get", "(", "i", ")", ";", "computer", ".", "removeImport", "(", "curr", ".", "substring", "(", "1", ")", ",", "STATIC_PREFIX", "==", "curr", ".", "charAt", "(", "0", ")", ")", ";", "}", "}", "TextEdit", "result", "=", "computer", ".", "getResultingEdits", "(", "new", "SubProgressMonitor", "(", "monitor", ",", "1", ")", ")", ";", "this", ".", "createdImports", "=", "computer", ".", "getCreatedImports", "(", ")", ";", "this", ".", "createdStaticImports", "=", "computer", ".", "getCreatedStaticImports", "(", ")", ";", "return", "result", ";", "}", "finally", "{", "monitor", ".", "done", "(", ")", ";", "}", "}", "public", "String", "[", "]", "getCreatedImports", "(", ")", "{", "return", "this", ".", "createdImports", ";", "}", "public", "String", "[", "]", "getCreatedStaticImports", "(", ")", "{", "return", "this", ".", "createdStaticImports", ";", "}", "public", "String", "[", "]", "getAddedImports", "(", ")", "{", "return", "filterFromList", "(", "this", ".", "addedImports", ",", "NORMAL_PREFIX", ")", ";", "}", "public", "String", "[", "]", "getAddedStaticImports", "(", ")", "{", "return", "filterFromList", "(", "this", ".", "addedImports", ",", "STATIC_PREFIX", ")", ";", "}", "public", "String", "[", "]", "getRemovedImports", "(", ")", "{", "return", "filterFromList", "(", "this", ".", "removedImports", ",", "NORMAL_PREFIX", ")", ";", "}", "public", "String", "[", "]", "getRemovedStaticImports", "(", ")", "{", "return", "filterFromList", "(", "this", ".", "removedImports", ",", "STATIC_PREFIX", ")", ";", "}", "public", "boolean", "hasRecordedChanges", "(", ")", "{", "return", "!", "this", ".", "restoreExistingImports", "||", "(", "this", ".", "addedImports", "!=", "null", "&&", "!", "this", ".", "addedImports", ".", "isEmpty", "(", ")", ")", "||", "(", "this", ".", "removedImports", "!=", "null", "&&", "!", "this", ".", "removedImports", ".", "isEmpty", "(", ")", ")", ";", "}", "private", "static", "String", "[", "]", "filterFromList", "(", "List", "imports", ",", "char", "prefix", ")", "{", "if", "(", "imports", "==", "null", ")", "{", "return", "CharOperation", ".", "NO_STRINGS", ";", "}", "ArrayList", "res", "=", "new", "ArrayList", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "imports", ".", "size", "(", ")", ";", "i", "++", ")", "{", "String", "curr", "=", "(", "String", ")", "imports", ".", "get", "(", "i", ")", ";", "if", "(", "prefix", "==", "curr", ".", "charAt", "(", "0", ")", ")", "{", "res", ".", "add", "(", "curr", ".", "substring", "(", "1", ")", ")", ";", "}", "}", "return", "(", "String", "[", "]", ")", "res", ".", "toArray", "(", "new", "String", "[", "res", ".", "size", "(", ")", "]", ")", ";", "}", "}", "</s>" ]
4,421
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "rewrite", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "ASTNode", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "CompilationUnit", ";", "public", "class", "TargetSourceRangeComputer", "{", "public", "static", "final", "class", "SourceRange", "{", "private", "int", "startPosition", ";", "private", "int", "length", ";", "public", "SourceRange", "(", "int", "startPosition", ",", "int", "length", ")", "{", "this", ".", "startPosition", "=", "startPosition", ";", "this", ".", "length", "=", "length", ";", "}", "public", "int", "getStartPosition", "(", ")", "{", "return", "this", ".", "startPosition", ";", "}", "public", "int", "getLength", "(", ")", "{", "return", "this", ".", "length", ";", "}", "}", "public", "TargetSourceRangeComputer", "(", ")", "{", "}", "public", "SourceRange", "computeSourceRange", "(", "ASTNode", "node", ")", "{", "ASTNode", "root", "=", "node", ".", "getRoot", "(", ")", ";", "if", "(", "root", "instanceof", "CompilationUnit", ")", "{", "CompilationUnit", "cu", "=", "(", "CompilationUnit", ")", "root", ";", "return", "new", "SourceRange", "(", "cu", ".", "getExtendedStartPosition", "(", "node", ")", ",", "cu", ".", "getExtendedLength", "(", "node", ")", ")", ";", "}", "return", "new", "SourceRange", "(", "node", ".", "getStartPosition", "(", ")", ",", "node", ".", "getLength", "(", ")", ")", ";", "}", "}", "</s>" ]
4,422
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ClassInstanceCreation", "extends", "Expression", "{", "public", "static", "final", "ChildListPropertyDescriptor", "TYPE_ARGUMENTS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "ClassInstanceCreation", ".", "class", ",", "\"\"", ",", "Type", ".", "class", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ClassInstanceCreation", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "OPTIONAL", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ClassInstanceCreation", ".", "class", ",", "\"name\"", ",", "Name", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "TYPE_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ClassInstanceCreation", ".", "class", ",", "\"type\"", ",", "Type", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "ARGUMENTS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "ClassInstanceCreation", ".", "class", ",", "\"arguments\"", ",", "Expression", ".", "class", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "ANONYMOUS_CLASS_DECLARATION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ClassInstanceCreation", ".", "class", ",", "\"\"", ",", "AnonymousClassDeclaration", ".", "class", ",", "OPTIONAL", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "5", ")", ";", "createPropertyList", "(", "ClassInstanceCreation", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "ARGUMENTS_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "ANONYMOUS_CLASS_DECLARATION_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "properyList", "=", "new", "ArrayList", "(", "6", ")", ";", "createPropertyList", "(", "ClassInstanceCreation", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "TYPE_ARGUMENTS_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "TYPE_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "ARGUMENTS_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "ANONYMOUS_CLASS_DECLARATION_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "Expression", "optionalExpression", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "typeArguments", "=", "null", ";", "private", "Name", "typeName", "=", "null", ";", "private", "Type", "type", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "arguments", "=", "new", "ASTNode", ".", "NodeList", "(", "ARGUMENTS_PROPERTY", ")", ";", "private", "AnonymousClassDeclaration", "optionalAnonymousClassDeclaration", "=", "null", ";", "ClassInstanceCreation", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "if", "(", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "this", ".", "typeArguments", "=", "new", "ASTNode", ".", "NodeList", "(", "TYPE_ARGUMENTS_PROPERTY", ")", ";", "}", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "Name", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "TYPE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getType", "(", ")", ";", "}", "else", "{", "setType", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "ANONYMOUS_CLASS_DECLARATION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getAnonymousClassDeclaration", "(", ")", ";", "}", "else", "{", "setAnonymousClassDeclaration", "(", "(", "AnonymousClassDeclaration", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "ARGUMENTS_PROPERTY", ")", "{", "return", "arguments", "(", ")", ";", "}", "if", "(", "property", "==", "TYPE_ARGUMENTS_PROPERTY", ")", "{", "return", "typeArguments", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "CLASS_INSTANCE_CREATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "ClassInstanceCreation", "result", "=", "new", "ClassInstanceCreation", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getExpression", "(", ")", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "result", ".", "setName", "(", "(", "Name", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "}", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "typeArguments", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "typeArguments", "(", ")", ")", ")", ";", "result", ".", "setType", "(", "(", "Type", ")", "getType", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "}", "result", ".", "arguments", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "arguments", "(", ")", ")", ")", ";", "result", ".", "setAnonymousClassDeclaration", "(", "(", "AnonymousClassDeclaration", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getAnonymousClassDeclaration", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "}", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "typeArguments", ")", ";", "acceptChild", "(", "visitor", ",", "getType", "(", ")", ")", ";", "}", "acceptChildren", "(", "visitor", ",", "this", ".", "arguments", ")", ";", "acceptChild", "(", "visitor", ",", "getAnonymousClassDeclaration", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "return", "this", ".", "optionalExpression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalExpression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "optionalExpression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "public", "List", "typeArguments", "(", ")", "{", "if", "(", "this", ".", "typeArguments", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "return", "this", ".", "typeArguments", ";", "}", "public", "Name", "getName", "(", ")", "{", "return", "internalGetName", "(", ")", ";", "}", "Name", "internalGetName", "(", ")", "{", "supportedOnlyIn2", "(", ")", ";", "if", "(", "this", ".", "typeName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "typeName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "typeName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "typeName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "typeName", ";", "}", "public", "void", "setName", "(", "Name", "name", ")", "{", "internalSetName", "(", "name", ")", ";", "}", "void", "internalSetName", "(", "Name", "name", ")", "{", "supportedOnlyIn2", "(", ")", ";", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "typeName", ";", "preReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "this", ".", "typeName", "=", "name", ";", "postReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "}", "public", "Type", "getType", "(", ")", "{", "unsupportedIn2", "(", ")", ";", "if", "(", "this", ".", "type", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "type", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "type", "=", "new", "SimpleType", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "type", ",", "TYPE_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "type", ";", "}", "public", "void", "setType", "(", "Type", "type", ")", "{", "unsupportedIn2", "(", ")", ";", "if", "(", "type", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "type", ";", "preReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "this", ".", "type", "=", "type", ";", "postReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "}", "public", "List", "arguments", "(", ")", "{", "return", "this", ".", "arguments", ";", "}", "public", "AnonymousClassDeclaration", "getAnonymousClassDeclaration", "(", ")", "{", "return", "this", ".", "optionalAnonymousClassDeclaration", ";", "}", "public", "void", "setAnonymousClassDeclaration", "(", "AnonymousClassDeclaration", "decl", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalAnonymousClassDeclaration", ";", "preReplaceChild", "(", "oldChild", ",", "decl", ",", "ANONYMOUS_CLASS_DECLARATION_PROPERTY", ")", ";", "this", ".", "optionalAnonymousClassDeclaration", "=", "decl", ";", "postReplaceChild", "(", "oldChild", ",", "decl", ",", "ANONYMOUS_CLASS_DECLARATION_PROPERTY", ")", ";", "}", "public", "IMethodBinding", "resolveConstructorBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveConstructor", "(", "this", ")", ";", "}", "public", "boolean", "isResolvedTypeInferredFromExpectedType", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "isResolvedTypeInferredFromExpectedType", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "6", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "typeName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "type", "==", "null", "?", "0", ":", "getType", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "optionalExpression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "typeArguments", "==", "null", "?", "0", ":", "this", ".", "typeArguments", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "arguments", "==", "null", "?", "0", ":", "this", ".", "arguments", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "optionalAnonymousClassDeclaration", "==", "null", "?", "0", ":", "getAnonymousClassDeclaration", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,423
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "Iterator", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "TypeDeclaration", "extends", "AbstractTypeDeclaration", "{", "public", "static", "final", "ChildPropertyDescriptor", "JAVADOC_PROPERTY", "=", "internalJavadocPropertyFactory", "(", "TypeDeclaration", ".", "class", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "MODIFIERS_PROPERTY", "=", "internalModifiersPropertyFactory", "(", "TypeDeclaration", ".", "class", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "MODIFIERS2_PROPERTY", "=", "internalModifiers2PropertyFactory", "(", "TypeDeclaration", ".", "class", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "INTERFACE_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "TypeDeclaration", ".", "class", ",", "\"interface\"", ",", "boolean", ".", "class", ",", "MANDATORY", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "internalNamePropertyFactory", "(", "TypeDeclaration", ".", "class", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "SUPERCLASS_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "TypeDeclaration", ".", "class", ",", "\"superclass\"", ",", "Name", ".", "class", ",", "OPTIONAL", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "SUPER_INTERFACES_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "TypeDeclaration", ".", "class", ",", "\"\"", ",", "Name", ".", "class", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "SUPERCLASS_TYPE_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "TypeDeclaration", ".", "class", ",", "\"\"", ",", "Type", ".", "class", ",", "OPTIONAL", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "SUPER_INTERFACE_TYPES_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "TypeDeclaration", ".", "class", ",", "\"\"", ",", "Type", ".", "class", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "TYPE_PARAMETERS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "TypeDeclaration", ".", "class", ",", "\"\"", ",", "TypeParameter", ".", "class", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "BODY_DECLARATIONS_PROPERTY", "=", "internalBodyDeclarationPropertyFactory", "(", "TypeDeclaration", ".", "class", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "8", ")", ";", "createPropertyList", "(", "TypeDeclaration", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "JAVADOC_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "MODIFIERS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "INTERFACE_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "SUPERCLASS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "SUPER_INTERFACES_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "BODY_DECLARATIONS_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "propertyList", "=", "new", "ArrayList", "(", "9", ")", ";", "createPropertyList", "(", "TypeDeclaration", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "JAVADOC_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "MODIFIERS2_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "INTERFACE_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "TYPE_PARAMETERS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "SUPERCLASS_TYPE_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "SUPER_INTERFACE_TYPES_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "BODY_DECLARATIONS_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "boolean", "isInterface", "=", "false", ";", "private", "ASTNode", ".", "NodeList", "typeParameters", "=", "null", ";", "private", "Name", "optionalSuperclassName", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "superInterfaceNames", "=", "null", ";", "private", "Type", "optionalSuperclassType", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "superInterfaceTypes", "=", "null", ";", "TypeDeclaration", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "if", "(", "ast", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "this", ".", "superInterfaceNames", "=", "new", "ASTNode", ".", "NodeList", "(", "SUPER_INTERFACES_PROPERTY", ")", ";", "}", "if", "(", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "this", ".", "typeParameters", "=", "new", "ASTNode", ".", "NodeList", "(", "TYPE_PARAMETERS_PROPERTY", ")", ";", "this", ".", "superInterfaceTypes", "=", "new", "ASTNode", ".", "NodeList", "(", "SUPER_INTERFACE_TYPES_PROPERTY", ")", ";", "}", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "int", "internalGetSetIntProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "int", "value", ")", "{", "if", "(", "property", "==", "MODIFIERS_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getModifiers", "(", ")", ";", "}", "else", "{", "internalSetModifiers", "(", "value", ")", ";", "return", "0", ";", "}", "}", "return", "super", ".", "internalGetSetIntProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "boolean", "internalGetSetBooleanProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "boolean", "value", ")", "{", "if", "(", "property", "==", "INTERFACE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "isInterface", "(", ")", ";", "}", "else", "{", "setInterface", "(", "value", ")", ";", "return", "false", ";", "}", "}", "return", "super", ".", "internalGetSetBooleanProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "JAVADOC_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getJavadoc", "(", ")", ";", "}", "else", "{", "setJavadoc", "(", "(", "Javadoc", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "SUPERCLASS_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getSuperclass", "(", ")", ";", "}", "else", "{", "setSuperclass", "(", "(", "Name", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "SUPERCLASS_TYPE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getSuperclassType", "(", ")", ";", "}", "else", "{", "setSuperclassType", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "MODIFIERS2_PROPERTY", ")", "{", "return", "modifiers", "(", ")", ";", "}", "if", "(", "property", "==", "TYPE_PARAMETERS_PROPERTY", ")", "{", "return", "typeParameters", "(", ")", ";", "}", "if", "(", "property", "==", "SUPER_INTERFACES_PROPERTY", ")", "{", "return", "superInterfaces", "(", ")", ";", "}", "if", "(", "property", "==", "SUPER_INTERFACE_TYPES_PROPERTY", ")", "{", "return", "superInterfaceTypes", "(", ")", ";", "}", "if", "(", "property", "==", "BODY_DECLARATIONS_PROPERTY", ")", "{", "return", "bodyDeclarations", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "ChildPropertyDescriptor", "internalJavadocProperty", "(", ")", "{", "return", "JAVADOC_PROPERTY", ";", "}", "final", "ChildListPropertyDescriptor", "internalModifiers2Property", "(", ")", "{", "return", "MODIFIERS2_PROPERTY", ";", "}", "final", "SimplePropertyDescriptor", "internalModifiersProperty", "(", ")", "{", "return", "MODIFIERS_PROPERTY", ";", "}", "final", "ChildPropertyDescriptor", "internalNameProperty", "(", ")", "{", "return", "NAME_PROPERTY", ";", "}", "final", "ChildListPropertyDescriptor", "internalBodyDeclarationsProperty", "(", ")", "{", "return", "BODY_DECLARATIONS_PROPERTY", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "TYPE_DECLARATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "TypeDeclaration", "result", "=", "new", "TypeDeclaration", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setJavadoc", "(", "(", "Javadoc", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getJavadoc", "(", ")", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "result", ".", "internalSetModifiers", "(", "getModifiers", "(", ")", ")", ";", "result", ".", "setSuperclass", "(", "(", "Name", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getSuperclass", "(", ")", ")", ")", ";", "result", ".", "superInterfaces", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "superInterfaces", "(", ")", ")", ")", ";", "}", "result", ".", "setInterface", "(", "isInterface", "(", ")", ")", ";", "result", ".", "setName", "(", "(", "SimpleName", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "modifiers", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "modifiers", "(", ")", ")", ")", ";", "result", ".", "typeParameters", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "typeParameters", "(", ")", ")", ")", ";", "result", ".", "setSuperclassType", "(", "(", "Type", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getSuperclassType", "(", ")", ")", ")", ";", "result", ".", "superInterfaceTypes", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "superInterfaceTypes", "(", ")", ")", ")", ";", "}", "result", ".", "bodyDeclarations", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "bodyDeclarations", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "if", "(", "this", ".", "ast", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "acceptChild", "(", "visitor", ",", "getJavadoc", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getSuperclass", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "superInterfaceNames", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "bodyDeclarations", ")", ";", "}", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "acceptChild", "(", "visitor", ",", "getJavadoc", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "modifiers", ")", ";", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "typeParameters", ")", ";", "acceptChild", "(", "visitor", ",", "getSuperclassType", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "superInterfaceTypes", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "bodyDeclarations", ")", ";", "}", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "boolean", "isInterface", "(", ")", "{", "return", "this", ".", "isInterface", ";", "}", "public", "void", "setInterface", "(", "boolean", "isInterface", ")", "{", "preValueChange", "(", "INTERFACE_PROPERTY", ")", ";", "this", ".", "isInterface", "=", "isInterface", ";", "postValueChange", "(", "INTERFACE_PROPERTY", ")", ";", "}", "public", "List", "typeParameters", "(", ")", "{", "if", "(", "this", ".", "typeParameters", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "return", "this", ".", "typeParameters", ";", "}", "public", "Name", "getSuperclass", "(", ")", "{", "return", "internalGetSuperclass", "(", ")", ";", "}", "final", "Name", "internalGetSuperclass", "(", ")", "{", "supportedOnlyIn2", "(", ")", ";", "return", "this", ".", "optionalSuperclassName", ";", "}", "public", "Type", "getSuperclassType", "(", ")", "{", "unsupportedIn2", "(", ")", ";", "return", "this", ".", "optionalSuperclassType", ";", "}", "public", "void", "setSuperclass", "(", "Name", "superclassName", ")", "{", "internalSetSuperclass", "(", "superclassName", ")", ";", "}", "final", "void", "internalSetSuperclass", "(", "Name", "superclassName", ")", "{", "supportedOnlyIn2", "(", ")", ";", "ASTNode", "oldChild", "=", "this", ".", "optionalSuperclassName", ";", "preReplaceChild", "(", "oldChild", ",", "superclassName", ",", "SUPERCLASS_PROPERTY", ")", ";", "this", ".", "optionalSuperclassName", "=", "superclassName", ";", "postReplaceChild", "(", "oldChild", ",", "superclassName", ",", "SUPERCLASS_PROPERTY", ")", ";", "}", "public", "void", "setSuperclassType", "(", "Type", "superclassType", ")", "{", "unsupportedIn2", "(", ")", ";", "ASTNode", "oldChild", "=", "this", ".", "optionalSuperclassType", ";", "preReplaceChild", "(", "oldChild", ",", "superclassType", ",", "SUPERCLASS_TYPE_PROPERTY", ")", ";", "this", ".", "optionalSuperclassType", "=", "superclassType", ";", "postReplaceChild", "(", "oldChild", ",", "superclassType", ",", "SUPERCLASS_TYPE_PROPERTY", ")", ";", "}", "public", "List", "superInterfaces", "(", ")", "{", "return", "internalSuperInterfaces", "(", ")", ";", "}", "final", "List", "internalSuperInterfaces", "(", ")", "{", "if", "(", "this", ".", "superInterfaceNames", "==", "null", ")", "{", "supportedOnlyIn2", "(", ")", ";", "}", "return", "this", ".", "superInterfaceNames", ";", "}", "public", "List", "superInterfaceTypes", "(", ")", "{", "if", "(", "this", ".", "superInterfaceTypes", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "return", "this", ".", "superInterfaceTypes", ";", "}", "public", "FieldDeclaration", "[", "]", "getFields", "(", ")", "{", "List", "bd", "=", "bodyDeclarations", "(", ")", ";", "int", "fieldCount", "=", "0", ";", "for", "(", "Iterator", "it", "=", "bd", ".", "listIterator", "(", ")", ";", "it", ".", "hasNext", "(", ")", ";", ")", "{", "if", "(", "it", ".", "next", "(", ")", "instanceof", "FieldDeclaration", ")", "{", "fieldCount", "++", ";", "}", "}", "FieldDeclaration", "[", "]", "fields", "=", "new", "FieldDeclaration", "[", "fieldCount", "]", ";", "int", "next", "=", "0", ";", "for", "(", "Iterator", "it", "=", "bd", ".", "listIterator", "(", ")", ";", "it", ".", "hasNext", "(", ")", ";", ")", "{", "Object", "decl", "=", "it", ".", "next", "(", ")", ";", "if", "(", "decl", "instanceof", "FieldDeclaration", ")", "{", "fields", "[", "next", "++", "]", "=", "(", "FieldDeclaration", ")", "decl", ";", "}", "}", "return", "fields", ";", "}", "public", "MethodDeclaration", "[", "]", "getMethods", "(", ")", "{", "List", "bd", "=", "bodyDeclarations", "(", ")", ";", "int", "methodCount", "=", "0", ";", "for", "(", "Iterator", "it", "=", "bd", ".", "listIterator", "(", ")", ";", "it", ".", "hasNext", "(", ")", ";", ")", "{", "if", "(", "it", ".", "next", "(", ")", "instanceof", "MethodDeclaration", ")", "{", "methodCount", "++", ";", "}", "}", "MethodDeclaration", "[", "]", "methods", "=", "new", "MethodDeclaration", "[", "methodCount", "]", ";", "int", "next", "=", "0", ";", "for", "(", "Iterator", "it", "=", "bd", ".", "listIterator", "(", ")", ";", "it", ".", "hasNext", "(", ")", ";", ")", "{", "Object", "decl", "=", "it", ".", "next", "(", ")", ";", "if", "(", "decl", "instanceof", "MethodDeclaration", ")", "{", "methods", "[", "next", "++", "]", "=", "(", "MethodDeclaration", ")", "decl", ";", "}", "}", "return", "methods", ";", "}", "public", "TypeDeclaration", "[", "]", "getTypes", "(", ")", "{", "List", "bd", "=", "bodyDeclarations", "(", ")", ";", "int", "typeCount", "=", "0", ";", "for", "(", "Iterator", "it", "=", "bd", ".", "listIterator", "(", ")", ";", "it", ".", "hasNext", "(", ")", ";", ")", "{", "if", "(", "it", ".", "next", "(", ")", "instanceof", "TypeDeclaration", ")", "{", "typeCount", "++", ";", "}", "}", "TypeDeclaration", "[", "]", "memberTypes", "=", "new", "TypeDeclaration", "[", "typeCount", "]", ";", "int", "next", "=", "0", ";", "for", "(", "Iterator", "it", "=", "bd", ".", "listIterator", "(", ")", ";", "it", ".", "hasNext", "(", ")", ";", ")", "{", "Object", "decl", "=", "it", ".", "next", "(", ")", ";", "if", "(", "decl", "instanceof", "TypeDeclaration", ")", "{", "memberTypes", "[", "next", "++", "]", "=", "(", "TypeDeclaration", ")", "decl", ";", "}", "}", "return", "memberTypes", ";", "}", "ITypeBinding", "internalResolveBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveType", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "6", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalDocComment", "==", "null", "?", "0", ":", "getJavadoc", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "modifiers", "==", "null", "?", "0", ":", "this", ".", "modifiers", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "typeName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "typeParameters", "==", "null", "?", "0", ":", "this", ".", "typeParameters", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "optionalSuperclassName", "==", "null", "?", "0", ":", "getSuperclass", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "optionalSuperclassType", "==", "null", "?", "0", ":", "getSuperclassType", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "superInterfaceNames", "==", "null", "?", "0", ":", "this", ".", "superInterfaceNames", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "superInterfaceTypes", "==", "null", "?", "0", ":", "this", ".", "superInterfaceTypes", ".", "listSize", "(", ")", ")", "+", "this", ".", "bodyDeclarations", ".", "listSize", "(", ")", ";", "}", "}", "</s>" ]
4,424
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "public", "abstract", "class", "VariableDeclaration", "extends", "ASTNode", "{", "abstract", "SimplePropertyDescriptor", "internalExtraDimensionsProperty", "(", ")", ";", "public", "final", "SimplePropertyDescriptor", "getExtraDimensionsProperty", "(", ")", "{", "return", "internalExtraDimensionsProperty", "(", ")", ";", "}", "abstract", "ChildPropertyDescriptor", "internalInitializerProperty", "(", ")", ";", "public", "final", "ChildPropertyDescriptor", "getInitializerProperty", "(", ")", "{", "return", "internalInitializerProperty", "(", ")", ";", "}", "abstract", "ChildPropertyDescriptor", "internalNameProperty", "(", ")", ";", "public", "final", "ChildPropertyDescriptor", "getNameProperty", "(", ")", "{", "return", "internalNameProperty", "(", ")", ";", "}", "VariableDeclaration", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "public", "abstract", "SimpleName", "getName", "(", ")", ";", "public", "abstract", "void", "setName", "(", "SimpleName", "variableName", ")", ";", "public", "abstract", "int", "getExtraDimensions", "(", ")", ";", "public", "abstract", "void", "setExtraDimensions", "(", "int", "dimensions", ")", ";", "public", "abstract", "Expression", "getInitializer", "(", ")", ";", "public", "abstract", "void", "setInitializer", "(", "Expression", "initializer", ")", ";", "public", "IVariableBinding", "resolveBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveVariable", "(", "this", ")", ";", "}", "}", "</s>" ]
4,425
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "BreakStatement", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "LABEL_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "BreakStatement", ".", "class", ",", "\"label\"", ",", "SimpleName", ".", "class", ",", "OPTIONAL", ",", "NO_CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "BreakStatement", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "LABEL_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "SimpleName", "optionalLabel", "=", "null", ";", "BreakStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "LABEL_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getLabel", "(", ")", ";", "}", "else", "{", "setLabel", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "BREAK_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "BreakStatement", "result", "=", "new", "BreakStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "result", ".", "setLabel", "(", "(", "SimpleName", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getLabel", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getLabel", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "SimpleName", "getLabel", "(", ")", "{", "return", "this", ".", "optionalLabel", ";", "}", "public", "void", "setLabel", "(", "SimpleName", "label", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalLabel", ";", "preReplaceChild", "(", "oldChild", ",", "label", ",", "LABEL_PROPERTY", ")", ";", "this", ".", "optionalLabel", "=", "label", ";", "postReplaceChild", "(", "oldChild", ",", "label", ",", "LABEL_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalLabel", "==", "null", "?", "0", ":", "getLabel", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,426
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "public", "interface", "IMemberValuePairBinding", "extends", "IBinding", "{", "public", "String", "getName", "(", ")", ";", "public", "IMethodBinding", "getMethodBinding", "(", ")", ";", "public", "Object", "getValue", "(", ")", ";", "public", "boolean", "isDefault", "(", ")", ";", "}", "</s>" ]
4,427
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "SimpleType", "extends", "Type", "{", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "SimpleType", ".", "class", ",", "\"name\"", ",", "Name", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "SimpleType", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Name", "typeName", "=", "null", ";", "SimpleType", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "Name", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "SIMPLE_TYPE", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "SimpleType", "result", "=", "new", "SimpleType", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setName", "(", "(", "Name", ")", "(", "getName", "(", ")", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Name", "getName", "(", ")", "{", "if", "(", "this", ".", "typeName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "typeName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "typeName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "typeName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "typeName", ";", "}", "public", "void", "setName", "(", "Name", "typeName", ")", "{", "if", "(", "typeName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "typeName", ";", "preReplaceChild", "(", "oldChild", ",", "typeName", ",", "NAME_PROPERTY", ")", ";", "this", ".", "typeName", "=", "typeName", ";", "postReplaceChild", "(", "oldChild", ",", "typeName", ",", "NAME_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "typeName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,428
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "TypeDeclarationStatement", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "TYPE_DECLARATION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "TypeDeclarationStatement", ".", "class", ",", "\"\"", ",", "TypeDeclaration", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "DECLARATION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "TypeDeclarationStatement", ".", "class", ",", "\"declaration\"", ",", "AbstractTypeDeclaration", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "TypeDeclarationStatement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "TYPE_DECLARATION_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "TypeDeclarationStatement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "DECLARATION_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "AbstractTypeDeclaration", "typeDecl", "=", "null", ";", "private", "ChildPropertyDescriptor", "typeDeclProperty", "(", ")", "{", "if", "(", "getAST", "(", ")", ".", "apiLevel", "(", ")", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "TYPE_DECLARATION_PROPERTY", ";", "}", "else", "{", "return", "DECLARATION_PROPERTY", ";", "}", "}", "TypeDeclarationStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "TYPE_DECLARATION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getTypeDeclaration", "(", ")", ";", "}", "else", "{", "setTypeDeclaration", "(", "(", "TypeDeclaration", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "DECLARATION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getDeclaration", "(", ")", ";", "}", "else", "{", "setDeclaration", "(", "(", "AbstractTypeDeclaration", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "TYPE_DECLARATION_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "TypeDeclarationStatement", "result", "=", "new", "TypeDeclarationStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "result", ".", "setDeclaration", "(", "(", "AbstractTypeDeclaration", ")", "getDeclaration", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getDeclaration", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "AbstractTypeDeclaration", "getDeclaration", "(", ")", "{", "if", "(", "this", ".", "typeDecl", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "typeDecl", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "typeDecl", "=", "new", "TypeDeclaration", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "typeDecl", ",", "typeDeclProperty", "(", ")", ")", ";", "}", "}", "}", "return", "this", ".", "typeDecl", ";", "}", "public", "void", "setDeclaration", "(", "AbstractTypeDeclaration", "decl", ")", "{", "if", "(", "decl", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "typeDecl", ";", "ChildPropertyDescriptor", "typeDeclProperty", "=", "typeDeclProperty", "(", ")", ";", "preReplaceChild", "(", "oldChild", ",", "decl", ",", "typeDeclProperty", ")", ";", "this", ".", "typeDecl", "=", "decl", ";", "postReplaceChild", "(", "oldChild", ",", "decl", ",", "typeDeclProperty", ")", ";", "}", "public", "TypeDeclaration", "getTypeDeclaration", "(", ")", "{", "return", "internalGetTypeDeclaration", "(", ")", ";", "}", "final", "TypeDeclaration", "internalGetTypeDeclaration", "(", ")", "{", "supportedOnlyIn2", "(", ")", ";", "return", "(", "TypeDeclaration", ")", "getDeclaration", "(", ")", ";", "}", "public", "void", "setTypeDeclaration", "(", "TypeDeclaration", "decl", ")", "{", "internalSetTypeDeclaration", "(", "decl", ")", ";", "}", "final", "void", "internalSetTypeDeclaration", "(", "TypeDeclaration", "decl", ")", "{", "supportedOnlyIn2", "(", ")", ";", "setDeclaration", "(", "decl", ")", ";", "}", "public", "ITypeBinding", "resolveBinding", "(", ")", "{", "AbstractTypeDeclaration", "d", "=", "getDeclaration", "(", ")", ";", "if", "(", "d", "instanceof", "TypeDeclaration", ")", "{", "return", "(", "(", "TypeDeclaration", ")", "d", ")", ".", "resolveBinding", "(", ")", ";", "}", "else", "if", "(", "d", "instanceof", "AnnotationTypeDeclaration", ")", "{", "return", "(", "(", "AnnotationTypeDeclaration", ")", "d", ")", ".", "resolveBinding", "(", ")", ";", "}", "else", "{", "return", "null", ";", "}", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "typeDecl", "==", "null", "?", "0", ":", "getDeclaration", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,429
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "public", "interface", "ITypeBinding", "extends", "IBinding", "{", "public", "ITypeBinding", "createArrayType", "(", "int", "dimension", ")", ";", "public", "String", "getBinaryName", "(", ")", ";", "public", "ITypeBinding", "getBound", "(", ")", ";", "public", "ITypeBinding", "getGenericTypeOfWildcardType", "(", ")", ";", "public", "int", "getRank", "(", ")", ";", "public", "ITypeBinding", "getComponentType", "(", ")", ";", "public", "IVariableBinding", "[", "]", "getDeclaredFields", "(", ")", ";", "public", "IMethodBinding", "[", "]", "getDeclaredMethods", "(", ")", ";", "public", "int", "getDeclaredModifiers", "(", ")", ";", "public", "ITypeBinding", "[", "]", "getDeclaredTypes", "(", ")", ";", "public", "ITypeBinding", "getDeclaringClass", "(", ")", ";", "public", "IMethodBinding", "getDeclaringMethod", "(", ")", ";", "public", "int", "getDimensions", "(", ")", ";", "public", "ITypeBinding", "getElementType", "(", ")", ";", "public", "ITypeBinding", "getErasure", "(", ")", ";", "public", "ITypeBinding", "[", "]", "getInterfaces", "(", ")", ";", "public", "int", "getModifiers", "(", ")", ";", "public", "String", "getName", "(", ")", ";", "public", "IPackageBinding", "getPackage", "(", ")", ";", "public", "String", "getQualifiedName", "(", ")", ";", "public", "ITypeBinding", "getSuperclass", "(", ")", ";", "public", "ITypeBinding", "[", "]", "getTypeArguments", "(", ")", ";", "public", "ITypeBinding", "[", "]", "getTypeBounds", "(", ")", ";", "public", "ITypeBinding", "getTypeDeclaration", "(", ")", ";", "public", "ITypeBinding", "[", "]", "getTypeParameters", "(", ")", ";", "public", "ITypeBinding", "getWildcard", "(", ")", ";", "public", "boolean", "isAnnotation", "(", ")", ";", "public", "boolean", "isAnonymous", "(", ")", ";", "public", "boolean", "isArray", "(", ")", ";", "public", "boolean", "isAssignmentCompatible", "(", "ITypeBinding", "variableType", ")", ";", "public", "boolean", "isCapture", "(", ")", ";", "public", "boolean", "isCastCompatible", "(", "ITypeBinding", "type", ")", ";", "public", "boolean", "isClass", "(", ")", ";", "public", "boolean", "isEnum", "(", ")", ";", "public", "boolean", "isFromSource", "(", ")", ";", "public", "boolean", "isGenericType", "(", ")", ";", "public", "boolean", "isInterface", "(", ")", ";", "public", "boolean", "isLocal", "(", ")", ";", "public", "boolean", "isMember", "(", ")", ";", "public", "boolean", "isNested", "(", ")", ";", "public", "boolean", "isNullType", "(", ")", ";", "public", "boolean", "isParameterizedType", "(", ")", ";", "public", "boolean", "isPrimitive", "(", ")", ";", "public", "boolean", "isRawType", "(", ")", ";", "public", "boolean", "isSubTypeCompatible", "(", "ITypeBinding", "type", ")", ";", "public", "boolean", "isTopLevel", "(", ")", ";", "public", "boolean", "isTypeVariable", "(", ")", ";", "public", "boolean", "isUpperbound", "(", ")", ";", "public", "boolean", "isWildcardType", "(", ")", ";", "}", "</s>" ]
4,430
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "class", "NodeEventHandler", "{", "NodeEventHandler", "(", ")", "{", "}", "void", "preRemoveChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "StructuralPropertyDescriptor", "property", ")", "{", "}", "void", "postRemoveChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "StructuralPropertyDescriptor", "property", ")", "{", "}", "void", "preReplaceChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "ASTNode", "newChild", ",", "StructuralPropertyDescriptor", "property", ")", "{", "}", "void", "postReplaceChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "ASTNode", "newChild", ",", "StructuralPropertyDescriptor", "property", ")", "{", "}", "void", "preAddChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "StructuralPropertyDescriptor", "property", ")", "{", "}", "void", "postAddChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "StructuralPropertyDescriptor", "property", ")", "{", "}", "void", "preValueChangeEvent", "(", "ASTNode", "node", ",", "SimplePropertyDescriptor", "property", ")", "{", "}", "void", "postValueChangeEvent", "(", "ASTNode", "node", ",", "SimplePropertyDescriptor", "property", ")", "{", "}", "void", "preCloneNodeEvent", "(", "ASTNode", "node", ")", "{", "}", "void", "postCloneNodeEvent", "(", "ASTNode", "node", ",", "ASTNode", "clone", ")", "{", "}", "}", "</s>" ]
4,431
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "lang", ".", "reflect", ".", "Constructor", ";", "import", "java", ".", "lang", ".", "reflect", ".", "InvocationTargetException", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "java", ".", "util", ".", "StringTokenizer", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IClassFile", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ICompilationUnit", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaProject", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaCore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "Scanner", ";", "import", "org", ".", "eclipse", ".", "jface", ".", "text", ".", "IDocument", ";", "import", "org", ".", "eclipse", ".", "text", ".", "edits", ".", "TextEdit", ";", "public", "final", "class", "AST", "{", "private", "static", "final", "Class", "[", "]", "AST_CLASS", "=", "new", "Class", "[", "]", "{", "AST", ".", "class", "}", ";", "public", "static", "final", "int", "JLS2", "=", "2", ";", "static", "final", "int", "JLS2_INTERNAL", "=", "JLS2", ";", "public", "static", "final", "int", "JLS3", "=", "3", ";", "public", "static", "final", "int", "JLS4", "=", "4", ";", "static", "final", "int", "RESOLVED_BINDINGS", "=", "0x80000000", ";", "public", "static", "CompilationUnit", "convertCompilationUnit", "(", "int", "level", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "CompilationUnitDeclaration", "compilationUnitDeclaration", ",", "char", "[", "]", "source", ",", "Map", "options", ",", "boolean", "isResolved", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "CompilationUnit", "workingCopy", ",", "int", "reconcileFlags", ",", "IProgressMonitor", "monitor", ")", "{", "return", "null", ";", "}", "public", "static", "CompilationUnit", "convertCompilationUnit", "(", "int", "level", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "CompilationUnitDeclaration", "compilationUnitDeclaration", ",", "Map", "options", ",", "boolean", "isResolved", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "CompilationUnit", "workingCopy", ",", "int", "reconcileFlags", ",", "IProgressMonitor", "monitor", ")", "{", "ASTConverter", "converter", "=", "new", "ASTConverter", "(", "options", ",", "isResolved", ",", "monitor", ")", ";", "AST", "ast", "=", "AST", ".", "newAST", "(", "level", ")", ";", "int", "savedDefaultNodeFlag", "=", "ast", ".", "getDefaultNodeFlag", "(", ")", ";", "ast", ".", "setDefaultNodeFlag", "(", "ASTNode", ".", "ORIGINAL", ")", ";", "BindingResolver", "resolver", "=", "null", ";", "if", "(", "isResolved", ")", "{", "resolver", "=", "new", "DefaultBindingResolver", "(", "compilationUnitDeclaration", ".", "scope", ",", "workingCopy", ".", "owner", ",", "new", "DefaultBindingResolver", ".", "BindingTables", "(", ")", ",", "false", ",", "true", ")", ";", "(", "(", "DefaultBindingResolver", ")", "resolver", ")", ".", "isRecoveringBindings", "=", "(", "reconcileFlags", "&", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ")", "!=", "0", ";", "ast", ".", "setFlag", "(", "AST", ".", "RESOLVED_BINDINGS", ")", ";", "}", "else", "{", "resolver", "=", "new", "BindingResolver", "(", ")", ";", "}", "ast", ".", "setFlag", "(", "reconcileFlags", ")", ";", "ast", ".", "setBindingResolver", "(", "resolver", ")", ";", "converter", ".", "setAST", "(", "ast", ")", ";", "CompilationUnit", "unit", "=", "converter", ".", "convert", "(", "compilationUnitDeclaration", ",", "workingCopy", ".", "getContents", "(", ")", ")", ";", "unit", ".", "setLineEndTable", "(", "compilationUnitDeclaration", ".", "compilationResult", ".", "getLineSeparatorPositions", "(", ")", ")", ";", "unit", ".", "setTypeRoot", "(", "workingCopy", ".", "originalFromClone", "(", ")", ")", ";", "ast", ".", "setDefaultNodeFlag", "(", "savedDefaultNodeFlag", ")", ";", "return", "unit", ";", "}", "public", "static", "AST", "newAST", "(", "int", "level", ")", "{", "return", "new", "AST", "(", "level", ")", ";", "}", "public", "static", "CompilationUnit", "parseCompilationUnit", "(", "char", "[", "]", "source", ")", "{", "if", "(", "source", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTParser", "c", "=", "ASTParser", ".", "newParser", "(", "AST", ".", "JLS2", ")", ";", "c", ".", "setSource", "(", "source", ")", ";", "ASTNode", "result", "=", "c", ".", "createAST", "(", "null", ")", ";", "return", "(", "CompilationUnit", ")", "result", ";", "}", "public", "static", "CompilationUnit", "parseCompilationUnit", "(", "char", "[", "]", "source", ",", "String", "unitName", ",", "IJavaProject", "project", ")", "{", "if", "(", "source", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTParser", "astParser", "=", "ASTParser", ".", "newParser", "(", "AST", ".", "JLS2", ")", ";", "astParser", ".", "setSource", "(", "source", ")", ";", "astParser", ".", "setUnitName", "(", "unitName", ")", ";", "astParser", ".", "setProject", "(", "project", ")", ";", "astParser", ".", "setResolveBindings", "(", "project", "!=", "null", ")", ";", "ASTNode", "result", "=", "astParser", ".", "createAST", "(", "null", ")", ";", "return", "(", "CompilationUnit", ")", "result", ";", "}", "public", "static", "CompilationUnit", "parseCompilationUnit", "(", "IClassFile", "classFile", ",", "boolean", "resolveBindings", ")", "{", "if", "(", "classFile", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "try", "{", "ASTParser", "c", "=", "ASTParser", ".", "newParser", "(", "AST", ".", "JLS2", ")", ";", "c", ".", "setSource", "(", "classFile", ")", ";", "c", ".", "setResolveBindings", "(", "resolveBindings", ")", ";", "ASTNode", "result", "=", "c", ".", "createAST", "(", "null", ")", ";", "return", "(", "CompilationUnit", ")", "result", ";", "}", "catch", "(", "IllegalStateException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "public", "static", "CompilationUnit", "parseCompilationUnit", "(", "ICompilationUnit", "unit", ",", "boolean", "resolveBindings", ")", "{", "try", "{", "ASTParser", "c", "=", "ASTParser", ".", "newParser", "(", "AST", ".", "JLS2", ")", ";", "c", ".", "setSource", "(", "unit", ")", ";", "c", ".", "setResolveBindings", "(", "resolveBindings", ")", ";", "ASTNode", "result", "=", "c", ".", "createAST", "(", "null", ")", ";", "return", "(", "CompilationUnit", ")", "result", ";", "}", "catch", "(", "IllegalStateException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "int", "apiLevel", ";", "private", "int", "bits", ";", "private", "int", "defaultNodeFlag", "=", "0", ";", "private", "int", "disableEvents", "=", "0", ";", "private", "NodeEventHandler", "eventHandler", "=", "new", "NodeEventHandler", "(", ")", ";", "private", "final", "Object", "internalASTLock", "=", "new", "Object", "(", ")", ";", "private", "long", "modificationCount", "=", "0", ";", "private", "long", "originalModificationCount", "=", "0", ";", "private", "BindingResolver", "resolver", "=", "new", "BindingResolver", "(", ")", ";", "InternalASTRewrite", "rewriter", ";", "Scanner", "scanner", ";", "private", "final", "Object", "[", "]", "THIS_AST", "=", "new", "Object", "[", "]", "{", "this", "}", ";", "public", "AST", "(", ")", "{", "this", "(", "JavaCore", ".", "getDefaultOptions", "(", ")", ")", ";", "}", "private", "AST", "(", "int", "level", ")", "{", "switch", "(", "level", ")", "{", "case", "JLS2_INTERNAL", ":", "case", "JLS3", ":", "this", ".", "apiLevel", "=", "level", ";", "this", ".", "scanner", "=", "new", "Scanner", "(", "true", ",", "true", ",", "false", ",", "ClassFileConstants", ".", "JDK1_3", ",", "ClassFileConstants", ".", "JDK1_5", ",", "null", ",", "null", ",", "true", ")", ";", "break", ";", "case", "JLS4", ":", "this", ".", "apiLevel", "=", "level", ";", "this", ".", "scanner", "=", "new", "Scanner", "(", "true", ",", "true", ",", "false", ",", "ClassFileConstants", ".", "JDK1_7", ",", "ClassFileConstants", ".", "JDK1_7", ",", "null", ",", "null", ",", "true", ")", ";", "break", ";", "default", ":", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "}", "public", "AST", "(", "Map", "options", ")", "{", "this", "(", "JLS2", ")", ";", "Object", "sourceLevelOption", "=", "options", ".", "get", "(", "JavaCore", ".", "COMPILER_SOURCE", ")", ";", "long", "sourceLevel", "=", "ClassFileConstants", ".", "JDK1_3", ";", "if", "(", "JavaCore", ".", "VERSION_1_4", ".", "equals", "(", "sourceLevelOption", ")", ")", "{", "sourceLevel", "=", "ClassFileConstants", ".", "JDK1_4", ";", "}", "else", "if", "(", "JavaCore", ".", "VERSION_1_5", ".", "equals", "(", "sourceLevelOption", ")", ")", "{", "sourceLevel", "=", "ClassFileConstants", ".", "JDK1_5", ";", "}", "else", "if", "(", "JavaCore", ".", "VERSION_1_7", ".", "equals", "(", "sourceLevelOption", ")", ")", "{", "sourceLevel", "=", "ClassFileConstants", ".", "JDK1_7", ";", "}", "Object", "complianceLevelOption", "=", "options", ".", "get", "(", "JavaCore", ".", "COMPILER_COMPLIANCE", ")", ";", "long", "complianceLevel", "=", "ClassFileConstants", ".", "JDK1_3", ";", "if", "(", "JavaCore", ".", "VERSION_1_4", ".", "equals", "(", "complianceLevelOption", ")", ")", "{", "complianceLevel", "=", "ClassFileConstants", ".", "JDK1_4", ";", "}", "else", "if", "(", "JavaCore", ".", "VERSION_1_5", ".", "equals", "(", "complianceLevelOption", ")", ")", "{", "complianceLevel", "=", "ClassFileConstants", ".", "JDK1_5", ";", "}", "else", "if", "(", "JavaCore", ".", "VERSION_1_7", ".", "equals", "(", "complianceLevelOption", ")", ")", "{", "complianceLevel", "=", "ClassFileConstants", ".", "JDK1_7", ";", "}", "this", ".", "scanner", "=", "new", "Scanner", "(", "true", ",", "true", ",", "false", ",", "sourceLevel", ",", "complianceLevel", ",", "null", ",", "null", ",", "true", ")", ";", "}", "public", "int", "apiLevel", "(", ")", "{", "return", "this", ".", "apiLevel", ";", "}", "public", "ASTNode", "createInstance", "(", "Class", "nodeClass", ")", "{", "if", "(", "nodeClass", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "try", "{", "Constructor", "c", "=", "nodeClass", ".", "getDeclaredConstructor", "(", "AST_CLASS", ")", ";", "Object", "result", "=", "c", ".", "newInstance", "(", "this", ".", "THIS_AST", ")", ";", "return", "(", "ASTNode", ")", "result", ";", "}", "catch", "(", "NoSuchMethodException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "catch", "(", "InstantiationException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "catch", "(", "IllegalAccessException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "catch", "(", "InvocationTargetException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "public", "ASTNode", "createInstance", "(", "int", "nodeType", ")", "{", "Class", "nodeClass", "=", "ASTNode", ".", "nodeClassForType", "(", "nodeType", ")", ";", "return", "createInstance", "(", "nodeClass", ")", ";", "}", "final", "void", "disableEvents", "(", ")", "{", "synchronized", "(", "this", ".", "internalASTLock", ")", "{", "this", ".", "disableEvents", "++", ";", "}", "}", "BindingResolver", "getBindingResolver", "(", ")", "{", "return", "this", ".", "resolver", ";", "}", "int", "getDefaultNodeFlag", "(", ")", "{", "return", "this", ".", "defaultNodeFlag", ";", "}", "NodeEventHandler", "getEventHandler", "(", ")", "{", "return", "this", ".", "eventHandler", ";", "}", "public", "boolean", "hasBindingsRecovery", "(", ")", "{", "return", "(", "this", ".", "bits", "&", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ")", "!=", "0", ";", "}", "public", "boolean", "hasResolvedBindings", "(", ")", "{", "return", "(", "this", ".", "bits", "&", "RESOLVED_BINDINGS", ")", "!=", "0", ";", "}", "public", "boolean", "hasStatementsRecovery", "(", ")", "{", "return", "(", "this", ".", "bits", "&", "ICompilationUnit", ".", "ENABLE_STATEMENTS_RECOVERY", ")", "!=", "0", ";", "}", "Name", "internalNewName", "(", "String", "[", "]", "identifiers", ")", "{", "int", "count", "=", "identifiers", ".", "length", ";", "if", "(", "count", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "final", "SimpleName", "simpleName", "=", "new", "SimpleName", "(", "this", ")", ";", "simpleName", ".", "internalSetIdentifier", "(", "identifiers", "[", "0", "]", ")", ";", "Name", "result", "=", "simpleName", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "count", ";", "i", "++", ")", "{", "SimpleName", "name", "=", "new", "SimpleName", "(", "this", ")", ";", "name", ".", "internalSetIdentifier", "(", "identifiers", "[", "i", "]", ")", ";", "result", "=", "newQualifiedName", "(", "result", ",", "name", ")", ";", "}", "return", "result", ";", "}", "public", "long", "modificationCount", "(", ")", "{", "return", "this", ".", "modificationCount", ";", "}", "void", "modifying", "(", ")", "{", "if", "(", "this", ".", "disableEvents", ">", "0", ")", "{", "return", ";", "}", "this", ".", "modificationCount", "++", ";", "}", "public", "AnnotationTypeDeclaration", "newAnnotationTypeDeclaration", "(", ")", "{", "AnnotationTypeDeclaration", "result", "=", "new", "AnnotationTypeDeclaration", "(", "this", ")", ";", "return", "result", ";", "}", "public", "AnnotationTypeMemberDeclaration", "newAnnotationTypeMemberDeclaration", "(", ")", "{", "AnnotationTypeMemberDeclaration", "result", "=", "new", "AnnotationTypeMemberDeclaration", "(", "this", ")", ";", "return", "result", ";", "}", "public", "AnonymousClassDeclaration", "newAnonymousClassDeclaration", "(", ")", "{", "AnonymousClassDeclaration", "result", "=", "new", "AnonymousClassDeclaration", "(", "this", ")", ";", "return", "result", ";", "}", "public", "ArrayAccess", "newArrayAccess", "(", ")", "{", "ArrayAccess", "result", "=", "new", "ArrayAccess", "(", "this", ")", ";", "return", "result", ";", "}", "public", "ArrayCreation", "newArrayCreation", "(", ")", "{", "ArrayCreation", "result", "=", "new", "ArrayCreation", "(", "this", ")", ";", "return", "result", ";", "}", "public", "ArrayInitializer", "newArrayInitializer", "(", ")", "{", "ArrayInitializer", "result", "=", "new", "ArrayInitializer", "(", "this", ")", ";", "return", "result", ";", "}", "public", "ArrayType", "newArrayType", "(", "Type", "componentType", ")", "{", "ArrayType", "result", "=", "new", "ArrayType", "(", "this", ")", ";", "result", ".", "setComponentType", "(", "componentType", ")", ";", "return", "result", ";", "}", "public", "ArrayType", "newArrayType", "(", "Type", "elementType", ",", "int", "dimensions", ")", "{", "if", "(", "elementType", "==", "null", "||", "elementType", ".", "isArrayType", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "dimensions", "<", "1", "||", "dimensions", ">", "1000", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ArrayType", "result", "=", "new", "ArrayType", "(", "this", ")", ";", "result", ".", "setComponentType", "(", "elementType", ")", ";", "for", "(", "int", "i", "=", "2", ";", "i", "<=", "dimensions", ";", "i", "++", ")", "{", "result", "=", "newArrayType", "(", "result", ")", ";", "}", "return", "result", ";", "}", "public", "AssertStatement", "newAssertStatement", "(", ")", "{", "return", "new", "AssertStatement", "(", "this", ")", ";", "}", "public", "Assignment", "newAssignment", "(", ")", "{", "Assignment", "result", "=", "new", "Assignment", "(", "this", ")", ";", "return", "result", ";", "}", "public", "Block", "newBlock", "(", ")", "{", "return", "new", "Block", "(", "this", ")", ";", "}", "public", "BlockComment", "newBlockComment", "(", ")", "{", "BlockComment", "result", "=", "new", "BlockComment", "(", "this", ")", ";", "return", "result", ";", "}", "public", "BooleanLiteral", "newBooleanLiteral", "(", "boolean", "value", ")", "{", "BooleanLiteral", "result", "=", "new", "BooleanLiteral", "(", "this", ")", ";", "result", ".", "setBooleanValue", "(", "value", ")", ";", "return", "result", ";", "}", "public", "BreakStatement", "newBreakStatement", "(", ")", "{", "return", "new", "BreakStatement", "(", "this", ")", ";", "}", "public", "CastExpression", "newCastExpression", "(", ")", "{", "CastExpression", "result", "=", "new", "CastExpression", "(", "this", ")", ";", "return", "result", ";", "}", "public", "CatchClause", "newCatchClause", "(", ")", "{", "return", "new", "CatchClause", "(", "this", ")", ";", "}", "public", "CharacterLiteral", "newCharacterLiteral", "(", ")", "{", "return", "new", "CharacterLiteral", "(", "this", ")", ";", "}", "public", "ClassInstanceCreation", "newClassInstanceCreation", "(", ")", "{", "ClassInstanceCreation", "result", "=", "new", "ClassInstanceCreation", "(", "this", ")", ";", "return", "result", ";", "}", "public", "CompilationUnit", "newCompilationUnit", "(", ")", "{", "return", "new", "CompilationUnit", "(", "this", ")", ";", "}", "public", "ConditionalExpression", "newConditionalExpression", "(", ")", "{", "ConditionalExpression", "result", "=", "new", "ConditionalExpression", "(", "this", ")", ";", "return", "result", ";", "}", "public", "ConstructorInvocation", "newConstructorInvocation", "(", ")", "{", "ConstructorInvocation", "result", "=", "new", "ConstructorInvocation", "(", "this", ")", ";", "return", "result", ";", "}", "public", "ContinueStatement", "newContinueStatement", "(", ")", "{", "return", "new", "ContinueStatement", "(", "this", ")", ";", "}", "public", "UnionType", "newUnionType", "(", ")", "{", "return", "new", "UnionType", "(", "this", ")", ";", "}", "public", "DoStatement", "newDoStatement", "(", ")", "{", "return", "new", "DoStatement", "(", "this", ")", ";", "}", "public", "EmptyStatement", "newEmptyStatement", "(", ")", "{", "return", "new", "EmptyStatement", "(", "this", ")", ";", "}", "public", "EnhancedForStatement", "newEnhancedForStatement", "(", ")", "{", "return", "new", "EnhancedForStatement", "(", "this", ")", ";", "}", "public", "EnumConstantDeclaration", "newEnumConstantDeclaration", "(", ")", "{", "EnumConstantDeclaration", "result", "=", "new", "EnumConstantDeclaration", "(", "this", ")", ";", "return", "result", ";", "}", "public", "EnumDeclaration", "newEnumDeclaration", "(", ")", "{", "EnumDeclaration", "result", "=", "new", "EnumDeclaration", "(", "this", ")", ";", "return", "result", ";", "}", "public", "ExpressionStatement", "newExpressionStatement", "(", "Expression", "expression", ")", "{", "ExpressionStatement", "result", "=", "new", "ExpressionStatement", "(", "this", ")", ";", "result", ".", "setExpression", "(", "expression", ")", ";", "return", "result", ";", "}", "public", "FieldAccess", "newFieldAccess", "(", ")", "{", "FieldAccess", "result", "=", "new", "FieldAccess", "(", "this", ")", ";", "return", "result", ";", "}", "public", "FieldDeclaration", "newFieldDeclaration", "(", "VariableDeclarationFragment", "fragment", ")", "{", "if", "(", "fragment", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "FieldDeclaration", "result", "=", "new", "FieldDeclaration", "(", "this", ")", ";", "result", ".", "fragments", "(", ")", ".", "add", "(", "fragment", ")", ";", "return", "result", ";", "}", "public", "ForStatement", "newForStatement", "(", ")", "{", "return", "new", "ForStatement", "(", "this", ")", ";", "}", "public", "IfStatement", "newIfStatement", "(", ")", "{", "return", "new", "IfStatement", "(", "this", ")", ";", "}", "public", "ImportDeclaration", "newImportDeclaration", "(", ")", "{", "ImportDeclaration", "result", "=", "new", "ImportDeclaration", "(", "this", ")", ";", "return", "result", ";", "}", "public", "InfixExpression", "newInfixExpression", "(", ")", "{", "InfixExpression", "result", "=", "new", "InfixExpression", "(", "this", ")", ";", "return", "result", ";", "}", "public", "Initializer", "newInitializer", "(", ")", "{", "Initializer", "result", "=", "new", "Initializer", "(", "this", ")", ";", "return", "result", ";", "}", "public", "InstanceofExpression", "newInstanceofExpression", "(", ")", "{", "InstanceofExpression", "result", "=", "new", "InstanceofExpression", "(", "this", ")", ";", "return", "result", ";", "}", "public", "Javadoc", "newJavadoc", "(", ")", "{", "Javadoc", "result", "=", "new", "Javadoc", "(", "this", ")", ";", "return", "result", ";", "}", "public", "LabeledStatement", "newLabeledStatement", "(", ")", "{", "return", "new", "LabeledStatement", "(", "this", ")", ";", "}", "public", "LineComment", "newLineComment", "(", ")", "{", "LineComment", "result", "=", "new", "LineComment", "(", "this", ")", ";", "return", "result", ";", "}", "public", "MarkerAnnotation", "newMarkerAnnotation", "(", ")", "{", "MarkerAnnotation", "result", "=", "new", "MarkerAnnotation", "(", "this", ")", ";", "return", "result", ";", "}", "public", "MemberRef", "newMemberRef", "(", ")", "{", "MemberRef", "result", "=", "new", "MemberRef", "(", "this", ")", ";", "return", "result", ";", "}", "public", "MemberValuePair", "newMemberValuePair", "(", ")", "{", "MemberValuePair", "result", "=", "new", "MemberValuePair", "(", "this", ")", ";", "return", "result", ";", "}", "public", "MethodDeclaration", "newMethodDeclaration", "(", ")", "{", "MethodDeclaration", "result", "=", "new", "MethodDeclaration", "(", "this", ")", ";", "result", ".", "setConstructor", "(", "false", ")", ";", "return", "result", ";", "}", "public", "MethodInvocation", "newMethodInvocation", "(", ")", "{", "MethodInvocation", "result", "=", "new", "MethodInvocation", "(", "this", ")", ";", "return", "result", ";", "}", "public", "MethodRef", "newMethodRef", "(", ")", "{", "MethodRef", "result", "=", "new", "MethodRef", "(", "this", ")", ";", "return", "result", ";", "}", "public", "MethodRefParameter", "newMethodRefParameter", "(", ")", "{", "MethodRefParameter", "result", "=", "new", "MethodRefParameter", "(", "this", ")", ";", "return", "result", ";", "}", "public", "Modifier", "newModifier", "(", "Modifier", ".", "ModifierKeyword", "keyword", ")", "{", "Modifier", "result", "=", "new", "Modifier", "(", "this", ")", ";", "result", ".", "setKeyword", "(", "keyword", ")", ";", "return", "result", ";", "}", "public", "List", "newModifiers", "(", "int", "flags", ")", "{", "if", "(", "this", ".", "apiLevel", "==", "AST", ".", "JLS2", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "List", "result", "=", "new", "ArrayList", "(", "3", ")", ";", "if", "(", "Modifier", ".", "isPublic", "(", "flags", ")", ")", "{", "result", ".", "add", "(", "newModifier", "(", "Modifier", ".", "ModifierKeyword", ".", "PUBLIC_KEYWORD", ")", ")", ";", "}", "if", "(", "Modifier", ".", "isProtected", "(", "flags", ")", ")", "{", "result", ".", "add", "(", "newModifier", "(", "Modifier", ".", "ModifierKeyword", ".", "PROTECTED_KEYWORD", ")", ")", ";", "}", "if", "(", "Modifier", ".", "isPrivate", "(", "flags", ")", ")", "{", "result", ".", "add", "(", "newModifier", "(", "Modifier", ".", "ModifierKeyword", ".", "PRIVATE_KEYWORD", ")", ")", ";", "}", "if", "(", "Modifier", ".", "isAbstract", "(", "flags", ")", ")", "{", "result", ".", "add", "(", "newModifier", "(", "Modifier", ".", "ModifierKeyword", ".", "ABSTRACT_KEYWORD", ")", ")", ";", "}", "if", "(", "Modifier", ".", "isStatic", "(", "flags", ")", ")", "{", "result", ".", "add", "(", "newModifier", "(", "Modifier", ".", "ModifierKeyword", ".", "STATIC_KEYWORD", ")", ")", ";", "}", "if", "(", "Modifier", ".", "isFinal", "(", "flags", ")", ")", "{", "result", ".", "add", "(", "newModifier", "(", "Modifier", ".", "ModifierKeyword", ".", "FINAL_KEYWORD", ")", ")", ";", "}", "if", "(", "Modifier", ".", "isSynchronized", "(", "flags", ")", ")", "{", "result", ".", "add", "(", "newModifier", "(", "Modifier", ".", "ModifierKeyword", ".", "SYNCHRONIZED_KEYWORD", ")", ")", ";", "}", "if", "(", "Modifier", ".", "isNative", "(", "flags", ")", ")", "{", "result", ".", "add", "(", "newModifier", "(", "Modifier", ".", "ModifierKeyword", ".", "NATIVE_KEYWORD", ")", ")", ";", "}", "if", "(", "Modifier", ".", "isStrictfp", "(", "flags", ")", ")", "{", "result", ".", "add", "(", "newModifier", "(", "Modifier", ".", "ModifierKeyword", ".", "STRICTFP_KEYWORD", ")", ")", ";", "}", "if", "(", "Modifier", ".", "isTransient", "(", "flags", ")", ")", "{", "result", ".", "add", "(", "newModifier", "(", "Modifier", ".", "ModifierKeyword", ".", "TRANSIENT_KEYWORD", ")", ")", ";", "}", "if", "(", "Modifier", ".", "isVolatile", "(", "flags", ")", ")", "{", "result", ".", "add", "(", "newModifier", "(", "Modifier", ".", "ModifierKeyword", ".", "VOLATILE_KEYWORD", ")", ")", ";", "}", "return", "result", ";", "}", "public", "Name", "newName", "(", "String", "qualifiedName", ")", "{", "StringTokenizer", "t", "=", "new", "StringTokenizer", "(", "qualifiedName", ",", "\".\"", ",", "true", ")", ";", "Name", "result", "=", "null", ";", "int", "balance", "=", "0", ";", "while", "(", "t", ".", "hasMoreTokens", "(", ")", ")", "{", "String", "s", "=", "t", ".", "nextToken", "(", ")", ";", "if", "(", "s", ".", "indexOf", "(", "'.'", ")", ">=", "0", ")", "{", "if", "(", "s", ".", "length", "(", ")", ">", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "balance", "--", ";", "if", "(", "balance", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "else", "{", "balance", "++", ";", "SimpleName", "name", "=", "newSimpleName", "(", "s", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "name", ";", "}", "else", "{", "result", "=", "newQualifiedName", "(", "result", ",", "name", ")", ";", "}", "}", "}", "if", "(", "balance", "!=", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "return", "result", ";", "}", "public", "Name", "newName", "(", "String", "[", "]", "identifiers", ")", "{", "int", "count", "=", "identifiers", ".", "length", ";", "if", "(", "count", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "Name", "result", "=", "newSimpleName", "(", "identifiers", "[", "0", "]", ")", ";", "for", "(", "int", "i", "=", "1", ";", "i", "<", "count", ";", "i", "++", ")", "{", "SimpleName", "name", "=", "newSimpleName", "(", "identifiers", "[", "i", "]", ")", ";", "result", "=", "newQualifiedName", "(", "result", ",", "name", ")", ";", "}", "return", "result", ";", "}", "public", "NormalAnnotation", "newNormalAnnotation", "(", ")", "{", "NormalAnnotation", "result", "=", "new", "NormalAnnotation", "(", "this", ")", ";", "return", "result", ";", "}", "public", "NullLiteral", "newNullLiteral", "(", ")", "{", "return", "new", "NullLiteral", "(", "this", ")", ";", "}", "public", "NumberLiteral", "newNumberLiteral", "(", ")", "{", "NumberLiteral", "result", "=", "new", "NumberLiteral", "(", "this", ")", ";", "return", "result", ";", "}", "public", "NumberLiteral", "newNumberLiteral", "(", "String", "literal", ")", "{", "if", "(", "literal", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "NumberLiteral", "result", "=", "new", "NumberLiteral", "(", "this", ")", ";", "result", ".", "setToken", "(", "literal", ")", ";", "return", "result", ";", "}", "public", "PackageDeclaration", "newPackageDeclaration", "(", ")", "{", "PackageDeclaration", "result", "=", "new", "PackageDeclaration", "(", "this", ")", ";", "return", "result", ";", "}", "public", "ParameterizedType", "newParameterizedType", "(", "Type", "type", ")", "{", "ParameterizedType", "result", "=", "new", "ParameterizedType", "(", "this", ")", ";", "result", ".", "setType", "(", "type", ")", ";", "return", "result", ";", "}", "public", "ParenthesizedExpression", "newParenthesizedExpression", "(", ")", "{", "ParenthesizedExpression", "result", "=", "new", "ParenthesizedExpression", "(", "this", ")", ";", "return", "result", ";", "}", "public", "PostfixExpression", "newPostfixExpression", "(", ")", "{", "PostfixExpression", "result", "=", "new", "PostfixExpression", "(", "this", ")", ";", "return", "result", ";", "}", "public", "PrefixExpression", "newPrefixExpression", "(", ")", "{", "PrefixExpression", "result", "=", "new", "PrefixExpression", "(", "this", ")", ";", "return", "result", ";", "}", "public", "PrimitiveType", "newPrimitiveType", "(", "PrimitiveType", ".", "Code", "typeCode", ")", "{", "PrimitiveType", "result", "=", "new", "PrimitiveType", "(", "this", ")", ";", "result", ".", "setPrimitiveTypeCode", "(", "typeCode", ")", ";", "return", "result", ";", "}", "public", "QualifiedName", "newQualifiedName", "(", "Name", "qualifier", ",", "SimpleName", "name", ")", "{", "QualifiedName", "result", "=", "new", "QualifiedName", "(", "this", ")", ";", "result", ".", "setQualifier", "(", "qualifier", ")", ";", "result", ".", "setName", "(", "name", ")", ";", "return", "result", ";", "}", "public", "QualifiedType", "newQualifiedType", "(", "Type", "qualifier", ",", "SimpleName", "name", ")", "{", "QualifiedType", "result", "=", "new", "QualifiedType", "(", "this", ")", ";", "result", ".", "setQualifier", "(", "qualifier", ")", ";", "result", ".", "setName", "(", "name", ")", ";", "return", "result", ";", "}", "public", "ReturnStatement", "newReturnStatement", "(", ")", "{", "return", "new", "ReturnStatement", "(", "this", ")", ";", "}", "public", "SimpleName", "newSimpleName", "(", "String", "identifier", ")", "{", "if", "(", "identifier", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "SimpleName", "result", "=", "new", "SimpleName", "(", "this", ")", ";", "result", ".", "setIdentifier", "(", "identifier", ")", ";", "return", "result", ";", "}", "public", "SimpleType", "newSimpleType", "(", "Name", "typeName", ")", "{", "SimpleType", "result", "=", "new", "SimpleType", "(", "this", ")", ";", "result", ".", "setName", "(", "typeName", ")", ";", "return", "result", ";", "}", "public", "SingleMemberAnnotation", "newSingleMemberAnnotation", "(", ")", "{", "SingleMemberAnnotation", "result", "=", "new", "SingleMemberAnnotation", "(", "this", ")", ";", "return", "result", ";", "}", "public", "SingleVariableDeclaration", "newSingleVariableDeclaration", "(", ")", "{", "SingleVariableDeclaration", "result", "=", "new", "SingleVariableDeclaration", "(", "this", ")", ";", "return", "result", ";", "}", "public", "StringLiteral", "newStringLiteral", "(", ")", "{", "return", "new", "StringLiteral", "(", "this", ")", ";", "}", "public", "SuperConstructorInvocation", "newSuperConstructorInvocation", "(", ")", "{", "SuperConstructorInvocation", "result", "=", "new", "SuperConstructorInvocation", "(", "this", ")", ";", "return", "result", ";", "}", "public", "SuperFieldAccess", "newSuperFieldAccess", "(", ")", "{", "SuperFieldAccess", "result", "=", "new", "SuperFieldAccess", "(", "this", ")", ";", "return", "result", ";", "}", "public", "SuperMethodInvocation", "newSuperMethodInvocation", "(", ")", "{", "SuperMethodInvocation", "result", "=", "new", "SuperMethodInvocation", "(", "this", ")", ";", "return", "result", ";", "}", "public", "SwitchCase", "newSwitchCase", "(", ")", "{", "return", "new", "SwitchCase", "(", "this", ")", ";", "}", "public", "SwitchStatement", "newSwitchStatement", "(", ")", "{", "return", "new", "SwitchStatement", "(", "this", ")", ";", "}", "public", "SynchronizedStatement", "newSynchronizedStatement", "(", ")", "{", "return", "new", "SynchronizedStatement", "(", "this", ")", ";", "}", "public", "TagElement", "newTagElement", "(", ")", "{", "TagElement", "result", "=", "new", "TagElement", "(", "this", ")", ";", "return", "result", ";", "}", "public", "TextElement", "newTextElement", "(", ")", "{", "TextElement", "result", "=", "new", "TextElement", "(", "this", ")", ";", "return", "result", ";", "}", "public", "ThisExpression", "newThisExpression", "(", ")", "{", "ThisExpression", "result", "=", "new", "ThisExpression", "(", "this", ")", ";", "return", "result", ";", "}", "public", "ThrowStatement", "newThrowStatement", "(", ")", "{", "return", "new", "ThrowStatement", "(", "this", ")", ";", "}", "public", "TryStatement", "newTryStatement", "(", ")", "{", "return", "new", "TryStatement", "(", "this", ")", ";", "}", "public", "TypeDeclaration", "newTypeDeclaration", "(", ")", "{", "TypeDeclaration", "result", "=", "new", "TypeDeclaration", "(", "this", ")", ";", "result", ".", "setInterface", "(", "false", ")", ";", "return", "result", ";", "}", "public", "TypeDeclarationStatement", "newTypeDeclarationStatement", "(", "AbstractTypeDeclaration", "decl", ")", "{", "TypeDeclarationStatement", "result", "=", "new", "TypeDeclarationStatement", "(", "this", ")", ";", "if", "(", "this", ".", "apiLevel", "==", "AST", ".", "JLS2", ")", "{", "result", ".", "internalSetTypeDeclaration", "(", "(", "TypeDeclaration", ")", "decl", ")", ";", "}", "if", "(", "this", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "setDeclaration", "(", "decl", ")", ";", "}", "return", "result", ";", "}", "public", "TypeDeclarationStatement", "newTypeDeclarationStatement", "(", "TypeDeclaration", "decl", ")", "{", "TypeDeclarationStatement", "result", "=", "new", "TypeDeclarationStatement", "(", "this", ")", ";", "result", ".", "setDeclaration", "(", "decl", ")", ";", "return", "result", ";", "}", "public", "TypeLiteral", "newTypeLiteral", "(", ")", "{", "TypeLiteral", "result", "=", "new", "TypeLiteral", "(", "this", ")", ";", "return", "result", ";", "}", "public", "TypeParameter", "newTypeParameter", "(", ")", "{", "TypeParameter", "result", "=", "new", "TypeParameter", "(", "this", ")", ";", "return", "result", ";", "}", "public", "VariableDeclarationExpression", "newVariableDeclarationExpression", "(", "VariableDeclarationFragment", "fragment", ")", "{", "if", "(", "fragment", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "VariableDeclarationExpression", "result", "=", "new", "VariableDeclarationExpression", "(", "this", ")", ";", "result", ".", "fragments", "(", ")", ".", "add", "(", "fragment", ")", ";", "return", "result", ";", "}", "public", "VariableDeclarationFragment", "newVariableDeclarationFragment", "(", ")", "{", "VariableDeclarationFragment", "result", "=", "new", "VariableDeclarationFragment", "(", "this", ")", ";", "return", "result", ";", "}", "public", "VariableDeclarationStatement", "newVariableDeclarationStatement", "(", "VariableDeclarationFragment", "fragment", ")", "{", "if", "(", "fragment", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "VariableDeclarationStatement", "result", "=", "new", "VariableDeclarationStatement", "(", "this", ")", ";", "result", ".", "fragments", "(", ")", ".", "add", "(", "fragment", ")", ";", "return", "result", ";", "}", "public", "WhileStatement", "newWhileStatement", "(", ")", "{", "return", "new", "WhileStatement", "(", "this", ")", ";", "}", "public", "WildcardType", "newWildcardType", "(", ")", "{", "WildcardType", "result", "=", "new", "WildcardType", "(", "this", ")", ";", "return", "result", ";", "}", "void", "postAddChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "StructuralPropertyDescriptor", "property", ")", "{", "synchronized", "(", "this", ".", "internalASTLock", ")", "{", "if", "(", "this", ".", "disableEvents", ">", "0", ")", "{", "return", ";", "}", "else", "{", "disableEvents", "(", ")", ";", "}", "}", "try", "{", "this", ".", "eventHandler", ".", "postAddChildEvent", "(", "node", ",", "child", ",", "property", ")", ";", "}", "finally", "{", "reenableEvents", "(", ")", ";", "}", "}", "void", "postCloneNodeEvent", "(", "ASTNode", "node", ",", "ASTNode", "clone", ")", "{", "synchronized", "(", "this", ".", "internalASTLock", ")", "{", "if", "(", "this", ".", "disableEvents", ">", "0", ")", "{", "return", ";", "}", "else", "{", "disableEvents", "(", ")", ";", "}", "}", "try", "{", "this", ".", "eventHandler", ".", "postCloneNodeEvent", "(", "node", ",", "clone", ")", ";", "}", "finally", "{", "reenableEvents", "(", ")", ";", "}", "}", "void", "postRemoveChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "StructuralPropertyDescriptor", "property", ")", "{", "synchronized", "(", "this", ".", "internalASTLock", ")", "{", "if", "(", "this", ".", "disableEvents", ">", "0", ")", "{", "return", ";", "}", "else", "{", "disableEvents", "(", ")", ";", "}", "}", "try", "{", "this", ".", "eventHandler", ".", "postRemoveChildEvent", "(", "node", ",", "child", ",", "property", ")", ";", "}", "finally", "{", "reenableEvents", "(", ")", ";", "}", "}", "void", "postReplaceChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "ASTNode", "newChild", ",", "StructuralPropertyDescriptor", "property", ")", "{", "synchronized", "(", "this", ".", "internalASTLock", ")", "{", "if", "(", "this", ".", "disableEvents", ">", "0", ")", "{", "return", ";", "}", "else", "{", "disableEvents", "(", ")", ";", "}", "}", "try", "{", "this", ".", "eventHandler", ".", "postReplaceChildEvent", "(", "node", ",", "child", ",", "newChild", ",", "property", ")", ";", "}", "finally", "{", "reenableEvents", "(", ")", ";", "}", "}", "void", "postValueChangeEvent", "(", "ASTNode", "node", ",", "SimplePropertyDescriptor", "property", ")", "{", "synchronized", "(", "this", ".", "internalASTLock", ")", "{", "if", "(", "this", ".", "disableEvents", ">", "0", ")", "{", "return", ";", "}", "else", "{", "disableEvents", "(", ")", ";", "}", "}", "try", "{", "this", ".", "eventHandler", ".", "postValueChangeEvent", "(", "node", ",", "property", ")", ";", "}", "finally", "{", "reenableEvents", "(", ")", ";", "}", "}", "void", "preAddChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "StructuralPropertyDescriptor", "property", ")", "{", "synchronized", "(", "this", ".", "internalASTLock", ")", "{", "if", "(", "this", ".", "disableEvents", ">", "0", ")", "{", "return", ";", "}", "else", "{", "disableEvents", "(", ")", ";", "}", "}", "try", "{", "this", ".", "eventHandler", ".", "preAddChildEvent", "(", "node", ",", "child", ",", "property", ")", ";", "}", "finally", "{", "reenableEvents", "(", ")", ";", "}", "}", "void", "preCloneNodeEvent", "(", "ASTNode", "node", ")", "{", "synchronized", "(", "this", ".", "internalASTLock", ")", "{", "if", "(", "this", ".", "disableEvents", ">", "0", ")", "{", "return", ";", "}", "else", "{", "disableEvents", "(", ")", ";", "}", "}", "try", "{", "this", ".", "eventHandler", ".", "preCloneNodeEvent", "(", "node", ")", ";", "}", "finally", "{", "reenableEvents", "(", ")", ";", "}", "}", "void", "preRemoveChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "StructuralPropertyDescriptor", "property", ")", "{", "synchronized", "(", "this", ".", "internalASTLock", ")", "{", "if", "(", "this", ".", "disableEvents", ">", "0", ")", "{", "return", ";", "}", "else", "{", "disableEvents", "(", ")", ";", "}", "}", "try", "{", "this", ".", "eventHandler", ".", "preRemoveChildEvent", "(", "node", ",", "child", ",", "property", ")", ";", "}", "finally", "{", "reenableEvents", "(", ")", ";", "}", "}", "void", "preReplaceChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "ASTNode", "newChild", ",", "StructuralPropertyDescriptor", "property", ")", "{", "synchronized", "(", "this", ".", "internalASTLock", ")", "{", "if", "(", "this", ".", "disableEvents", ">", "0", ")", "{", "return", ";", "}", "else", "{", "disableEvents", "(", ")", ";", "}", "}", "try", "{", "this", ".", "eventHandler", ".", "preReplaceChildEvent", "(", "node", ",", "child", ",", "newChild", ",", "property", ")", ";", "}", "finally", "{", "reenableEvents", "(", ")", ";", "}", "}", "void", "preValueChangeEvent", "(", "ASTNode", "node", ",", "SimplePropertyDescriptor", "property", ")", "{", "synchronized", "(", "this", ".", "internalASTLock", ")", "{", "if", "(", "this", ".", "disableEvents", ">", "0", ")", "{", "return", ";", "}", "else", "{", "disableEvents", "(", ")", ";", "}", "}", "try", "{", "this", ".", "eventHandler", ".", "preValueChangeEvent", "(", "node", ",", "property", ")", ";", "}", "finally", "{", "reenableEvents", "(", ")", ";", "}", "}", "void", "recordModifications", "(", "CompilationUnit", "root", ")", "{", "if", "(", "this", ".", "modificationCount", "!=", "this", ".", "originalModificationCount", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "else", "if", "(", "this", ".", "rewriter", "!=", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "else", "if", "(", "(", "root", ".", "getFlags", "(", ")", "&", "ASTNode", ".", "PROTECT", ")", "!=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "else", "if", "(", "root", ".", "getAST", "(", ")", "!=", "this", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "this", ".", "rewriter", "=", "new", "InternalASTRewrite", "(", "root", ")", ";", "setEventHandler", "(", "this", ".", "rewriter", ")", ";", "}", "final", "void", "reenableEvents", "(", ")", "{", "synchronized", "(", "this", ".", "internalASTLock", ")", "{", "this", ".", "disableEvents", "--", ";", "}", "}", "public", "ITypeBinding", "resolveWellKnownType", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "null", ";", "}", "return", "getBindingResolver", "(", ")", ".", "resolveWellKnownType", "(", "name", ")", ";", "}", "TextEdit", "rewrite", "(", "IDocument", "document", ",", "Map", "options", ")", "{", "if", "(", "document", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "this", ".", "rewriter", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"\"", ")", ";", "}", "return", "this", ".", "rewriter", ".", "rewriteAST", "(", "document", ",", "options", ")", ";", "}", "void", "setBindingResolver", "(", "BindingResolver", "resolver", ")", "{", "if", "(", "resolver", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "this", ".", "resolver", "=", "resolver", ";", "}", "void", "setDefaultNodeFlag", "(", "int", "flag", ")", "{", "this", ".", "defaultNodeFlag", "=", "flag", ";", "}", "void", "setEventHandler", "(", "NodeEventHandler", "eventHandler", ")", "{", "if", "(", "this", ".", "eventHandler", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "this", ".", "eventHandler", "=", "eventHandler", ";", "}", "void", "setFlag", "(", "int", "newValue", ")", "{", "this", ".", "bits", "|=", "newValue", ";", "}", "void", "setOriginalModificationCount", "(", "long", "count", ")", "{", "this", ".", "originalModificationCount", "=", "count", ";", "}", "void", "supportedOnlyIn2", "(", ")", "{", "if", "(", "this", ".", "apiLevel", "!=", "AST", ".", "JLS2", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"\"", ")", ";", "}", "}", "void", "unsupportedIn2", "(", ")", "{", "if", "(", "this", ".", "apiLevel", "==", "AST", ".", "JLS2", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"\"", ")", ";", "}", "}", "}", "</s>" ]
4,432
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ReturnStatement", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ReturnStatement", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "OPTIONAL", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "ReturnStatement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Expression", "optionalExpression", "=", "null", ";", "ReturnStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "RETURN_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "ReturnStatement", "result", "=", "new", "ReturnStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getExpression", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "return", "this", ".", "optionalExpression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalExpression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "optionalExpression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalExpression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,433
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "AnonymousClassDeclaration", "extends", "ASTNode", "{", "public", "static", "final", "ChildListPropertyDescriptor", "BODY_DECLARATIONS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "AnonymousClassDeclaration", ".", "class", ",", "\"\"", ",", "BodyDeclaration", ".", "class", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "AnonymousClassDeclaration", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "BODY_DECLARATIONS_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "ASTNode", ".", "NodeList", "bodyDeclarations", "=", "new", "ASTNode", ".", "NodeList", "(", "BODY_DECLARATIONS_PROPERTY", ")", ";", "AnonymousClassDeclaration", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "BODY_DECLARATIONS_PROPERTY", ")", "{", "return", "bodyDeclarations", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "ANONYMOUS_CLASS_DECLARATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "AnonymousClassDeclaration", "result", "=", "new", "AnonymousClassDeclaration", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "bodyDeclarations", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "bodyDeclarations", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "bodyDeclarations", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "List", "bodyDeclarations", "(", ")", "{", "return", "this", ".", "bodyDeclarations", ";", "}", "public", "ITypeBinding", "resolveBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveType", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "this", ".", "bodyDeclarations", ".", "listSize", "(", ")", ";", "}", "}", "</s>" ]
4,434
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IAnnotatable", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ICompilationUnit", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaElement", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IMember", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ElementValuePair", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TagBits", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "*", ";", "class", "AnnotationBinding", "implements", "IAnnotationBinding", "{", "static", "final", "AnnotationBinding", "[", "]", "NoAnnotations", "=", "new", "AnnotationBinding", "[", "0", "]", ";", "private", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "AnnotationBinding", "binding", ";", "private", "BindingResolver", "bindingResolver", ";", "private", "String", "key", ";", "AnnotationBinding", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "AnnotationBinding", "annotation", ",", "BindingResolver", "resolver", ")", "{", "if", "(", "annotation", "==", "null", ")", "throw", "new", "IllegalStateException", "(", ")", ";", "this", ".", "binding", "=", "annotation", ";", "this", ".", "bindingResolver", "=", "resolver", ";", "}", "public", "IAnnotationBinding", "[", "]", "getAnnotations", "(", ")", "{", "return", "NoAnnotations", ";", "}", "public", "ITypeBinding", "getAnnotationType", "(", ")", "{", "ITypeBinding", "typeBinding", "=", "this", ".", "bindingResolver", ".", "getTypeBinding", "(", "this", ".", "binding", ".", "getAnnotationType", "(", ")", ")", ";", "if", "(", "typeBinding", "==", "null", ")", "return", "null", ";", "return", "typeBinding", ";", "}", "public", "IMemberValuePairBinding", "[", "]", "getDeclaredMemberValuePairs", "(", ")", "{", "ReferenceBinding", "typeBinding", "=", "this", ".", "binding", ".", "getAnnotationType", "(", ")", ";", "if", "(", "typeBinding", "==", "null", "||", "(", "(", "typeBinding", ".", "tagBits", "&", "TagBits", ".", "HasMissingType", ")", "!=", "0", ")", ")", "{", "return", "MemberValuePairBinding", ".", "NoPair", ";", "}", "ElementValuePair", "[", "]", "internalPairs", "=", "this", ".", "binding", ".", "getElementValuePairs", "(", ")", ";", "int", "length", "=", "internalPairs", ".", "length", ";", "IMemberValuePairBinding", "[", "]", "pairs", "=", "length", "==", "0", "?", "MemberValuePairBinding", ".", "NoPair", ":", "new", "MemberValuePairBinding", "[", "length", "]", ";", "int", "counter", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "ElementValuePair", "valuePair", "=", "internalPairs", "[", "i", "]", ";", "if", "(", "valuePair", ".", "binding", "==", "null", ")", "continue", ";", "pairs", "[", "counter", "++", "]", "=", "this", ".", "bindingResolver", ".", "getMemberValuePairBinding", "(", "valuePair", ")", ";", "}", "if", "(", "counter", "==", "0", ")", "return", "MemberValuePairBinding", ".", "NoPair", ";", "if", "(", "counter", "!=", "length", ")", "{", "System", ".", "arraycopy", "(", "pairs", ",", "0", ",", "(", "pairs", "=", "new", "MemberValuePairBinding", "[", "counter", "]", ")", ",", "0", ",", "counter", ")", ";", "}", "return", "pairs", ";", "}", "public", "IMemberValuePairBinding", "[", "]", "getAllMemberValuePairs", "(", ")", "{", "IMemberValuePairBinding", "[", "]", "pairs", "=", "getDeclaredMemberValuePairs", "(", ")", ";", "ReferenceBinding", "typeBinding", "=", "this", ".", "binding", ".", "getAnnotationType", "(", ")", ";", "if", "(", "typeBinding", "==", "null", "||", "(", "(", "typeBinding", ".", "tagBits", "&", "TagBits", ".", "HasMissingType", ")", "!=", "0", ")", ")", "return", "pairs", ";", "MethodBinding", "[", "]", "methods", "=", "typeBinding", ".", "availableMethods", "(", ")", ";", "int", "methodLength", "=", "methods", "==", "null", "?", "0", ":", "methods", ".", "length", ";", "if", "(", "methodLength", "==", "0", ")", "return", "pairs", ";", "int", "declaredLength", "=", "pairs", ".", "length", ";", "if", "(", "declaredLength", "==", "methodLength", ")", "return", "pairs", ";", "HashtableOfObject", "table", "=", "new", "HashtableOfObject", "(", "declaredLength", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "declaredLength", ";", "i", "++", ")", "{", "char", "[", "]", "internalName", "=", "(", "(", "MemberValuePairBinding", ")", "pairs", "[", "i", "]", ")", ".", "internalName", "(", ")", ";", "if", "(", "internalName", "==", "null", ")", "continue", ";", "table", ".", "put", "(", "internalName", ",", "pairs", "[", "i", "]", ")", ";", "}", "IMemberValuePairBinding", "[", "]", "allPairs", "=", "new", "IMemberValuePairBinding", "[", "methodLength", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "methodLength", ";", "i", "++", ")", "{", "Object", "pair", "=", "table", ".", "get", "(", "methods", "[", "i", "]", ".", "selector", ")", ";", "allPairs", "[", "i", "]", "=", "pair", "==", "null", "?", "new", "DefaultValuePairBinding", "(", "methods", "[", "i", "]", ",", "this", ".", "bindingResolver", ")", ":", "(", "IMemberValuePairBinding", ")", "pair", ";", "}", "return", "allPairs", ";", "}", "public", "IJavaElement", "getJavaElement", "(", ")", "{", "if", "(", "!", "(", "this", ".", "bindingResolver", "instanceof", "DefaultBindingResolver", ")", ")", "return", "null", ";", "ASTNode", "node", "=", "(", "ASTNode", ")", "(", "(", "DefaultBindingResolver", ")", "this", ".", "bindingResolver", ")", ".", "bindingsToAstNodes", ".", "get", "(", "this", ")", ";", "if", "(", "!", "(", "node", "instanceof", "Annotation", ")", ")", "return", "null", ";", "ASTNode", "parent", "=", "node", ".", "getParent", "(", ")", ";", "IJavaElement", "parentElement", "=", "null", ";", "switch", "(", "parent", ".", "getNodeType", "(", ")", ")", "{", "case", "ASTNode", ".", "PACKAGE_DECLARATION", ":", "IJavaElement", "cu", "=", "(", "(", "CompilationUnit", ")", "parent", ".", "getParent", "(", ")", ")", ".", "getJavaElement", "(", ")", ";", "if", "(", "cu", "instanceof", "ICompilationUnit", ")", "{", "String", "pkgName", "=", "(", "(", "PackageDeclaration", ")", "parent", ")", ".", "getName", "(", ")", ".", "getFullyQualifiedName", "(", ")", ";", "parentElement", "=", "(", "(", "ICompilationUnit", ")", "cu", ")", ".", "getPackageDeclaration", "(", "pkgName", ")", ";", "}", "break", ";", "case", "ASTNode", ".", "ENUM_DECLARATION", ":", "case", "ASTNode", ".", "TYPE_DECLARATION", ":", "case", "ASTNode", ".", "ANNOTATION_TYPE_DECLARATION", ":", "parentElement", "=", "(", "(", "AbstractTypeDeclaration", ")", "parent", ")", ".", "resolveBinding", "(", ")", ".", "getJavaElement", "(", ")", ";", "break", ";", "case", "ASTNode", ".", "FIELD_DECLARATION", ":", "VariableDeclarationFragment", "fragment", "=", "(", "VariableDeclarationFragment", ")", "(", "(", "FieldDeclaration", ")", "parent", ")", ".", "fragments", "(", ")", ".", "get", "(", "0", ")", ";", "IVariableBinding", "variableBinding", "=", "fragment", ".", "resolveBinding", "(", ")", ";", "if", "(", "variableBinding", "==", "null", ")", "{", "return", "null", ";", "}", "parentElement", "=", "variableBinding", ".", "getJavaElement", "(", ")", ";", "break", ";", "case", "ASTNode", ".", "METHOD_DECLARATION", ":", "IMethodBinding", "methodBinding", "=", "(", "(", "MethodDeclaration", ")", "parent", ")", ".", "resolveBinding", "(", ")", ";", "if", "(", "methodBinding", "==", "null", ")", "return", "null", ";", "parentElement", "=", "methodBinding", ".", "getJavaElement", "(", ")", ";", "break", ";", "case", "ASTNode", ".", "VARIABLE_DECLARATION_STATEMENT", ":", "fragment", "=", "(", "VariableDeclarationFragment", ")", "(", "(", "VariableDeclarationStatement", ")", "parent", ")", ".", "fragments", "(", ")", ".", "get", "(", "0", ")", ";", "variableBinding", "=", "fragment", ".", "resolveBinding", "(", ")", ";", "if", "(", "variableBinding", "==", "null", ")", "{", "return", "null", ";", "}", "parentElement", "=", "variableBinding", ".", "getJavaElement", "(", ")", ";", "break", ";", "default", ":", "return", "null", ";", "}", "if", "(", "!", "(", "parentElement", "instanceof", "IAnnotatable", ")", ")", "return", "null", ";", "if", "(", "(", "parentElement", "instanceof", "IMember", ")", "&&", "(", "(", "IMember", ")", "parentElement", ")", ".", "isBinary", "(", ")", ")", "{", "return", "(", "(", "IAnnotatable", ")", "parentElement", ")", ".", "getAnnotation", "(", "getAnnotationType", "(", ")", ".", "getQualifiedName", "(", ")", ")", ";", "}", "return", "(", "(", "IAnnotatable", ")", "parentElement", ")", ".", "getAnnotation", "(", "getName", "(", ")", ")", ";", "}", "public", "String", "getKey", "(", ")", "{", "if", "(", "this", ".", "key", "==", "null", ")", "{", "String", "recipientKey", "=", "getRecipientKey", "(", ")", ";", "this", ".", "key", "=", "new", "String", "(", "this", ".", "binding", ".", "computeUniqueKey", "(", "recipientKey", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "return", "this", ".", "key", ";", "}", "private", "String", "getRecipientKey", "(", ")", "{", "if", "(", "!", "(", "this", ".", "bindingResolver", "instanceof", "DefaultBindingResolver", ")", ")", "return", "\"\"", ";", "DefaultBindingResolver", "resolver", "=", "(", "DefaultBindingResolver", ")", "this", ".", "bindingResolver", ";", "ASTNode", "node", "=", "(", "ASTNode", ")", "resolver", ".", "bindingsToAstNodes", ".", "get", "(", "this", ")", ";", "if", "(", "node", "==", "null", ")", "{", "return", "\"\"", ";", "}", "ASTNode", "recipient", "=", "node", ".", "getParent", "(", ")", ";", "switch", "(", "recipient", ".", "getNodeType", "(", ")", ")", "{", "case", "ASTNode", ".", "PACKAGE_DECLARATION", ":", "String", "pkgName", "=", "(", "(", "PackageDeclaration", ")", "recipient", ")", ".", "getName", "(", ")", ".", "getFullyQualifiedName", "(", ")", ";", "return", "pkgName", ".", "replace", "(", "'.'", ",", "'/'", ")", ";", "case", "ASTNode", ".", "TYPE_DECLARATION", ":", "return", "(", "(", "TypeDeclaration", ")", "recipient", ")", ".", "resolveBinding", "(", ")", ".", "getKey", "(", ")", ";", "case", "ASTNode", ".", "FIELD_DECLARATION", ":", "VariableDeclarationFragment", "fragment", "=", "(", "VariableDeclarationFragment", ")", "(", "(", "FieldDeclaration", ")", "recipient", ")", ".", "fragments", "(", ")", ".", "get", "(", "0", ")", ";", "return", "fragment", ".", "resolveBinding", "(", ")", ".", "getKey", "(", ")", ";", "case", "ASTNode", ".", "METHOD_DECLARATION", ":", "return", "(", "(", "MethodDeclaration", ")", "recipient", ")", ".", "resolveBinding", "(", ")", ".", "getKey", "(", ")", ";", "case", "ASTNode", ".", "VARIABLE_DECLARATION_STATEMENT", ":", "fragment", "=", "(", "VariableDeclarationFragment", ")", "(", "(", "VariableDeclarationStatement", ")", "recipient", ")", ".", "fragments", "(", ")", ".", "get", "(", "0", ")", ";", "return", "fragment", ".", "resolveBinding", "(", ")", ".", "getKey", "(", ")", ";", "default", ":", "return", "\"\"", ";", "}", "}", "public", "int", "getKind", "(", ")", "{", "return", "IBinding", ".", "ANNOTATION", ";", "}", "public", "int", "getModifiers", "(", ")", "{", "return", "Modifier", ".", "NONE", ";", "}", "public", "String", "getName", "(", ")", "{", "ITypeBinding", "annotationType", "=", "getAnnotationType", "(", ")", ";", "if", "(", "annotationType", "==", "null", ")", "{", "return", "new", "String", "(", "this", ".", "binding", ".", "getAnnotationType", "(", ")", ".", "sourceName", "(", ")", ")", ";", "}", "else", "{", "return", "annotationType", ".", "getName", "(", ")", ";", "}", "}", "public", "boolean", "isDeprecated", "(", ")", "{", "ReferenceBinding", "typeBinding", "=", "this", ".", "binding", ".", "getAnnotationType", "(", ")", ";", "if", "(", "typeBinding", "==", "null", ")", "return", "false", ";", "return", "typeBinding", ".", "isDeprecated", "(", ")", ";", "}", "public", "boolean", "isEqualTo", "(", "IBinding", "otherBinding", ")", "{", "if", "(", "this", "==", "otherBinding", ")", "return", "true", ";", "if", "(", "otherBinding", ".", "getKind", "(", ")", "!=", "IBinding", ".", "ANNOTATION", ")", "return", "false", ";", "IAnnotationBinding", "other", "=", "(", "IAnnotationBinding", ")", "otherBinding", ";", "if", "(", "!", "getAnnotationType", "(", ")", ".", "isEqualTo", "(", "other", ".", "getAnnotationType", "(", ")", ")", ")", "return", "false", ";", "IMemberValuePairBinding", "[", "]", "memberValuePairs", "=", "getDeclaredMemberValuePairs", "(", ")", ";", "IMemberValuePairBinding", "[", "]", "otherMemberValuePairs", "=", "other", ".", "getDeclaredMemberValuePairs", "(", ")", ";", "if", "(", "memberValuePairs", ".", "length", "!=", "otherMemberValuePairs", ".", "length", ")", "return", "false", ";", "for", "(", "int", "i", "=", "0", ",", "length", "=", "memberValuePairs", ".", "length", ";", "i", "<", "length", ";", "i", "++", ")", "{", "if", "(", "!", "memberValuePairs", "[", "i", "]", ".", "isEqualTo", "(", "otherMemberValuePairs", "[", "i", "]", ")", ")", "return", "false", ";", "}", "return", "true", ";", "}", "public", "boolean", "isRecovered", "(", ")", "{", "ReferenceBinding", "annotationType", "=", "this", ".", "binding", ".", "getAnnotationType", "(", ")", ";", "return", "annotationType", "==", "null", "||", "(", "annotationType", ".", "tagBits", "&", "TagBits", ".", "HasMissingType", ")", "!=", "0", ";", "}", "public", "boolean", "isSynthetic", "(", ")", "{", "return", "false", ";", "}", "public", "String", "toString", "(", ")", "{", "ITypeBinding", "type", "=", "getAnnotationType", "(", ")", ";", "final", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "buffer", ".", "append", "(", "'@'", ")", ";", "if", "(", "type", "!=", "null", ")", "buffer", ".", "append", "(", "type", ".", "getName", "(", ")", ")", ";", "buffer", ".", "append", "(", "'('", ")", ";", "IMemberValuePairBinding", "[", "]", "pairs", "=", "getDeclaredMemberValuePairs", "(", ")", ";", "for", "(", "int", "i", "=", "0", ",", "len", "=", "pairs", ".", "length", ";", "i", "<", "len", ";", "i", "++", ")", "{", "if", "(", "i", "!=", "0", ")", "buffer", ".", "append", "(", "\",", "\"", ")", ";", "buffer", ".", "append", "(", "pairs", "[", "i", "]", ".", "toString", "(", ")", ")", ";", "}", "buffer", ".", "append", "(", "')'", ")", ";", "return", "buffer", ".", "toString", "(", ")", ";", "}", "}", "</s>" ]
4,435
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "Hashtable", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "org", ".", "eclipse", ".", "text", ".", "edits", ".", "MultiTextEdit", ";", "import", "org", ".", "eclipse", ".", "text", ".", "edits", ".", "TextEdit", ";", "import", "org", ".", "eclipse", ".", "jface", ".", "text", ".", "IDocument", ";", "import", "org", ".", "eclipse", ".", "jface", ".", "text", ".", "TextUtilities", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaCore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "SimplePropertyDescriptor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "StructuralPropertyDescriptor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "rewrite", ".", "TargetSourceRangeComputer", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "RecoveryScannerData", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "ASTRewriteAnalyzer", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "LineInformation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "ListRewriteEvent", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "NodeInfoStore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "NodeRewriteEvent", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "RewriteEventStore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "RewriteEventStore", ".", "CopySourceInfo", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "dom", ".", "rewrite", ".", "RewriteEventStore", ".", "PropertyLocation", ";", "class", "InternalASTRewrite", "extends", "NodeEventHandler", "{", "private", "CompilationUnit", "root", ";", "protected", "final", "RewriteEventStore", "eventStore", ";", "protected", "final", "NodeInfoStore", "nodeStore", ";", "protected", "final", "Hashtable", "clonedNodes", ";", "int", "cloneDepth", "=", "0", ";", "public", "InternalASTRewrite", "(", "CompilationUnit", "root", ")", "{", "this", ".", "root", "=", "root", ";", "this", ".", "eventStore", "=", "new", "RewriteEventStore", "(", ")", ";", "this", ".", "nodeStore", "=", "new", "NodeInfoStore", "(", "root", ".", "getAST", "(", ")", ")", ";", "this", ".", "clonedNodes", "=", "new", "Hashtable", "(", ")", ";", "}", "public", "TextEdit", "rewriteAST", "(", "IDocument", "document", ",", "Map", "options", ")", "{", "TextEdit", "result", "=", "new", "MultiTextEdit", "(", ")", ";", "final", "CompilationUnit", "rootNode", "=", "getRootNode", "(", ")", ";", "if", "(", "rootNode", "!=", "null", ")", "{", "TargetSourceRangeComputer", "xsrComputer", "=", "new", "TargetSourceRangeComputer", "(", ")", "{", "public", "SourceRange", "computeSourceRange", "(", "ASTNode", "node", ")", "{", "int", "extendedStartPosition", "=", "rootNode", ".", "getExtendedStartPosition", "(", "node", ")", ";", "int", "extendedLength", "=", "rootNode", ".", "getExtendedLength", "(", "node", ")", ";", "return", "new", "SourceRange", "(", "extendedStartPosition", ",", "extendedLength", ")", ";", "}", "}", ";", "char", "[", "]", "content", "=", "document", ".", "get", "(", ")", ".", "toCharArray", "(", ")", ";", "LineInformation", "lineInfo", "=", "LineInformation", ".", "create", "(", "document", ")", ";", "String", "lineDelim", "=", "TextUtilities", ".", "getDefaultLineDelimiter", "(", "document", ")", ";", "List", "comments", "=", "rootNode", ".", "getCommentList", "(", ")", ";", "Map", "currentOptions", "=", "options", "==", "null", "?", "JavaCore", ".", "getOptions", "(", ")", ":", "options", ";", "ASTRewriteAnalyzer", "visitor", "=", "new", "ASTRewriteAnalyzer", "(", "content", ",", "lineInfo", ",", "lineDelim", ",", "result", ",", "this", ".", "eventStore", ",", "this", ".", "nodeStore", ",", "comments", ",", "currentOptions", ",", "xsrComputer", ",", "(", "RecoveryScannerData", ")", "rootNode", ".", "getStatementsRecoveryData", "(", ")", ")", ";", "rootNode", ".", "accept", "(", "visitor", ")", ";", "}", "return", "result", ";", "}", "private", "void", "markAsMoveOrCopyTarget", "(", "ASTNode", "node", ",", "ASTNode", "newChild", ")", "{", "ASTNode", "source", "=", "(", "ASTNode", ")", "this", ".", "clonedNodes", ".", "get", "(", "newChild", ")", ";", "if", "(", "source", "!=", "null", ")", "{", "if", "(", "this", ".", "cloneDepth", "==", "0", ")", "{", "PropertyLocation", "propertyLocation", "=", "this", ".", "eventStore", ".", "getPropertyLocation", "(", "source", ",", "RewriteEventStore", ".", "ORIGINAL", ")", ";", "CopySourceInfo", "sourceInfo", "=", "this", ".", "eventStore", ".", "markAsCopySource", "(", "propertyLocation", ".", "getParent", "(", ")", ",", "propertyLocation", ".", "getProperty", "(", ")", ",", "source", ",", "false", ")", ";", "this", ".", "nodeStore", ".", "markAsCopyTarget", "(", "newChild", ",", "sourceInfo", ")", ";", "}", "}", "else", "if", "(", "(", "newChild", ".", "getFlags", "(", ")", "&", "ASTNode", ".", "ORIGINAL", ")", "!=", "0", ")", "{", "PropertyLocation", "propertyLocation", "=", "this", ".", "eventStore", ".", "getPropertyLocation", "(", "newChild", ",", "RewriteEventStore", ".", "ORIGINAL", ")", ";", "CopySourceInfo", "sourceInfo", "=", "this", ".", "eventStore", ".", "markAsCopySource", "(", "propertyLocation", ".", "getParent", "(", ")", ",", "propertyLocation", ".", "getProperty", "(", ")", ",", "newChild", ",", "true", ")", ";", "this", ".", "nodeStore", ".", "markAsCopyTarget", "(", "newChild", ",", "sourceInfo", ")", ";", "}", "}", "private", "CompilationUnit", "getRootNode", "(", ")", "{", "return", "this", ".", "root", ";", "}", "public", "String", "toString", "(", ")", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", ")", ";", "buf", ".", "append", "(", "\"Events:n\"", ")", ";", "buf", ".", "append", "(", "this", ".", "eventStore", ".", "toString", "(", ")", ")", ";", "return", "buf", ".", "toString", "(", ")", ";", "}", "void", "preValueChangeEvent", "(", "ASTNode", "node", ",", "SimplePropertyDescriptor", "property", ")", "{", "getNodeEvent", "(", "node", ",", "property", ")", ";", "}", "void", "postValueChangeEvent", "(", "ASTNode", "node", ",", "SimplePropertyDescriptor", "property", ")", "{", "NodeRewriteEvent", "event", "=", "getNodeEvent", "(", "node", ",", "property", ")", ";", "event", ".", "setNewValue", "(", "node", ".", "getStructuralProperty", "(", "property", ")", ")", ";", "}", "void", "preAddChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "StructuralPropertyDescriptor", "property", ")", "{", "if", "(", "property", ".", "isChildProperty", "(", ")", ")", "{", "NodeRewriteEvent", "event", "=", "getNodeEvent", "(", "node", ",", "property", ")", ";", "event", ".", "setNewValue", "(", "child", ")", ";", "if", "(", "child", "!=", "null", ")", "{", "markAsMoveOrCopyTarget", "(", "node", ",", "child", ")", ";", "}", "}", "else", "if", "(", "property", ".", "isChildListProperty", "(", ")", ")", "{", "getListEvent", "(", "node", ",", "property", ")", ";", "}", "}", "void", "postAddChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "StructuralPropertyDescriptor", "property", ")", "{", "if", "(", "property", ".", "isChildListProperty", "(", ")", ")", "{", "ListRewriteEvent", "event", "=", "getListEvent", "(", "node", ",", "property", ")", ";", "List", "list", "=", "(", "List", ")", "node", ".", "getStructuralProperty", "(", "property", ")", ";", "int", "i", "=", "list", ".", "indexOf", "(", "child", ")", ";", "int", "s", "=", "list", ".", "size", "(", ")", ";", "int", "index", ";", "if", "(", "i", "+", "1", "<", "s", ")", "{", "ASTNode", "nextNode", "=", "(", "ASTNode", ")", "list", ".", "get", "(", "i", "+", "1", ")", ";", "index", "=", "event", ".", "getIndex", "(", "nextNode", ",", "ListRewriteEvent", ".", "NEW", ")", ";", "}", "else", "{", "index", "=", "-", "1", ";", "}", "event", ".", "insert", "(", "child", ",", "index", ")", ";", "if", "(", "child", "!=", "null", ")", "{", "markAsMoveOrCopyTarget", "(", "node", ",", "child", ")", ";", "}", "}", "}", "void", "preRemoveChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "StructuralPropertyDescriptor", "property", ")", "{", "if", "(", "property", ".", "isChildProperty", "(", ")", ")", "{", "NodeRewriteEvent", "event", "=", "getNodeEvent", "(", "node", ",", "property", ")", ";", "event", ".", "setNewValue", "(", "null", ")", ";", "}", "else", "if", "(", "property", ".", "isChildListProperty", "(", ")", ")", "{", "ListRewriteEvent", "event", "=", "getListEvent", "(", "node", ",", "property", ")", ";", "int", "i", "=", "event", ".", "getIndex", "(", "child", ",", "ListRewriteEvent", ".", "NEW", ")", ";", "NodeRewriteEvent", "nodeEvent", "=", "(", "NodeRewriteEvent", ")", "event", ".", "getChildren", "(", ")", "[", "i", "]", ";", "if", "(", "nodeEvent", ".", "getOriginalValue", "(", ")", "==", "null", ")", "{", "event", ".", "revertChange", "(", "nodeEvent", ")", ";", "}", "else", "{", "nodeEvent", ".", "setNewValue", "(", "null", ")", ";", "}", "}", "}", "void", "preReplaceChildEvent", "(", "ASTNode", "node", ",", "ASTNode", "child", ",", "ASTNode", "newChild", ",", "StructuralPropertyDescriptor", "property", ")", "{", "if", "(", "property", ".", "isChildProperty", "(", ")", ")", "{", "NodeRewriteEvent", "event", "=", "getNodeEvent", "(", "node", ",", "property", ")", ";", "event", ".", "setNewValue", "(", "newChild", ")", ";", "if", "(", "newChild", "!=", "null", ")", "{", "markAsMoveOrCopyTarget", "(", "node", ",", "newChild", ")", ";", "}", "}", "else", "if", "(", "property", ".", "isChildListProperty", "(", ")", ")", "{", "ListRewriteEvent", "event", "=", "getListEvent", "(", "node", ",", "property", ")", ";", "int", "i", "=", "event", ".", "getIndex", "(", "child", ",", "ListRewriteEvent", ".", "NEW", ")", ";", "NodeRewriteEvent", "nodeEvent", "=", "(", "NodeRewriteEvent", ")", "event", ".", "getChildren", "(", ")", "[", "i", "]", ";", "nodeEvent", ".", "setNewValue", "(", "newChild", ")", ";", "if", "(", "newChild", "!=", "null", ")", "{", "markAsMoveOrCopyTarget", "(", "node", ",", "newChild", ")", ";", "}", "}", "}", "void", "preCloneNodeEvent", "(", "ASTNode", "node", ")", "{", "this", ".", "cloneDepth", "++", ";", "}", "void", "postCloneNodeEvent", "(", "ASTNode", "node", ",", "ASTNode", "clone", ")", "{", "if", "(", "node", ".", "ast", "==", "this", ".", "root", ".", "ast", "&&", "clone", ".", "ast", "==", "this", ".", "root", ".", "ast", ")", "{", "if", "(", "(", "node", ".", "getFlags", "(", ")", "&", "ASTNode", ".", "ORIGINAL", ")", "!=", "0", ")", "{", "this", ".", "clonedNodes", ".", "put", "(", "clone", ",", "node", ")", ";", "}", "else", "{", "Object", "original", "=", "this", ".", "clonedNodes", ".", "get", "(", "node", ")", ";", "if", "(", "original", "!=", "null", ")", "{", "this", ".", "clonedNodes", ".", "put", "(", "clone", ",", "original", ")", ";", "}", "}", "}", "this", ".", "cloneDepth", "--", ";", "}", "private", "NodeRewriteEvent", "getNodeEvent", "(", "ASTNode", "node", ",", "StructuralPropertyDescriptor", "property", ")", "{", "return", "this", ".", "eventStore", ".", "getNodeEvent", "(", "node", ",", "property", ",", "true", ")", ";", "}", "private", "ListRewriteEvent", "getListEvent", "(", "ASTNode", "node", ",", "StructuralPropertyDescriptor", "property", ")", "{", "return", "this", ".", "eventStore", ".", "getListEvent", "(", "node", ",", "property", ",", "true", ")", ";", "}", "}", "</s>" ]
4,436
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "IfStatement", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "IfStatement", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "THEN_STATEMENT_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "IfStatement", ".", "class", ",", "\"\"", ",", "Statement", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "ELSE_STATEMENT_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "IfStatement", ".", "class", ",", "\"\"", ",", "Statement", ".", "class", ",", "OPTIONAL", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "IfStatement", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "THEN_STATEMENT_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "ELSE_STATEMENT_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Expression", "expression", "=", "null", ";", "private", "Statement", "thenStatement", "=", "null", ";", "private", "Statement", "optionalElseStatement", "=", "null", ";", "IfStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "THEN_STATEMENT_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getThenStatement", "(", ")", ";", "}", "else", "{", "setThenStatement", "(", "(", "Statement", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "ELSE_STATEMENT_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getElseStatement", "(", ")", ";", "}", "else", "{", "setElseStatement", "(", "(", "Statement", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "IF_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "IfStatement", "result", "=", "new", "IfStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "getExpression", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setThenStatement", "(", "(", "Statement", ")", "getThenStatement", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setElseStatement", "(", "(", "Statement", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getElseStatement", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getThenStatement", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getElseStatement", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "expression", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "expression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "expression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "expression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "public", "Statement", "getThenStatement", "(", ")", "{", "if", "(", "this", ".", "thenStatement", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "thenStatement", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "thenStatement", "=", "new", "Block", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "thenStatement", ",", "THEN_STATEMENT_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "thenStatement", ";", "}", "public", "void", "setThenStatement", "(", "Statement", "statement", ")", "{", "if", "(", "statement", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "thenStatement", ";", "preReplaceChild", "(", "oldChild", ",", "statement", ",", "THEN_STATEMENT_PROPERTY", ")", ";", "this", ".", "thenStatement", "=", "statement", ";", "postReplaceChild", "(", "oldChild", ",", "statement", ",", "THEN_STATEMENT_PROPERTY", ")", ";", "}", "public", "Statement", "getElseStatement", "(", ")", "{", "return", "this", ".", "optionalElseStatement", ";", "}", "public", "void", "setElseStatement", "(", "Statement", "statement", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalElseStatement", ";", "preReplaceChild", "(", "oldChild", ",", "statement", ",", "ELSE_STATEMENT_PROPERTY", ")", ";", "this", ".", "optionalElseStatement", "=", "statement", ";", "postReplaceChild", "(", "oldChild", ",", "statement", ",", "ELSE_STATEMENT_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "3", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "expression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "thenStatement", "==", "null", "?", "0", ":", "getThenStatement", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "optionalElseStatement", "==", "null", "?", "0", ":", "getElseStatement", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,437
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "FieldDeclaration", "extends", "BodyDeclaration", "{", "public", "static", "final", "ChildPropertyDescriptor", "JAVADOC_PROPERTY", "=", "internalJavadocPropertyFactory", "(", "FieldDeclaration", ".", "class", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "MODIFIERS_PROPERTY", "=", "internalModifiersPropertyFactory", "(", "FieldDeclaration", ".", "class", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "MODIFIERS2_PROPERTY", "=", "internalModifiers2PropertyFactory", "(", "FieldDeclaration", ".", "class", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "TYPE_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "FieldDeclaration", ".", "class", ",", "\"type\"", ",", "Type", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "FRAGMENTS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "FieldDeclaration", ".", "class", ",", "\"fragments\"", ",", "VariableDeclarationFragment", ".", "class", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "5", ")", ";", "createPropertyList", "(", "FieldDeclaration", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "JAVADOC_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "MODIFIERS_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "TYPE_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "FRAGMENTS_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "properyList", "=", "new", "ArrayList", "(", "5", ")", ";", "createPropertyList", "(", "FieldDeclaration", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "JAVADOC_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "MODIFIERS2_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "TYPE_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "FRAGMENTS_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "Type", "baseType", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "variableDeclarationFragments", "=", "new", "ASTNode", ".", "NodeList", "(", "FRAGMENTS_PROPERTY", ")", ";", "FieldDeclaration", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "int", "internalGetSetIntProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "int", "value", ")", "{", "if", "(", "property", "==", "MODIFIERS_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getModifiers", "(", ")", ";", "}", "else", "{", "internalSetModifiers", "(", "value", ")", ";", "return", "0", ";", "}", "}", "return", "super", ".", "internalGetSetIntProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "JAVADOC_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getJavadoc", "(", ")", ";", "}", "else", "{", "setJavadoc", "(", "(", "Javadoc", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "TYPE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getType", "(", ")", ";", "}", "else", "{", "setType", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "MODIFIERS2_PROPERTY", ")", "{", "return", "modifiers", "(", ")", ";", "}", "if", "(", "property", "==", "FRAGMENTS_PROPERTY", ")", "{", "return", "fragments", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "ChildPropertyDescriptor", "internalJavadocProperty", "(", ")", "{", "return", "JAVADOC_PROPERTY", ";", "}", "final", "SimplePropertyDescriptor", "internalModifiersProperty", "(", ")", "{", "return", "MODIFIERS_PROPERTY", ";", "}", "final", "ChildListPropertyDescriptor", "internalModifiers2Property", "(", ")", "{", "return", "MODIFIERS2_PROPERTY", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "FIELD_DECLARATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "FieldDeclaration", "result", "=", "new", "FieldDeclaration", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setJavadoc", "(", "(", "Javadoc", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getJavadoc", "(", ")", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "result", ".", "internalSetModifiers", "(", "getModifiers", "(", ")", ")", ";", "}", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "modifiers", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "modifiers", "(", ")", ")", ")", ";", "}", "result", ".", "setType", "(", "(", "Type", ")", "getType", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "fragments", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "fragments", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getJavadoc", "(", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "modifiers", ")", ";", "}", "acceptChild", "(", "visitor", ",", "getType", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "variableDeclarationFragments", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Type", "getType", "(", ")", "{", "if", "(", "this", ".", "baseType", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "baseType", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "baseType", "=", "this", ".", "ast", ".", "newPrimitiveType", "(", "PrimitiveType", ".", "INT", ")", ";", "postLazyInit", "(", "this", ".", "baseType", ",", "TYPE_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "baseType", ";", "}", "public", "void", "setType", "(", "Type", "type", ")", "{", "if", "(", "type", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "baseType", ";", "preReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "this", ".", "baseType", "=", "type", ";", "postReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "}", "public", "List", "fragments", "(", ")", "{", "return", "this", ".", "variableDeclarationFragments", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "2", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalDocComment", "==", "null", "?", "0", ":", "getJavadoc", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "modifiers", "==", "null", "?", "0", ":", "this", ".", "modifiers", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "baseType", "==", "null", "?", "0", ":", "getType", "(", ")", ".", "treeSize", "(", ")", ")", "+", "this", ".", "variableDeclarationFragments", ".", "listSize", "(", ")", ";", "}", "}", "</s>" ]
4,438
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "MethodRefParameter", "extends", "ASTNode", "{", "public", "static", "final", "ChildPropertyDescriptor", "TYPE_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "MethodRefParameter", ".", "class", ",", "\"type\"", ",", "Type", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "VARARGS_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "MethodRefParameter", ".", "class", ",", "\"varargs\"", ",", "boolean", ".", "class", ",", "MANDATORY", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "MethodRefParameter", ".", "class", ",", "\"name\"", ",", "SimpleName", ".", "class", ",", "OPTIONAL", ",", "NO_CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "MethodRefParameter", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "TYPE_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "properyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "MethodRefParameter", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "TYPE_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "VARARGS_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "Type", "type", "=", "null", ";", "private", "boolean", "variableArity", "=", "false", ";", "private", "SimpleName", "optionalParameterName", "=", "null", ";", "MethodRefParameter", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "TYPE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getType", "(", ")", ";", "}", "else", "{", "setType", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "boolean", "internalGetSetBooleanProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "boolean", "value", ")", "{", "if", "(", "property", "==", "VARARGS_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "isVarargs", "(", ")", ";", "}", "else", "{", "setVarargs", "(", "value", ")", ";", "return", "false", ";", "}", "}", "return", "super", ".", "internalGetSetBooleanProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "METHOD_REF_PARAMETER", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "MethodRefParameter", "result", "=", "new", "MethodRefParameter", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setType", "(", "(", "Type", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getType", "(", ")", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "setVarargs", "(", "isVarargs", "(", ")", ")", ";", "}", "result", ".", "setName", "(", "(", "SimpleName", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getName", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getType", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Type", "getType", "(", ")", "{", "if", "(", "this", ".", "type", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "type", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "type", "=", "this", ".", "ast", ".", "newPrimitiveType", "(", "PrimitiveType", ".", "INT", ")", ";", "postLazyInit", "(", "this", ".", "type", ",", "TYPE_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "type", ";", "}", "public", "void", "setType", "(", "Type", "type", ")", "{", "if", "(", "type", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "type", ";", "preReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "this", ".", "type", "=", "type", ";", "postReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "}", "public", "boolean", "isVarargs", "(", ")", "{", "unsupportedIn2", "(", ")", ";", "return", "this", ".", "variableArity", ";", "}", "public", "void", "setVarargs", "(", "boolean", "variableArity", ")", "{", "unsupportedIn2", "(", ")", ";", "preValueChange", "(", "VARARGS_PROPERTY", ")", ";", "this", ".", "variableArity", "=", "variableArity", ";", "postValueChange", "(", "VARARGS_PROPERTY", ")", ";", "}", "public", "SimpleName", "getName", "(", ")", "{", "return", "this", ".", "optionalParameterName", ";", "}", "public", "void", "setName", "(", "SimpleName", "name", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalParameterName", ";", "preReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "this", ".", "optionalParameterName", "=", "name", ";", "postReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "2", "*", "5", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "type", "==", "null", "?", "0", ":", "getType", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "optionalParameterName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,439
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "WhileStatement", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "WhileStatement", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "BODY_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "WhileStatement", ".", "class", ",", "\"body\"", ",", "Statement", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "WhileStatement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "BODY_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Expression", "expression", "=", "null", ";", "private", "Statement", "body", "=", "null", ";", "WhileStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "BODY_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getBody", "(", ")", ";", "}", "else", "{", "setBody", "(", "(", "Statement", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "WHILE_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "WhileStatement", "result", "=", "new", "WhileStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "getExpression", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setBody", "(", "(", "Statement", ")", "getBody", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getBody", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "expression", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "expression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "expression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "expression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "public", "Statement", "getBody", "(", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "body", "=", "new", "Block", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "body", ",", "BODY_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "body", ";", "}", "public", "void", "setBody", "(", "Statement", "statement", ")", "{", "if", "(", "statement", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "body", ";", "preReplaceChild", "(", "oldChild", ",", "statement", ",", "BODY_PROPERTY", ")", ";", "this", ".", "body", "=", "statement", ";", "postReplaceChild", "(", "oldChild", ",", "statement", ",", "BODY_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "2", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "expression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "body", "==", "null", "?", "0", ":", "getBody", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,440
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "public", "abstract", "class", "Annotation", "extends", "Expression", "implements", "IExtendedModifier", "{", "abstract", "ChildPropertyDescriptor", "internalTypeNameProperty", "(", ")", ";", "public", "final", "ChildPropertyDescriptor", "getTypeNameProperty", "(", ")", "{", "return", "internalTypeNameProperty", "(", ")", ";", "}", "static", "final", "ChildPropertyDescriptor", "internalTypeNamePropertyFactory", "(", "Class", "nodeClass", ")", "{", "return", "new", "ChildPropertyDescriptor", "(", "nodeClass", ",", "\"typeName\"", ",", "Name", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "}", "Name", "typeName", "=", "null", ";", "Annotation", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "public", "boolean", "isModifier", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isAnnotation", "(", ")", "{", "return", "true", ";", "}", "public", "Name", "getTypeName", "(", ")", "{", "if", "(", "this", ".", "typeName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "typeName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "typeName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "typeName", ",", "internalTypeNameProperty", "(", ")", ")", ";", "}", "}", "}", "return", "this", ".", "typeName", ";", "}", "public", "void", "setTypeName", "(", "Name", "typeName", ")", "{", "if", "(", "typeName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ChildPropertyDescriptor", "p", "=", "internalTypeNameProperty", "(", ")", ";", "ASTNode", "oldChild", "=", "this", ".", "typeName", ";", "preReplaceChild", "(", "oldChild", ",", "typeName", ",", "p", ")", ";", "this", ".", "typeName", "=", "typeName", ";", "postReplaceChild", "(", "oldChild", ",", "typeName", ",", "p", ")", ";", "}", "public", "boolean", "isNormalAnnotation", "(", ")", "{", "return", "(", "this", "instanceof", "NormalAnnotation", ")", ";", "}", "public", "boolean", "isMarkerAnnotation", "(", ")", "{", "return", "(", "this", "instanceof", "MarkerAnnotation", ")", ";", "}", "public", "boolean", "isSingleMemberAnnotation", "(", ")", "{", "return", "(", "this", "instanceof", "SingleMemberAnnotation", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "1", "*", "4", ";", "}", "public", "IAnnotationBinding", "resolveAnnotationBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveAnnotation", "(", "this", ")", ";", "}", "}", "</s>" ]
4,441
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "public", "interface", "IVariableBinding", "extends", "IBinding", "{", "public", "boolean", "isField", "(", ")", ";", "public", "boolean", "isEnumConstant", "(", ")", ";", "public", "boolean", "isParameter", "(", ")", ";", "public", "String", "getName", "(", ")", ";", "public", "ITypeBinding", "getDeclaringClass", "(", ")", ";", "public", "ITypeBinding", "getType", "(", ")", ";", "public", "int", "getVariableId", "(", ")", ";", "public", "Object", "getConstantValue", "(", ")", ";", "public", "IMethodBinding", "getDeclaringMethod", "(", ")", ";", "public", "IVariableBinding", "getVariableDeclaration", "(", ")", ";", "}", "</s>" ]
4,442
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "InvalidInputException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "Scanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "TerminalTokens", ";", "public", "class", "SimpleName", "extends", "Name", "{", "public", "static", "final", "SimplePropertyDescriptor", "IDENTIFIER_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "SimpleName", ".", "class", ",", "\"identifier\"", ",", "String", ".", "class", ",", "MANDATORY", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "SimpleName", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "IDENTIFIER_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "static", "final", "String", "MISSING_IDENTIFIER", "=", "\"MISSING\"", ";", "private", "String", "identifier", "=", "MISSING_IDENTIFIER", ";", "SimpleName", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "Object", "internalGetSetObjectProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "Object", "value", ")", "{", "if", "(", "property", "==", "IDENTIFIER_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getIdentifier", "(", ")", ";", "}", "else", "{", "setIdentifier", "(", "(", "String", ")", "value", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetObjectProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "SIMPLE_NAME", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "SimpleName", "result", "=", "new", "SimpleName", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setIdentifier", "(", "getIdentifier", "(", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "visitor", ".", "visit", "(", "this", ")", ";", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "String", "getIdentifier", "(", ")", "{", "return", "this", ".", "identifier", ";", "}", "public", "void", "setIdentifier", "(", "String", "identifier", ")", "{", "if", "(", "identifier", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "Scanner", "scanner", "=", "this", ".", "ast", ".", "scanner", ";", "long", "sourceLevel", "=", "scanner", ".", "sourceLevel", ";", "long", "complianceLevel", "=", "scanner", ".", "complianceLevel", ";", "try", "{", "scanner", ".", "sourceLevel", "=", "ClassFileConstants", ".", "JDK1_3", ";", "scanner", ".", "complianceLevel", "=", "ClassFileConstants", ".", "JDK1_5", ";", "char", "[", "]", "source", "=", "identifier", ".", "toCharArray", "(", ")", ";", "scanner", ".", "setSource", "(", "source", ")", ";", "final", "int", "length", "=", "source", ".", "length", ";", "scanner", ".", "resetTo", "(", "0", ",", "length", "-", "1", ")", ";", "try", "{", "int", "tokenType", "=", "scanner", ".", "scanIdentifier", "(", ")", ";", "if", "(", "tokenType", "!=", "TerminalTokens", ".", "TokenNameIdentifier", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "scanner", ".", "currentPosition", "!=", "length", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "finally", "{", "this", ".", "ast", ".", "scanner", ".", "sourceLevel", "=", "sourceLevel", ";", "this", ".", "ast", ".", "scanner", ".", "complianceLevel", "=", "complianceLevel", ";", "}", "preValueChange", "(", "IDENTIFIER_PROPERTY", ")", ";", "this", ".", "identifier", "=", "identifier", ";", "postValueChange", "(", "IDENTIFIER_PROPERTY", ")", ";", "}", "void", "internalSetIdentifier", "(", "String", "ident", ")", "{", "preValueChange", "(", "IDENTIFIER_PROPERTY", ")", ";", "this", ".", "identifier", "=", "ident", ";", "postValueChange", "(", "IDENTIFIER_PROPERTY", ")", ";", "}", "public", "boolean", "isDeclaration", "(", ")", "{", "StructuralPropertyDescriptor", "d", "=", "getLocationInParent", "(", ")", ";", "if", "(", "d", "==", "null", ")", "{", "return", "false", ";", "}", "ASTNode", "parent", "=", "getParent", "(", ")", ";", "if", "(", "parent", "instanceof", "TypeDeclaration", ")", "{", "return", "(", "d", "==", "TypeDeclaration", ".", "NAME_PROPERTY", ")", ";", "}", "if", "(", "parent", "instanceof", "MethodDeclaration", ")", "{", "MethodDeclaration", "p", "=", "(", "MethodDeclaration", ")", "parent", ";", "return", "!", "p", ".", "isConstructor", "(", ")", "&&", "(", "d", "==", "MethodDeclaration", ".", "NAME_PROPERTY", ")", ";", "}", "if", "(", "parent", "instanceof", "SingleVariableDeclaration", ")", "{", "return", "(", "d", "==", "SingleVariableDeclaration", ".", "NAME_PROPERTY", ")", ";", "}", "if", "(", "parent", "instanceof", "VariableDeclarationFragment", ")", "{", "return", "(", "d", "==", "VariableDeclarationFragment", ".", "NAME_PROPERTY", ")", ";", "}", "if", "(", "parent", "instanceof", "EnumDeclaration", ")", "{", "return", "(", "d", "==", "EnumDeclaration", ".", "NAME_PROPERTY", ")", ";", "}", "if", "(", "parent", "instanceof", "EnumConstantDeclaration", ")", "{", "return", "(", "d", "==", "EnumConstantDeclaration", ".", "NAME_PROPERTY", ")", ";", "}", "if", "(", "parent", "instanceof", "TypeParameter", ")", "{", "return", "(", "d", "==", "TypeParameter", ".", "NAME_PROPERTY", ")", ";", "}", "if", "(", "parent", "instanceof", "AnnotationTypeDeclaration", ")", "{", "return", "(", "d", "==", "AnnotationTypeDeclaration", ".", "NAME_PROPERTY", ")", ";", "}", "if", "(", "parent", "instanceof", "AnnotationTypeMemberDeclaration", ")", "{", "return", "(", "d", "==", "AnnotationTypeMemberDeclaration", ".", "NAME_PROPERTY", ")", ";", "}", "return", "false", ";", "}", "void", "appendName", "(", "StringBuffer", "buffer", ")", "{", "buffer", ".", "append", "(", "getIdentifier", "(", ")", ")", ";", "}", "int", "memSize", "(", ")", "{", "int", "size", "=", "BASE_NAME_NODE_SIZE", "+", "2", "*", "4", ";", "if", "(", "this", ".", "identifier", "!=", "MISSING_IDENTIFIER", ")", "{", "size", "+=", "stringSize", "(", "this", ".", "identifier", ")", ";", "}", "return", "size", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", ";", "}", "}", "</s>" ]
4,443
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "Iterator", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Map", ";", "public", "final", "class", "Modifier", "extends", "ASTNode", "implements", "IExtendedModifier", "{", "public", "static", "class", "ModifierKeyword", "{", "public", "static", "final", "ModifierKeyword", "ABSTRACT_KEYWORD", "=", "new", "ModifierKeyword", "(", "\"abstract\"", ",", "ABSTRACT", ")", ";", "public", "static", "final", "ModifierKeyword", "FINAL_KEYWORD", "=", "new", "ModifierKeyword", "(", "\"final\"", ",", "FINAL", ")", ";", "private", "static", "final", "Map", "KEYWORDS", ";", "public", "static", "final", "ModifierKeyword", "NATIVE_KEYWORD", "=", "new", "ModifierKeyword", "(", "\"native\"", ",", "NATIVE", ")", ";", "public", "static", "final", "ModifierKeyword", "PRIVATE_KEYWORD", "=", "new", "ModifierKeyword", "(", "\"private\"", ",", "PRIVATE", ")", ";", "public", "static", "final", "ModifierKeyword", "PROTECTED_KEYWORD", "=", "new", "ModifierKeyword", "(", "\"protected\"", ",", "PROTECTED", ")", ";", "public", "static", "final", "ModifierKeyword", "PUBLIC_KEYWORD", "=", "new", "ModifierKeyword", "(", "\"public\"", ",", "PUBLIC", ")", ";", "public", "static", "final", "ModifierKeyword", "STATIC_KEYWORD", "=", "new", "ModifierKeyword", "(", "\"static\"", ",", "STATIC", ")", ";", "public", "static", "final", "ModifierKeyword", "STRICTFP_KEYWORD", "=", "new", "ModifierKeyword", "(", "\"strictfp\"", ",", "STRICTFP", ")", ";", "public", "static", "final", "ModifierKeyword", "SYNCHRONIZED_KEYWORD", "=", "new", "ModifierKeyword", "(", "\"synchronized\"", ",", "SYNCHRONIZED", ")", ";", "public", "static", "final", "ModifierKeyword", "TRANSIENT_KEYWORD", "=", "new", "ModifierKeyword", "(", "\"transient\"", ",", "TRANSIENT", ")", ";", "public", "static", "final", "ModifierKeyword", "VOLATILE_KEYWORD", "=", "new", "ModifierKeyword", "(", "\"volatile\"", ",", "VOLATILE", ")", ";", "static", "{", "KEYWORDS", "=", "new", "HashMap", "(", "20", ")", ";", "ModifierKeyword", "[", "]", "ops", "=", "{", "PUBLIC_KEYWORD", ",", "PROTECTED_KEYWORD", ",", "PRIVATE_KEYWORD", ",", "STATIC_KEYWORD", ",", "ABSTRACT_KEYWORD", ",", "FINAL_KEYWORD", ",", "NATIVE_KEYWORD", ",", "SYNCHRONIZED_KEYWORD", ",", "TRANSIENT_KEYWORD", ",", "VOLATILE_KEYWORD", ",", "STRICTFP_KEYWORD", "}", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "ops", ".", "length", ";", "i", "++", ")", "{", "KEYWORDS", ".", "put", "(", "ops", "[", "i", "]", ".", "toString", "(", ")", ",", "ops", "[", "i", "]", ")", ";", "}", "}", "public", "static", "ModifierKeyword", "fromFlagValue", "(", "int", "flagValue", ")", "{", "for", "(", "Iterator", "it", "=", "KEYWORDS", ".", "values", "(", ")", ".", "iterator", "(", ")", ";", "it", ".", "hasNext", "(", ")", ";", ")", "{", "ModifierKeyword", "k", "=", "(", "ModifierKeyword", ")", "it", ".", "next", "(", ")", ";", "if", "(", "k", ".", "toFlagValue", "(", ")", "==", "flagValue", ")", "{", "return", "k", ";", "}", "}", "return", "null", ";", "}", "public", "static", "ModifierKeyword", "toKeyword", "(", "String", "keyword", ")", "{", "return", "(", "ModifierKeyword", ")", "KEYWORDS", ".", "get", "(", "keyword", ")", ";", "}", "private", "int", "flagValue", ";", "private", "String", "keyword", ";", "private", "ModifierKeyword", "(", "String", "keyword", ",", "int", "flagValue", ")", "{", "this", ".", "keyword", "=", "keyword", ";", "this", ".", "flagValue", "=", "flagValue", ";", "}", "public", "int", "toFlagValue", "(", ")", "{", "return", "this", ".", "flagValue", ";", "}", "public", "String", "toString", "(", ")", "{", "return", "this", ".", "keyword", ";", "}", "}", "public", "static", "final", "int", "ABSTRACT", "=", "0x0400", ";", "public", "static", "final", "int", "FINAL", "=", "0x0010", ";", "public", "static", "final", "SimplePropertyDescriptor", "KEYWORD_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "Modifier", ".", "class", ",", "\"keyword\"", ",", "Modifier", ".", "ModifierKeyword", ".", "class", ",", "MANDATORY", ")", ";", "public", "static", "final", "int", "NATIVE", "=", "0x0100", ";", "public", "static", "final", "int", "NONE", "=", "0x0000", ";", "public", "static", "final", "int", "PRIVATE", "=", "0x0002", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "public", "static", "final", "int", "PROTECTED", "=", "0x0004", ";", "public", "static", "final", "int", "PUBLIC", "=", "0x0001", ";", "public", "static", "final", "int", "STATIC", "=", "0x0008", ";", "public", "static", "final", "int", "STRICTFP", "=", "0x0800", ";", "public", "static", "final", "int", "SYNCHRONIZED", "=", "0x0020", ";", "public", "static", "final", "int", "TRANSIENT", "=", "0x0080", ";", "public", "static", "final", "int", "VOLATILE", "=", "0x0040", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "Modifier", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "KEYWORD_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "boolean", "isAbstract", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "ABSTRACT", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isFinal", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "FINAL", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isNative", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "NATIVE", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isPrivate", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "PRIVATE", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isProtected", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "PROTECTED", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isPublic", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "PUBLIC", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isStatic", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "STATIC", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isStrictfp", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "STRICTFP", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isSynchronized", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "SYNCHRONIZED", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isTransient", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "TRANSIENT", ")", "!=", "0", ";", "}", "public", "static", "boolean", "isVolatile", "(", "int", "flags", ")", "{", "return", "(", "flags", "&", "VOLATILE", ")", "!=", "0", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "ModifierKeyword", "modifierKeyword", "=", "ModifierKeyword", ".", "PUBLIC_KEYWORD", ";", "Modifier", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "unsupportedIn2", "(", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "visitor", ".", "visit", "(", "this", ")", ";", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "Modifier", "result", "=", "new", "Modifier", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setKeyword", "(", "getKeyword", "(", ")", ")", ";", "return", "result", ";", "}", "public", "ModifierKeyword", "getKeyword", "(", ")", "{", "return", "this", ".", "modifierKeyword", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "MODIFIER", ";", "}", "final", "Object", "internalGetSetObjectProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "Object", "value", ")", "{", "if", "(", "property", "==", "KEYWORD_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getKeyword", "(", ")", ";", "}", "else", "{", "setKeyword", "(", "(", "ModifierKeyword", ")", "value", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetObjectProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "public", "boolean", "isAbstract", "(", ")", "{", "return", "this", ".", "modifierKeyword", "==", "ModifierKeyword", ".", "ABSTRACT_KEYWORD", ";", "}", "public", "boolean", "isAnnotation", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isFinal", "(", ")", "{", "return", "this", ".", "modifierKeyword", "==", "ModifierKeyword", ".", "FINAL_KEYWORD", ";", "}", "public", "boolean", "isModifier", "(", ")", "{", "return", "true", ";", "}", "public", "boolean", "isNative", "(", ")", "{", "return", "this", ".", "modifierKeyword", "==", "ModifierKeyword", ".", "NATIVE_KEYWORD", ";", "}", "public", "boolean", "isPrivate", "(", ")", "{", "return", "this", ".", "modifierKeyword", "==", "ModifierKeyword", ".", "PRIVATE_KEYWORD", ";", "}", "public", "boolean", "isProtected", "(", ")", "{", "return", "this", ".", "modifierKeyword", "==", "ModifierKeyword", ".", "PROTECTED_KEYWORD", ";", "}", "public", "boolean", "isPublic", "(", ")", "{", "return", "this", ".", "modifierKeyword", "==", "ModifierKeyword", ".", "PUBLIC_KEYWORD", ";", "}", "public", "boolean", "isStatic", "(", ")", "{", "return", "this", ".", "modifierKeyword", "==", "ModifierKeyword", ".", "STATIC_KEYWORD", ";", "}", "public", "boolean", "isStrictfp", "(", ")", "{", "return", "this", ".", "modifierKeyword", "==", "ModifierKeyword", ".", "STRICTFP_KEYWORD", ";", "}", "public", "boolean", "isSynchronized", "(", ")", "{", "return", "this", ".", "modifierKeyword", "==", "ModifierKeyword", ".", "SYNCHRONIZED_KEYWORD", ";", "}", "public", "boolean", "isTransient", "(", ")", "{", "return", "this", ".", "modifierKeyword", "==", "ModifierKeyword", ".", "TRANSIENT_KEYWORD", ";", "}", "public", "boolean", "isVolatile", "(", ")", "{", "return", "this", ".", "modifierKeyword", "==", "ModifierKeyword", ".", "VOLATILE_KEYWORD", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "1", "*", "4", ";", "}", "public", "void", "setKeyword", "(", "ModifierKeyword", "modifierKeyord", ")", "{", "if", "(", "modifierKeyord", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "preValueChange", "(", "KEYWORD_PROPERTY", ")", ";", "this", ".", "modifierKeyword", "=", "modifierKeyord", ";", "postValueChange", "(", "KEYWORD_PROPERTY", ")", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", ";", "}", "}", "</s>" ]
4,444
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "Iterator", ";", "import", "java", ".", "util", ".", "List", ";", "public", "abstract", "class", "BodyDeclaration", "extends", "ASTNode", "{", "Javadoc", "optionalDocComment", "=", "null", ";", "private", "int", "modifierFlags", "=", "Modifier", ".", "NONE", ";", "ASTNode", ".", "NodeList", "modifiers", "=", "null", ";", "abstract", "SimplePropertyDescriptor", "internalModifiersProperty", "(", ")", ";", "abstract", "ChildListPropertyDescriptor", "internalModifiers2Property", "(", ")", ";", "public", "final", "ChildListPropertyDescriptor", "getModifiersProperty", "(", ")", "{", "return", "internalModifiers2Property", "(", ")", ";", "}", "abstract", "ChildPropertyDescriptor", "internalJavadocProperty", "(", ")", ";", "public", "final", "ChildPropertyDescriptor", "getJavadocProperty", "(", ")", "{", "return", "internalJavadocProperty", "(", ")", ";", "}", "static", "final", "ChildPropertyDescriptor", "internalJavadocPropertyFactory", "(", "Class", "nodeClass", ")", "{", "return", "new", "ChildPropertyDescriptor", "(", "nodeClass", ",", "\"javadoc\"", ",", "Javadoc", ".", "class", ",", "OPTIONAL", ",", "NO_CYCLE_RISK", ")", ";", "}", "static", "final", "SimplePropertyDescriptor", "internalModifiersPropertyFactory", "(", "Class", "nodeClass", ")", "{", "return", "new", "SimplePropertyDescriptor", "(", "nodeClass", ",", "\"modifiers\"", ",", "int", ".", "class", ",", "MANDATORY", ")", ";", "}", "static", "final", "ChildListPropertyDescriptor", "internalModifiers2PropertyFactory", "(", "Class", "nodeClass", ")", "{", "return", "new", "ChildListPropertyDescriptor", "(", "nodeClass", ",", "\"modifiers\"", ",", "IExtendedModifier", ".", "class", ",", "CYCLE_RISK", ")", ";", "}", "BodyDeclaration", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "if", "(", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "this", ".", "modifiers", "=", "new", "ASTNode", ".", "NodeList", "(", "internalModifiers2Property", "(", ")", ")", ";", "}", "}", "public", "Javadoc", "getJavadoc", "(", ")", "{", "return", "this", ".", "optionalDocComment", ";", "}", "public", "void", "setJavadoc", "(", "Javadoc", "docComment", ")", "{", "ChildPropertyDescriptor", "p", "=", "internalJavadocProperty", "(", ")", ";", "ASTNode", "oldChild", "=", "this", ".", "optionalDocComment", ";", "preReplaceChild", "(", "oldChild", ",", "docComment", ",", "p", ")", ";", "this", ".", "optionalDocComment", "=", "docComment", ";", "postReplaceChild", "(", "oldChild", ",", "docComment", ",", "p", ")", ";", "}", "public", "int", "getModifiers", "(", ")", "{", "if", "(", "this", ".", "modifiers", "==", "null", ")", "{", "return", "this", ".", "modifierFlags", ";", "}", "else", "{", "int", "computedmodifierFlags", "=", "Modifier", ".", "NONE", ";", "for", "(", "Iterator", "it", "=", "modifiers", "(", ")", ".", "iterator", "(", ")", ";", "it", ".", "hasNext", "(", ")", ";", ")", "{", "Object", "x", "=", "it", ".", "next", "(", ")", ";", "if", "(", "x", "instanceof", "Modifier", ")", "{", "computedmodifierFlags", "|=", "(", "(", "Modifier", ")", "x", ")", ".", "getKeyword", "(", ")", ".", "toFlagValue", "(", ")", ";", "}", "}", "return", "computedmodifierFlags", ";", "}", "}", "public", "void", "setModifiers", "(", "int", "modifiers", ")", "{", "internalSetModifiers", "(", "modifiers", ")", ";", "}", "final", "void", "internalSetModifiers", "(", "int", "pmodifiers", ")", "{", "if", "(", "this", ".", "modifiers", "!=", "null", ")", "{", "supportedOnlyIn2", "(", ")", ";", "}", "SimplePropertyDescriptor", "p", "=", "internalModifiersProperty", "(", ")", ";", "preValueChange", "(", "p", ")", ";", "this", ".", "modifierFlags", "=", "pmodifiers", ";", "postValueChange", "(", "p", ")", ";", "}", "public", "List", "modifiers", "(", ")", "{", "if", "(", "this", ".", "modifiers", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "return", "this", ".", "modifiers", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "3", "*", "4", ";", "}", "}", "</s>" ]
4,445
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "PackageDeclaration", "extends", "ASTNode", "{", "public", "static", "final", "ChildPropertyDescriptor", "JAVADOC_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "PackageDeclaration", ".", "class", ",", "\"javadoc\"", ",", "Javadoc", ".", "class", ",", "OPTIONAL", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "ANNOTATIONS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "PackageDeclaration", ".", "class", ",", "\"annotations\"", ",", "Annotation", ".", "class", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "PackageDeclaration", ".", "class", ",", "\"name\"", ",", "Name", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "PackageDeclaration", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "propertyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "PackageDeclaration", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "JAVADOC_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "ANNOTATIONS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "Javadoc", "optionalDocComment", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "annotations", "=", "null", ";", "private", "Name", "packageName", "=", "null", ";", "PackageDeclaration", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "if", "(", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "this", ".", "annotations", "=", "new", "ASTNode", ".", "NodeList", "(", "ANNOTATIONS_PROPERTY", ")", ";", "}", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "JAVADOC_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getJavadoc", "(", ")", ";", "}", "else", "{", "setJavadoc", "(", "(", "Javadoc", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "Name", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "ANNOTATIONS_PROPERTY", ")", "{", "return", "annotations", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "PACKAGE_DECLARATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "PackageDeclaration", "result", "=", "new", "PackageDeclaration", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "setJavadoc", "(", "(", "Javadoc", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getJavadoc", "(", ")", ")", ")", ";", "result", ".", "annotations", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "annotations", "(", ")", ")", ")", ";", "}", "result", ".", "setName", "(", "(", "Name", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "acceptChild", "(", "visitor", ",", "getJavadoc", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "annotations", ")", ";", "}", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "List", "annotations", "(", ")", "{", "if", "(", "this", ".", "annotations", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "return", "this", ".", "annotations", ";", "}", "public", "Javadoc", "getJavadoc", "(", ")", "{", "if", "(", "this", ".", "annotations", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "return", "this", ".", "optionalDocComment", ";", "}", "public", "void", "setJavadoc", "(", "Javadoc", "docComment", ")", "{", "if", "(", "this", ".", "annotations", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "optionalDocComment", ";", "preReplaceChild", "(", "oldChild", ",", "docComment", ",", "JAVADOC_PROPERTY", ")", ";", "this", ".", "optionalDocComment", "=", "docComment", ";", "postReplaceChild", "(", "oldChild", ",", "docComment", ",", "JAVADOC_PROPERTY", ")", ";", "}", "public", "Name", "getName", "(", ")", "{", "if", "(", "this", ".", "packageName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "packageName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "packageName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "packageName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "packageName", ";", "}", "public", "void", "setName", "(", "Name", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "packageName", ";", "preReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "this", ".", "packageName", "=", "name", ";", "postReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "}", "public", "IPackageBinding", "resolveBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolvePackage", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "3", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalDocComment", "==", "null", "?", "0", ":", "getJavadoc", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "annotations", "==", "null", "?", "0", ":", "this", ".", "annotations", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "packageName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,446
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "TryStatement", "extends", "Statement", "{", "public", "static", "final", "ChildListPropertyDescriptor", "RESOURCES_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "TryStatement", ".", "class", ",", "\"resources\"", ",", "VariableDeclarationExpression", ".", "class", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "BODY_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "TryStatement", ".", "class", ",", "\"body\"", ",", "Block", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "CATCH_CLAUSES_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "TryStatement", ".", "class", ",", "\"catchClauses\"", ",", "CatchClause", ".", "class", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "FINALLY_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "TryStatement", ".", "class", ",", "\"finally\"", ",", "Block", ".", "class", ",", "OPTIONAL", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_4_0", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "TryStatement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "BODY_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "CATCH_CLAUSES_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "FINALLY_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "propertyList", "=", "new", "ArrayList", "(", "5", ")", ";", "createPropertyList", "(", "TryStatement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "RESOURCES_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "BODY_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "CATCH_CLAUSES_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "FINALLY_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_4_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "switch", "(", "apiLevel", ")", "{", "case", "AST", ".", "JLS2_INTERNAL", ":", "case", "AST", ".", "JLS3", ":", "return", "PROPERTY_DESCRIPTORS", ";", "default", ":", "return", "PROPERTY_DESCRIPTORS_4_0", ";", "}", "}", "private", "ASTNode", ".", "NodeList", "resources", "=", "null", ";", "private", "Block", "body", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "catchClauses", "=", "new", "ASTNode", ".", "NodeList", "(", "CATCH_CLAUSES_PROPERTY", ")", ";", "private", "Block", "optionalFinallyBody", "=", "null", ";", "TryStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "if", "(", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS4", ")", "{", "this", ".", "resources", "=", "new", "ASTNode", ".", "NodeList", "(", "RESOURCES_PROPERTY", ")", ";", "}", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "BODY_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getBody", "(", ")", ";", "}", "else", "{", "setBody", "(", "(", "Block", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "FINALLY_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getFinally", "(", ")", ";", "}", "else", "{", "setFinally", "(", "(", "Block", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "RESOURCES_PROPERTY", ")", "{", "return", "resources", "(", ")", ";", "}", "if", "(", "property", "==", "CATCH_CLAUSES_PROPERTY", ")", "{", "return", "catchClauses", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "TRY_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "TryStatement", "result", "=", "new", "TryStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS4", ")", "{", "result", ".", "resources", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "resources", "(", ")", ")", ")", ";", "}", "result", ".", "setBody", "(", "(", "Block", ")", "getBody", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "catchClauses", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "catchClauses", "(", ")", ")", ")", ";", "result", ".", "setFinally", "(", "(", "Block", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getFinally", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS4", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "resources", ")", ";", "}", "acceptChild", "(", "visitor", ",", "getBody", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "catchClauses", ")", ";", "acceptChild", "(", "visitor", ",", "getFinally", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Block", "getBody", "(", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "body", "=", "new", "Block", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "body", ",", "BODY_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "body", ";", "}", "public", "void", "setBody", "(", "Block", "body", ")", "{", "if", "(", "body", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "body", ";", "preReplaceChild", "(", "oldChild", ",", "body", ",", "BODY_PROPERTY", ")", ";", "this", ".", "body", "=", "body", ";", "postReplaceChild", "(", "oldChild", ",", "body", ",", "BODY_PROPERTY", ")", ";", "}", "public", "List", "catchClauses", "(", ")", "{", "return", "this", ".", "catchClauses", ";", "}", "public", "Block", "getFinally", "(", ")", "{", "return", "this", ".", "optionalFinallyBody", ";", "}", "public", "void", "setFinally", "(", "Block", "block", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalFinallyBody", ";", "preReplaceChild", "(", "oldChild", ",", "block", ",", "FINALLY_PROPERTY", ")", ";", "this", ".", "optionalFinallyBody", "=", "block", ";", "postReplaceChild", "(", "oldChild", ",", "block", ",", "FINALLY_PROPERTY", ")", ";", "}", "public", "List", "resources", "(", ")", "{", "if", "(", "this", ".", "resources", "!=", "null", ")", "{", "unsupportedIn2_3", "(", ")", ";", "}", "return", "this", ".", "resources", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "4", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "resources", "==", "null", "?", "0", ":", "this", ".", "resources", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "body", "==", "null", "?", "0", ":", "getBody", "(", ")", ".", "treeSize", "(", ")", ")", "+", "this", ".", "catchClauses", ".", "listSize", "(", ")", "+", "(", "this", ".", "optionalFinallyBody", "==", "null", "?", "0", ":", "getFinally", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,447
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "InvalidInputException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "Scanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "TerminalTokens", ";", "public", "class", "Javadoc", "extends", "Comment", "{", "public", "static", "final", "SimplePropertyDescriptor", "COMMENT_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "Javadoc", ".", "class", ",", "\"comment\"", ",", "String", ".", "class", ",", "MANDATORY", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "TAGS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "Javadoc", ".", "class", ",", "\"tags\"", ",", "TagElement", ".", "class", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "Javadoc", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "COMMENT_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "TAGS_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "properyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "Javadoc", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "TAGS_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "static", "final", "String", "MINIMAL_DOC_COMMENT", "=", "\"/**", "*/\"", ";", "private", "String", "comment", "=", "MINIMAL_DOC_COMMENT", ";", "private", "ASTNode", ".", "NodeList", "tags", "=", "new", "ASTNode", ".", "NodeList", "(", "TAGS_PROPERTY", ")", ";", "Javadoc", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "Object", "internalGetSetObjectProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "Object", "value", ")", "{", "if", "(", "property", "==", "COMMENT_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getComment", "(", ")", ";", "}", "else", "{", "setComment", "(", "(", "String", ")", "value", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetObjectProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "TAGS_PROPERTY", ")", "{", "return", "tags", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "JAVADOC", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "Javadoc", "result", "=", "new", "Javadoc", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "result", ".", "setComment", "(", "getComment", "(", ")", ")", ";", "}", "result", ".", "tags", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "tags", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "tags", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "String", "getComment", "(", ")", "{", "supportedOnlyIn2", "(", ")", ";", "return", "this", ".", "comment", ";", "}", "public", "void", "setComment", "(", "String", "docComment", ")", "{", "supportedOnlyIn2", "(", ")", ";", "if", "(", "docComment", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "char", "[", "]", "source", "=", "docComment", ".", "toCharArray", "(", ")", ";", "Scanner", "scanner", "=", "this", ".", "ast", ".", "scanner", ";", "scanner", ".", "resetTo", "(", "0", ",", "source", ".", "length", ")", ";", "scanner", ".", "setSource", "(", "source", ")", ";", "try", "{", "int", "token", ";", "boolean", "onlyOneComment", "=", "false", ";", "while", "(", "(", "token", "=", "scanner", ".", "getNextToken", "(", ")", ")", "!=", "TerminalTokens", ".", "TokenNameEOF", ")", "{", "switch", "(", "token", ")", "{", "case", "TerminalTokens", ".", "TokenNameCOMMENT_JAVADOC", ":", "if", "(", "onlyOneComment", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "onlyOneComment", "=", "true", ";", "break", ";", "default", ":", "onlyOneComment", "=", "false", ";", "}", "}", "if", "(", "!", "onlyOneComment", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "preValueChange", "(", "COMMENT_PROPERTY", ")", ";", "this", ".", "comment", "=", "docComment", ";", "postValueChange", "(", "COMMENT_PROPERTY", ")", ";", "}", "public", "List", "tags", "(", ")", "{", "return", "this", ".", "tags", ";", "}", "int", "memSize", "(", ")", "{", "int", "size", "=", "super", ".", "memSize", "(", ")", "+", "2", "*", "4", ";", "if", "(", "this", ".", "comment", "!=", "MINIMAL_DOC_COMMENT", ")", "{", "size", "+=", "stringSize", "(", "this", ".", "comment", ")", ";", "}", "return", "size", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "this", ".", "tags", ".", "listSize", "(", ")", ";", "}", "}", "</s>" ]
4,448
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "LabeledStatement", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "LABEL_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "LabeledStatement", ".", "class", ",", "\"label\"", ",", "SimpleName", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "BODY_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "LabeledStatement", ".", "class", ",", "\"body\"", ",", "Statement", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "LabeledStatement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "LABEL_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "BODY_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "SimpleName", "labelName", "=", "null", ";", "private", "Statement", "body", "=", "null", ";", "LabeledStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "LABEL_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getLabel", "(", ")", ";", "}", "else", "{", "setLabel", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "BODY_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getBody", "(", ")", ";", "}", "else", "{", "setBody", "(", "(", "Statement", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "LABELED_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "LabeledStatement", "result", "=", "new", "LabeledStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setLabel", "(", "(", "SimpleName", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getLabel", "(", ")", ")", ")", ";", "result", ".", "setBody", "(", "(", "Statement", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getBody", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getLabel", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getBody", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "SimpleName", "getLabel", "(", ")", "{", "if", "(", "this", ".", "labelName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "labelName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "labelName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "labelName", ",", "LABEL_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "labelName", ";", "}", "public", "void", "setLabel", "(", "SimpleName", "label", ")", "{", "if", "(", "label", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "labelName", ";", "preReplaceChild", "(", "oldChild", ",", "label", ",", "LABEL_PROPERTY", ")", ";", "this", ".", "labelName", "=", "label", ";", "postReplaceChild", "(", "oldChild", ",", "label", ",", "LABEL_PROPERTY", ")", ";", "}", "public", "Statement", "getBody", "(", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "body", "=", "new", "EmptyStatement", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "body", ",", "BODY_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "body", ";", "}", "public", "void", "setBody", "(", "Statement", "statement", ")", "{", "if", "(", "statement", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "body", ";", "preReplaceChild", "(", "oldChild", ",", "statement", ",", "BODY_PROPERTY", ")", ";", "this", ".", "body", "=", "statement", ";", "postReplaceChild", "(", "oldChild", ",", "statement", ",", "BODY_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "2", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "labelName", "==", "null", "?", "0", ":", "getLabel", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "body", "==", "null", "?", "0", ":", "getBody", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,449
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "List", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaElement", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ArrayBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Binding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "CompilationUnitScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "SuffixConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "Util", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "PackageFragment", ";", "class", "RecoveredTypeBinding", "implements", "ITypeBinding", "{", "private", "VariableDeclaration", "variableDeclaration", ";", "private", "Type", "currentType", ";", "private", "BindingResolver", "resolver", ";", "private", "int", "dimensions", ";", "private", "RecoveredTypeBinding", "innerTypeBinding", ";", "private", "ITypeBinding", "[", "]", "typeArguments", ";", "private", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "binding", ";", "RecoveredTypeBinding", "(", "BindingResolver", "resolver", ",", "VariableDeclaration", "variableDeclaration", ")", "{", "this", ".", "variableDeclaration", "=", "variableDeclaration", ";", "this", ".", "resolver", "=", "resolver", ";", "this", ".", "currentType", "=", "getType", "(", ")", ";", "this", ".", "dimensions", "=", "variableDeclaration", ".", "getExtraDimensions", "(", ")", ";", "if", "(", "this", ".", "currentType", ".", "isArrayType", "(", ")", ")", "{", "this", ".", "dimensions", "+=", "(", "(", "ArrayType", ")", "this", ".", "currentType", ")", ".", "getDimensions", "(", ")", ";", "}", "}", "RecoveredTypeBinding", "(", "BindingResolver", "resolver", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "typeBinding", ")", "{", "this", ".", "resolver", "=", "resolver", ";", "this", ".", "dimensions", "=", "typeBinding", ".", "dimensions", "(", ")", ";", "this", ".", "binding", "=", "typeBinding", ";", "}", "RecoveredTypeBinding", "(", "BindingResolver", "resolver", ",", "Type", "type", ")", "{", "this", ".", "currentType", "=", "type", ";", "this", ".", "resolver", "=", "resolver", ";", "this", ".", "dimensions", "=", "0", ";", "if", "(", "type", ".", "isArrayType", "(", ")", ")", "{", "this", ".", "dimensions", "+=", "(", "(", "ArrayType", ")", "type", ")", ".", "getDimensions", "(", ")", ";", "}", "}", "RecoveredTypeBinding", "(", "BindingResolver", "resolver", ",", "RecoveredTypeBinding", "typeBinding", ",", "int", "dimensions", ")", "{", "this", ".", "innerTypeBinding", "=", "typeBinding", ";", "this", ".", "dimensions", "=", "typeBinding", ".", "getDimensions", "(", ")", "+", "dimensions", ";", "this", ".", "resolver", "=", "resolver", ";", "}", "public", "ITypeBinding", "createArrayType", "(", "int", "dims", ")", "{", "return", "this", ".", "resolver", ".", "getTypeBinding", "(", "this", ",", "dims", ")", ";", "}", "public", "String", "getBinaryName", "(", ")", "{", "return", "null", ";", "}", "public", "ITypeBinding", "getBound", "(", ")", "{", "return", "null", ";", "}", "public", "ITypeBinding", "getGenericTypeOfWildcardType", "(", ")", "{", "return", "null", ";", "}", "public", "int", "getRank", "(", ")", "{", "return", "-", "1", ";", "}", "public", "ITypeBinding", "getComponentType", "(", ")", "{", "if", "(", "this", ".", "dimensions", "==", "0", ")", "return", "null", ";", "return", "this", ".", "resolver", ".", "getTypeBinding", "(", "this", ",", "-", "1", ")", ";", "}", "public", "IVariableBinding", "[", "]", "getDeclaredFields", "(", ")", "{", "return", "TypeBinding", ".", "NO_VARIABLE_BINDINGS", ";", "}", "public", "IMethodBinding", "[", "]", "getDeclaredMethods", "(", ")", "{", "return", "TypeBinding", ".", "NO_METHOD_BINDINGS", ";", "}", "public", "int", "getDeclaredModifiers", "(", ")", "{", "return", "0", ";", "}", "public", "ITypeBinding", "[", "]", "getDeclaredTypes", "(", ")", "{", "return", "TypeBinding", ".", "NO_TYPE_BINDINGS", ";", "}", "public", "ITypeBinding", "getDeclaringClass", "(", ")", "{", "return", "null", ";", "}", "public", "IMethodBinding", "getDeclaringMethod", "(", ")", "{", "return", "null", ";", "}", "public", "int", "getDimensions", "(", ")", "{", "return", "this", ".", "dimensions", ";", "}", "public", "ITypeBinding", "getElementType", "(", ")", "{", "if", "(", "this", ".", "binding", "!=", "null", ")", "{", "if", "(", "this", ".", "binding", ".", "isArrayType", "(", ")", ")", "{", "ArrayBinding", "arrayBinding", "=", "(", "ArrayBinding", ")", "this", ".", "binding", ";", "return", "new", "RecoveredTypeBinding", "(", "this", ".", "resolver", ",", "arrayBinding", ".", "leafComponentType", ")", ";", "}", "else", "{", "return", "new", "RecoveredTypeBinding", "(", "this", ".", "resolver", ",", "this", ".", "binding", ")", ";", "}", "}", "if", "(", "this", ".", "innerTypeBinding", "!=", "null", ")", "{", "return", "this", ".", "innerTypeBinding", ".", "getElementType", "(", ")", ";", "}", "if", "(", "this", ".", "currentType", "!=", "null", "&&", "this", ".", "currentType", ".", "isArrayType", "(", ")", ")", "{", "return", "this", ".", "resolver", ".", "getTypeBinding", "(", "(", "(", "ArrayType", ")", "this", ".", "currentType", ")", ".", "getElementType", "(", ")", ")", ";", "}", "if", "(", "this", ".", "variableDeclaration", "!=", "null", "&&", "this", ".", "variableDeclaration", ".", "getExtraDimensions", "(", ")", "!=", "0", ")", "{", "return", "this", ".", "resolver", ".", "getTypeBinding", "(", "getType", "(", ")", ")", ";", "}", "return", "null", ";", "}", "public", "ITypeBinding", "getErasure", "(", ")", "{", "return", "this", ";", "}", "public", "ITypeBinding", "[", "]", "getInterfaces", "(", ")", "{", "return", "TypeBinding", ".", "NO_TYPE_BINDINGS", ";", "}", "public", "int", "getModifiers", "(", ")", "{", "return", "Modifier", ".", "NONE", ";", "}", "public", "String", "getName", "(", ")", "{", "char", "[", "]", "brackets", "=", "new", "char", "[", "this", ".", "dimensions", "*", "2", "]", ";", "for", "(", "int", "i", "=", "this", ".", "dimensions", "*", "2", "-", "1", ";", "i", ">=", "0", ";", "i", "-=", "2", ")", "{", "brackets", "[", "i", "]", "=", "']'", ";", "brackets", "[", "i", "-", "1", "]", "=", "'['", ";", "}", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", "getInternalName", "(", ")", ")", ";", "buffer", ".", "append", "(", "brackets", ")", ";", "return", "String", ".", "valueOf", "(", "buffer", ")", ";", "}", "private", "String", "getInternalName", "(", ")", "{", "if", "(", "this", ".", "innerTypeBinding", "!=", "null", ")", "{", "return", "this", ".", "innerTypeBinding", ".", "getInternalName", "(", ")", ";", "}", "ReferenceBinding", "referenceBinding", "=", "getReferenceBinding", "(", ")", ";", "if", "(", "referenceBinding", "!=", "null", ")", "{", "return", "new", "String", "(", "referenceBinding", ".", "compoundName", "[", "referenceBinding", ".", "compoundName", ".", "length", "-", "1", "]", ")", ";", "}", "return", "getTypeNameFrom", "(", "getType", "(", ")", ")", ";", "}", "public", "IPackageBinding", "getPackage", "(", ")", "{", "if", "(", "this", ".", "binding", "!=", "null", ")", "{", "switch", "(", "this", ".", "binding", ".", "kind", "(", ")", ")", "{", "case", "Binding", ".", "BASE_TYPE", ":", "case", "Binding", ".", "ARRAY_TYPE", ":", "case", "Binding", ".", "TYPE_PARAMETER", ":", "case", "Binding", ".", "WILDCARD_TYPE", ":", "case", "Binding", ".", "INTERSECTION_TYPE", ":", "return", "null", ";", "}", "IPackageBinding", "packageBinding", "=", "this", ".", "resolver", ".", "getPackageBinding", "(", "this", ".", "binding", ".", "getPackage", "(", ")", ")", ";", "if", "(", "packageBinding", "!=", "null", ")", "return", "packageBinding", ";", "}", "if", "(", "this", ".", "innerTypeBinding", "!=", "null", "&&", "this", ".", "dimensions", ">", "0", ")", "{", "return", "null", ";", "}", "CompilationUnitScope", "scope", "=", "this", ".", "resolver", ".", "scope", "(", ")", ";", "if", "(", "scope", "!=", "null", ")", "{", "return", "this", ".", "resolver", ".", "getPackageBinding", "(", "scope", ".", "getCurrentPackage", "(", ")", ")", ";", "}", "return", "null", ";", "}", "public", "String", "getQualifiedName", "(", ")", "{", "ReferenceBinding", "referenceBinding", "=", "getReferenceBinding", "(", ")", ";", "if", "(", "referenceBinding", "!=", "null", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "char", "[", "]", "brackets", "=", "new", "char", "[", "this", ".", "dimensions", "*", "2", "]", ";", "for", "(", "int", "i", "=", "this", ".", "dimensions", "*", "2", "-", "1", ";", "i", ">=", "0", ";", "i", "-=", "2", ")", "{", "brackets", "[", "i", "]", "=", "']'", ";", "brackets", "[", "i", "-", "1", "]", "=", "'['", ";", "}", "buffer", ".", "append", "(", "CharOperation", ".", "toString", "(", "referenceBinding", ".", "compoundName", ")", ")", ";", "buffer", ".", "append", "(", "brackets", ")", ";", "return", "String", ".", "valueOf", "(", "buffer", ")", ";", "}", "else", "{", "return", "getName", "(", ")", ";", "}", "}", "private", "ReferenceBinding", "getReferenceBinding", "(", ")", "{", "if", "(", "this", ".", "binding", "!=", "null", ")", "{", "if", "(", "this", ".", "binding", ".", "isArrayType", "(", ")", ")", "{", "ArrayBinding", "arrayBinding", "=", "(", "ArrayBinding", ")", "this", ".", "binding", ";", "if", "(", "arrayBinding", ".", "leafComponentType", "instanceof", "ReferenceBinding", ")", "{", "return", "(", "ReferenceBinding", ")", "arrayBinding", ".", "leafComponentType", ";", "}", "}", "else", "if", "(", "this", ".", "binding", "instanceof", "ReferenceBinding", ")", "{", "return", "(", "ReferenceBinding", ")", "this", ".", "binding", ";", "}", "}", "else", "if", "(", "this", ".", "innerTypeBinding", "!=", "null", ")", "{", "return", "this", ".", "innerTypeBinding", ".", "getReferenceBinding", "(", ")", ";", "}", "return", "null", ";", "}", "public", "ITypeBinding", "getSuperclass", "(", ")", "{", "if", "(", "getQualifiedName", "(", ")", ".", "equals", "(", "\"\"", ")", ")", "{", "return", "null", ";", "}", "return", "this", ".", "resolver", ".", "resolveWellKnownType", "(", "\"\"", ")", ";", "}", "public", "ITypeBinding", "[", "]", "getTypeArguments", "(", ")", "{", "if", "(", "this", ".", "binding", "!=", "null", ")", "{", "return", "this", ".", "typeArguments", "=", "TypeBinding", ".", "NO_TYPE_BINDINGS", ";", "}", "if", "(", "this", ".", "typeArguments", "!=", "null", ")", "{", "return", "this", ".", "typeArguments", ";", "}", "if", "(", "this", ".", "innerTypeBinding", "!=", "null", ")", "{", "return", "this", ".", "innerTypeBinding", ".", "getTypeArguments", "(", ")", ";", "}", "if", "(", "this", ".", "currentType", ".", "isParameterizedType", "(", ")", ")", "{", "ParameterizedType", "parameterizedType", "=", "(", "ParameterizedType", ")", "this", ".", "currentType", ";", "List", "typeArgumentsList", "=", "parameterizedType", ".", "typeArguments", "(", ")", ";", "int", "size", "=", "typeArgumentsList", ".", "size", "(", ")", ";", "ITypeBinding", "[", "]", "temp", "=", "new", "ITypeBinding", "[", "size", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "++", ")", "{", "ITypeBinding", "currentTypeBinding", "=", "(", "(", "Type", ")", "typeArgumentsList", ".", "get", "(", "i", ")", ")", ".", "resolveBinding", "(", ")", ";", "if", "(", "currentTypeBinding", "==", "null", ")", "{", "return", "this", ".", "typeArguments", "=", "TypeBinding", ".", "NO_TYPE_BINDINGS", ";", "}", "temp", "[", "i", "]", "=", "currentTypeBinding", ";", "}", "return", "this", ".", "typeArguments", "=", "temp", ";", "}", "return", "this", ".", "typeArguments", "=", "TypeBinding", ".", "NO_TYPE_BINDINGS", ";", "}", "public", "ITypeBinding", "[", "]", "getTypeBounds", "(", ")", "{", "return", "TypeBinding", ".", "NO_TYPE_BINDINGS", ";", "}", "public", "ITypeBinding", "getTypeDeclaration", "(", ")", "{", "return", "this", ";", "}", "public", "ITypeBinding", "[", "]", "getTypeParameters", "(", ")", "{", "return", "TypeBinding", ".", "NO_TYPE_BINDINGS", ";", "}", "public", "ITypeBinding", "getWildcard", "(", ")", "{", "return", "null", ";", "}", "public", "boolean", "isAnnotation", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isAnonymous", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isArray", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isAssignmentCompatible", "(", "ITypeBinding", "typeBinding", ")", "{", "if", "(", "\"\"", ".", "equals", "(", "typeBinding", ".", "getQualifiedName", "(", ")", ")", ")", "{", "return", "true", ";", "}", "return", "isEqualTo", "(", "typeBinding", ")", ";", "}", "public", "boolean", "isCapture", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isCastCompatible", "(", "ITypeBinding", "typeBinding", ")", "{", "if", "(", "\"\"", ".", "equals", "(", "typeBinding", ".", "getQualifiedName", "(", ")", ")", ")", "{", "return", "true", ";", "}", "return", "isEqualTo", "(", "typeBinding", ")", ";", "}", "public", "boolean", "isClass", "(", ")", "{", "return", "true", ";", "}", "public", "boolean", "isEnum", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isFromSource", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isGenericType", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isInterface", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isLocal", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isMember", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isNested", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isNullType", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isParameterizedType", "(", ")", "{", "if", "(", "this", ".", "innerTypeBinding", "!=", "null", ")", "{", "return", "this", ".", "innerTypeBinding", ".", "isParameterizedType", "(", ")", ";", "}", "if", "(", "this", ".", "currentType", "!=", "null", ")", "{", "return", "this", ".", "currentType", ".", "isParameterizedType", "(", ")", ";", "}", "return", "false", ";", "}", "public", "boolean", "isPrimitive", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isRawType", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isSubTypeCompatible", "(", "ITypeBinding", "typeBinding", ")", "{", "if", "(", "\"\"", ".", "equals", "(", "typeBinding", ".", "getQualifiedName", "(", ")", ")", ")", "{", "return", "true", ";", "}", "return", "isEqualTo", "(", "typeBinding", ")", ";", "}", "public", "boolean", "isTopLevel", "(", ")", "{", "return", "true", ";", "}", "public", "boolean", "isTypeVariable", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isUpperbound", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isWildcardType", "(", ")", "{", "return", "false", ";", "}", "public", "IAnnotationBinding", "[", "]", "getAnnotations", "(", ")", "{", "return", "AnnotationBinding", ".", "NoAnnotations", ";", "}", "public", "IJavaElement", "getJavaElement", "(", ")", "{", "IPackageBinding", "packageBinding", "=", "getPackage", "(", ")", ";", "if", "(", "packageBinding", "!=", "null", ")", "{", "final", "IJavaElement", "javaElement", "=", "packageBinding", ".", "getJavaElement", "(", ")", ";", "if", "(", "javaElement", "!=", "null", "&&", "javaElement", ".", "getElementType", "(", ")", "==", "IJavaElement", ".", "PACKAGE_FRAGMENT", ")", "{", "return", "(", "(", "PackageFragment", ")", "javaElement", ")", ".", "getCompilationUnit", "(", "getInternalName", "(", ")", "+", "SuffixConstants", ".", "SUFFIX_STRING_java", ")", ".", "getType", "(", "this", ".", "getName", "(", ")", ")", ";", "}", "}", "return", "null", ";", "}", "public", "String", "getKey", "(", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "buffer", ".", "append", "(", "\"Recovered#\"", ")", ";", "if", "(", "this", ".", "innerTypeBinding", "!=", "null", ")", "{", "buffer", ".", "append", "(", "\"\"", ")", ".", "append", "(", "this", ".", "innerTypeBinding", ".", "getKey", "(", ")", ")", ";", "}", "else", "if", "(", "this", ".", "currentType", "!=", "null", ")", "{", "buffer", ".", "append", "(", "\"currentType\"", ")", ".", "append", "(", "this", ".", "currentType", ".", "toString", "(", ")", ")", ";", "}", "else", "if", "(", "this", ".", "binding", "!=", "null", ")", "{", "buffer", ".", "append", "(", "\"typeBinding\"", ")", ".", "append", "(", "this", ".", "binding", ".", "computeUniqueKey", "(", ")", ")", ";", "}", "else", "if", "(", "this", ".", "variableDeclaration", "!=", "null", ")", "{", "buffer", ".", "append", "(", "\"\"", ")", ".", "append", "(", "this", ".", "variableDeclaration", ".", "getClass", "(", ")", ")", ".", "append", "(", "this", ".", "variableDeclaration", ".", "getName", "(", ")", ".", "getIdentifier", "(", ")", ")", ".", "append", "(", "this", ".", "variableDeclaration", ".", "getExtraDimensions", "(", ")", ")", ";", "}", "buffer", ".", "append", "(", "getDimensions", "(", ")", ")", ";", "if", "(", "this", ".", "typeArguments", "!=", "null", ")", "{", "buffer", ".", "append", "(", "'<'", ")", ";", "for", "(", "int", "i", "=", "0", ",", "max", "=", "this", ".", "typeArguments", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "if", "(", "i", "!=", "0", ")", "{", "buffer", ".", "append", "(", "','", ")", ";", "}", "buffer", ".", "append", "(", "this", ".", "typeArguments", "[", "i", "]", ".", "getKey", "(", ")", ")", ";", "}", "buffer", ".", "append", "(", "'>'", ")", ";", "}", "return", "String", ".", "valueOf", "(", "buffer", ")", ";", "}", "public", "int", "getKind", "(", ")", "{", "return", "IBinding", ".", "TYPE", ";", "}", "public", "boolean", "isDeprecated", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isEqualTo", "(", "IBinding", "other", ")", "{", "if", "(", "!", "other", ".", "isRecovered", "(", ")", "||", "other", ".", "getKind", "(", ")", "!=", "IBinding", ".", "TYPE", ")", "return", "false", ";", "return", "getKey", "(", ")", ".", "equals", "(", "other", ".", "getKey", "(", ")", ")", ";", "}", "public", "boolean", "isRecovered", "(", ")", "{", "return", "true", ";", "}", "public", "boolean", "isSynthetic", "(", ")", "{", "return", "false", ";", "}", "private", "String", "getTypeNameFrom", "(", "Type", "type", ")", "{", "if", "(", "type", "==", "null", ")", "return", "Util", ".", "EMPTY_STRING", ";", "switch", "(", "type", ".", "getNodeType0", "(", ")", ")", "{", "case", "ASTNode", ".", "ARRAY_TYPE", ":", "ArrayType", "arrayType", "=", "(", "ArrayType", ")", "type", ";", "type", "=", "arrayType", ".", "getElementType", "(", ")", ";", "return", "getTypeNameFrom", "(", "type", ")", ";", "case", "ASTNode", ".", "PARAMETERIZED_TYPE", ":", "ParameterizedType", "parameterizedType", "=", "(", "ParameterizedType", ")", "type", ";", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", "getTypeNameFrom", "(", "parameterizedType", ".", "getType", "(", ")", ")", ")", ";", "ITypeBinding", "[", "]", "tArguments", "=", "getTypeArguments", "(", ")", ";", "final", "int", "typeArgumentsLength", "=", "tArguments", ".", "length", ";", "if", "(", "typeArgumentsLength", "!=", "0", ")", "{", "buffer", ".", "append", "(", "'<'", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "typeArgumentsLength", ";", "i", "++", ")", "{", "if", "(", "i", ">", "0", ")", "{", "buffer", ".", "append", "(", "','", ")", ";", "}", "buffer", ".", "append", "(", "tArguments", "[", "i", "]", ".", "getName", "(", ")", ")", ";", "}", "buffer", ".", "append", "(", "'>'", ")", ";", "}", "return", "String", ".", "valueOf", "(", "buffer", ")", ";", "case", "ASTNode", ".", "PRIMITIVE_TYPE", ":", "PrimitiveType", "primitiveType", "=", "(", "PrimitiveType", ")", "type", ";", "return", "primitiveType", ".", "getPrimitiveTypeCode", "(", ")", ".", "toString", "(", ")", ";", "case", "ASTNode", ".", "QUALIFIED_TYPE", ":", "QualifiedType", "qualifiedType", "=", "(", "QualifiedType", ")", "type", ";", "return", "qualifiedType", ".", "getName", "(", ")", ".", "getIdentifier", "(", ")", ";", "case", "ASTNode", ".", "SIMPLE_TYPE", ":", "SimpleType", "simpleType", "=", "(", "SimpleType", ")", "type", ";", "Name", "name", "=", "simpleType", ".", "getName", "(", ")", ";", "if", "(", "name", ".", "isQualifiedName", "(", ")", ")", "{", "QualifiedName", "qualifiedName", "=", "(", "QualifiedName", ")", "name", ";", "return", "qualifiedName", ".", "getName", "(", ")", ".", "getIdentifier", "(", ")", ";", "}", "return", "(", "(", "SimpleName", ")", "name", ")", ".", "getIdentifier", "(", ")", ";", "}", "return", "Util", ".", "EMPTY_STRING", ";", "}", "private", "Type", "getType", "(", ")", "{", "if", "(", "this", ".", "currentType", "!=", "null", ")", "{", "return", "this", ".", "currentType", ";", "}", "if", "(", "this", ".", "variableDeclaration", "==", "null", ")", "return", "null", ";", "switch", "(", "this", ".", "variableDeclaration", ".", "getNodeType", "(", ")", ")", "{", "case", "ASTNode", ".", "SINGLE_VARIABLE_DECLARATION", ":", "SingleVariableDeclaration", "singleVariableDeclaration", "=", "(", "SingleVariableDeclaration", ")", "this", ".", "variableDeclaration", ";", "return", "singleVariableDeclaration", ".", "getType", "(", ")", ";", "default", ":", "ASTNode", "parent", "=", "this", ".", "variableDeclaration", ".", "getParent", "(", ")", ";", "switch", "(", "parent", ".", "getNodeType", "(", ")", ")", "{", "case", "ASTNode", ".", "VARIABLE_DECLARATION_EXPRESSION", ":", "VariableDeclarationExpression", "variableDeclarationExpression", "=", "(", "VariableDeclarationExpression", ")", "parent", ";", "return", "variableDeclarationExpression", ".", "getType", "(", ")", ";", "case", "ASTNode", ".", "VARIABLE_DECLARATION_STATEMENT", ":", "VariableDeclarationStatement", "statement", "=", "(", "VariableDeclarationStatement", ")", "parent", ";", "return", "statement", ".", "getType", "(", ")", ";", "case", "ASTNode", ".", "FIELD_DECLARATION", ":", "FieldDeclaration", "fieldDeclaration", "=", "(", "FieldDeclaration", ")", "parent", ";", "return", "fieldDeclaration", ".", "getType", "(", ")", ";", "}", "}", "return", "null", ";", "}", "}", "</s>" ]
4,450
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "public", "class", "Message", "{", "private", "String", "message", ";", "private", "int", "startPosition", ";", "private", "int", "length", ";", "public", "Message", "(", "String", "message", ",", "int", "startPosition", ")", "{", "if", "(", "message", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "startPosition", "<", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "this", ".", "message", "=", "message", ";", "this", ".", "startPosition", "=", "startPosition", ";", "this", ".", "length", "=", "0", ";", "}", "public", "Message", "(", "String", "message", ",", "int", "startPosition", ",", "int", "length", ")", "{", "if", "(", "message", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "if", "(", "startPosition", "<", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "this", ".", "message", "=", "message", ";", "this", ".", "startPosition", "=", "startPosition", ";", "if", "(", "length", "<=", "0", ")", "{", "this", ".", "length", "=", "0", ";", "}", "else", "{", "this", ".", "length", "=", "length", ";", "}", "}", "public", "String", "getMessage", "(", ")", "{", "return", "this", ".", "message", ";", "}", "public", "int", "getSourcePosition", "(", ")", "{", "return", "getStartPosition", "(", ")", ";", "}", "public", "int", "getStartPosition", "(", ")", "{", "return", "this", ".", "startPosition", ";", "}", "public", "int", "getLength", "(", ")", "{", "return", "this", ".", "length", ";", "}", "}", "</s>" ]
4,451
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "VariableDeclarationFragment", "extends", "VariableDeclaration", "{", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "VariableDeclarationFragment", ".", "class", ",", "\"name\"", ",", "SimpleName", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "EXTRA_DIMENSIONS_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "VariableDeclarationFragment", ".", "class", ",", "\"\"", ",", "int", ".", "class", ",", "MANDATORY", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "INITIALIZER_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "VariableDeclarationFragment", ".", "class", ",", "\"initializer\"", ",", "Expression", ".", "class", ",", "OPTIONAL", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "VariableDeclarationFragment", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "EXTRA_DIMENSIONS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "INITIALIZER_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "SimpleName", "variableName", "=", "null", ";", "private", "int", "extraArrayDimensions", "=", "0", ";", "private", "Expression", "optionalInitializer", "=", "null", ";", "VariableDeclarationFragment", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "SimplePropertyDescriptor", "internalExtraDimensionsProperty", "(", ")", "{", "return", "EXTRA_DIMENSIONS_PROPERTY", ";", "}", "final", "ChildPropertyDescriptor", "internalInitializerProperty", "(", ")", "{", "return", "INITIALIZER_PROPERTY", ";", "}", "final", "ChildPropertyDescriptor", "internalNameProperty", "(", ")", "{", "return", "NAME_PROPERTY", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "int", "internalGetSetIntProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "int", "value", ")", "{", "if", "(", "property", "==", "EXTRA_DIMENSIONS_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExtraDimensions", "(", ")", ";", "}", "else", "{", "setExtraDimensions", "(", "value", ")", ";", "return", "0", ";", "}", "}", "return", "super", ".", "internalGetSetIntProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "INITIALIZER_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getInitializer", "(", ")", ";", "}", "else", "{", "setInitializer", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "VARIABLE_DECLARATION_FRAGMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "VariableDeclarationFragment", "result", "=", "new", "VariableDeclarationFragment", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setName", "(", "(", "SimpleName", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setExtraDimensions", "(", "getExtraDimensions", "(", ")", ")", ";", "result", ".", "setInitializer", "(", "(", "Expression", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getInitializer", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getInitializer", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "SimpleName", "getName", "(", ")", "{", "if", "(", "this", ".", "variableName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "variableName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "variableName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "variableName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "variableName", ";", "}", "public", "void", "setName", "(", "SimpleName", "variableName", ")", "{", "if", "(", "variableName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "variableName", ";", "preReplaceChild", "(", "oldChild", ",", "variableName", ",", "NAME_PROPERTY", ")", ";", "this", ".", "variableName", "=", "variableName", ";", "postReplaceChild", "(", "oldChild", ",", "variableName", ",", "NAME_PROPERTY", ")", ";", "}", "public", "int", "getExtraDimensions", "(", ")", "{", "return", "this", ".", "extraArrayDimensions", ";", "}", "public", "void", "setExtraDimensions", "(", "int", "dimensions", ")", "{", "if", "(", "dimensions", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "preValueChange", "(", "EXTRA_DIMENSIONS_PROPERTY", ")", ";", "this", ".", "extraArrayDimensions", "=", "dimensions", ";", "postValueChange", "(", "EXTRA_DIMENSIONS_PROPERTY", ")", ";", "}", "public", "Expression", "getInitializer", "(", ")", "{", "return", "this", ".", "optionalInitializer", ";", "}", "public", "void", "setInitializer", "(", "Expression", "initializer", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalInitializer", ";", "preReplaceChild", "(", "oldChild", ",", "initializer", ",", "INITIALIZER_PROPERTY", ")", ";", "this", ".", "optionalInitializer", "=", "initializer", ";", "postReplaceChild", "(", "oldChild", ",", "initializer", ",", "INITIALIZER_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "3", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "variableName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "optionalInitializer", "==", "null", "?", "0", ":", "getInitializer", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,452
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "QualifiedName", "extends", "Name", "{", "public", "static", "final", "ChildPropertyDescriptor", "QUALIFIER_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "QualifiedName", ".", "class", ",", "\"qualifier\"", ",", "Name", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "QualifiedName", ".", "class", ",", "\"name\"", ",", "SimpleName", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "QualifiedName", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "QUALIFIER_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Name", "qualifier", "=", "null", ";", "private", "SimpleName", "name", "=", "null", ";", "QualifiedName", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "QUALIFIER_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getQualifier", "(", ")", ";", "}", "else", "{", "setQualifier", "(", "(", "Name", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "QUALIFIED_NAME", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "QualifiedName", "result", "=", "new", "QualifiedName", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setQualifier", "(", "(", "Name", ")", "getQualifier", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setName", "(", "(", "SimpleName", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getQualifier", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Name", "getQualifier", "(", ")", "{", "if", "(", "this", ".", "qualifier", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "qualifier", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "qualifier", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "qualifier", ",", "QUALIFIER_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "qualifier", ";", "}", "public", "void", "setQualifier", "(", "Name", "qualifier", ")", "{", "if", "(", "qualifier", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "qualifier", ";", "preReplaceChild", "(", "oldChild", ",", "qualifier", ",", "QUALIFIER_PROPERTY", ")", ";", "this", ".", "qualifier", "=", "qualifier", ";", "postReplaceChild", "(", "oldChild", ",", "qualifier", ",", "QUALIFIER_PROPERTY", ")", ";", "}", "public", "SimpleName", "getName", "(", ")", "{", "if", "(", "this", ".", "name", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "name", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "name", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "name", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "name", ";", "}", "public", "void", "setName", "(", "SimpleName", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "name", ";", "preReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "this", ".", "name", "=", "name", ";", "postReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "}", "void", "appendName", "(", "StringBuffer", "buffer", ")", "{", "getQualifier", "(", ")", ".", "appendName", "(", "buffer", ")", ";", "buffer", ".", "append", "(", "'.'", ")", ";", "getName", "(", ")", ".", "appendName", "(", "buffer", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NAME_NODE_SIZE", "+", "3", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "name", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "qualifier", "==", "null", "?", "0", ":", "getQualifier", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,453
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ThisExpression", "extends", "Expression", "{", "public", "static", "final", "ChildPropertyDescriptor", "QUALIFIER_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ThisExpression", ".", "class", ",", "\"qualifier\"", ",", "Name", ".", "class", ",", "OPTIONAL", ",", "NO_CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "ThisExpression", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "QUALIFIER_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Name", "optionalQualifier", "=", "null", ";", "ThisExpression", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "QUALIFIER_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getQualifier", "(", ")", ";", "}", "else", "{", "setQualifier", "(", "(", "Name", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "THIS_EXPRESSION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "ThisExpression", "result", "=", "new", "ThisExpression", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setQualifier", "(", "(", "Name", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getQualifier", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getQualifier", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Name", "getQualifier", "(", ")", "{", "return", "this", ".", "optionalQualifier", ";", "}", "public", "void", "setQualifier", "(", "Name", "name", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalQualifier", ";", "preReplaceChild", "(", "oldChild", ",", "name", ",", "QUALIFIER_PROPERTY", ")", ";", "this", ".", "optionalQualifier", "=", "name", ";", "postReplaceChild", "(", "oldChild", ",", "name", ",", "QUALIFIER_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalQualifier", "==", "null", "?", "0", ":", "getQualifier", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,454
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "io", ".", "PrintWriter", ";", "import", "java", ".", "io", ".", "StringWriter", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IClassFile", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ICompilationUnit", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaElement", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ITypeRoot", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaProject", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaCore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaModelException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "WorkingCopyOwner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CategorizedProblem", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "CompilationUnitDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ConstructorDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "batch", ".", "Main", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "IBinaryType", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "RecoveryScanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "RecoveryScannerData", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "Scanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "SuffixConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "*", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "CodeSnippetParsingUtil", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "RecordedParsingInformation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ";", "public", "class", "ASTParser", "{", "public", "static", "final", "int", "K_EXPRESSION", "=", "0x01", ";", "public", "static", "final", "int", "K_STATEMENTS", "=", "0x02", ";", "public", "static", "final", "int", "K_CLASS_BODY_DECLARATIONS", "=", "0x04", ";", "public", "static", "final", "int", "K_COMPILATION_UNIT", "=", "0x08", ";", "public", "static", "ASTParser", "newParser", "(", "int", "level", ")", "{", "return", "new", "ASTParser", "(", "level", ")", ";", "}", "private", "final", "int", "apiLevel", ";", "private", "int", "astKind", ";", "private", "Map", "compilerOptions", ";", "private", "int", "focalPointPosition", ";", "private", "char", "[", "]", "rawSource", "=", "null", ";", "private", "ITypeRoot", "typeRoot", "=", "null", ";", "private", "int", "sourceOffset", "=", "0", ";", "private", "int", "sourceLength", "=", "-", "1", ";", "private", "WorkingCopyOwner", "workingCopyOwner", "=", "DefaultWorkingCopyOwner", ".", "PRIMARY", ";", "private", "IJavaProject", "project", "=", "null", ";", "private", "String", "unitName", "=", "null", ";", "private", "String", "[", "]", "classpaths", ";", "private", "String", "[", "]", "sourcepaths", ";", "private", "String", "[", "]", "sourcepathsEncodings", ";", "private", "int", "bits", ";", "ASTParser", "(", "int", "level", ")", "{", "switch", "(", "level", ")", "{", "case", "AST", ".", "JLS2_INTERNAL", ":", "case", "AST", ".", "JLS3", ":", "case", "AST", ".", "JLS4", ":", "break", ";", "default", ":", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "this", ".", "apiLevel", "=", "level", ";", "initializeDefaults", "(", ")", ";", "}", "private", "List", "getClasspath", "(", ")", "throws", "IllegalStateException", "{", "Main", "main", "=", "new", "Main", "(", "new", "PrintWriter", "(", "System", ".", "out", ")", ",", "new", "PrintWriter", "(", "System", ".", "err", ")", ",", "false", ",", "null", ",", "null", ")", ";", "ArrayList", "allClasspaths", "=", "new", "ArrayList", "(", ")", ";", "try", "{", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "INCLUDE_RUNNING_VM_BOOTCLASSPATH", ")", "!=", "0", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "Util", ".", "collectRunningVMBootclasspath", "(", "allClasspaths", ")", ";", "}", "if", "(", "this", ".", "sourcepaths", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ",", "max", "=", "this", ".", "sourcepaths", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "String", "encoding", "=", "this", ".", "sourcepathsEncodings", "==", "null", "?", "null", ":", "this", ".", "sourcepathsEncodings", "[", "i", "]", ";", "main", ".", "processPathEntries", "(", "Main", ".", "DEFAULT_SIZE_CLASSPATH", ",", "allClasspaths", ",", "this", ".", "sourcepaths", "[", "i", "]", ",", "encoding", ",", "true", ",", "false", ")", ";", "}", "}", "if", "(", "this", ".", "classpaths", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ",", "max", "=", "this", ".", "classpaths", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "main", ".", "processPathEntries", "(", "Main", ".", "DEFAULT_SIZE_CLASSPATH", ",", "allClasspaths", ",", "this", ".", "classpaths", "[", "i", "]", ",", "null", ",", "false", ",", "false", ")", ";", "}", "}", "ArrayList", "pendingErrors", "=", "main", ".", "pendingErrors", ";", "if", "(", "pendingErrors", "!=", "null", "&&", "pendingErrors", ".", "size", "(", ")", "!=", "0", ")", "{", "throw", "new", "IllegalStateException", "(", "\"\"", ")", ";", "}", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "throw", "new", "IllegalStateException", "(", "\"\"", ")", ";", "}", "return", "allClasspaths", ";", "}", "private", "void", "initializeDefaults", "(", ")", "{", "this", ".", "astKind", "=", "K_COMPILATION_UNIT", ";", "this", ".", "rawSource", "=", "null", ";", "this", ".", "typeRoot", "=", "null", ";", "this", ".", "bits", "=", "0", ";", "this", ".", "sourceLength", "=", "-", "1", ";", "this", ".", "sourceOffset", "=", "0", ";", "this", ".", "workingCopyOwner", "=", "DefaultWorkingCopyOwner", ".", "PRIMARY", ";", "this", ".", "unitName", "=", "null", ";", "this", ".", "project", "=", "null", ";", "this", ".", "classpaths", "=", "null", ";", "this", ".", "sourcepaths", "=", "null", ";", "this", ".", "sourcepathsEncodings", "=", "null", ";", "Map", "options", "=", "JavaCore", ".", "getOptions", "(", ")", ";", "options", ".", "remove", "(", "JavaCore", ".", "COMPILER_TASK_TAGS", ")", ";", "this", ".", "compilerOptions", "=", "options", ";", "}", "public", "void", "setBindingsRecovery", "(", "boolean", "enabled", ")", "{", "if", "(", "enabled", ")", "{", "this", ".", "bits", "|=", "CompilationUnitResolver", ".", "BINDING_RECOVERY", ";", "}", "else", "{", "this", ".", "bits", "&=", "~", "CompilationUnitResolver", ".", "BINDING_RECOVERY", ";", "}", "}", "public", "void", "setEnvironment", "(", "String", "[", "]", "classpathEntries", ",", "String", "[", "]", "sourcepathEntries", ",", "String", "[", "]", "encodings", ",", "boolean", "includeRunningVMBootclasspath", ")", "{", "this", ".", "classpaths", "=", "classpathEntries", ";", "this", ".", "sourcepaths", "=", "sourcepathEntries", ";", "this", ".", "sourcepathsEncodings", "=", "encodings", ";", "if", "(", "encodings", "!=", "null", ")", "{", "if", "(", "sourcepathEntries", "==", "null", "||", "sourcepathEntries", ".", "length", "!=", "encodings", ".", "length", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "if", "(", "includeRunningVMBootclasspath", ")", "{", "this", ".", "bits", "|=", "CompilationUnitResolver", ".", "INCLUDE_RUNNING_VM_BOOTCLASSPATH", ";", "}", "}", "public", "void", "setCompilerOptions", "(", "Map", "options", ")", "{", "if", "(", "options", "==", "null", ")", "{", "options", "=", "JavaCore", ".", "getOptions", "(", ")", ";", "}", "else", "{", "options", "=", "new", "HashMap", "(", "options", ")", ";", "}", "options", ".", "remove", "(", "JavaCore", ".", "COMPILER_TASK_TAGS", ")", ";", "this", ".", "compilerOptions", "=", "options", ";", "}", "public", "void", "setResolveBindings", "(", "boolean", "enabled", ")", "{", "if", "(", "enabled", ")", "{", "this", ".", "bits", "|=", "CompilationUnitResolver", ".", "RESOLVE_BINDING", ";", "}", "else", "{", "this", ".", "bits", "&=", "~", "CompilationUnitResolver", ".", "RESOLVE_BINDING", ";", "}", "}", "public", "void", "setFocalPosition", "(", "int", "position", ")", "{", "this", ".", "bits", "|=", "CompilationUnitResolver", ".", "PARTIAL", ";", "this", ".", "focalPointPosition", "=", "position", ";", "}", "public", "void", "setKind", "(", "int", "kind", ")", "{", "if", "(", "(", "kind", "!=", "K_COMPILATION_UNIT", ")", "&&", "(", "kind", "!=", "K_CLASS_BODY_DECLARATIONS", ")", "&&", "(", "kind", "!=", "K_EXPRESSION", ")", "&&", "(", "kind", "!=", "K_STATEMENTS", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "this", ".", "astKind", "=", "kind", ";", "}", "public", "void", "setSource", "(", "char", "[", "]", "source", ")", "{", "this", ".", "rawSource", "=", "source", ";", "this", ".", "typeRoot", "=", "null", ";", "}", "public", "void", "setSource", "(", "ICompilationUnit", "source", ")", "{", "setSource", "(", "(", "ITypeRoot", ")", "source", ")", ";", "}", "public", "void", "setSource", "(", "IClassFile", "source", ")", "{", "setSource", "(", "(", "ITypeRoot", ")", "source", ")", ";", "}", "public", "void", "setSource", "(", "ITypeRoot", "source", ")", "{", "this", ".", "typeRoot", "=", "source", ";", "this", ".", "rawSource", "=", "null", ";", "if", "(", "source", "!=", "null", ")", "{", "this", ".", "project", "=", "source", ".", "getJavaProject", "(", ")", ";", "Map", "options", "=", "this", ".", "project", ".", "getOptions", "(", "true", ")", ";", "options", ".", "remove", "(", "JavaCore", ".", "COMPILER_TASK_TAGS", ")", ";", "this", ".", "compilerOptions", "=", "options", ";", "}", "}", "public", "void", "setSourceRange", "(", "int", "offset", ",", "int", "length", ")", "{", "if", "(", "offset", "<", "0", "||", "length", "<", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "this", ".", "sourceOffset", "=", "offset", ";", "this", ".", "sourceLength", "=", "length", ";", "}", "public", "void", "setStatementsRecovery", "(", "boolean", "enabled", ")", "{", "if", "(", "enabled", ")", "{", "this", ".", "bits", "|=", "CompilationUnitResolver", ".", "STATEMENT_RECOVERY", ";", "}", "else", "{", "this", ".", "bits", "&=", "~", "CompilationUnitResolver", ".", "STATEMENT_RECOVERY", ";", "}", "}", "public", "void", "setIgnoreMethodBodies", "(", "boolean", "enabled", ")", "{", "if", "(", "enabled", ")", "{", "this", ".", "bits", "|=", "CompilationUnitResolver", ".", "IGNORE_METHOD_BODIES", ";", "}", "else", "{", "this", ".", "bits", "&=", "~", "CompilationUnitResolver", ".", "IGNORE_METHOD_BODIES", ";", "}", "}", "public", "void", "setWorkingCopyOwner", "(", "WorkingCopyOwner", "owner", ")", "{", "if", "(", "owner", "==", "null", ")", "{", "this", ".", "workingCopyOwner", "=", "DefaultWorkingCopyOwner", ".", "PRIMARY", ";", "}", "else", "{", "this", ".", "workingCopyOwner", "=", "owner", ";", "}", "}", "public", "void", "setUnitName", "(", "String", "unitName", ")", "{", "this", ".", "unitName", "=", "unitName", ";", "}", "public", "void", "setProject", "(", "IJavaProject", "project", ")", "{", "this", ".", "project", "=", "project", ";", "if", "(", "project", "!=", "null", ")", "{", "Map", "options", "=", "project", ".", "getOptions", "(", "true", ")", ";", "options", ".", "remove", "(", "JavaCore", ".", "COMPILER_TASK_TAGS", ")", ";", "this", ".", "compilerOptions", "=", "options", ";", "}", "}", "public", "ASTNode", "createAST", "(", "IProgressMonitor", "monitor", ")", "{", "ASTNode", "result", "=", "null", ";", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "beginTask", "(", "\"\"", ",", "1", ")", ";", "try", "{", "if", "(", "this", ".", "rawSource", "==", "null", "&&", "this", ".", "typeRoot", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"\"", ")", ";", "}", "result", "=", "internalCreateAST", "(", "monitor", ")", ";", "}", "finally", "{", "initializeDefaults", "(", ")", ";", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "done", "(", ")", ";", "}", "return", "result", ";", "}", "public", "void", "createASTs", "(", "ICompilationUnit", "[", "]", "compilationUnits", ",", "String", "[", "]", "bindingKeys", ",", "ASTRequestor", "requestor", ",", "IProgressMonitor", "monitor", ")", "{", "try", "{", "int", "flags", "=", "0", ";", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "STATEMENT_RECOVERY", ")", "!=", "0", ")", "{", "flags", "|=", "ICompilationUnit", ".", "ENABLE_STATEMENTS_RECOVERY", ";", "}", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "IGNORE_METHOD_BODIES", ")", "!=", "0", ")", "{", "flags", "|=", "ICompilationUnit", ".", "IGNORE_METHOD_BODIES", ";", "}", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "RESOLVE_BINDING", ")", "!=", "0", ")", "{", "if", "(", "this", ".", "project", "==", "null", ")", "throw", "new", "IllegalStateException", "(", "\"\"", ")", ";", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "BINDING_RECOVERY", ")", "!=", "0", ")", "{", "flags", "|=", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ";", "}", "CompilationUnitResolver", ".", "resolve", "(", "compilationUnits", ",", "bindingKeys", ",", "requestor", ",", "this", ".", "apiLevel", ",", "this", ".", "compilerOptions", ",", "this", ".", "project", ",", "this", ".", "workingCopyOwner", ",", "flags", ",", "monitor", ")", ";", "}", "else", "{", "CompilationUnitResolver", ".", "parse", "(", "compilationUnits", ",", "requestor", ",", "this", ".", "apiLevel", ",", "this", ".", "compilerOptions", ",", "flags", ",", "monitor", ")", ";", "}", "}", "finally", "{", "initializeDefaults", "(", ")", ";", "}", "}", "public", "void", "createASTs", "(", "String", "[", "]", "sourceFilePaths", ",", "String", "[", "]", "encodings", ",", "String", "[", "]", "bindingKeys", ",", "FileASTRequestor", "requestor", ",", "IProgressMonitor", "monitor", ")", "{", "try", "{", "int", "flags", "=", "0", ";", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "STATEMENT_RECOVERY", ")", "!=", "0", ")", "{", "flags", "|=", "ICompilationUnit", ".", "ENABLE_STATEMENTS_RECOVERY", ";", "}", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "IGNORE_METHOD_BODIES", ")", "!=", "0", ")", "{", "flags", "|=", "ICompilationUnit", ".", "IGNORE_METHOD_BODIES", ";", "}", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "RESOLVE_BINDING", ")", "!=", "0", ")", "{", "if", "(", "this", ".", "classpaths", "==", "null", "&&", "this", ".", "sourcepaths", "==", "null", "&&", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "INCLUDE_RUNNING_VM_BOOTCLASSPATH", ")", "==", "0", ")", ")", "{", "throw", "new", "IllegalStateException", "(", "\"\"", ")", ";", "}", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "BINDING_RECOVERY", ")", "!=", "0", ")", "{", "flags", "|=", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ";", "}", "CompilationUnitResolver", ".", "resolve", "(", "sourceFilePaths", ",", "encodings", ",", "bindingKeys", ",", "requestor", ",", "this", ".", "apiLevel", ",", "this", ".", "compilerOptions", ",", "getClasspath", "(", ")", ",", "flags", ",", "monitor", ")", ";", "}", "else", "{", "CompilationUnitResolver", ".", "parse", "(", "sourceFilePaths", ",", "encodings", ",", "requestor", ",", "this", ".", "apiLevel", ",", "this", ".", "compilerOptions", ",", "flags", ",", "monitor", ")", ";", "}", "}", "finally", "{", "initializeDefaults", "(", ")", ";", "}", "}", "public", "IBinding", "[", "]", "createBindings", "(", "IJavaElement", "[", "]", "elements", ",", "IProgressMonitor", "monitor", ")", "{", "try", "{", "if", "(", "this", ".", "project", "==", "null", ")", "throw", "new", "IllegalStateException", "(", "\"\"", ")", ";", "int", "flags", "=", "0", ";", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "STATEMENT_RECOVERY", ")", "!=", "0", ")", "{", "flags", "|=", "ICompilationUnit", ".", "ENABLE_STATEMENTS_RECOVERY", ";", "}", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "BINDING_RECOVERY", ")", "!=", "0", ")", "{", "flags", "|=", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ";", "}", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "IGNORE_METHOD_BODIES", ")", "!=", "0", ")", "{", "flags", "|=", "ICompilationUnit", ".", "IGNORE_METHOD_BODIES", ";", "}", "return", "CompilationUnitResolver", ".", "resolve", "(", "elements", ",", "this", ".", "apiLevel", ",", "this", ".", "compilerOptions", ",", "this", ".", "project", ",", "this", ".", "workingCopyOwner", ",", "flags", ",", "monitor", ")", ";", "}", "finally", "{", "initializeDefaults", "(", ")", ";", "}", "}", "private", "ASTNode", "internalCreateAST", "(", "IProgressMonitor", "monitor", ")", "{", "boolean", "needToResolveBindings", "=", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "RESOLVE_BINDING", ")", "!=", "0", ";", "switch", "(", "this", ".", "astKind", ")", "{", "case", "K_CLASS_BODY_DECLARATIONS", ":", "case", "K_EXPRESSION", ":", "case", "K_STATEMENTS", ":", "if", "(", "this", ".", "rawSource", "==", "null", ")", "{", "if", "(", "this", ".", "typeRoot", "!=", "null", ")", "{", "if", "(", "this", ".", "typeRoot", "instanceof", "ICompilationUnit", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", ")", "this", ".", "typeRoot", ";", "this", ".", "rawSource", "=", "sourceUnit", ".", "getContents", "(", ")", ";", "}", "else", "if", "(", "this", ".", "typeRoot", "instanceof", "IClassFile", ")", "{", "try", "{", "String", "sourceString", "=", "this", ".", "typeRoot", ".", "getSource", "(", ")", ";", "if", "(", "sourceString", "!=", "null", ")", "{", "this", ".", "rawSource", "=", "sourceString", ".", "toCharArray", "(", ")", ";", "}", "}", "catch", "(", "JavaModelException", "e", ")", "{", "StringWriter", "stringWriter", "=", "new", "StringWriter", "(", ")", ";", "PrintWriter", "writer", "=", "null", ";", "try", "{", "writer", "=", "new", "PrintWriter", "(", "stringWriter", ")", ";", "e", ".", "printStackTrace", "(", "writer", ")", ";", "}", "finally", "{", "if", "(", "writer", "!=", "null", ")", "writer", ".", "close", "(", ")", ";", "}", "throw", "new", "IllegalStateException", "(", "String", ".", "valueOf", "(", "stringWriter", ".", "getBuffer", "(", ")", ")", ")", ";", "}", "}", "}", "}", "if", "(", "this", ".", "rawSource", "!=", "null", ")", "{", "if", "(", "this", ".", "sourceOffset", "+", "this", ".", "sourceLength", ">", "this", ".", "rawSource", ".", "length", ")", "{", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "return", "internalCreateASTForKind", "(", ")", ";", "}", "break", ";", "case", "K_COMPILATION_UNIT", ":", "CompilationUnitDeclaration", "compilationUnitDeclaration", "=", "null", ";", "try", "{", "NodeSearcher", "searcher", "=", "null", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", "=", "null", ";", "WorkingCopyOwner", "wcOwner", "=", "this", ".", "workingCopyOwner", ";", "if", "(", "this", ".", "typeRoot", "instanceof", "ICompilationUnit", ")", "{", "sourceUnit", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", ")", "this", ".", "typeRoot", ";", "sourceUnit", "=", "new", "BasicCompilationUnit", "(", "sourceUnit", ".", "getContents", "(", ")", ",", "sourceUnit", ".", "getPackageName", "(", ")", ",", "new", "String", "(", "sourceUnit", ".", "getFileName", "(", ")", ")", ",", "this", ".", "project", ")", ";", "wcOwner", "=", "(", "(", "ICompilationUnit", ")", "this", ".", "typeRoot", ")", ".", "getOwner", "(", ")", ";", "}", "else", "if", "(", "this", ".", "typeRoot", "instanceof", "IClassFile", ")", "{", "try", "{", "String", "sourceString", "=", "this", ".", "typeRoot", ".", "getSource", "(", ")", ";", "if", "(", "sourceString", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "PackageFragment", "packageFragment", "=", "(", "PackageFragment", ")", "this", ".", "typeRoot", ".", "getParent", "(", ")", ";", "BinaryType", "type", "=", "(", "BinaryType", ")", "this", ".", "typeRoot", ".", "findPrimaryType", "(", ")", ";", "IBinaryType", "binaryType", "=", "(", "IBinaryType", ")", "type", ".", "getElementInfo", "(", ")", ";", "char", "[", "]", "fileName", "=", "binaryType", ".", "getFileName", "(", ")", ";", "int", "firstDollar", "=", "CharOperation", ".", "indexOf", "(", "'$'", ",", "fileName", ")", ";", "if", "(", "firstDollar", "!=", "-", "1", ")", "{", "char", "[", "]", "suffix", "=", "SuffixConstants", ".", "SUFFIX_class", ";", "int", "suffixLength", "=", "suffix", ".", "length", ";", "char", "[", "]", "newFileName", "=", "new", "char", "[", "firstDollar", "+", "suffixLength", "]", ";", "System", ".", "arraycopy", "(", "fileName", ",", "0", ",", "newFileName", ",", "0", ",", "firstDollar", ")", ";", "System", ".", "arraycopy", "(", "suffix", ",", "0", ",", "newFileName", ",", "firstDollar", ",", "suffixLength", ")", ";", "fileName", "=", "newFileName", ";", "}", "sourceUnit", "=", "new", "BasicCompilationUnit", "(", "sourceString", ".", "toCharArray", "(", ")", ",", "Util", ".", "toCharArrays", "(", "packageFragment", ".", "names", ")", ",", "new", "String", "(", "fileName", ")", ",", "this", ".", "project", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "StringWriter", "stringWriter", "=", "new", "StringWriter", "(", ")", ";", "PrintWriter", "writer", "=", "null", ";", "try", "{", "writer", "=", "new", "PrintWriter", "(", "stringWriter", ")", ";", "e", ".", "printStackTrace", "(", "writer", ")", ";", "}", "finally", "{", "if", "(", "writer", "!=", "null", ")", "writer", ".", "close", "(", ")", ";", "}", "throw", "new", "IllegalStateException", "(", "String", ".", "valueOf", "(", "stringWriter", ".", "getBuffer", "(", ")", ")", ")", ";", "}", "}", "else", "if", "(", "this", ".", "rawSource", "!=", "null", ")", "{", "needToResolveBindings", "=", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "RESOLVE_BINDING", ")", "!=", "0", ")", "&&", "this", ".", "unitName", "!=", "null", "&&", "(", "this", ".", "project", "!=", "null", "||", "this", ".", "classpaths", "!=", "null", "||", "this", ".", "sourcepaths", "!=", "null", "||", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "INCLUDE_RUNNING_VM_BOOTCLASSPATH", ")", "!=", "0", ")", ")", "&&", "this", ".", "compilerOptions", "!=", "null", ";", "sourceUnit", "=", "new", "BasicCompilationUnit", "(", "this", ".", "rawSource", ",", "null", ",", "this", ".", "unitName", "==", "null", "?", "\"\"", ":", "this", ".", "unitName", ",", "this", ".", "project", ")", ";", "}", "else", "{", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "PARTIAL", ")", "!=", "0", ")", "{", "searcher", "=", "new", "NodeSearcher", "(", "this", ".", "focalPointPosition", ")", ";", "}", "int", "flags", "=", "0", ";", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "STATEMENT_RECOVERY", ")", "!=", "0", ")", "{", "flags", "|=", "ICompilationUnit", ".", "ENABLE_STATEMENTS_RECOVERY", ";", "}", "if", "(", "searcher", "==", "null", "&&", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "IGNORE_METHOD_BODIES", ")", "!=", "0", ")", ")", "{", "flags", "|=", "ICompilationUnit", ".", "IGNORE_METHOD_BODIES", ";", "}", "if", "(", "needToResolveBindings", ")", "{", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "BINDING_RECOVERY", ")", "!=", "0", ")", "{", "flags", "|=", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ";", "}", "try", "{", "compilationUnitDeclaration", "=", "CompilationUnitResolver", ".", "resolve", "(", "sourceUnit", ",", "this", ".", "project", ",", "getClasspath", "(", ")", ",", "searcher", ",", "this", ".", "compilerOptions", ",", "this", ".", "workingCopyOwner", ",", "flags", ",", "monitor", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "flags", "&=", "~", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ";", "compilationUnitDeclaration", "=", "CompilationUnitResolver", ".", "parse", "(", "sourceUnit", ",", "searcher", ",", "this", ".", "compilerOptions", ",", "flags", ")", ";", "needToResolveBindings", "=", "false", ";", "}", "}", "else", "{", "compilationUnitDeclaration", "=", "CompilationUnitResolver", ".", "parse", "(", "sourceUnit", ",", "searcher", ",", "this", ".", "compilerOptions", ",", "flags", ")", ";", "needToResolveBindings", "=", "false", ";", "}", "CompilationUnit", "result", "=", "CompilationUnitResolver", ".", "convert", "(", "compilationUnitDeclaration", ",", "sourceUnit", ".", "getContents", "(", ")", ",", "this", ".", "apiLevel", ",", "this", ".", "compilerOptions", ",", "needToResolveBindings", ",", "wcOwner", ",", "needToResolveBindings", "?", "new", "DefaultBindingResolver", ".", "BindingTables", "(", ")", ":", "null", ",", "flags", ",", "monitor", ",", "this", ".", "project", "!=", "null", ")", ";", "result", ".", "setTypeRoot", "(", "this", ".", "typeRoot", ")", ";", "return", "result", ";", "}", "finally", "{", "if", "(", "compilationUnitDeclaration", "!=", "null", "&&", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "RESOLVE_BINDING", ")", "!=", "0", ")", ")", "{", "compilationUnitDeclaration", ".", "cleanUp", "(", ")", ";", "}", "}", "}", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "private", "ASTNode", "internalCreateASTForKind", "(", ")", "{", "final", "ASTConverter", "converter", "=", "new", "ASTConverter", "(", "this", ".", "compilerOptions", ",", "false", ",", "null", ")", ";", "converter", ".", "compilationUnitSource", "=", "this", ".", "rawSource", ";", "converter", ".", "compilationUnitSourceLength", "=", "this", ".", "rawSource", ".", "length", ";", "converter", ".", "scanner", ".", "setSource", "(", "this", ".", "rawSource", ")", ";", "AST", "ast", "=", "AST", ".", "newAST", "(", "this", ".", "apiLevel", ")", ";", "ast", ".", "setDefaultNodeFlag", "(", "ASTNode", ".", "ORIGINAL", ")", ";", "ast", ".", "setBindingResolver", "(", "new", "BindingResolver", "(", ")", ")", ";", "if", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "STATEMENT_RECOVERY", ")", "!=", "0", ")", "{", "ast", ".", "setFlag", "(", "ICompilationUnit", ".", "ENABLE_STATEMENTS_RECOVERY", ")", ";", "}", "converter", ".", "setAST", "(", "ast", ")", ";", "CodeSnippetParsingUtil", "codeSnippetParsingUtil", "=", "new", "CodeSnippetParsingUtil", "(", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "IGNORE_METHOD_BODIES", ")", "!=", "0", ")", ";", "CompilationUnit", "compilationUnit", "=", "ast", ".", "newCompilationUnit", "(", ")", ";", "if", "(", "this", ".", "sourceLength", "==", "-", "1", ")", "{", "this", ".", "sourceLength", "=", "this", ".", "rawSource", ".", "length", ";", "}", "switch", "(", "this", ".", "astKind", ")", "{", "case", "K_STATEMENTS", ":", "ConstructorDeclaration", "constructorDeclaration", "=", "codeSnippetParsingUtil", ".", "parseStatements", "(", "this", ".", "rawSource", ",", "this", ".", "sourceOffset", ",", "this", ".", "sourceLength", ",", "this", ".", "compilerOptions", ",", "true", ",", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "STATEMENT_RECOVERY", ")", "!=", "0", ")", ";", "RecoveryScannerData", "data", "=", "constructorDeclaration", ".", "compilationResult", ".", "recoveryScannerData", ";", "if", "(", "data", "!=", "null", ")", "{", "Scanner", "scanner", "=", "converter", ".", "scanner", ";", "converter", ".", "scanner", "=", "new", "RecoveryScanner", "(", "scanner", ",", "data", ".", "removeUnused", "(", ")", ")", ";", "converter", ".", "docParser", ".", "scanner", "=", "converter", ".", "scanner", ";", "converter", ".", "scanner", ".", "setSource", "(", "scanner", ".", "source", ")", ";", "compilationUnit", ".", "setStatementsRecoveryData", "(", "data", ")", ";", "}", "RecordedParsingInformation", "recordedParsingInformation", "=", "codeSnippetParsingUtil", ".", "recordedParsingInformation", ";", "int", "[", "]", "[", "]", "comments", "=", "recordedParsingInformation", ".", "commentPositions", ";", "if", "(", "comments", "!=", "null", ")", "{", "converter", ".", "buildCommentsTable", "(", "compilationUnit", ",", "comments", ")", ";", "}", "compilationUnit", ".", "setLineEndTable", "(", "recordedParsingInformation", ".", "lineEnds", ")", ";", "Block", "block", "=", "ast", ".", "newBlock", "(", ")", ";", "block", ".", "setSourceRange", "(", "this", ".", "sourceOffset", ",", "this", ".", "sourceOffset", "+", "this", ".", "sourceLength", ")", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Statement", "[", "]", "statements", "=", "constructorDeclaration", ".", "statements", ";", "if", "(", "statements", "!=", "null", ")", "{", "int", "statementsLength", "=", "statements", ".", "length", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "statementsLength", ";", "i", "++", ")", "{", "if", "(", "statements", "[", "i", "]", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "LocalDeclaration", ")", "{", "converter", ".", "checkAndAddMultipleLocalDeclaration", "(", "statements", ",", "i", ",", "block", ".", "statements", "(", ")", ")", ";", "}", "else", "{", "Statement", "statement", "=", "converter", ".", "convert", "(", "statements", "[", "i", "]", ")", ";", "if", "(", "statement", "!=", "null", ")", "{", "block", ".", "statements", "(", ")", ".", "add", "(", "statement", ")", ";", "}", "}", "}", "}", "rootNodeToCompilationUnit", "(", "ast", ",", "compilationUnit", ",", "block", ",", "recordedParsingInformation", ",", "data", ")", ";", "ast", ".", "setDefaultNodeFlag", "(", "0", ")", ";", "ast", ".", "setOriginalModificationCount", "(", "ast", ".", "modificationCount", "(", ")", ")", ";", "return", "block", ";", "case", "K_EXPRESSION", ":", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", "expression", "=", "codeSnippetParsingUtil", ".", "parseExpression", "(", "this", ".", "rawSource", ",", "this", ".", "sourceOffset", ",", "this", ".", "sourceLength", ",", "this", ".", "compilerOptions", ",", "true", ")", ";", "recordedParsingInformation", "=", "codeSnippetParsingUtil", ".", "recordedParsingInformation", ";", "comments", "=", "recordedParsingInformation", ".", "commentPositions", ";", "if", "(", "comments", "!=", "null", ")", "{", "converter", ".", "buildCommentsTable", "(", "compilationUnit", ",", "comments", ")", ";", "}", "compilationUnit", ".", "setLineEndTable", "(", "recordedParsingInformation", ".", "lineEnds", ")", ";", "if", "(", "expression", "!=", "null", ")", "{", "Expression", "expression2", "=", "converter", ".", "convert", "(", "expression", ")", ";", "rootNodeToCompilationUnit", "(", "expression2", ".", "getAST", "(", ")", ",", "compilationUnit", ",", "expression2", ",", "codeSnippetParsingUtil", ".", "recordedParsingInformation", ",", "null", ")", ";", "ast", ".", "setDefaultNodeFlag", "(", "0", ")", ";", "ast", ".", "setOriginalModificationCount", "(", "ast", ".", "modificationCount", "(", ")", ")", ";", "return", "expression2", ";", "}", "else", "{", "CategorizedProblem", "[", "]", "problems", "=", "recordedParsingInformation", ".", "problems", ";", "if", "(", "problems", "!=", "null", ")", "{", "compilationUnit", ".", "setProblems", "(", "problems", ")", ";", "}", "ast", ".", "setDefaultNodeFlag", "(", "0", ")", ";", "ast", ".", "setOriginalModificationCount", "(", "ast", ".", "modificationCount", "(", ")", ")", ";", "return", "compilationUnit", ";", "}", "case", "K_CLASS_BODY_DECLARATIONS", ":", "final", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "[", "]", "nodes", "=", "codeSnippetParsingUtil", ".", "parseClassBodyDeclarations", "(", "this", ".", "rawSource", ",", "this", ".", "sourceOffset", ",", "this", ".", "sourceLength", ",", "this", ".", "compilerOptions", ",", "true", ",", "(", "this", ".", "bits", "&", "CompilationUnitResolver", ".", "STATEMENT_RECOVERY", ")", "!=", "0", ")", ";", "recordedParsingInformation", "=", "codeSnippetParsingUtil", ".", "recordedParsingInformation", ";", "comments", "=", "recordedParsingInformation", ".", "commentPositions", ";", "if", "(", "comments", "!=", "null", ")", "{", "converter", ".", "buildCommentsTable", "(", "compilationUnit", ",", "comments", ")", ";", "}", "compilationUnit", ".", "setLineEndTable", "(", "recordedParsingInformation", ".", "lineEnds", ")", ";", "if", "(", "nodes", "!=", "null", ")", "{", "TypeDeclaration", "typeDeclaration", "=", "converter", ".", "convert", "(", "nodes", ")", ";", "typeDeclaration", ".", "setSourceRange", "(", "this", ".", "sourceOffset", ",", "this", ".", "sourceOffset", "+", "this", ".", "sourceLength", ")", ";", "rootNodeToCompilationUnit", "(", "typeDeclaration", ".", "getAST", "(", ")", ",", "compilationUnit", ",", "typeDeclaration", ",", "codeSnippetParsingUtil", ".", "recordedParsingInformation", ",", "null", ")", ";", "ast", ".", "setDefaultNodeFlag", "(", "0", ")", ";", "ast", ".", "setOriginalModificationCount", "(", "ast", ".", "modificationCount", "(", ")", ")", ";", "return", "typeDeclaration", ";", "}", "else", "{", "CategorizedProblem", "[", "]", "problems", "=", "recordedParsingInformation", ".", "problems", ";", "if", "(", "problems", "!=", "null", ")", "{", "compilationUnit", ".", "setProblems", "(", "problems", ")", ";", "}", "ast", ".", "setDefaultNodeFlag", "(", "0", ")", ";", "ast", ".", "setOriginalModificationCount", "(", "ast", ".", "modificationCount", "(", ")", ")", ";", "return", "compilationUnit", ";", "}", "}", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "private", "void", "propagateErrors", "(", "ASTNode", "astNode", ",", "CategorizedProblem", "[", "]", "problems", ",", "RecoveryScannerData", "data", ")", "{", "astNode", ".", "accept", "(", "new", "ASTSyntaxErrorPropagator", "(", "problems", ")", ")", ";", "if", "(", "data", "!=", "null", ")", "{", "astNode", ".", "accept", "(", "new", "ASTRecoveryPropagator", "(", "problems", ",", "data", ")", ")", ";", "}", "}", "private", "void", "rootNodeToCompilationUnit", "(", "AST", "ast", ",", "CompilationUnit", "compilationUnit", ",", "ASTNode", "node", ",", "RecordedParsingInformation", "recordedParsingInformation", ",", "RecoveryScannerData", "data", ")", "{", "final", "int", "problemsCount", "=", "recordedParsingInformation", ".", "problemsCount", ";", "switch", "(", "node", ".", "getNodeType", "(", ")", ")", "{", "case", "ASTNode", ".", "BLOCK", ":", "{", "Block", "block", "=", "(", "Block", ")", "node", ";", "if", "(", "problemsCount", "!=", "0", ")", "{", "final", "CategorizedProblem", "[", "]", "problems", "=", "recordedParsingInformation", ".", "problems", ";", "propagateErrors", "(", "block", ",", "problems", ",", "data", ")", ";", "compilationUnit", ".", "setProblems", "(", "problems", ")", ";", "}", "TypeDeclaration", "typeDeclaration", "=", "ast", ".", "newTypeDeclaration", "(", ")", ";", "Initializer", "initializer", "=", "ast", ".", "newInitializer", "(", ")", ";", "initializer", ".", "setBody", "(", "block", ")", ";", "typeDeclaration", ".", "bodyDeclarations", "(", ")", ".", "add", "(", "initializer", ")", ";", "compilationUnit", ".", "types", "(", ")", ".", "add", "(", "typeDeclaration", ")", ";", "}", "break", ";", "case", "ASTNode", ".", "TYPE_DECLARATION", ":", "{", "TypeDeclaration", "typeDeclaration", "=", "(", "TypeDeclaration", ")", "node", ";", "if", "(", "problemsCount", "!=", "0", ")", "{", "final", "CategorizedProblem", "[", "]", "problems", "=", "recordedParsingInformation", ".", "problems", ";", "propagateErrors", "(", "typeDeclaration", ",", "problems", ",", "data", ")", ";", "compilationUnit", ".", "setProblems", "(", "problems", ")", ";", "}", "compilationUnit", ".", "types", "(", ")", ".", "add", "(", "typeDeclaration", ")", ";", "}", "break", ";", "default", ":", "if", "(", "node", "instanceof", "Expression", ")", "{", "Expression", "expression", "=", "(", "Expression", ")", "node", ";", "if", "(", "problemsCount", "!=", "0", ")", "{", "final", "CategorizedProblem", "[", "]", "problems", "=", "recordedParsingInformation", ".", "problems", ";", "propagateErrors", "(", "expression", ",", "problems", ",", "data", ")", ";", "compilationUnit", ".", "setProblems", "(", "problems", ")", ";", "}", "ExpressionStatement", "expressionStatement", "=", "ast", ".", "newExpressionStatement", "(", "expression", ")", ";", "Block", "block", "=", "ast", ".", "newBlock", "(", ")", ";", "block", ".", "statements", "(", ")", ".", "add", "(", "expressionStatement", ")", ";", "Initializer", "initializer", "=", "ast", ".", "newInitializer", "(", ")", ";", "initializer", ".", "setBody", "(", "block", ")", ";", "TypeDeclaration", "typeDeclaration", "=", "ast", ".", "newTypeDeclaration", "(", ")", ";", "typeDeclaration", ".", "bodyDeclarations", "(", ")", ".", "add", "(", "initializer", ")", ";", "compilationUnit", ".", "types", "(", ")", ".", "add", "(", "typeDeclaration", ")", ";", "}", "}", "}", "}", "</s>" ]
4,455
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "FieldAccess", "extends", "Expression", "{", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "FieldAccess", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "FieldAccess", ".", "class", ",", "\"name\"", ",", "SimpleName", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "FieldAccess", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Expression", "expression", "=", "null", ";", "private", "SimpleName", "fieldName", "=", "null", ";", "FieldAccess", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "FIELD_ACCESS", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "FieldAccess", "result", "=", "new", "FieldAccess", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "getExpression", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setName", "(", "(", "SimpleName", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "expression", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "expression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "expression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "expression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "public", "SimpleName", "getName", "(", ")", "{", "if", "(", "this", ".", "fieldName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "fieldName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "fieldName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "fieldName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "fieldName", ";", "}", "public", "void", "setName", "(", "SimpleName", "fieldName", ")", "{", "if", "(", "fieldName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "fieldName", ";", "preReplaceChild", "(", "oldChild", ",", "fieldName", ",", "NAME_PROPERTY", ")", ";", "this", ".", "fieldName", "=", "fieldName", ";", "postReplaceChild", "(", "oldChild", ",", "fieldName", ",", "NAME_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "2", "*", "4", ";", "}", "public", "IVariableBinding", "resolveFieldBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveField", "(", "this", ")", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "expression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "fieldName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,456
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "SuperFieldAccess", "extends", "Expression", "{", "public", "static", "final", "ChildPropertyDescriptor", "QUALIFIER_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "SuperFieldAccess", ".", "class", ",", "\"qualifier\"", ",", "Name", ".", "class", ",", "OPTIONAL", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "SuperFieldAccess", ".", "class", ",", "\"name\"", ",", "SimpleName", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "SuperFieldAccess", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "QUALIFIER_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Name", "optionalQualifier", "=", "null", ";", "private", "SimpleName", "fieldName", "=", "null", ";", "SuperFieldAccess", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "QUALIFIER_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getQualifier", "(", ")", ";", "}", "else", "{", "setQualifier", "(", "(", "Name", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "SUPER_FIELD_ACCESS", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "SuperFieldAccess", "result", "=", "new", "SuperFieldAccess", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setName", "(", "(", "SimpleName", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getName", "(", ")", ")", ")", ";", "result", ".", "setQualifier", "(", "(", "Name", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getQualifier", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getQualifier", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Name", "getQualifier", "(", ")", "{", "return", "this", ".", "optionalQualifier", ";", "}", "public", "void", "setQualifier", "(", "Name", "name", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalQualifier", ";", "preReplaceChild", "(", "oldChild", ",", "name", ",", "QUALIFIER_PROPERTY", ")", ";", "this", ".", "optionalQualifier", "=", "name", ";", "postReplaceChild", "(", "oldChild", ",", "name", ",", "QUALIFIER_PROPERTY", ")", ";", "}", "public", "SimpleName", "getName", "(", ")", "{", "if", "(", "this", ".", "fieldName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "fieldName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "fieldName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "fieldName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "fieldName", ";", "}", "public", "IVariableBinding", "resolveFieldBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveField", "(", "this", ")", ";", "}", "public", "void", "setName", "(", "SimpleName", "fieldName", ")", "{", "if", "(", "fieldName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "fieldName", ";", "preReplaceChild", "(", "oldChild", ",", "fieldName", ",", "NAME_PROPERTY", ")", ";", "this", ".", "fieldName", "=", "fieldName", ";", "postReplaceChild", "(", "oldChild", ",", "fieldName", ",", "NAME_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "2", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalQualifier", "==", "null", "?", "0", ":", "getQualifier", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "fieldName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,457
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ArrayAccess", "extends", "Expression", "{", "public", "static", "final", "ChildPropertyDescriptor", "ARRAY_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ArrayAccess", ".", "class", ",", "\"array\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "INDEX_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ArrayAccess", ".", "class", ",", "\"index\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "ArrayAccess", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "ARRAY_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "INDEX_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Expression", "arrayExpression", "=", "null", ";", "private", "Expression", "indexExpression", "=", "null", ";", "ArrayAccess", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "ARRAY_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getArray", "(", ")", ";", "}", "else", "{", "setArray", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "INDEX_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getIndex", "(", ")", ";", "}", "else", "{", "setIndex", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "ARRAY_ACCESS", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "ArrayAccess", "result", "=", "new", "ArrayAccess", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setArray", "(", "(", "Expression", ")", "getArray", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setIndex", "(", "(", "Expression", ")", "getIndex", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getArray", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getIndex", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getArray", "(", ")", "{", "if", "(", "this", ".", "arrayExpression", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "arrayExpression", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "arrayExpression", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "arrayExpression", ",", "ARRAY_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "arrayExpression", ";", "}", "public", "void", "setArray", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "arrayExpression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "ARRAY_PROPERTY", ")", ";", "this", ".", "arrayExpression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "ARRAY_PROPERTY", ")", ";", "}", "public", "Expression", "getIndex", "(", ")", "{", "if", "(", "this", ".", "indexExpression", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "indexExpression", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "indexExpression", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "indexExpression", ",", "INDEX_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "indexExpression", ";", "}", "public", "void", "setIndex", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "indexExpression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "INDEX_PROPERTY", ")", ";", "this", ".", "indexExpression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "INDEX_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "2", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "arrayExpression", "==", "null", "?", "0", ":", "getArray", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "indexExpression", "==", "null", "?", "0", ":", "getIndex", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,458
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "public", "final", "class", "ChildPropertyDescriptor", "extends", "StructuralPropertyDescriptor", "{", "private", "final", "Class", "childClass", ";", "private", "final", "boolean", "mandatory", ";", "final", "boolean", "cycleRisk", ";", "ChildPropertyDescriptor", "(", "Class", "nodeClass", ",", "String", "propertyId", ",", "Class", "childType", ",", "boolean", "mandatory", ",", "boolean", "cycleRisk", ")", "{", "super", "(", "nodeClass", ",", "propertyId", ")", ";", "if", "(", "childType", "==", "null", "||", "!", "ASTNode", ".", "class", ".", "isAssignableFrom", "(", "childType", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "this", ".", "childClass", "=", "childType", ";", "this", ".", "mandatory", "=", "mandatory", ";", "this", ".", "cycleRisk", "=", "cycleRisk", ";", "}", "public", "final", "Class", "getChildType", "(", ")", "{", "return", "this", ".", "childClass", ";", "}", "public", "final", "boolean", "isMandatory", "(", ")", "{", "return", "this", ".", "mandatory", ";", "}", "public", "final", "boolean", "cycleRisk", "(", ")", "{", "return", "this", ".", "cycleRisk", ";", "}", "}", "</s>" ]
4,459
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "CatchClause", "extends", "ASTNode", "{", "public", "static", "final", "ChildPropertyDescriptor", "EXCEPTION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "CatchClause", ".", "class", ",", "\"exception\"", ",", "SingleVariableDeclaration", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "BODY_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "CatchClause", ".", "class", ",", "\"body\"", ",", "Block", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "CatchClause", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "EXCEPTION_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "BODY_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Block", "body", "=", "null", ";", "private", "SingleVariableDeclaration", "exceptionDecl", "=", "null", ";", "CatchClause", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXCEPTION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getException", "(", ")", ";", "}", "else", "{", "setException", "(", "(", "SingleVariableDeclaration", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "BODY_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getBody", "(", ")", ";", "}", "else", "{", "setBody", "(", "(", "Block", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "CATCH_CLAUSE", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "CatchClause", "result", "=", "new", "CatchClause", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setBody", "(", "(", "Block", ")", "getBody", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setException", "(", "(", "SingleVariableDeclaration", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getException", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getException", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getBody", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "SingleVariableDeclaration", "getException", "(", ")", "{", "if", "(", "this", ".", "exceptionDecl", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "exceptionDecl", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "exceptionDecl", "=", "new", "SingleVariableDeclaration", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "exceptionDecl", ",", "EXCEPTION_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "exceptionDecl", ";", "}", "public", "void", "setException", "(", "SingleVariableDeclaration", "exception", ")", "{", "if", "(", "exception", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "exceptionDecl", ";", "preReplaceChild", "(", "oldChild", ",", "exception", ",", "EXCEPTION_PROPERTY", ")", ";", "this", ".", "exceptionDecl", "=", "exception", ";", "postReplaceChild", "(", "oldChild", ",", "exception", ",", "EXCEPTION_PROPERTY", ")", ";", "}", "public", "Block", "getBody", "(", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "body", "=", "new", "Block", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "body", ",", "BODY_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "body", ";", "}", "public", "void", "setBody", "(", "Block", "body", ")", "{", "if", "(", "body", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "body", ";", "preReplaceChild", "(", "oldChild", ",", "body", ",", "BODY_PROPERTY", ")", ";", "this", ".", "body", "=", "body", ";", "postReplaceChild", "(", "oldChild", ",", "body", ",", "BODY_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "2", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "exceptionDecl", "==", "null", "?", "0", ":", "getException", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "body", "==", "null", "?", "0", ":", "getBody", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,460
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ParenthesizedExpression", "extends", "Expression", "{", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ParenthesizedExpression", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "ParenthesizedExpression", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Expression", "expression", "=", "null", ";", "ParenthesizedExpression", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "PARENTHESIZED_EXPRESSION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "ParenthesizedExpression", "result", "=", "new", "ParenthesizedExpression", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "getExpression", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "expression", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "expression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "expression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "expression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "expression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,461
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ArrayType", "extends", "Type", "{", "public", "static", "final", "ChildPropertyDescriptor", "COMPONENT_TYPE_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ArrayType", ".", "class", ",", "\"\"", ",", "Type", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "ArrayType", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "COMPONENT_TYPE_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Type", "componentType", "=", "null", ";", "ArrayType", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "COMPONENT_TYPE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getComponentType", "(", ")", ";", "}", "else", "{", "setComponentType", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "ARRAY_TYPE", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "ArrayType", "result", "=", "new", "ArrayType", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setComponentType", "(", "(", "Type", ")", "getComponentType", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getComponentType", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Type", "getComponentType", "(", ")", "{", "if", "(", "this", ".", "componentType", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "componentType", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "componentType", "=", "new", "SimpleType", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "componentType", ",", "COMPONENT_TYPE_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "componentType", ";", "}", "public", "void", "setComponentType", "(", "Type", "componentType", ")", "{", "if", "(", "componentType", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "componentType", ";", "preReplaceChild", "(", "oldChild", ",", "componentType", ",", "COMPONENT_TYPE_PROPERTY", ")", ";", "this", ".", "componentType", "=", "componentType", ";", "postReplaceChild", "(", "oldChild", ",", "componentType", ",", "COMPONENT_TYPE_PROPERTY", ")", ";", "}", "public", "Type", "getElementType", "(", ")", "{", "Type", "t", "=", "getComponentType", "(", ")", ";", "while", "(", "t", ".", "isArrayType", "(", ")", ")", "{", "t", "=", "(", "(", "ArrayType", ")", "t", ")", ".", "getComponentType", "(", ")", ";", "}", "return", "t", ";", "}", "public", "int", "getDimensions", "(", ")", "{", "Type", "t", "=", "getComponentType", "(", ")", ";", "int", "dimensions", "=", "1", ";", "while", "(", "t", ".", "isArrayType", "(", ")", ")", "{", "dimensions", "++", ";", "t", "=", "(", "(", "ArrayType", ")", "t", ")", ".", "getComponentType", "(", ")", ";", "}", "return", "dimensions", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "componentType", "==", "null", "?", "0", ":", "getComponentType", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,462
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "final", "class", "SingleMemberAnnotation", "extends", "Annotation", "{", "public", "static", "final", "ChildPropertyDescriptor", "TYPE_NAME_PROPERTY", "=", "internalTypeNamePropertyFactory", "(", "SingleMemberAnnotation", ".", "class", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "VALUE_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "SingleMemberAnnotation", ".", "class", ",", "\"value\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "SingleMemberAnnotation", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "TYPE_NAME_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "VALUE_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Expression", "value", "=", "null", ";", "SingleMemberAnnotation", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "unsupportedIn2", "(", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "TYPE_NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getTypeName", "(", ")", ";", "}", "else", "{", "setTypeName", "(", "(", "Name", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "VALUE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getValue", "(", ")", ";", "}", "else", "{", "setValue", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "ChildPropertyDescriptor", "internalTypeNameProperty", "(", ")", "{", "return", "TYPE_NAME_PROPERTY", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "SINGLE_MEMBER_ANNOTATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "SingleMemberAnnotation", "result", "=", "new", "SingleMemberAnnotation", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setTypeName", "(", "(", "Name", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getTypeName", "(", ")", ")", ")", ";", "result", ".", "setValue", "(", "(", "Expression", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getValue", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getTypeName", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getValue", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getValue", "(", ")", "{", "if", "(", "this", ".", "value", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "value", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "value", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "value", ",", "VALUE_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "value", ";", "}", "public", "void", "setValue", "(", "Expression", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "value", ";", "preReplaceChild", "(", "oldChild", ",", "value", ",", "VALUE_PROPERTY", ")", ";", "this", ".", "value", "=", "value", ";", "postReplaceChild", "(", "oldChild", ",", "value", ",", "VALUE_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "typeName", "==", "null", "?", "0", ":", "getTypeName", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "value", "==", "null", "?", "0", ":", "getValue", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,463
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "TypeLiteral", "extends", "Expression", "{", "public", "static", "final", "ChildPropertyDescriptor", "TYPE_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "TypeLiteral", ".", "class", ",", "\"type\"", ",", "Type", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "TypeLiteral", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "TYPE_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Type", "type", "=", "null", ";", "TypeLiteral", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "TYPE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getType", "(", ")", ";", "}", "else", "{", "setType", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "TYPE_LITERAL", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "TypeLiteral", "result", "=", "new", "TypeLiteral", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setType", "(", "(", "Type", ")", "getType", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getType", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Type", "getType", "(", ")", "{", "if", "(", "this", ".", "type", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "type", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "type", "=", "this", ".", "ast", ".", "newPrimitiveType", "(", "PrimitiveType", ".", "INT", ")", ";", "postLazyInit", "(", "this", ".", "type", ",", "TYPE_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "type", ";", "}", "public", "void", "setType", "(", "Type", "type", ")", "{", "if", "(", "type", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "type", ";", "preReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "this", ".", "type", "=", "type", ";", "postReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "type", "==", "null", "?", "0", ":", "getType", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,464
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "public", "abstract", "class", "Name", "extends", "Expression", "implements", "IDocElement", "{", "static", "final", "int", "BASE_NAME_NODE_SIZE", "=", "BASE_NODE_SIZE", "+", "1", "*", "4", ";", "int", "index", ";", "Name", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "public", "final", "boolean", "isSimpleName", "(", ")", "{", "return", "(", "this", "instanceof", "SimpleName", ")", ";", "}", "public", "final", "boolean", "isQualifiedName", "(", ")", "{", "return", "(", "this", "instanceof", "QualifiedName", ")", ";", "}", "public", "final", "IBinding", "resolveBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveName", "(", "this", ")", ";", "}", "public", "final", "String", "getFullyQualifiedName", "(", ")", "{", "if", "(", "isSimpleName", "(", ")", ")", "{", "return", "(", "(", "SimpleName", ")", "this", ")", ".", "getIdentifier", "(", ")", ";", "}", "else", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", "50", ")", ";", "appendName", "(", "buffer", ")", ";", "return", "new", "String", "(", "buffer", ")", ";", "}", "}", "abstract", "void", "appendName", "(", "StringBuffer", "buffer", ")", ";", "}", "</s>" ]
4,465
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "EnumConstantDeclaration", "extends", "BodyDeclaration", "{", "public", "static", "final", "ChildPropertyDescriptor", "JAVADOC_PROPERTY", "=", "internalJavadocPropertyFactory", "(", "EnumConstantDeclaration", ".", "class", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "MODIFIERS2_PROPERTY", "=", "internalModifiers2PropertyFactory", "(", "EnumConstantDeclaration", ".", "class", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "EnumConstantDeclaration", ".", "class", ",", "\"name\"", ",", "SimpleName", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "ARGUMENTS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "EnumConstantDeclaration", ".", "class", ",", "\"arguments\"", ",", "Expression", ".", "class", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "ANONYMOUS_CLASS_DECLARATION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "EnumConstantDeclaration", ".", "class", ",", "\"\"", ",", "AnonymousClassDeclaration", ".", "class", ",", "OPTIONAL", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "6", ")", ";", "createPropertyList", "(", "EnumConstantDeclaration", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "JAVADOC_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "MODIFIERS2_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "ARGUMENTS_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "ANONYMOUS_CLASS_DECLARATION_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "SimpleName", "constantName", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "arguments", "=", "new", "ASTNode", ".", "NodeList", "(", "ARGUMENTS_PROPERTY", ")", ";", "private", "AnonymousClassDeclaration", "optionalAnonymousClassDeclaration", "=", "null", ";", "EnumConstantDeclaration", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "unsupportedIn2", "(", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "JAVADOC_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getJavadoc", "(", ")", ";", "}", "else", "{", "setJavadoc", "(", "(", "Javadoc", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "ANONYMOUS_CLASS_DECLARATION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getAnonymousClassDeclaration", "(", ")", ";", "}", "else", "{", "setAnonymousClassDeclaration", "(", "(", "AnonymousClassDeclaration", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "MODIFIERS2_PROPERTY", ")", "{", "return", "modifiers", "(", ")", ";", "}", "if", "(", "property", "==", "ARGUMENTS_PROPERTY", ")", "{", "return", "arguments", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "ChildPropertyDescriptor", "internalJavadocProperty", "(", ")", "{", "return", "JAVADOC_PROPERTY", ";", "}", "final", "ChildListPropertyDescriptor", "internalModifiers2Property", "(", ")", "{", "return", "MODIFIERS2_PROPERTY", ";", "}", "final", "SimplePropertyDescriptor", "internalModifiersProperty", "(", ")", "{", "return", "null", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "ENUM_CONSTANT_DECLARATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "EnumConstantDeclaration", "result", "=", "new", "EnumConstantDeclaration", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setJavadoc", "(", "(", "Javadoc", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getJavadoc", "(", ")", ")", ")", ";", "result", ".", "modifiers", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "modifiers", "(", ")", ")", ")", ";", "result", ".", "setName", "(", "(", "SimpleName", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "arguments", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "arguments", "(", ")", ")", ")", ";", "result", ".", "setAnonymousClassDeclaration", "(", "(", "AnonymousClassDeclaration", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getAnonymousClassDeclaration", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getJavadoc", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "modifiers", ")", ";", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "arguments", ")", ";", "acceptChild", "(", "visitor", ",", "getAnonymousClassDeclaration", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "SimpleName", "getName", "(", ")", "{", "if", "(", "this", ".", "constantName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "constantName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "constantName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "constantName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "constantName", ";", "}", "public", "void", "setName", "(", "SimpleName", "constantName", ")", "{", "if", "(", "constantName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "constantName", ";", "preReplaceChild", "(", "oldChild", ",", "constantName", ",", "NAME_PROPERTY", ")", ";", "this", ".", "constantName", "=", "constantName", ";", "postReplaceChild", "(", "oldChild", ",", "constantName", ",", "NAME_PROPERTY", ")", ";", "}", "public", "List", "arguments", "(", ")", "{", "return", "this", ".", "arguments", ";", "}", "public", "AnonymousClassDeclaration", "getAnonymousClassDeclaration", "(", ")", "{", "return", "this", ".", "optionalAnonymousClassDeclaration", ";", "}", "public", "void", "setAnonymousClassDeclaration", "(", "AnonymousClassDeclaration", "decl", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalAnonymousClassDeclaration", ";", "preReplaceChild", "(", "oldChild", ",", "decl", ",", "ANONYMOUS_CLASS_DECLARATION_PROPERTY", ")", ";", "this", ".", "optionalAnonymousClassDeclaration", "=", "decl", ";", "postReplaceChild", "(", "oldChild", ",", "decl", ",", "ANONYMOUS_CLASS_DECLARATION_PROPERTY", ")", ";", "}", "public", "IMethodBinding", "resolveConstructorBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveConstructor", "(", "this", ")", ";", "}", "public", "IVariableBinding", "resolveVariable", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveVariable", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "3", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalDocComment", "==", "null", "?", "0", ":", "getJavadoc", "(", ")", ".", "treeSize", "(", ")", ")", "+", "this", ".", "modifiers", ".", "listSize", "(", ")", "+", "(", "this", ".", "constantName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", "+", "this", ".", "arguments", ".", "listSize", "(", ")", "+", "(", "this", ".", "optionalAnonymousClassDeclaration", "==", "null", "?", "0", ":", "getAnonymousClassDeclaration", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,466
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "InvalidInputException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "Scanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "TerminalTokens", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "Util", ";", "class", "DefaultCommentMapper", "{", "Comment", "[", "]", "comments", ";", "Scanner", "scanner", ";", "int", "leadingPtr", ";", "ASTNode", "[", "]", "leadingNodes", ";", "long", "[", "]", "leadingIndexes", ";", "int", "trailingPtr", ",", "lastTrailingPtr", ";", "ASTNode", "[", "]", "trailingNodes", ";", "long", "[", "]", "trailingIndexes", ";", "static", "final", "int", "STORAGE_INCREMENT", "=", "16", ";", "DefaultCommentMapper", "(", "Comment", "[", "]", "table", ")", "{", "this", ".", "comments", "=", "table", ";", "}", "boolean", "hasSameTable", "(", "Comment", "[", "]", "table", ")", "{", "return", "this", ".", "comments", "==", "table", ";", "}", "Comment", "getComment", "(", "int", "position", ")", "{", "if", "(", "this", ".", "comments", "==", "null", ")", "{", "return", "null", ";", "}", "int", "size", "=", "this", ".", "comments", ".", "length", ";", "if", "(", "size", "==", "0", ")", "{", "return", "null", ";", "}", "int", "index", "=", "getCommentIndex", "(", "0", ",", "position", ",", "0", ")", ";", "if", "(", "index", "<", "0", ")", "{", "return", "null", ";", "}", "return", "this", ".", "comments", "[", "index", "]", ";", "}", "private", "int", "getCommentIndex", "(", "int", "start", ",", "int", "position", ",", "int", "exact", ")", "{", "if", "(", "position", "==", "0", ")", "{", "if", "(", "this", ".", "comments", ".", "length", ">", "0", "&&", "this", ".", "comments", "[", "0", "]", ".", "getStartPosition", "(", ")", "==", "0", ")", "{", "return", "0", ";", "}", "return", "-", "1", ";", "}", "int", "bottom", "=", "start", ",", "top", "=", "this", ".", "comments", ".", "length", "-", "1", ";", "int", "i", "=", "0", ",", "index", "=", "-", "1", ";", "Comment", "comment", "=", "null", ";", "while", "(", "bottom", "<=", "top", ")", "{", "i", "=", "bottom", "+", "(", "top", "-", "bottom", ")", "/", "2", ";", "comment", "=", "this", ".", "comments", "[", "i", "]", ";", "int", "commentStart", "=", "comment", ".", "getStartPosition", "(", ")", ";", "if", "(", "position", "<", "commentStart", ")", "{", "top", "=", "i", "-", "1", ";", "}", "else", "if", "(", "position", ">=", "(", "commentStart", "+", "comment", ".", "getLength", "(", ")", ")", ")", "{", "bottom", "=", "i", "+", "1", ";", "}", "else", "{", "index", "=", "i", ";", "break", ";", "}", "}", "if", "(", "index", "<", "0", "&&", "exact", "!=", "0", ")", "{", "comment", "=", "this", ".", "comments", "[", "i", "]", ";", "if", "(", "position", "<", "comment", ".", "getStartPosition", "(", ")", ")", "{", "return", "exact", "<", "0", "?", "i", "-", "1", ":", "i", ";", "}", "else", "{", "return", "exact", "<", "0", "?", "i", ":", "i", "+", "1", ";", "}", "}", "return", "index", ";", "}", "public", "int", "getExtendedStartPosition", "(", "ASTNode", "node", ")", "{", "if", "(", "this", ".", "leadingPtr", ">=", "0", ")", "{", "long", "range", "=", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "range", "<", "0", "&&", "i", "<=", "this", ".", "leadingPtr", ";", "i", "++", ")", "{", "if", "(", "this", ".", "leadingNodes", "[", "i", "]", "==", "node", ")", "range", "=", "this", ".", "leadingIndexes", "[", "i", "]", ";", "}", "if", "(", "range", ">=", "0", ")", "{", "return", "this", ".", "comments", "[", "(", "int", ")", "(", "range", ">>", "32", ")", "]", ".", "getStartPosition", "(", ")", ";", "}", "}", "return", "node", ".", "getStartPosition", "(", ")", ";", "}", "public", "final", "int", "getLineNumber", "(", "int", "position", ",", "int", "[", "]", "lineRange", ")", "{", "int", "[", "]", "lineEnds", "=", "this", ".", "scanner", ".", "lineEnds", ";", "int", "length", "=", "lineEnds", ".", "length", ";", "return", "Util", ".", "getLineNumber", "(", "position", ",", "lineEnds", ",", "(", "lineRange", "[", "0", "]", ">", "length", "?", "length", ":", "lineRange", "[", "0", "]", ")", "-", "1", ",", "(", "lineRange", "[", "1", "]", ">", "length", "?", "length", ":", "lineRange", "[", "1", "]", ")", "-", "1", ")", ";", "}", "public", "int", "getExtendedEnd", "(", "ASTNode", "node", ")", "{", "int", "end", "=", "node", ".", "getStartPosition", "(", ")", "+", "node", ".", "getLength", "(", ")", ";", "if", "(", "this", ".", "trailingPtr", ">=", "0", ")", "{", "long", "range", "=", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "range", "<", "0", "&&", "i", "<=", "this", ".", "trailingPtr", ";", "i", "++", ")", "{", "if", "(", "this", ".", "trailingNodes", "[", "i", "]", "==", "node", ")", "range", "=", "this", ".", "trailingIndexes", "[", "i", "]", ";", "}", "if", "(", "range", ">=", "0", ")", "{", "Comment", "lastComment", "=", "this", ".", "comments", "[", "(", "int", ")", "range", "]", ";", "end", "=", "lastComment", ".", "getStartPosition", "(", ")", "+", "lastComment", ".", "getLength", "(", ")", ";", "}", "}", "return", "end", "-", "1", ";", "}", "public", "int", "getExtendedLength", "(", "ASTNode", "node", ")", "{", "return", "getExtendedEnd", "(", "node", ")", "-", "getExtendedStartPosition", "(", "node", ")", "+", "1", ";", "}", "int", "firstLeadingCommentIndex", "(", "ASTNode", "node", ")", "{", "if", "(", "this", ".", "leadingPtr", ">=", "0", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<=", "this", ".", "leadingPtr", ";", "i", "++", ")", "{", "if", "(", "this", ".", "leadingNodes", "[", "i", "]", "==", "node", ")", "{", "return", "(", "int", ")", "(", "this", ".", "leadingIndexes", "[", "i", "]", ">>", "32", ")", ";", "}", "}", "}", "return", "-", "1", ";", "}", "int", "lastTrailingCommentIndex", "(", "ASTNode", "node", ")", "{", "if", "(", "this", ".", "trailingPtr", ">=", "0", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<=", "this", ".", "trailingPtr", ";", "i", "++", ")", "{", "if", "(", "this", ".", "trailingNodes", "[", "i", "]", "==", "node", ")", "{", "return", "(", "int", ")", "this", ".", "trailingIndexes", "[", "i", "]", ";", "}", "}", "}", "return", "-", "1", ";", "}", "void", "initialize", "(", "CompilationUnit", "unit", ",", "Scanner", "sc", ")", "{", "this", ".", "leadingPtr", "=", "-", "1", ";", "this", ".", "trailingPtr", "=", "-", "1", ";", "this", ".", "comments", "=", "unit", ".", "optionalCommentTable", ";", "if", "(", "this", ".", "comments", "==", "null", ")", "{", "return", ";", "}", "int", "size", "=", "this", ".", "comments", ".", "length", ";", "if", "(", "size", "==", "0", ")", "{", "return", ";", "}", "this", ".", "scanner", "=", "sc", ";", "this", ".", "scanner", ".", "tokenizeWhiteSpace", "=", "true", ";", "DefaultASTVisitor", "commentVisitor", "=", "new", "CommentMapperVisitor", "(", ")", ";", "unit", ".", "accept", "(", "commentVisitor", ")", ";", "int", "leadingCount", "=", "this", ".", "leadingPtr", "+", "1", ";", "if", "(", "leadingCount", ">", "0", "&&", "leadingCount", "<", "this", ".", "leadingIndexes", ".", "length", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "leadingNodes", ",", "0", ",", "this", ".", "leadingNodes", "=", "new", "ASTNode", "[", "leadingCount", "]", ",", "0", ",", "leadingCount", ")", ";", "System", ".", "arraycopy", "(", "this", ".", "leadingIndexes", ",", "0", ",", "this", ".", "leadingIndexes", "=", "new", "long", "[", "leadingCount", "]", ",", "0", ",", "leadingCount", ")", ";", "}", "if", "(", "this", ".", "trailingPtr", ">=", "0", ")", "{", "while", "(", "this", ".", "trailingIndexes", "[", "this", ".", "trailingPtr", "]", "==", "-", "1", ")", "{", "this", ".", "trailingPtr", "--", ";", "if", "(", "this", ".", "trailingPtr", "<", "0", ")", "{", "this", ".", "trailingIndexes", "=", "null", ";", "this", ".", "trailingNodes", "=", "null", ";", "break", ";", "}", "}", "int", "trailingCount", "=", "this", ".", "trailingPtr", "+", "1", ";", "if", "(", "trailingCount", ">", "0", "&&", "trailingCount", "<", "this", ".", "trailingIndexes", ".", "length", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "trailingNodes", ",", "0", ",", "this", ".", "trailingNodes", "=", "new", "ASTNode", "[", "trailingCount", "]", ",", "0", ",", "trailingCount", ")", ";", "System", ".", "arraycopy", "(", "this", ".", "trailingIndexes", ",", "0", ",", "this", ".", "trailingIndexes", "=", "new", "long", "[", "trailingCount", "]", ",", "0", ",", "trailingCount", ")", ";", "}", "}", "this", ".", "scanner", "=", "null", ";", "}", "int", "storeLeadingComments", "(", "ASTNode", "node", ",", "int", "previousEnd", ",", "int", "[", "]", "parentLineRange", ")", "{", "int", "nodeStart", "=", "node", ".", "getStartPosition", "(", ")", ";", "int", "extended", "=", "nodeStart", ";", "int", "previousEndLine", "=", "getLineNumber", "(", "previousEnd", ",", "parentLineRange", ")", ";", "int", "nodeStartLine", "=", "getLineNumber", "(", "nodeStart", ",", "parentLineRange", ")", ";", "int", "idx", "=", "getCommentIndex", "(", "0", ",", "nodeStart", ",", "-", "1", ")", ";", "if", "(", "idx", "==", "-", "1", ")", "{", "return", "nodeStart", ";", "}", "int", "startIdx", "=", "-", "1", ";", "int", "endIdx", "=", "idx", ";", "int", "previousStart", "=", "nodeStart", ";", "while", "(", "idx", ">=", "0", "&&", "previousStart", ">=", "previousEnd", ")", "{", "Comment", "comment", "=", "this", ".", "comments", "[", "idx", "]", ";", "int", "commentStart", "=", "comment", ".", "getStartPosition", "(", ")", ";", "int", "end", "=", "commentStart", "+", "comment", ".", "getLength", "(", ")", "-", "1", ";", "int", "commentLine", "=", "getLineNumber", "(", "commentStart", ",", "parentLineRange", ")", ";", "if", "(", "end", "<=", "previousEnd", "||", "(", "commentLine", "==", "previousEndLine", "&&", "commentLine", "!=", "nodeStartLine", ")", ")", "{", "break", ";", "}", "else", "if", "(", "(", "end", "+", "1", ")", "<", "previousStart", ")", "{", "this", ".", "scanner", ".", "resetTo", "(", "end", "+", "1", ",", "previousStart", ")", ";", "try", "{", "int", "token", "=", "this", ".", "scanner", ".", "getNextToken", "(", ")", ";", "if", "(", "token", "!=", "TerminalTokens", ".", "TokenNameWHITESPACE", "||", "this", ".", "scanner", ".", "currentPosition", "!=", "previousStart", ")", "{", "if", "(", "idx", "==", "endIdx", ")", "{", "return", "nodeStart", ";", "}", "break", ";", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "return", "nodeStart", ";", "}", "char", "[", "]", "gap", "=", "this", ".", "scanner", ".", "getCurrentIdentifierSource", "(", ")", ";", "int", "nbrLine", "=", "0", ";", "int", "pos", "=", "-", "1", ";", "while", "(", "(", "pos", "=", "CharOperation", ".", "indexOf", "(", "'\\n'", ",", "gap", ",", "pos", "+", "1", ")", ")", ">=", "0", ")", "{", "nbrLine", "++", ";", "}", "if", "(", "nbrLine", ">", "1", ")", "{", "break", ";", "}", "}", "previousStart", "=", "commentStart", ";", "startIdx", "=", "idx", "--", ";", "}", "if", "(", "startIdx", "!=", "-", "1", ")", "{", "int", "commentStart", "=", "this", ".", "comments", "[", "startIdx", "]", ".", "getStartPosition", "(", ")", ";", "if", "(", "previousEnd", "<", "commentStart", "&&", "previousEndLine", "!=", "nodeStartLine", ")", "{", "int", "lastTokenEnd", "=", "previousEnd", ";", "this", ".", "scanner", ".", "resetTo", "(", "previousEnd", ",", "commentStart", ")", ";", "try", "{", "while", "(", "this", ".", "scanner", ".", "currentPosition", "<", "commentStart", ")", "{", "if", "(", "this", ".", "scanner", ".", "getNextToken", "(", ")", "!=", "TerminalTokens", ".", "TokenNameWHITESPACE", ")", "{", "lastTokenEnd", "=", "this", ".", "scanner", ".", "getCurrentTokenEndPosition", "(", ")", ";", "}", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "}", "int", "lastTokenLine", "=", "getLineNumber", "(", "lastTokenEnd", ",", "parentLineRange", ")", ";", "int", "length", "=", "this", ".", "comments", ".", "length", ";", "while", "(", "startIdx", "<", "length", "&&", "lastTokenLine", "==", "getLineNumber", "(", "this", ".", "comments", "[", "startIdx", "]", ".", "getStartPosition", "(", ")", ",", "parentLineRange", ")", "&&", "nodeStartLine", "!=", "lastTokenLine", ")", "{", "startIdx", "++", ";", "}", "}", "if", "(", "startIdx", "<=", "endIdx", ")", "{", "if", "(", "++", "this", ".", "leadingPtr", "==", "0", ")", "{", "this", ".", "leadingNodes", "=", "new", "ASTNode", "[", "STORAGE_INCREMENT", "]", ";", "this", ".", "leadingIndexes", "=", "new", "long", "[", "STORAGE_INCREMENT", "]", ";", "}", "else", "if", "(", "this", ".", "leadingPtr", "==", "this", ".", "leadingNodes", ".", "length", ")", "{", "int", "newLength", "=", "(", "this", ".", "leadingPtr", "*", "3", "/", "2", ")", "+", "STORAGE_INCREMENT", ";", "System", ".", "arraycopy", "(", "this", ".", "leadingNodes", ",", "0", ",", "this", ".", "leadingNodes", "=", "new", "ASTNode", "[", "newLength", "]", ",", "0", ",", "this", ".", "leadingPtr", ")", ";", "System", ".", "arraycopy", "(", "this", ".", "leadingIndexes", ",", "0", ",", "this", ".", "leadingIndexes", "=", "new", "long", "[", "newLength", "]", ",", "0", ",", "this", ".", "leadingPtr", ")", ";", "}", "this", ".", "leadingNodes", "[", "this", ".", "leadingPtr", "]", "=", "node", ";", "this", ".", "leadingIndexes", "[", "this", ".", "leadingPtr", "]", "=", "(", "(", "(", "long", ")", "startIdx", ")", "<<", "32", ")", "+", "endIdx", ";", "extended", "=", "this", ".", "comments", "[", "endIdx", "]", ".", "getStartPosition", "(", ")", ";", "}", "}", "return", "extended", ";", "}", "int", "storeTrailingComments", "(", "ASTNode", "node", ",", "int", "nextStart", ",", "boolean", "lastChild", ",", "int", "[", "]", "parentLineRange", ")", "{", "int", "nodeEnd", "=", "node", ".", "getStartPosition", "(", ")", "+", "node", ".", "getLength", "(", ")", "-", "1", ";", "if", "(", "nodeEnd", "==", "nextStart", ")", "{", "if", "(", "++", "this", ".", "trailingPtr", "==", "0", ")", "{", "this", ".", "trailingNodes", "=", "new", "ASTNode", "[", "STORAGE_INCREMENT", "]", ";", "this", ".", "trailingIndexes", "=", "new", "long", "[", "STORAGE_INCREMENT", "]", ";", "this", ".", "lastTrailingPtr", "=", "-", "1", ";", "}", "else", "if", "(", "this", ".", "trailingPtr", "==", "this", ".", "trailingNodes", ".", "length", ")", "{", "int", "newLength", "=", "(", "this", ".", "trailingPtr", "*", "3", "/", "2", ")", "+", "STORAGE_INCREMENT", ";", "System", ".", "arraycopy", "(", "this", ".", "trailingNodes", ",", "0", ",", "this", ".", "trailingNodes", "=", "new", "ASTNode", "[", "newLength", "]", ",", "0", ",", "this", ".", "trailingPtr", ")", ";", "System", ".", "arraycopy", "(", "this", ".", "trailingIndexes", ",", "0", ",", "this", ".", "trailingIndexes", "=", "new", "long", "[", "newLength", "]", ",", "0", ",", "this", ".", "trailingPtr", ")", ";", "}", "this", ".", "trailingNodes", "[", "this", ".", "trailingPtr", "]", "=", "node", ";", "this", ".", "trailingIndexes", "[", "this", ".", "trailingPtr", "]", "=", "-", "1", ";", "return", "nodeEnd", ";", "}", "int", "extended", "=", "nodeEnd", ";", "int", "nodeEndLine", "=", "getLineNumber", "(", "nodeEnd", ",", "parentLineRange", ")", ";", "int", "idx", "=", "getCommentIndex", "(", "0", ",", "nodeEnd", ",", "1", ")", ";", "if", "(", "idx", "==", "-", "1", ")", "{", "return", "nodeEnd", ";", "}", "int", "startIdx", "=", "idx", ";", "int", "endIdx", "=", "-", "1", ";", "int", "length", "=", "this", ".", "comments", ".", "length", ";", "int", "commentStart", "=", "extended", "+", "1", ";", "int", "previousEnd", "=", "nodeEnd", "+", "1", ";", "int", "sameLineIdx", "=", "-", "1", ";", "while", "(", "idx", "<", "length", "&&", "commentStart", "<", "nextStart", ")", "{", "Comment", "comment", "=", "this", ".", "comments", "[", "idx", "]", ";", "commentStart", "=", "comment", ".", "getStartPosition", "(", ")", ";", "if", "(", "commentStart", ">=", "nextStart", ")", "{", "break", ";", "}", "else", "if", "(", "previousEnd", "<", "commentStart", ")", "{", "this", ".", "scanner", ".", "resetTo", "(", "previousEnd", ",", "commentStart", ")", ";", "try", "{", "int", "token", "=", "this", ".", "scanner", ".", "getNextToken", "(", ")", ";", "if", "(", "token", "!=", "TerminalTokens", ".", "TokenNameWHITESPACE", "||", "this", ".", "scanner", ".", "currentPosition", "!=", "commentStart", ")", "{", "if", "(", "idx", "==", "startIdx", ")", "{", "return", "nodeEnd", ";", "}", "break", ";", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "return", "nodeEnd", ";", "}", "char", "[", "]", "gap", "=", "this", ".", "scanner", ".", "getCurrentIdentifierSource", "(", ")", ";", "int", "nbrLine", "=", "0", ";", "int", "pos", "=", "-", "1", ";", "while", "(", "(", "pos", "=", "CharOperation", ".", "indexOf", "(", "'\\n'", ",", "gap", ",", "pos", "+", "1", ")", ")", ">=", "0", ")", "{", "nbrLine", "++", ";", "}", "if", "(", "nbrLine", ">", "1", ")", "{", "break", ";", "}", "}", "int", "commentLine", "=", "getLineNumber", "(", "commentStart", ",", "parentLineRange", ")", ";", "if", "(", "commentLine", "==", "nodeEndLine", ")", "{", "sameLineIdx", "=", "idx", ";", "}", "previousEnd", "=", "commentStart", "+", "comment", ".", "getLength", "(", ")", ";", "endIdx", "=", "idx", "++", ";", "}", "if", "(", "endIdx", "!=", "-", "1", ")", "{", "if", "(", "!", "lastChild", ")", "{", "int", "nextLine", "=", "getLineNumber", "(", "nextStart", ",", "parentLineRange", ")", ";", "int", "previousLine", "=", "getLineNumber", "(", "previousEnd", ",", "parentLineRange", ")", ";", "if", "(", "(", "nextLine", "-", "previousLine", ")", "<=", "1", ")", "{", "if", "(", "sameLineIdx", "==", "-", "1", ")", "return", "nodeEnd", ";", "endIdx", "=", "sameLineIdx", ";", "}", "}", "if", "(", "++", "this", ".", "trailingPtr", "==", "0", ")", "{", "this", ".", "trailingNodes", "=", "new", "ASTNode", "[", "STORAGE_INCREMENT", "]", ";", "this", ".", "trailingIndexes", "=", "new", "long", "[", "STORAGE_INCREMENT", "]", ";", "this", ".", "lastTrailingPtr", "=", "-", "1", ";", "}", "else", "if", "(", "this", ".", "trailingPtr", "==", "this", ".", "trailingNodes", ".", "length", ")", "{", "int", "newLength", "=", "(", "this", ".", "trailingPtr", "*", "3", "/", "2", ")", "+", "STORAGE_INCREMENT", ";", "System", ".", "arraycopy", "(", "this", ".", "trailingNodes", ",", "0", ",", "this", ".", "trailingNodes", "=", "new", "ASTNode", "[", "newLength", "]", ",", "0", ",", "this", ".", "trailingPtr", ")", ";", "System", ".", "arraycopy", "(", "this", ".", "trailingIndexes", ",", "0", ",", "this", ".", "trailingIndexes", "=", "new", "long", "[", "newLength", "]", ",", "0", ",", "this", ".", "trailingPtr", ")", ";", "}", "this", ".", "trailingNodes", "[", "this", ".", "trailingPtr", "]", "=", "node", ";", "long", "nodeRange", "=", "(", "(", "(", "long", ")", "startIdx", ")", "<<", "32", ")", "+", "endIdx", ";", "this", ".", "trailingIndexes", "[", "this", ".", "trailingPtr", "]", "=", "nodeRange", ";", "extended", "=", "this", ".", "comments", "[", "endIdx", "]", ".", "getStartPosition", "(", ")", "+", "this", ".", "comments", "[", "endIdx", "]", ".", "getLength", "(", ")", "-", "1", ";", "ASTNode", "previousNode", "=", "node", ";", "int", "ptr", "=", "this", ".", "trailingPtr", "-", "1", ";", "while", "(", "ptr", ">=", "0", ")", "{", "long", "range", "=", "this", ".", "trailingIndexes", "[", "ptr", "]", ";", "if", "(", "range", "!=", "-", "1", ")", "break", ";", "ASTNode", "unresolved", "=", "this", ".", "trailingNodes", "[", "ptr", "]", ";", "if", "(", "previousNode", "!=", "unresolved", ".", "getParent", "(", ")", ")", "break", ";", "this", ".", "trailingIndexes", "[", "ptr", "]", "=", "nodeRange", ";", "previousNode", "=", "unresolved", ";", "ptr", "--", ";", "}", "if", "(", "ptr", ">", "this", ".", "lastTrailingPtr", ")", "{", "int", "offset", "=", "ptr", "-", "this", ".", "lastTrailingPtr", ";", "for", "(", "int", "i", "=", "ptr", "+", "1", ";", "i", "<=", "this", ".", "trailingPtr", ";", "i", "++", ")", "{", "this", ".", "trailingNodes", "[", "i", "-", "offset", "]", "=", "this", ".", "trailingNodes", "[", "i", "]", ";", "this", ".", "trailingIndexes", "[", "i", "-", "offset", "]", "=", "this", ".", "trailingIndexes", "[", "i", "]", ";", "}", "this", ".", "trailingPtr", "-=", "offset", ";", "}", "this", ".", "lastTrailingPtr", "=", "this", ".", "trailingPtr", ";", "}", "return", "extended", ";", "}", "class", "CommentMapperVisitor", "extends", "DefaultASTVisitor", "{", "ASTNode", "topSiblingParent", "=", "null", ";", "ASTNode", "[", "]", "siblings", "=", "new", "ASTNode", "[", "10", "]", ";", "int", "[", "]", "[", "]", "parentLineRange", "=", "new", "int", "[", "10", "]", "[", "]", ";", "int", "siblingPtr", "=", "-", "1", ";", "protected", "boolean", "visitNode", "(", "ASTNode", "node", ")", "{", "ASTNode", "parent", "=", "node", ".", "getParent", "(", ")", ";", "int", "previousEnd", "=", "parent", ".", "getStartPosition", "(", ")", ";", "ASTNode", "sibling", "=", "parent", "==", "this", ".", "topSiblingParent", "?", "(", "ASTNode", ")", "this", ".", "siblings", "[", "this", ".", "siblingPtr", "]", ":", "null", ";", "if", "(", "sibling", "!=", "null", ")", "{", "try", "{", "previousEnd", "=", "storeTrailingComments", "(", "sibling", ",", "node", ".", "getStartPosition", "(", ")", ",", "false", ",", "this", ".", "parentLineRange", "[", "this", ".", "siblingPtr", "]", ")", ";", "}", "catch", "(", "Exception", "ex", ")", "{", "}", "}", "if", "(", "(", "node", ".", "typeAndFlags", "&", "ASTNode", ".", "MALFORMED", ")", "!=", "0", ")", "{", "return", "false", ";", "}", "int", "[", "]", "previousLineRange", "=", "this", ".", "siblingPtr", ">", "-", "1", "?", "this", ".", "parentLineRange", "[", "this", ".", "siblingPtr", "]", ":", "new", "int", "[", "]", "{", "1", ",", "DefaultCommentMapper", ".", "this", ".", "scanner", ".", "linePtr", "+", "1", "}", ";", "try", "{", "storeLeadingComments", "(", "node", ",", "previousEnd", ",", "previousLineRange", ")", ";", "}", "catch", "(", "Exception", "ex", ")", "{", "}", "if", "(", "this", ".", "topSiblingParent", "!=", "parent", ")", "{", "if", "(", "this", ".", "siblings", ".", "length", "==", "++", "this", ".", "siblingPtr", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "siblings", ",", "0", ",", "this", ".", "siblings", "=", "new", "ASTNode", "[", "this", ".", "siblingPtr", "*", "2", "]", ",", "0", ",", "this", ".", "siblingPtr", ")", ";", "System", ".", "arraycopy", "(", "this", ".", "parentLineRange", ",", "0", ",", "this", ".", "parentLineRange", "=", "new", "int", "[", "this", ".", "siblingPtr", "*", "2", "]", "[", "]", ",", "0", ",", "this", ".", "siblingPtr", ")", ";", "}", "if", "(", "this", ".", "topSiblingParent", "==", "null", ")", "{", "this", ".", "parentLineRange", "[", "this", ".", "siblingPtr", "]", "=", "previousLineRange", ";", "}", "else", "{", "int", "parentStart", "=", "parent", ".", "getStartPosition", "(", ")", ";", "int", "firstLine", "=", "getLineNumber", "(", "parentStart", ",", "previousLineRange", ")", ";", "int", "lastLine", "=", "getLineNumber", "(", "parentStart", "+", "parent", ".", "getLength", "(", ")", "-", "1", ",", "previousLineRange", ")", ";", "if", "(", "this", ".", "parentLineRange", "[", "this", ".", "siblingPtr", "]", "==", "null", ")", "{", "this", ".", "parentLineRange", "[", "this", ".", "siblingPtr", "]", "=", "new", "int", "[", "]", "{", "firstLine", ",", "lastLine", "}", ";", "}", "else", "{", "int", "[", "]", "lineRange", "=", "this", ".", "parentLineRange", "[", "this", ".", "siblingPtr", "]", ";", "lineRange", "[", "0", "]", "=", "firstLine", ";", "lineRange", "[", "1", "]", "=", "lastLine", ";", "}", "}", "this", ".", "topSiblingParent", "=", "parent", ";", "}", "this", ".", "siblings", "[", "this", ".", "siblingPtr", "]", "=", "node", ";", "return", "true", ";", "}", "protected", "void", "endVisitNode", "(", "ASTNode", "node", ")", "{", "ASTNode", "sibling", "=", "this", ".", "topSiblingParent", "==", "node", "?", "(", "ASTNode", ")", "this", ".", "siblings", "[", "this", ".", "siblingPtr", "]", ":", "null", ";", "if", "(", "sibling", "!=", "null", ")", "{", "try", "{", "storeTrailingComments", "(", "sibling", ",", "node", ".", "getStartPosition", "(", ")", "+", "node", ".", "getLength", "(", ")", "-", "1", ",", "true", ",", "this", ".", "parentLineRange", "[", "this", ".", "siblingPtr", "]", ")", ";", "}", "catch", "(", "Exception", "ex", ")", "{", "}", "}", "if", "(", "this", ".", "topSiblingParent", "!=", "null", "&&", "this", ".", "topSiblingParent", "==", "node", ")", "{", "this", ".", "siblingPtr", "--", ";", "this", ".", "topSiblingParent", "=", "node", ".", "getParent", "(", ")", ";", "}", "}", "public", "boolean", "visit", "(", "Modifier", "modifier", ")", "{", "return", "false", ";", "}", "public", "boolean", "visit", "(", "CompilationUnit", "node", ")", "{", "return", "true", ";", "}", "}", "}", "</s>" ]
4,467
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "Iterator", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "VariableDeclarationStatement", "extends", "Statement", "{", "public", "static", "final", "SimplePropertyDescriptor", "MODIFIERS_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "VariableDeclarationStatement", ".", "class", ",", "\"modifiers\"", ",", "int", ".", "class", ",", "MANDATORY", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "MODIFIERS2_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "VariableDeclarationStatement", ".", "class", ",", "\"modifiers\"", ",", "IExtendedModifier", ".", "class", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "TYPE_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "VariableDeclarationStatement", ".", "class", ",", "\"type\"", ",", "Type", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "FRAGMENTS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "VariableDeclarationStatement", ".", "class", ",", "\"fragments\"", ",", "VariableDeclarationFragment", ".", "class", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "VariableDeclarationStatement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "MODIFIERS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "TYPE_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "FRAGMENTS_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "propertyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "VariableDeclarationStatement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "MODIFIERS2_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "TYPE_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "FRAGMENTS_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "ASTNode", ".", "NodeList", "modifiers", "=", "null", ";", "private", "int", "modifierFlags", "=", "Modifier", ".", "NONE", ";", "private", "Type", "baseType", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "variableDeclarationFragments", "=", "new", "ASTNode", ".", "NodeList", "(", "FRAGMENTS_PROPERTY", ")", ";", "VariableDeclarationStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "if", "(", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "this", ".", "modifiers", "=", "new", "ASTNode", ".", "NodeList", "(", "MODIFIERS2_PROPERTY", ")", ";", "}", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "int", "internalGetSetIntProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "int", "value", ")", "{", "if", "(", "property", "==", "MODIFIERS_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getModifiers", "(", ")", ";", "}", "else", "{", "setModifiers", "(", "value", ")", ";", "return", "0", ";", "}", "}", "return", "super", ".", "internalGetSetIntProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "TYPE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getType", "(", ")", ";", "}", "else", "{", "setType", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "MODIFIERS2_PROPERTY", ")", "{", "return", "modifiers", "(", ")", ";", "}", "if", "(", "property", "==", "FRAGMENTS_PROPERTY", ")", "{", "return", "fragments", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "VARIABLE_DECLARATION_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "VariableDeclarationStatement", "result", "=", "new", "VariableDeclarationStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "result", ".", "setModifiers", "(", "getModifiers", "(", ")", ")", ";", "}", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "modifiers", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "modifiers", "(", ")", ")", ")", ";", "}", "result", ".", "setType", "(", "(", "Type", ")", "getType", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "fragments", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "fragments", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "modifiers", ")", ";", "}", "acceptChild", "(", "visitor", ",", "getType", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "variableDeclarationFragments", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "List", "modifiers", "(", ")", "{", "if", "(", "this", ".", "modifiers", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "return", "this", ".", "modifiers", ";", "}", "public", "int", "getModifiers", "(", ")", "{", "if", "(", "this", ".", "modifiers", "==", "null", ")", "{", "return", "this", ".", "modifierFlags", ";", "}", "else", "{", "int", "computedModifierFlags", "=", "Modifier", ".", "NONE", ";", "for", "(", "Iterator", "it", "=", "modifiers", "(", ")", ".", "iterator", "(", ")", ";", "it", ".", "hasNext", "(", ")", ";", ")", "{", "Object", "x", "=", "it", ".", "next", "(", ")", ";", "if", "(", "x", "instanceof", "Modifier", ")", "{", "computedModifierFlags", "|=", "(", "(", "Modifier", ")", "x", ")", ".", "getKeyword", "(", ")", ".", "toFlagValue", "(", ")", ";", "}", "}", "return", "computedModifierFlags", ";", "}", "}", "public", "void", "setModifiers", "(", "int", "modifiers", ")", "{", "internalSetModifiers", "(", "modifiers", ")", ";", "}", "final", "void", "internalSetModifiers", "(", "int", "pmodifiers", ")", "{", "supportedOnlyIn2", "(", ")", ";", "preValueChange", "(", "MODIFIERS_PROPERTY", ")", ";", "this", ".", "modifierFlags", "=", "pmodifiers", ";", "postValueChange", "(", "MODIFIERS_PROPERTY", ")", ";", "}", "public", "Type", "getType", "(", ")", "{", "if", "(", "this", ".", "baseType", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "baseType", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "baseType", "=", "this", ".", "ast", ".", "newPrimitiveType", "(", "PrimitiveType", ".", "INT", ")", ";", "postLazyInit", "(", "this", ".", "baseType", ",", "TYPE_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "baseType", ";", "}", "public", "void", "setType", "(", "Type", "type", ")", "{", "if", "(", "type", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "baseType", ";", "preReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "this", ".", "baseType", "=", "type", ";", "postReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "}", "public", "List", "fragments", "(", ")", "{", "return", "this", ".", "variableDeclarationFragments", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "4", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "modifiers", "==", "null", "?", "0", ":", "this", ".", "modifiers", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "baseType", "==", "null", "?", "0", ":", "getType", "(", ")", ".", "treeSize", "(", ")", ")", "+", "this", ".", "variableDeclarationFragments", ".", "listSize", "(", ")", ";", "}", "}", "</s>" ]
4,468
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "CastExpression", "extends", "Expression", "{", "public", "static", "final", "ChildPropertyDescriptor", "TYPE_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "CastExpression", ".", "class", ",", "\"type\"", ",", "Type", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "CastExpression", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "CastExpression", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "TYPE_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Type", "type", "=", "null", ";", "private", "Expression", "expression", "=", "null", ";", "CastExpression", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "TYPE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getType", "(", ")", ";", "}", "else", "{", "setType", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "CAST_EXPRESSION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "CastExpression", "result", "=", "new", "CastExpression", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setType", "(", "(", "Type", ")", "getType", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "getExpression", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getType", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Type", "getType", "(", ")", "{", "if", "(", "this", ".", "type", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "type", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "type", "=", "this", ".", "ast", ".", "newPrimitiveType", "(", "PrimitiveType", ".", "INT", ")", ";", "postLazyInit", "(", "this", ".", "type", ",", "TYPE_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "type", ";", "}", "public", "void", "setType", "(", "Type", "type", ")", "{", "if", "(", "type", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "type", ";", "preReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "this", ".", "type", "=", "type", ";", "postReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "expression", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "expression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "expression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "expression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "2", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "expression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "type", "==", "null", "?", "0", ":", "getType", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,469
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "final", "class", "TagElement", "extends", "ASTNode", "implements", "IDocElement", "{", "public", "static", "final", "SimplePropertyDescriptor", "TAG_NAME_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "TagElement", ".", "class", ",", "\"tagName\"", ",", "String", ".", "class", ",", "OPTIONAL", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "FRAGMENTS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "TagElement", ".", "class", ",", "\"fragments\"", ",", "IDocElement", ".", "class", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "TagElement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "TAG_NAME_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "FRAGMENTS_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "public", "static", "final", "String", "TAG_AUTHOR", "=", "\"@author\"", ";", "public", "static", "final", "String", "TAG_CODE", "=", "\"@code\"", ";", "public", "static", "final", "String", "TAG_DEPRECATED", "=", "\"@deprecated\"", ";", "public", "static", "final", "String", "TAG_DOCROOT", "=", "\"@docRoot\"", ";", "public", "static", "final", "String", "TAG_EXCEPTION", "=", "\"@exception\"", ";", "public", "static", "final", "String", "TAG_INHERITDOC", "=", "\"@inheritDoc\"", ";", "public", "static", "final", "String", "TAG_LINK", "=", "\"@link\"", ";", "public", "static", "final", "String", "TAG_LINKPLAIN", "=", "\"@linkplain\"", ";", "public", "static", "final", "String", "TAG_LITERAL", "=", "\"@literal\"", ";", "public", "static", "final", "String", "TAG_PARAM", "=", "\"@param\"", ";", "public", "static", "final", "String", "TAG_RETURN", "=", "\"@return\"", ";", "public", "static", "final", "String", "TAG_SEE", "=", "\"@see\"", ";", "public", "static", "final", "String", "TAG_SERIAL", "=", "\"@serial\"", ";", "public", "static", "final", "String", "TAG_SERIALDATA", "=", "\"@serialData\"", ";", "public", "static", "final", "String", "TAG_SERIALFIELD", "=", "\"@serialField\"", ";", "public", "static", "final", "String", "TAG_SINCE", "=", "\"@since\"", ";", "public", "static", "final", "String", "TAG_THROWS", "=", "\"@throws\"", ";", "public", "static", "final", "String", "TAG_VALUE", "=", "\"@value\"", ";", "public", "static", "final", "String", "TAG_VERSION", "=", "\"@version\"", ";", "private", "String", "optionalTagName", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "fragments", "=", "new", "ASTNode", ".", "NodeList", "(", "FRAGMENTS_PROPERTY", ")", ";", "TagElement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "Object", "internalGetSetObjectProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "Object", "value", ")", "{", "if", "(", "property", "==", "TAG_NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getTagName", "(", ")", ";", "}", "else", "{", "setTagName", "(", "(", "String", ")", "value", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetObjectProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "FRAGMENTS_PROPERTY", ")", "{", "return", "fragments", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "TAG_ELEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "TagElement", "result", "=", "new", "TagElement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setTagName", "(", "getTagName", "(", ")", ")", ";", "result", ".", "fragments", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "fragments", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "fragments", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "String", "getTagName", "(", ")", "{", "return", "this", ".", "optionalTagName", ";", "}", "public", "void", "setTagName", "(", "String", "tagName", ")", "{", "preValueChange", "(", "TAG_NAME_PROPERTY", ")", ";", "this", ".", "optionalTagName", "=", "tagName", ";", "postValueChange", "(", "TAG_NAME_PROPERTY", ")", ";", "}", "public", "List", "fragments", "(", ")", "{", "return", "this", ".", "fragments", ";", "}", "public", "boolean", "isNested", "(", ")", "{", "return", "(", "getParent", "(", ")", "instanceof", "TagElement", ")", ";", "}", "int", "memSize", "(", ")", "{", "int", "size", "=", "BASE_NODE_SIZE", "+", "2", "*", "4", "+", "stringSize", "(", "this", ".", "optionalTagName", ")", ";", "return", "size", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "this", ".", "fragments", ".", "listSize", "(", ")", ";", "}", "}", "</s>" ]
4,470
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Map", ";", "public", "class", "PostfixExpression", "extends", "Expression", "{", "public", "static", "class", "Operator", "{", "private", "String", "token", ";", "private", "Operator", "(", "String", "token", ")", "{", "this", ".", "token", "=", "token", ";", "}", "public", "String", "toString", "(", ")", "{", "return", "this", ".", "token", ";", "}", "public", "static", "final", "Operator", "INCREMENT", "=", "new", "Operator", "(", "\"++\"", ")", ";", "public", "static", "final", "Operator", "DECREMENT", "=", "new", "Operator", "(", "\"--\"", ")", ";", "private", "static", "final", "Map", "CODES", ";", "static", "{", "CODES", "=", "new", "HashMap", "(", "20", ")", ";", "Operator", "[", "]", "ops", "=", "{", "INCREMENT", ",", "DECREMENT", ",", "}", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "ops", ".", "length", ";", "i", "++", ")", "{", "CODES", ".", "put", "(", "ops", "[", "i", "]", ".", "toString", "(", ")", ",", "ops", "[", "i", "]", ")", ";", "}", "}", "public", "static", "Operator", "toOperator", "(", "String", "token", ")", "{", "return", "(", "Operator", ")", "CODES", ".", "get", "(", "token", ")", ";", "}", "}", "public", "static", "final", "SimplePropertyDescriptor", "OPERATOR_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "PostfixExpression", ".", "class", ",", "\"operator\"", ",", "PostfixExpression", ".", "Operator", ".", "class", ",", "MANDATORY", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "OPERAND_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "PostfixExpression", ".", "class", ",", "\"operand\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "PostfixExpression", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "OPERAND_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "OPERATOR_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "PostfixExpression", ".", "Operator", "operator", "=", "PostfixExpression", ".", "Operator", ".", "INCREMENT", ";", "private", "Expression", "operand", "=", "null", ";", "PostfixExpression", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "Object", "internalGetSetObjectProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "Object", "value", ")", "{", "if", "(", "property", "==", "OPERATOR_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getOperator", "(", ")", ";", "}", "else", "{", "setOperator", "(", "(", "Operator", ")", "value", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetObjectProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "OPERAND_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getOperand", "(", ")", ";", "}", "else", "{", "setOperand", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "POSTFIX_EXPRESSION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "PostfixExpression", "result", "=", "new", "PostfixExpression", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setOperator", "(", "getOperator", "(", ")", ")", ";", "result", ".", "setOperand", "(", "(", "Expression", ")", "getOperand", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getOperand", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "PostfixExpression", ".", "Operator", "getOperator", "(", ")", "{", "return", "this", ".", "operator", ";", "}", "public", "void", "setOperator", "(", "PostfixExpression", ".", "Operator", "operator", ")", "{", "if", "(", "operator", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "preValueChange", "(", "OPERATOR_PROPERTY", ")", ";", "this", ".", "operator", "=", "operator", ";", "postValueChange", "(", "OPERATOR_PROPERTY", ")", ";", "}", "public", "Expression", "getOperand", "(", ")", "{", "if", "(", "this", ".", "operand", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "operand", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "operand", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "operand", ",", "OPERAND_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "operand", ";", "}", "public", "void", "setOperand", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "operand", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "OPERAND_PROPERTY", ")", ";", "this", ".", "operand", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "OPERAND_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "2", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "operand", "==", "null", "?", "0", ":", "getOperand", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,471
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "final", "class", "LineComment", "extends", "Comment", "{", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "1", ")", ";", "createPropertyList", "(", "LineComment", ".", "class", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "LineComment", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "LINE_COMMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "LineComment", "result", "=", "new", "LineComment", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "visitor", ".", "visit", "(", "this", ")", ";", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", ";", "}", "}", "</s>" ]
4,472
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Map", ";", "public", "class", "InfixExpression", "extends", "Expression", "{", "public", "static", "class", "Operator", "{", "private", "String", "token", ";", "private", "Operator", "(", "String", "token", ")", "{", "this", ".", "token", "=", "token", ";", "}", "public", "String", "toString", "(", ")", "{", "return", "this", ".", "token", ";", "}", "public", "static", "final", "Operator", "TIMES", "=", "new", "Operator", "(", "\"*\"", ")", ";", "public", "static", "final", "Operator", "DIVIDE", "=", "new", "Operator", "(", "\"/\"", ")", ";", "public", "static", "final", "Operator", "REMAINDER", "=", "new", "Operator", "(", "\"%\"", ")", ";", "public", "static", "final", "Operator", "PLUS", "=", "new", "Operator", "(", "\"+\"", ")", ";", "public", "static", "final", "Operator", "MINUS", "=", "new", "Operator", "(", "\"-\"", ")", ";", "public", "static", "final", "Operator", "LEFT_SHIFT", "=", "new", "Operator", "(", "\"<<\"", ")", ";", "public", "static", "final", "Operator", "RIGHT_SHIFT_SIGNED", "=", "new", "Operator", "(", "\">>\"", ")", ";", "public", "static", "final", "Operator", "RIGHT_SHIFT_UNSIGNED", "=", "new", "Operator", "(", "\">>>\"", ")", ";", "public", "static", "final", "Operator", "LESS", "=", "new", "Operator", "(", "\"<\"", ")", ";", "public", "static", "final", "Operator", "GREATER", "=", "new", "Operator", "(", "\">\"", ")", ";", "public", "static", "final", "Operator", "LESS_EQUALS", "=", "new", "Operator", "(", "\"<=\"", ")", ";", "public", "static", "final", "Operator", "GREATER_EQUALS", "=", "new", "Operator", "(", "\">=\"", ")", ";", "public", "static", "final", "Operator", "EQUALS", "=", "new", "Operator", "(", "\"==\"", ")", ";", "public", "static", "final", "Operator", "NOT_EQUALS", "=", "new", "Operator", "(", "\"!=\"", ")", ";", "public", "static", "final", "Operator", "XOR", "=", "new", "Operator", "(", "\"^\"", ")", ";", "public", "static", "final", "Operator", "OR", "=", "new", "Operator", "(", "\"|\"", ")", ";", "public", "static", "final", "Operator", "AND", "=", "new", "Operator", "(", "\"&\"", ")", ";", "public", "static", "final", "Operator", "CONDITIONAL_OR", "=", "new", "Operator", "(", "\"||\"", ")", ";", "public", "static", "final", "Operator", "CONDITIONAL_AND", "=", "new", "Operator", "(", "\"&&\"", ")", ";", "private", "static", "final", "Map", "CODES", ";", "static", "{", "CODES", "=", "new", "HashMap", "(", "20", ")", ";", "Operator", "[", "]", "ops", "=", "{", "TIMES", ",", "DIVIDE", ",", "REMAINDER", ",", "PLUS", ",", "MINUS", ",", "LEFT_SHIFT", ",", "RIGHT_SHIFT_SIGNED", ",", "RIGHT_SHIFT_UNSIGNED", ",", "LESS", ",", "GREATER", ",", "LESS_EQUALS", ",", "GREATER_EQUALS", ",", "EQUALS", ",", "NOT_EQUALS", ",", "XOR", ",", "OR", ",", "AND", ",", "CONDITIONAL_OR", ",", "CONDITIONAL_AND", ",", "}", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "ops", ".", "length", ";", "i", "++", ")", "{", "CODES", ".", "put", "(", "ops", "[", "i", "]", ".", "toString", "(", ")", ",", "ops", "[", "i", "]", ")", ";", "}", "}", "public", "static", "Operator", "toOperator", "(", "String", "token", ")", "{", "return", "(", "Operator", ")", "CODES", ".", "get", "(", "token", ")", ";", "}", "}", "public", "static", "final", "ChildPropertyDescriptor", "LEFT_OPERAND_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "InfixExpression", ".", "class", ",", "\"leftOperand\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "OPERATOR_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "InfixExpression", ".", "class", ",", "\"operator\"", ",", "InfixExpression", ".", "Operator", ".", "class", ",", "MANDATORY", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "RIGHT_OPERAND_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "InfixExpression", ".", "class", ",", "\"rightOperand\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "EXTENDED_OPERANDS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "InfixExpression", ".", "class", ",", "\"\"", ",", "Expression", ".", "class", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "5", ")", ";", "createPropertyList", "(", "InfixExpression", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "LEFT_OPERAND_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "OPERATOR_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "RIGHT_OPERAND_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "EXTENDED_OPERANDS_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "InfixExpression", ".", "Operator", "operator", "=", "InfixExpression", ".", "Operator", ".", "PLUS", ";", "private", "Expression", "leftOperand", "=", "null", ";", "private", "Expression", "rightOperand", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "extendedOperands", "=", "null", ";", "InfixExpression", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "Object", "internalGetSetObjectProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "Object", "value", ")", "{", "if", "(", "property", "==", "OPERATOR_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getOperator", "(", ")", ";", "}", "else", "{", "setOperator", "(", "(", "Operator", ")", "value", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetObjectProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "LEFT_OPERAND_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getLeftOperand", "(", ")", ";", "}", "else", "{", "setLeftOperand", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "RIGHT_OPERAND_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getRightOperand", "(", ")", ";", "}", "else", "{", "setRightOperand", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "EXTENDED_OPERANDS_PROPERTY", ")", "{", "return", "extendedOperands", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "INFIX_EXPRESSION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "InfixExpression", "result", "=", "new", "InfixExpression", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setOperator", "(", "getOperator", "(", ")", ")", ";", "result", ".", "setLeftOperand", "(", "(", "Expression", ")", "getLeftOperand", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setRightOperand", "(", "(", "Expression", ")", "getRightOperand", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "if", "(", "this", ".", "extendedOperands", "!=", "null", ")", "{", "result", ".", "extendedOperands", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "extendedOperands", "(", ")", ")", ")", ";", "}", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getLeftOperand", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getRightOperand", "(", ")", ")", ";", "if", "(", "this", ".", "extendedOperands", "!=", "null", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "extendedOperands", ")", ";", "}", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "InfixExpression", ".", "Operator", "getOperator", "(", ")", "{", "return", "this", ".", "operator", ";", "}", "public", "void", "setOperator", "(", "InfixExpression", ".", "Operator", "operator", ")", "{", "if", "(", "operator", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "preValueChange", "(", "OPERATOR_PROPERTY", ")", ";", "this", ".", "operator", "=", "operator", ";", "postValueChange", "(", "OPERATOR_PROPERTY", ")", ";", "}", "public", "Expression", "getLeftOperand", "(", ")", "{", "if", "(", "this", ".", "leftOperand", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "leftOperand", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "leftOperand", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "leftOperand", ",", "LEFT_OPERAND_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "leftOperand", ";", "}", "public", "void", "setLeftOperand", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "leftOperand", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "LEFT_OPERAND_PROPERTY", ")", ";", "this", ".", "leftOperand", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "LEFT_OPERAND_PROPERTY", ")", ";", "}", "public", "Expression", "getRightOperand", "(", ")", "{", "if", "(", "this", ".", "rightOperand", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "rightOperand", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "rightOperand", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "rightOperand", ",", "RIGHT_OPERAND_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "rightOperand", ";", "}", "public", "void", "setRightOperand", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "rightOperand", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "RIGHT_OPERAND_PROPERTY", ")", ";", "this", ".", "rightOperand", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "RIGHT_OPERAND_PROPERTY", ")", ";", "}", "public", "boolean", "hasExtendedOperands", "(", ")", "{", "return", "(", "this", ".", "extendedOperands", "!=", "null", ")", "&&", "this", ".", "extendedOperands", ".", "size", "(", ")", ">", "0", ";", "}", "public", "List", "extendedOperands", "(", ")", "{", "if", "(", "this", ".", "extendedOperands", "==", "null", ")", "{", "this", ".", "extendedOperands", "=", "new", "ASTNode", ".", "NodeList", "(", "EXTENDED_OPERANDS_PROPERTY", ")", ";", "}", "return", "this", ".", "extendedOperands", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "4", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "leftOperand", "==", "null", "?", "0", ":", "getLeftOperand", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "rightOperand", "==", "null", "?", "0", ":", "getRightOperand", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "extendedOperands", "==", "null", "?", "0", ":", "this", ".", "extendedOperands", ".", "listSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,473
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "WildcardType", "extends", "Type", "{", "public", "static", "final", "ChildPropertyDescriptor", "BOUND_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "WildcardType", ".", "class", ",", "\"bound\"", ",", "Type", ".", "class", ",", "OPTIONAL", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "UPPER_BOUND_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "WildcardType", ".", "class", ",", "\"upperBound\"", ",", "boolean", ".", "class", ",", "MANDATORY", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "WildcardType", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "BOUND_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "UPPER_BOUND_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Type", "optionalBound", "=", "null", ";", "private", "boolean", "isUpperBound", "=", "true", ";", "WildcardType", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "unsupportedIn2", "(", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "boolean", "internalGetSetBooleanProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "boolean", "value", ")", "{", "if", "(", "property", "==", "UPPER_BOUND_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "isUpperBound", "(", ")", ";", "}", "else", "{", "setUpperBound", "(", "value", ")", ";", "return", "false", ";", "}", "}", "return", "super", ".", "internalGetSetBooleanProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "BOUND_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getBound", "(", ")", ";", "}", "else", "{", "setBound", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "WILDCARD_TYPE", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "WildcardType", "result", "=", "new", "WildcardType", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setBound", "(", "(", "Type", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getBound", "(", ")", ")", ",", "isUpperBound", "(", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getBound", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "boolean", "isUpperBound", "(", ")", "{", "return", "this", ".", "isUpperBound", ";", "}", "public", "Type", "getBound", "(", ")", "{", "return", "this", ".", "optionalBound", ";", "}", "public", "void", "setBound", "(", "Type", "type", ",", "boolean", "isUpperBound", ")", "{", "setBound", "(", "type", ")", ";", "setUpperBound", "(", "isUpperBound", ")", ";", "}", "public", "void", "setBound", "(", "Type", "type", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalBound", ";", "preReplaceChild", "(", "oldChild", ",", "type", ",", "BOUND_PROPERTY", ")", ";", "this", ".", "optionalBound", "=", "type", ";", "postReplaceChild", "(", "oldChild", ",", "type", ",", "BOUND_PROPERTY", ")", ";", "}", "public", "void", "setUpperBound", "(", "boolean", "isUpperBound", ")", "{", "preValueChange", "(", "UPPER_BOUND_PROPERTY", ")", ";", "this", ".", "isUpperBound", "=", "isUpperBound", ";", "postValueChange", "(", "UPPER_BOUND_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "2", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalBound", "==", "null", "?", "0", ":", "getBound", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,474
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "public", "abstract", "class", "FileASTRequestor", "{", "CompilationUnitResolver", "compilationUnitResolver", "=", "null", ";", "public", "void", "acceptAST", "(", "String", "sourceFilePath", ",", "CompilationUnit", "ast", ")", "{", "}", "public", "void", "acceptBinding", "(", "String", "bindingKey", ",", "IBinding", "binding", ")", "{", "}", "public", "final", "IBinding", "[", "]", "createBindings", "(", "String", "[", "]", "bindingKeys", ")", "{", "int", "length", "=", "bindingKeys", ".", "length", ";", "IBinding", "[", "]", "result", "=", "new", "IBinding", "[", "length", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "result", "[", "i", "]", "=", "null", ";", "if", "(", "this", ".", "compilationUnitResolver", "!=", "null", ")", "{", "result", "[", "i", "]", "=", "this", ".", "compilationUnitResolver", ".", "createBinding", "(", "bindingKeys", "[", "i", "]", ")", ";", "}", "}", "return", "result", ";", "}", "}", "</s>" ]
4,475
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "Iterator", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ASTMatcher", "{", "private", "boolean", "matchDocTags", ";", "public", "ASTMatcher", "(", ")", "{", "this", "(", "false", ")", ";", "}", "public", "ASTMatcher", "(", "boolean", "matchDocTags", ")", "{", "this", ".", "matchDocTags", "=", "matchDocTags", ";", "}", "public", "final", "boolean", "safeSubtreeListMatch", "(", "List", "list1", ",", "List", "list2", ")", "{", "int", "size1", "=", "list1", ".", "size", "(", ")", ";", "int", "size2", "=", "list2", ".", "size", "(", ")", ";", "if", "(", "size1", "!=", "size2", ")", "{", "return", "false", ";", "}", "for", "(", "Iterator", "it1", "=", "list1", ".", "iterator", "(", ")", ",", "it2", "=", "list2", ".", "iterator", "(", ")", ";", "it1", ".", "hasNext", "(", ")", ";", ")", "{", "ASTNode", "n1", "=", "(", "ASTNode", ")", "it1", ".", "next", "(", ")", ";", "ASTNode", "n2", "=", "(", "ASTNode", ")", "it2", ".", "next", "(", ")", ";", "if", "(", "!", "n1", ".", "subtreeMatch", "(", "this", ",", "n2", ")", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "public", "final", "boolean", "safeSubtreeMatch", "(", "Object", "node1", ",", "Object", "node2", ")", "{", "if", "(", "node1", "==", "null", "&&", "node2", "==", "null", ")", "{", "return", "true", ";", "}", "if", "(", "node1", "==", "null", "||", "node2", "==", "null", ")", "{", "return", "false", ";", "}", "return", "(", "(", "ASTNode", ")", "node1", ")", ".", "subtreeMatch", "(", "this", ",", "node2", ")", ";", "}", "public", "static", "boolean", "safeEquals", "(", "Object", "o1", ",", "Object", "o2", ")", "{", "if", "(", "o1", "==", "o2", ")", "{", "return", "true", ";", "}", "if", "(", "o1", "==", "null", "||", "o2", "==", "null", ")", "{", "return", "false", ";", "}", "return", "o1", ".", "equals", "(", "o2", ")", ";", "}", "public", "boolean", "match", "(", "AnnotationTypeDeclaration", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "AnnotationTypeDeclaration", ")", ")", "{", "return", "false", ";", "}", "AnnotationTypeDeclaration", "o", "=", "(", "AnnotationTypeDeclaration", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getJavadoc", "(", ")", ",", "o", ".", "getJavadoc", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "modifiers", "(", ")", ",", "o", ".", "modifiers", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "bodyDeclarations", "(", ")", ",", "o", ".", "bodyDeclarations", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "AnnotationTypeMemberDeclaration", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "AnnotationTypeMemberDeclaration", ")", ")", "{", "return", "false", ";", "}", "AnnotationTypeMemberDeclaration", "o", "=", "(", "AnnotationTypeMemberDeclaration", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getJavadoc", "(", ")", ",", "o", ".", "getJavadoc", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "modifiers", "(", ")", ",", "o", ".", "modifiers", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getType", "(", ")", ",", "o", ".", "getType", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getDefault", "(", ")", ",", "o", ".", "getDefault", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "AnonymousClassDeclaration", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "AnonymousClassDeclaration", ")", ")", "{", "return", "false", ";", "}", "AnonymousClassDeclaration", "o", "=", "(", "AnonymousClassDeclaration", ")", "other", ";", "return", "safeSubtreeListMatch", "(", "node", ".", "bodyDeclarations", "(", ")", ",", "o", ".", "bodyDeclarations", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "ArrayAccess", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ArrayAccess", ")", ")", "{", "return", "false", ";", "}", "ArrayAccess", "o", "=", "(", "ArrayAccess", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getArray", "(", ")", ",", "o", ".", "getArray", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getIndex", "(", ")", ",", "o", ".", "getIndex", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "ArrayCreation", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ArrayCreation", ")", ")", "{", "return", "false", ";", "}", "ArrayCreation", "o", "=", "(", "ArrayCreation", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getType", "(", ")", ",", "o", ".", "getType", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "dimensions", "(", ")", ",", "o", ".", "dimensions", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getInitializer", "(", ")", ",", "o", ".", "getInitializer", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "ArrayInitializer", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ArrayInitializer", ")", ")", "{", "return", "false", ";", "}", "ArrayInitializer", "o", "=", "(", "ArrayInitializer", ")", "other", ";", "return", "safeSubtreeListMatch", "(", "node", ".", "expressions", "(", ")", ",", "o", ".", "expressions", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "ArrayType", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ArrayType", ")", ")", "{", "return", "false", ";", "}", "ArrayType", "o", "=", "(", "ArrayType", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getComponentType", "(", ")", ",", "o", ".", "getComponentType", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "AssertStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "AssertStatement", ")", ")", "{", "return", "false", ";", "}", "AssertStatement", "o", "=", "(", "AssertStatement", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getMessage", "(", ")", ",", "o", ".", "getMessage", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "Assignment", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "Assignment", ")", ")", "{", "return", "false", ";", "}", "Assignment", "o", "=", "(", "Assignment", ")", "other", ";", "return", "(", "node", ".", "getOperator", "(", ")", ".", "equals", "(", "o", ".", "getOperator", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getLeftHandSide", "(", ")", ",", "o", ".", "getLeftHandSide", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getRightHandSide", "(", ")", ",", "o", ".", "getRightHandSide", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "Block", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "Block", ")", ")", "{", "return", "false", ";", "}", "Block", "o", "=", "(", "Block", ")", "other", ";", "return", "safeSubtreeListMatch", "(", "node", ".", "statements", "(", ")", ",", "o", ".", "statements", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "BlockComment", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "BlockComment", ")", ")", "{", "return", "false", ";", "}", "return", "true", ";", "}", "public", "boolean", "match", "(", "BooleanLiteral", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "BooleanLiteral", ")", ")", "{", "return", "false", ";", "}", "BooleanLiteral", "o", "=", "(", "BooleanLiteral", ")", "other", ";", "return", "node", ".", "booleanValue", "(", ")", "==", "o", ".", "booleanValue", "(", ")", ";", "}", "public", "boolean", "match", "(", "BreakStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "BreakStatement", ")", ")", "{", "return", "false", ";", "}", "BreakStatement", "o", "=", "(", "BreakStatement", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getLabel", "(", ")", ",", "o", ".", "getLabel", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "CastExpression", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "CastExpression", ")", ")", "{", "return", "false", ";", "}", "CastExpression", "o", "=", "(", "CastExpression", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getType", "(", ")", ",", "o", ".", "getType", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "CatchClause", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "CatchClause", ")", ")", "{", "return", "false", ";", "}", "CatchClause", "o", "=", "(", "CatchClause", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getException", "(", ")", ",", "o", ".", "getException", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getBody", "(", ")", ",", "o", ".", "getBody", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "CharacterLiteral", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "CharacterLiteral", ")", ")", "{", "return", "false", ";", "}", "CharacterLiteral", "o", "=", "(", "CharacterLiteral", ")", "other", ";", "return", "safeEquals", "(", "node", ".", "getEscapedValue", "(", ")", ",", "o", ".", "getEscapedValue", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "ClassInstanceCreation", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ClassInstanceCreation", ")", ")", "{", "return", "false", ";", "}", "ClassInstanceCreation", "o", "=", "(", "ClassInstanceCreation", ")", "other", ";", "int", "level", "=", "node", ".", "getAST", "(", ")", ".", "apiLevel", ";", "if", "(", "level", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "if", "(", "!", "safeSubtreeMatch", "(", "node", ".", "internalGetName", "(", ")", ",", "o", ".", "internalGetName", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "if", "(", "level", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "typeArguments", "(", ")", ",", "o", ".", "typeArguments", "(", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "safeSubtreeMatch", "(", "node", ".", "getType", "(", ")", ",", "o", ".", "getType", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "return", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "arguments", "(", ")", ",", "o", ".", "arguments", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getAnonymousClassDeclaration", "(", ")", ",", "o", ".", "getAnonymousClassDeclaration", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "CompilationUnit", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "CompilationUnit", ")", ")", "{", "return", "false", ";", "}", "CompilationUnit", "o", "=", "(", "CompilationUnit", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getPackage", "(", ")", ",", "o", ".", "getPackage", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "imports", "(", ")", ",", "o", ".", "imports", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "types", "(", ")", ",", "o", ".", "types", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "ConditionalExpression", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ConditionalExpression", ")", ")", "{", "return", "false", ";", "}", "ConditionalExpression", "o", "=", "(", "ConditionalExpression", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getThenExpression", "(", ")", ",", "o", ".", "getThenExpression", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getElseExpression", "(", ")", ",", "o", ".", "getElseExpression", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "ConstructorInvocation", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ConstructorInvocation", ")", ")", "{", "return", "false", ";", "}", "ConstructorInvocation", "o", "=", "(", "ConstructorInvocation", ")", "other", ";", "if", "(", "node", ".", "getAST", "(", ")", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "typeArguments", "(", ")", ",", "o", ".", "typeArguments", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "return", "safeSubtreeListMatch", "(", "node", ".", "arguments", "(", ")", ",", "o", ".", "arguments", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "ContinueStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ContinueStatement", ")", ")", "{", "return", "false", ";", "}", "ContinueStatement", "o", "=", "(", "ContinueStatement", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getLabel", "(", ")", ",", "o", ".", "getLabel", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "UnionType", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "UnionType", ")", ")", "{", "return", "false", ";", "}", "UnionType", "o", "=", "(", "UnionType", ")", "other", ";", "return", "safeSubtreeListMatch", "(", "node", ".", "types", "(", ")", ",", "o", ".", "types", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "DoStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "DoStatement", ")", ")", "{", "return", "false", ";", "}", "DoStatement", "o", "=", "(", "DoStatement", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getBody", "(", ")", ",", "o", ".", "getBody", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "EmptyStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "EmptyStatement", ")", ")", "{", "return", "false", ";", "}", "return", "true", ";", "}", "public", "boolean", "match", "(", "EnhancedForStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "EnhancedForStatement", ")", ")", "{", "return", "false", ";", "}", "EnhancedForStatement", "o", "=", "(", "EnhancedForStatement", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getParameter", "(", ")", ",", "o", ".", "getParameter", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getBody", "(", ")", ",", "o", ".", "getBody", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "EnumConstantDeclaration", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "EnumConstantDeclaration", ")", ")", "{", "return", "false", ";", "}", "EnumConstantDeclaration", "o", "=", "(", "EnumConstantDeclaration", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getJavadoc", "(", ")", ",", "o", ".", "getJavadoc", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "modifiers", "(", ")", ",", "o", ".", "modifiers", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "arguments", "(", ")", ",", "o", ".", "arguments", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getAnonymousClassDeclaration", "(", ")", ",", "o", ".", "getAnonymousClassDeclaration", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "EnumDeclaration", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "EnumDeclaration", ")", ")", "{", "return", "false", ";", "}", "EnumDeclaration", "o", "=", "(", "EnumDeclaration", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getJavadoc", "(", ")", ",", "o", ".", "getJavadoc", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "modifiers", "(", ")", ",", "o", ".", "modifiers", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "superInterfaceTypes", "(", ")", ",", "o", ".", "superInterfaceTypes", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "enumConstants", "(", ")", ",", "o", ".", "enumConstants", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "bodyDeclarations", "(", ")", ",", "o", ".", "bodyDeclarations", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "ExpressionStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ExpressionStatement", ")", ")", "{", "return", "false", ";", "}", "ExpressionStatement", "o", "=", "(", "ExpressionStatement", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "FieldAccess", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "FieldAccess", ")", ")", "{", "return", "false", ";", "}", "FieldAccess", "o", "=", "(", "FieldAccess", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "FieldDeclaration", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "FieldDeclaration", ")", ")", "{", "return", "false", ";", "}", "FieldDeclaration", "o", "=", "(", "FieldDeclaration", ")", "other", ";", "int", "level", "=", "node", ".", "getAST", "(", ")", ".", "apiLevel", ";", "if", "(", "level", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "if", "(", "node", ".", "getModifiers", "(", ")", "!=", "o", ".", "getModifiers", "(", ")", ")", "{", "return", "false", ";", "}", "}", "if", "(", "level", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "modifiers", "(", ")", ",", "o", ".", "modifiers", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "return", "safeSubtreeMatch", "(", "node", ".", "getJavadoc", "(", ")", ",", "o", ".", "getJavadoc", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getType", "(", ")", ",", "o", ".", "getType", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "fragments", "(", ")", ",", "o", ".", "fragments", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "ForStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ForStatement", ")", ")", "{", "return", "false", ";", "}", "ForStatement", "o", "=", "(", "ForStatement", ")", "other", ";", "return", "(", "safeSubtreeListMatch", "(", "node", ".", "initializers", "(", ")", ",", "o", ".", "initializers", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "updaters", "(", ")", ",", "o", ".", "updaters", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getBody", "(", ")", ",", "o", ".", "getBody", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "IfStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "IfStatement", ")", ")", "{", "return", "false", ";", "}", "IfStatement", "o", "=", "(", "IfStatement", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getThenStatement", "(", ")", ",", "o", ".", "getThenStatement", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getElseStatement", "(", ")", ",", "o", ".", "getElseStatement", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "ImportDeclaration", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ImportDeclaration", ")", ")", "{", "return", "false", ";", "}", "ImportDeclaration", "o", "=", "(", "ImportDeclaration", ")", "other", ";", "if", "(", "node", ".", "getAST", "(", ")", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "node", ".", "isStatic", "(", ")", "!=", "o", ".", "isStatic", "(", ")", ")", "{", "return", "false", ";", "}", "}", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "node", ".", "isOnDemand", "(", ")", "==", "o", ".", "isOnDemand", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "InfixExpression", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "InfixExpression", ")", ")", "{", "return", "false", ";", "}", "InfixExpression", "o", "=", "(", "InfixExpression", ")", "other", ";", "if", "(", "node", ".", "hasExtendedOperands", "(", ")", "&&", "o", ".", "hasExtendedOperands", "(", ")", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "extendedOperands", "(", ")", ",", "o", ".", "extendedOperands", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "if", "(", "node", ".", "hasExtendedOperands", "(", ")", "!=", "o", ".", "hasExtendedOperands", "(", ")", ")", "{", "return", "false", ";", "}", "return", "(", "node", ".", "getOperator", "(", ")", ".", "equals", "(", "o", ".", "getOperator", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getLeftOperand", "(", ")", ",", "o", ".", "getLeftOperand", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getRightOperand", "(", ")", ",", "o", ".", "getRightOperand", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "InstanceofExpression", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "InstanceofExpression", ")", ")", "{", "return", "false", ";", "}", "InstanceofExpression", "o", "=", "(", "InstanceofExpression", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getLeftOperand", "(", ")", ",", "o", ".", "getLeftOperand", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getRightOperand", "(", ")", ",", "o", ".", "getRightOperand", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "Initializer", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "Initializer", ")", ")", "{", "return", "false", ";", "}", "Initializer", "o", "=", "(", "Initializer", ")", "other", ";", "int", "level", "=", "node", ".", "getAST", "(", ")", ".", "apiLevel", ";", "if", "(", "level", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "if", "(", "node", ".", "getModifiers", "(", ")", "!=", "o", ".", "getModifiers", "(", ")", ")", "{", "return", "false", ";", "}", "}", "if", "(", "level", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "modifiers", "(", ")", ",", "o", ".", "modifiers", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getJavadoc", "(", ")", ",", "o", ".", "getJavadoc", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getBody", "(", ")", ",", "o", ".", "getBody", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "Javadoc", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "Javadoc", ")", ")", "{", "return", "false", ";", "}", "Javadoc", "o", "=", "(", "Javadoc", ")", "other", ";", "if", "(", "this", ".", "matchDocTags", ")", "{", "return", "safeSubtreeListMatch", "(", "node", ".", "tags", "(", ")", ",", "o", ".", "tags", "(", ")", ")", ";", "}", "else", "{", "return", "compareDeprecatedComment", "(", "node", ",", "o", ")", ";", "}", "}", "private", "boolean", "compareDeprecatedComment", "(", "Javadoc", "first", ",", "Javadoc", "second", ")", "{", "if", "(", "first", ".", "getAST", "(", ")", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "safeEquals", "(", "first", ".", "getComment", "(", ")", ",", "second", ".", "getComment", "(", ")", ")", ";", "}", "else", "{", "return", "true", ";", "}", "}", "public", "boolean", "match", "(", "LabeledStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "LabeledStatement", ")", ")", "{", "return", "false", ";", "}", "LabeledStatement", "o", "=", "(", "LabeledStatement", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getLabel", "(", ")", ",", "o", ".", "getLabel", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getBody", "(", ")", ",", "o", ".", "getBody", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "LineComment", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "LineComment", ")", ")", "{", "return", "false", ";", "}", "return", "true", ";", "}", "public", "boolean", "match", "(", "MarkerAnnotation", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "MarkerAnnotation", ")", ")", "{", "return", "false", ";", "}", "MarkerAnnotation", "o", "=", "(", "MarkerAnnotation", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getTypeName", "(", ")", ",", "o", ".", "getTypeName", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "MemberRef", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "MemberRef", ")", ")", "{", "return", "false", ";", "}", "MemberRef", "o", "=", "(", "MemberRef", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getQualifier", "(", ")", ",", "o", ".", "getQualifier", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "MemberValuePair", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "MemberValuePair", ")", ")", "{", "return", "false", ";", "}", "MemberValuePair", "o", "=", "(", "MemberValuePair", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getValue", "(", ")", ",", "o", ".", "getValue", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "MethodRef", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "MethodRef", ")", ")", "{", "return", "false", ";", "}", "MethodRef", "o", "=", "(", "MethodRef", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getQualifier", "(", ")", ",", "o", ".", "getQualifier", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "parameters", "(", ")", ",", "o", ".", "parameters", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "MethodRefParameter", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "MethodRefParameter", ")", ")", "{", "return", "false", ";", "}", "MethodRefParameter", "o", "=", "(", "MethodRefParameter", ")", "other", ";", "int", "level", "=", "node", ".", "getAST", "(", ")", ".", "apiLevel", ";", "if", "(", "level", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "node", ".", "isVarargs", "(", ")", "!=", "o", ".", "isVarargs", "(", ")", ")", "{", "return", "false", ";", "}", "}", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getType", "(", ")", ",", "o", ".", "getType", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "MethodDeclaration", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "MethodDeclaration", ")", ")", "{", "return", "false", ";", "}", "MethodDeclaration", "o", "=", "(", "MethodDeclaration", ")", "other", ";", "int", "level", "=", "node", ".", "getAST", "(", ")", ".", "apiLevel", ";", "if", "(", "level", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "if", "(", "node", ".", "getModifiers", "(", ")", "!=", "o", ".", "getModifiers", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "safeSubtreeMatch", "(", "node", ".", "internalGetReturnType", "(", ")", ",", "o", ".", "internalGetReturnType", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "if", "(", "level", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "modifiers", "(", ")", ",", "o", ".", "modifiers", "(", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "safeSubtreeMatch", "(", "node", ".", "getReturnType2", "(", ")", ",", "o", ".", "getReturnType2", "(", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "typeParameters", "(", ")", ",", "o", ".", "typeParameters", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "return", "(", "(", "node", ".", "isConstructor", "(", ")", "==", "o", ".", "isConstructor", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getJavadoc", "(", ")", ",", "o", ".", "getJavadoc", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "parameters", "(", ")", ",", "o", ".", "parameters", "(", ")", ")", "&&", "node", ".", "getExtraDimensions", "(", ")", "==", "o", ".", "getExtraDimensions", "(", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "thrownExceptions", "(", ")", ",", "o", ".", "thrownExceptions", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getBody", "(", ")", ",", "o", ".", "getBody", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "MethodInvocation", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "MethodInvocation", ")", ")", "{", "return", "false", ";", "}", "MethodInvocation", "o", "=", "(", "MethodInvocation", ")", "other", ";", "if", "(", "node", ".", "getAST", "(", ")", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "typeArguments", "(", ")", ",", "o", ".", "typeArguments", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "arguments", "(", ")", ",", "o", ".", "arguments", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "Modifier", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "Modifier", ")", ")", "{", "return", "false", ";", "}", "Modifier", "o", "=", "(", "Modifier", ")", "other", ";", "return", "(", "node", ".", "getKeyword", "(", ")", "==", "o", ".", "getKeyword", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "NormalAnnotation", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "NormalAnnotation", ")", ")", "{", "return", "false", ";", "}", "NormalAnnotation", "o", "=", "(", "NormalAnnotation", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getTypeName", "(", ")", ",", "o", ".", "getTypeName", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "values", "(", ")", ",", "o", ".", "values", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "NullLiteral", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "NullLiteral", ")", ")", "{", "return", "false", ";", "}", "return", "true", ";", "}", "public", "boolean", "match", "(", "NumberLiteral", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "NumberLiteral", ")", ")", "{", "return", "false", ";", "}", "NumberLiteral", "o", "=", "(", "NumberLiteral", ")", "other", ";", "return", "safeEquals", "(", "node", ".", "getToken", "(", ")", ",", "o", ".", "getToken", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "PackageDeclaration", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "PackageDeclaration", ")", ")", "{", "return", "false", ";", "}", "PackageDeclaration", "o", "=", "(", "PackageDeclaration", ")", "other", ";", "if", "(", "node", ".", "getAST", "(", ")", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeMatch", "(", "node", ".", "getJavadoc", "(", ")", ",", "o", ".", "getJavadoc", "(", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "annotations", "(", ")", ",", "o", ".", "annotations", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "return", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "ParameterizedType", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ParameterizedType", ")", ")", "{", "return", "false", ";", "}", "ParameterizedType", "o", "=", "(", "ParameterizedType", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getType", "(", ")", ",", "o", ".", "getType", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "typeArguments", "(", ")", ",", "o", ".", "typeArguments", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "ParenthesizedExpression", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ParenthesizedExpression", ")", ")", "{", "return", "false", ";", "}", "ParenthesizedExpression", "o", "=", "(", "ParenthesizedExpression", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "PostfixExpression", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "PostfixExpression", ")", ")", "{", "return", "false", ";", "}", "PostfixExpression", "o", "=", "(", "PostfixExpression", ")", "other", ";", "return", "(", "node", ".", "getOperator", "(", ")", ".", "equals", "(", "o", ".", "getOperator", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getOperand", "(", ")", ",", "o", ".", "getOperand", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "PrefixExpression", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "PrefixExpression", ")", ")", "{", "return", "false", ";", "}", "PrefixExpression", "o", "=", "(", "PrefixExpression", ")", "other", ";", "return", "(", "node", ".", "getOperator", "(", ")", ".", "equals", "(", "o", ".", "getOperator", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getOperand", "(", ")", ",", "o", ".", "getOperand", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "PrimitiveType", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "PrimitiveType", ")", ")", "{", "return", "false", ";", "}", "PrimitiveType", "o", "=", "(", "PrimitiveType", ")", "other", ";", "return", "(", "node", ".", "getPrimitiveTypeCode", "(", ")", "==", "o", ".", "getPrimitiveTypeCode", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "QualifiedName", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "QualifiedName", ")", ")", "{", "return", "false", ";", "}", "QualifiedName", "o", "=", "(", "QualifiedName", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getQualifier", "(", ")", ",", "o", ".", "getQualifier", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "QualifiedType", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "QualifiedType", ")", ")", "{", "return", "false", ";", "}", "QualifiedType", "o", "=", "(", "QualifiedType", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getQualifier", "(", ")", ",", "o", ".", "getQualifier", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "ReturnStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ReturnStatement", ")", ")", "{", "return", "false", ";", "}", "ReturnStatement", "o", "=", "(", "ReturnStatement", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "SimpleName", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "SimpleName", ")", ")", "{", "return", "false", ";", "}", "SimpleName", "o", "=", "(", "SimpleName", ")", "other", ";", "return", "node", ".", "getIdentifier", "(", ")", ".", "equals", "(", "o", ".", "getIdentifier", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "SimpleType", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "SimpleType", ")", ")", "{", "return", "false", ";", "}", "SimpleType", "o", "=", "(", "SimpleType", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "SingleMemberAnnotation", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "SingleMemberAnnotation", ")", ")", "{", "return", "false", ";", "}", "SingleMemberAnnotation", "o", "=", "(", "SingleMemberAnnotation", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getTypeName", "(", ")", ",", "o", ".", "getTypeName", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getValue", "(", ")", ",", "o", ".", "getValue", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "SingleVariableDeclaration", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "SingleVariableDeclaration", ")", ")", "{", "return", "false", ";", "}", "SingleVariableDeclaration", "o", "=", "(", "SingleVariableDeclaration", ")", "other", ";", "int", "level", "=", "node", ".", "getAST", "(", ")", ".", "apiLevel", ";", "if", "(", "level", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "if", "(", "node", ".", "getModifiers", "(", ")", "!=", "o", ".", "getModifiers", "(", ")", ")", "{", "return", "false", ";", "}", "}", "if", "(", "level", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "modifiers", "(", ")", ",", "o", ".", "modifiers", "(", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "node", ".", "isVarargs", "(", ")", "!=", "o", ".", "isVarargs", "(", ")", ")", "{", "return", "false", ";", "}", "}", "return", "safeSubtreeMatch", "(", "node", ".", "getType", "(", ")", ",", "o", ".", "getType", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "node", ".", "getExtraDimensions", "(", ")", "==", "o", ".", "getExtraDimensions", "(", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getInitializer", "(", ")", ",", "o", ".", "getInitializer", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "StringLiteral", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "StringLiteral", ")", ")", "{", "return", "false", ";", "}", "StringLiteral", "o", "=", "(", "StringLiteral", ")", "other", ";", "return", "safeEquals", "(", "node", ".", "getEscapedValue", "(", ")", ",", "o", ".", "getEscapedValue", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "SuperConstructorInvocation", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "SuperConstructorInvocation", ")", ")", "{", "return", "false", ";", "}", "SuperConstructorInvocation", "o", "=", "(", "SuperConstructorInvocation", ")", "other", ";", "if", "(", "node", ".", "getAST", "(", ")", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "typeArguments", "(", ")", ",", "o", ".", "typeArguments", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "arguments", "(", ")", ",", "o", ".", "arguments", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "SuperFieldAccess", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "SuperFieldAccess", ")", ")", "{", "return", "false", ";", "}", "SuperFieldAccess", "o", "=", "(", "SuperFieldAccess", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getQualifier", "(", ")", ",", "o", ".", "getQualifier", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "SuperMethodInvocation", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "SuperMethodInvocation", ")", ")", "{", "return", "false", ";", "}", "SuperMethodInvocation", "o", "=", "(", "SuperMethodInvocation", ")", "other", ";", "if", "(", "node", ".", "getAST", "(", ")", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "typeArguments", "(", ")", ",", "o", ".", "typeArguments", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getQualifier", "(", ")", ",", "o", ".", "getQualifier", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "arguments", "(", ")", ",", "o", ".", "arguments", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "SwitchCase", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "SwitchCase", ")", ")", "{", "return", "false", ";", "}", "SwitchCase", "o", "=", "(", "SwitchCase", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "SwitchStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "SwitchStatement", ")", ")", "{", "return", "false", ";", "}", "SwitchStatement", "o", "=", "(", "SwitchStatement", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "statements", "(", ")", ",", "o", ".", "statements", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "SynchronizedStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "SynchronizedStatement", ")", ")", "{", "return", "false", ";", "}", "SynchronizedStatement", "o", "=", "(", "SynchronizedStatement", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getBody", "(", ")", ",", "o", ".", "getBody", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "TagElement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "TagElement", ")", ")", "{", "return", "false", ";", "}", "TagElement", "o", "=", "(", "TagElement", ")", "other", ";", "return", "(", "safeEquals", "(", "node", ".", "getTagName", "(", ")", ",", "o", ".", "getTagName", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "fragments", "(", ")", ",", "o", ".", "fragments", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "TextElement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "TextElement", ")", ")", "{", "return", "false", ";", "}", "TextElement", "o", "=", "(", "TextElement", ")", "other", ";", "return", "safeEquals", "(", "node", ".", "getText", "(", ")", ",", "o", ".", "getText", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "ThisExpression", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ThisExpression", ")", ")", "{", "return", "false", ";", "}", "ThisExpression", "o", "=", "(", "ThisExpression", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getQualifier", "(", ")", ",", "o", ".", "getQualifier", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "ThrowStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "ThrowStatement", ")", ")", "{", "return", "false", ";", "}", "ThrowStatement", "o", "=", "(", "ThrowStatement", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "TryStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "TryStatement", ")", ")", "{", "return", "false", ";", "}", "TryStatement", "o", "=", "(", "TryStatement", ")", "other", ";", "switch", "(", "node", ".", "getAST", "(", ")", ".", "apiLevel", ")", "{", "case", "AST", ".", "JLS2_INTERNAL", ":", "case", "AST", ".", "JLS3", ":", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getBody", "(", ")", ",", "o", ".", "getBody", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "catchClauses", "(", ")", ",", "o", ".", "catchClauses", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getFinally", "(", ")", ",", "o", ".", "getFinally", "(", ")", ")", ")", ";", "}", "return", "(", "safeSubtreeListMatch", "(", "node", ".", "resources", "(", ")", ",", "o", ".", "resources", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getBody", "(", ")", ",", "o", ".", "getBody", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "catchClauses", "(", ")", ",", "o", ".", "catchClauses", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getFinally", "(", ")", ",", "o", ".", "getFinally", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "TypeDeclaration", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "TypeDeclaration", ")", ")", "{", "return", "false", ";", "}", "TypeDeclaration", "o", "=", "(", "TypeDeclaration", ")", "other", ";", "int", "level", "=", "node", ".", "getAST", "(", ")", ".", "apiLevel", ";", "if", "(", "level", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "if", "(", "node", ".", "getModifiers", "(", ")", "!=", "o", ".", "getModifiers", "(", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "safeSubtreeMatch", "(", "node", ".", "internalGetSuperclass", "(", ")", ",", "o", ".", "internalGetSuperclass", "(", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "internalSuperInterfaces", "(", ")", ",", "o", ".", "internalSuperInterfaces", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "if", "(", "level", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "modifiers", "(", ")", ",", "o", ".", "modifiers", "(", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "typeParameters", "(", ")", ",", "o", ".", "typeParameters", "(", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "safeSubtreeMatch", "(", "node", ".", "getSuperclassType", "(", ")", ",", "o", ".", "getSuperclassType", "(", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "superInterfaceTypes", "(", ")", ",", "o", ".", "superInterfaceTypes", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "return", "(", "(", "node", ".", "isInterface", "(", ")", "==", "o", ".", "isInterface", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getJavadoc", "(", ")", ",", "o", ".", "getJavadoc", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "bodyDeclarations", "(", ")", ",", "o", ".", "bodyDeclarations", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "TypeDeclarationStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "TypeDeclarationStatement", ")", ")", "{", "return", "false", ";", "}", "TypeDeclarationStatement", "o", "=", "(", "TypeDeclarationStatement", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getDeclaration", "(", ")", ",", "o", ".", "getDeclaration", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "TypeLiteral", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "TypeLiteral", ")", ")", "{", "return", "false", ";", "}", "TypeLiteral", "o", "=", "(", "TypeLiteral", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getType", "(", ")", ",", "o", ".", "getType", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "TypeParameter", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "TypeParameter", ")", ")", "{", "return", "false", ";", "}", "TypeParameter", "o", "=", "(", "TypeParameter", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "typeBounds", "(", ")", ",", "o", ".", "typeBounds", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "VariableDeclarationExpression", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "VariableDeclarationExpression", ")", ")", "{", "return", "false", ";", "}", "VariableDeclarationExpression", "o", "=", "(", "VariableDeclarationExpression", ")", "other", ";", "int", "level", "=", "node", ".", "getAST", "(", ")", ".", "apiLevel", ";", "if", "(", "level", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "if", "(", "node", ".", "getModifiers", "(", ")", "!=", "o", ".", "getModifiers", "(", ")", ")", "{", "return", "false", ";", "}", "}", "if", "(", "level", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "modifiers", "(", ")", ",", "o", ".", "modifiers", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "return", "safeSubtreeMatch", "(", "node", ".", "getType", "(", ")", ",", "o", ".", "getType", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "fragments", "(", ")", ",", "o", ".", "fragments", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "VariableDeclarationFragment", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "VariableDeclarationFragment", ")", ")", "{", "return", "false", ";", "}", "VariableDeclarationFragment", "o", "=", "(", "VariableDeclarationFragment", ")", "other", ";", "return", "safeSubtreeMatch", "(", "node", ".", "getName", "(", ")", ",", "o", ".", "getName", "(", ")", ")", "&&", "node", ".", "getExtraDimensions", "(", ")", "==", "o", ".", "getExtraDimensions", "(", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getInitializer", "(", ")", ",", "o", ".", "getInitializer", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "VariableDeclarationStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "VariableDeclarationStatement", ")", ")", "{", "return", "false", ";", "}", "VariableDeclarationStatement", "o", "=", "(", "VariableDeclarationStatement", ")", "other", ";", "int", "level", "=", "node", ".", "getAST", "(", ")", ".", "apiLevel", ";", "if", "(", "level", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "if", "(", "node", ".", "getModifiers", "(", ")", "!=", "o", ".", "getModifiers", "(", ")", ")", "{", "return", "false", ";", "}", "}", "if", "(", "level", ">=", "AST", ".", "JLS3", ")", "{", "if", "(", "!", "safeSubtreeListMatch", "(", "node", ".", "modifiers", "(", ")", ",", "o", ".", "modifiers", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "return", "safeSubtreeMatch", "(", "node", ".", "getType", "(", ")", ",", "o", ".", "getType", "(", ")", ")", "&&", "safeSubtreeListMatch", "(", "node", ".", "fragments", "(", ")", ",", "o", ".", "fragments", "(", ")", ")", ";", "}", "public", "boolean", "match", "(", "WhileStatement", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "WhileStatement", ")", ")", "{", "return", "false", ";", "}", "WhileStatement", "o", "=", "(", "WhileStatement", ")", "other", ";", "return", "(", "safeSubtreeMatch", "(", "node", ".", "getExpression", "(", ")", ",", "o", ".", "getExpression", "(", ")", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getBody", "(", ")", ",", "o", ".", "getBody", "(", ")", ")", ")", ";", "}", "public", "boolean", "match", "(", "WildcardType", "node", ",", "Object", "other", ")", "{", "if", "(", "!", "(", "other", "instanceof", "WildcardType", ")", ")", "{", "return", "false", ";", "}", "WildcardType", "o", "=", "(", "WildcardType", ")", "other", ";", "return", "node", ".", "isUpperBound", "(", ")", "==", "o", ".", "isUpperBound", "(", ")", "&&", "safeSubtreeMatch", "(", "node", ".", "getBound", "(", ")", ",", "o", ".", "getBound", "(", ")", ")", ";", "}", "}", "</s>" ]
4,476
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "EmptyStatement", "extends", "Statement", "{", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "1", ")", ";", "createPropertyList", "(", "EmptyStatement", ".", "class", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "EmptyStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "EMPTY_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "EmptyStatement", "result", "=", "new", "EmptyStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "visitor", ".", "visit", "(", "this", ")", ";", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", ";", "}", "}", "</s>" ]
4,477
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "final", "class", "BlockComment", "extends", "Comment", "{", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "1", ")", ";", "createPropertyList", "(", "BlockComment", ".", "class", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "BlockComment", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "BLOCK_COMMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "BlockComment", "result", "=", "new", "BlockComment", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "visitor", ".", "visit", "(", "this", ")", ";", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", ";", "}", "}", "</s>" ]
4,478
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "WorkingCopyOwner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "AbstractMethodDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "AbstractVariableDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "AllocationExpression", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ArrayAllocationExpression", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "CompilationUnitDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ExplicitConstructorCall", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "JavadocImplicitTypeReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ImportReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "JavadocAllocationExpression", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "JavadocFieldReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "JavadocMessageSend", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "JavadocQualifiedTypeReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "JavadocSingleNameReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "JavadocSingleTypeReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Literal", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "LocalDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "MemberValuePair", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "MessageSend", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ParameterizedQualifiedTypeReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "QualifiedNameReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "QualifiedSuperReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "QualifiedTypeReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "SingleNameReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "SingleTypeReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ThisReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeReference", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "Constant", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ArrayBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Binding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "BlockScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "CompilationUnitScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ElementValuePair", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "LocalVariableBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "LookupEnvironment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ParameterizedGenericMethodBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemFieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemReasons", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Scope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TagBits", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeIds", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "problem", ".", "AbortCompilation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ";", "class", "DefaultBindingResolver", "extends", "BindingResolver", "{", "static", "class", "BindingTables", "{", "Map", "bindingKeysToBindings", ";", "Map", "compilerBindingsToASTBindings", ";", "BindingTables", "(", ")", "{", "this", ".", "compilerBindingsToASTBindings", "=", "new", "HashMap", "(", ")", ";", "this", ".", "bindingKeysToBindings", "=", "new", "HashMap", "(", ")", ";", "}", "}", "Map", "astNodesToBlockScope", ";", "Map", "bindingsToAstNodes", ";", "BindingTables", "bindingTables", ";", "Map", "newAstToOldAst", ";", "private", "CompilationUnitScope", "scope", ";", "WorkingCopyOwner", "workingCopyOwner", ";", "boolean", "isRecoveringBindings", ";", "boolean", "fromJavaProject", ";", "DefaultBindingResolver", "(", "CompilationUnitScope", "scope", ",", "WorkingCopyOwner", "workingCopyOwner", ",", "BindingTables", "bindingTables", ",", "boolean", "isRecoveringBindings", ",", "boolean", "fromJavaProject", ")", "{", "this", ".", "newAstToOldAst", "=", "new", "HashMap", "(", ")", ";", "this", ".", "astNodesToBlockScope", "=", "new", "HashMap", "(", ")", ";", "this", ".", "bindingsToAstNodes", "=", "new", "HashMap", "(", ")", ";", "this", ".", "bindingTables", "=", "bindingTables", ";", "this", ".", "scope", "=", "scope", ";", "this", ".", "workingCopyOwner", "=", "workingCopyOwner", ";", "this", ".", "isRecoveringBindings", "=", "isRecoveringBindings", ";", "this", ".", "fromJavaProject", "=", "fromJavaProject", ";", "}", "DefaultBindingResolver", "(", "LookupEnvironment", "lookupEnvironment", ",", "WorkingCopyOwner", "workingCopyOwner", ",", "BindingTables", "bindingTables", ",", "boolean", "isRecoveringBindings", ",", "boolean", "fromJavaProject", ")", "{", "this", ".", "newAstToOldAst", "=", "new", "HashMap", "(", ")", ";", "this", ".", "astNodesToBlockScope", "=", "new", "HashMap", "(", ")", ";", "this", ".", "bindingsToAstNodes", "=", "new", "HashMap", "(", ")", ";", "this", ".", "bindingTables", "=", "bindingTables", ";", "this", ".", "scope", "=", "new", "CompilationUnitScope", "(", "new", "CompilationUnitDeclaration", "(", "null", ",", "null", ",", "-", "1", ")", ",", "lookupEnvironment", ")", ";", "this", ".", "workingCopyOwner", "=", "workingCopyOwner", ";", "this", ".", "isRecoveringBindings", "=", "isRecoveringBindings", ";", "this", ".", "fromJavaProject", "=", "fromJavaProject", ";", "}", "synchronized", "ASTNode", "findDeclaringNode", "(", "IBinding", "binding", ")", "{", "if", "(", "binding", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "binding", "instanceof", "IMethodBinding", ")", "{", "IMethodBinding", "methodBinding", "=", "(", "IMethodBinding", ")", "binding", ";", "return", "(", "ASTNode", ")", "this", ".", "bindingsToAstNodes", ".", "get", "(", "methodBinding", ".", "getMethodDeclaration", "(", ")", ")", ";", "}", "else", "if", "(", "binding", "instanceof", "ITypeBinding", ")", "{", "ITypeBinding", "typeBinding", "=", "(", "ITypeBinding", ")", "binding", ";", "return", "(", "ASTNode", ")", "this", ".", "bindingsToAstNodes", ".", "get", "(", "typeBinding", ".", "getTypeDeclaration", "(", ")", ")", ";", "}", "else", "if", "(", "binding", "instanceof", "IVariableBinding", ")", "{", "IVariableBinding", "variableBinding", "=", "(", "IVariableBinding", ")", "binding", ";", "return", "(", "ASTNode", ")", "this", ".", "bindingsToAstNodes", ".", "get", "(", "variableBinding", ".", "getVariableDeclaration", "(", ")", ")", ";", "}", "return", "(", "ASTNode", ")", "this", ".", "bindingsToAstNodes", ".", "get", "(", "binding", ")", ";", "}", "synchronized", "ASTNode", "findDeclaringNode", "(", "String", "bindingKey", ")", "{", "if", "(", "bindingKey", "==", "null", ")", "{", "return", "null", ";", "}", "Object", "binding", "=", "this", ".", "bindingTables", ".", "bindingKeysToBindings", ".", "get", "(", "bindingKey", ")", ";", "if", "(", "binding", "==", "null", ")", "return", "null", ";", "return", "(", "ASTNode", ")", "this", ".", "bindingsToAstNodes", ".", "get", "(", "binding", ")", ";", "}", "IBinding", "getBinding", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Binding", "binding", ")", "{", "switch", "(", "binding", ".", "kind", "(", ")", ")", "{", "case", "Binding", ".", "PACKAGE", ":", "return", "getPackageBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "binding", ")", ";", "case", "Binding", ".", "TYPE", ":", "case", "Binding", ".", "BASE_TYPE", ":", "case", "Binding", ".", "GENERIC_TYPE", ":", "case", "Binding", ".", "PARAMETERIZED_TYPE", ":", "case", "Binding", ".", "RAW_TYPE", ":", "return", "getTypeBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "binding", ")", ";", "case", "Binding", ".", "ARRAY_TYPE", ":", "case", "Binding", ".", "TYPE_PARAMETER", ":", "return", "new", "TypeBinding", "(", "this", ",", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "binding", ")", ";", "case", "Binding", ".", "METHOD", ":", "return", "getMethodBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ")", "binding", ")", ";", "case", "Binding", ".", "FIELD", ":", "case", "Binding", ".", "LOCAL", ":", "return", "getVariableBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "VariableBinding", ")", "binding", ")", ";", "}", "return", "null", ";", "}", "Util", ".", "BindingsToNodesMap", "getBindingsToNodesMap", "(", ")", "{", "return", "new", "Util", ".", "BindingsToNodesMap", "(", ")", "{", "public", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "get", "(", "Binding", "binding", ")", "{", "return", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "DefaultBindingResolver", ".", "this", ".", "newAstToOldAst", ".", "get", "(", "DefaultBindingResolver", ".", "this", ".", "bindingsToAstNodes", ".", "get", "(", "binding", ")", ")", ";", "}", "}", ";", "}", "synchronized", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "getCorrespondingNode", "(", "ASTNode", "currentNode", ")", "{", "return", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "currentNode", ")", ";", "}", "synchronized", "IMethodBinding", "getMethodBinding", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", "methodBinding", ")", "{", "if", "(", "methodBinding", "!=", "null", "&&", "!", "methodBinding", ".", "isValidBinding", "(", ")", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemMethodBinding", "problemMethodBinding", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ProblemMethodBinding", ")", "methodBinding", ";", "methodBinding", "=", "problemMethodBinding", ".", "closestMatch", ";", "}", "if", "(", "methodBinding", "!=", "null", ")", "{", "if", "(", "!", "this", ".", "isRecoveringBindings", "&&", "(", "(", "methodBinding", ".", "tagBits", "&", "TagBits", ".", "HasMissingType", ")", "!=", "0", ")", ")", "{", "return", "null", ";", "}", "IMethodBinding", "binding", "=", "(", "IMethodBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "methodBinding", ")", ";", "if", "(", "binding", "!=", "null", ")", "{", "return", "binding", ";", "}", "binding", "=", "new", "MethodBinding", "(", "this", ",", "methodBinding", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "methodBinding", ",", "binding", ")", ";", "return", "binding", ";", "}", "return", "null", ";", "}", "synchronized", "IMemberValuePairBinding", "getMemberValuePairBinding", "(", "ElementValuePair", "valuePair", ")", "{", "if", "(", "valuePair", "==", "null", "||", "valuePair", ".", "binding", "==", "null", ")", "return", "null", ";", "IMemberValuePairBinding", "binding", "=", "(", "IMemberValuePairBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "valuePair", ")", ";", "if", "(", "binding", "!=", "null", ")", "return", "binding", ";", "binding", "=", "new", "MemberValuePairBinding", "(", "valuePair", ",", "this", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "valuePair", ",", "binding", ")", ";", "return", "binding", ";", "}", "synchronized", "IPackageBinding", "getPackageBinding", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", "packageBinding", ")", "{", "if", "(", "packageBinding", "==", "null", ")", "{", "return", "null", ";", "}", "IPackageBinding", "binding", "=", "(", "IPackageBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "packageBinding", ")", ";", "if", "(", "binding", "!=", "null", ")", "{", "return", "binding", ";", "}", "binding", "=", "new", "PackageBinding", "(", "packageBinding", ",", "this", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "packageBinding", ",", "binding", ")", ";", "return", "binding", ";", "}", "private", "int", "getTypeArguments", "(", "ParameterizedQualifiedTypeReference", "typeReference", ")", "{", "TypeReference", "[", "]", "[", "]", "typeArguments", "=", "typeReference", ".", "typeArguments", ";", "int", "value", "=", "0", ";", "for", "(", "int", "i", "=", "0", ",", "max", "=", "typeArguments", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "if", "(", "(", "typeArguments", "[", "i", "]", "!=", "null", ")", "||", "(", "value", "!=", "0", ")", ")", "{", "value", "++", ";", "}", "}", "return", "value", ";", "}", "synchronized", "ITypeBinding", "getTypeBinding", "(", "VariableDeclaration", "variableDeclaration", ")", "{", "ITypeBinding", "binding", "=", "(", "ITypeBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "variableDeclaration", ")", ";", "if", "(", "binding", "!=", "null", ")", "{", "return", "binding", ";", "}", "binding", "=", "new", "RecoveredTypeBinding", "(", "this", ",", "variableDeclaration", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "variableDeclaration", ",", "binding", ")", ";", "return", "binding", ";", "}", "synchronized", "ITypeBinding", "getTypeBinding", "(", "Type", "type", ")", "{", "ITypeBinding", "binding", "=", "(", "ITypeBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "type", ")", ";", "if", "(", "binding", "!=", "null", ")", "{", "return", "binding", ";", "}", "binding", "=", "new", "RecoveredTypeBinding", "(", "this", ",", "type", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "type", ",", "binding", ")", ";", "return", "binding", ";", "}", "synchronized", "ITypeBinding", "getTypeBinding", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "referenceBinding", ")", "{", "if", "(", "referenceBinding", "==", "null", ")", "{", "return", "null", ";", "}", "else", "if", "(", "!", "referenceBinding", ".", "isValidBinding", "(", ")", ")", "{", "switch", "(", "referenceBinding", ".", "problemId", "(", ")", ")", "{", "case", "ProblemReasons", ".", "NotVisible", ":", "case", "ProblemReasons", ".", "NonStaticReferenceInStaticContext", ":", "if", "(", "referenceBinding", "instanceof", "ProblemReferenceBinding", ")", "{", "ProblemReferenceBinding", "problemReferenceBinding", "=", "(", "ProblemReferenceBinding", ")", "referenceBinding", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "binding2", "=", "problemReferenceBinding", ".", "closestMatch", "(", ")", ";", "ITypeBinding", "binding", "=", "(", "ITypeBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "binding2", ")", ";", "if", "(", "binding", "!=", "null", ")", "{", "return", "binding", ";", "}", "binding", "=", "new", "TypeBinding", "(", "this", ",", "binding2", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "binding2", ",", "binding", ")", ";", "return", "binding", ";", "}", "break", ";", "case", "ProblemReasons", ".", "NotFound", ":", "if", "(", "!", "this", ".", "isRecoveringBindings", ")", "{", "return", "null", ";", "}", "ITypeBinding", "binding", "=", "(", "ITypeBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "referenceBinding", ")", ";", "if", "(", "binding", "!=", "null", ")", "{", "return", "binding", ";", "}", "if", "(", "(", "referenceBinding", ".", "tagBits", "&", "TagBits", ".", "HasMissingType", ")", "!=", "0", ")", "{", "binding", "=", "new", "TypeBinding", "(", "this", ",", "referenceBinding", ")", ";", "}", "else", "{", "binding", "=", "new", "RecoveredTypeBinding", "(", "this", ",", "referenceBinding", ")", ";", "}", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "referenceBinding", ",", "binding", ")", ";", "return", "binding", ";", "}", "return", "null", ";", "}", "else", "{", "if", "(", "(", "referenceBinding", ".", "tagBits", "&", "TagBits", ".", "HasMissingType", ")", "!=", "0", "&&", "!", "this", ".", "isRecoveringBindings", ")", "{", "return", "null", ";", "}", "ITypeBinding", "binding", "=", "(", "ITypeBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "referenceBinding", ")", ";", "if", "(", "binding", "!=", "null", ")", "{", "return", "binding", ";", "}", "binding", "=", "new", "TypeBinding", "(", "this", ",", "referenceBinding", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "referenceBinding", ",", "binding", ")", ";", "return", "binding", ";", "}", "}", "synchronized", "ITypeBinding", "getTypeBinding", "(", "RecoveredTypeBinding", "recoveredTypeBinding", ",", "int", "dimensions", ")", "{", "if", "(", "recoveredTypeBinding", "==", "null", ")", "{", "return", "null", ";", "}", "return", "new", "RecoveredTypeBinding", "(", "this", ",", "recoveredTypeBinding", ",", "dimensions", ")", ";", "}", "synchronized", "IVariableBinding", "getVariableBinding", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "VariableBinding", "variableBinding", ",", "VariableDeclaration", "variableDeclaration", ")", "{", "if", "(", "this", ".", "isRecoveringBindings", ")", "{", "if", "(", "variableBinding", "!=", "null", ")", "{", "if", "(", "variableBinding", ".", "isValidBinding", "(", ")", ")", "{", "IVariableBinding", "binding", "=", "(", "IVariableBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "variableBinding", ")", ";", "if", "(", "binding", "!=", "null", ")", "{", "return", "binding", ";", "}", "if", "(", "variableBinding", ".", "type", "!=", "null", ")", "{", "binding", "=", "new", "VariableBinding", "(", "this", ",", "variableBinding", ")", ";", "}", "else", "{", "binding", "=", "new", "RecoveredVariableBinding", "(", "this", ",", "variableDeclaration", ")", ";", "}", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "variableBinding", ",", "binding", ")", ";", "return", "binding", ";", "}", "else", "{", "if", "(", "variableBinding", "instanceof", "ProblemFieldBinding", ")", "{", "ProblemFieldBinding", "problemFieldBinding", "=", "(", "ProblemFieldBinding", ")", "variableBinding", ";", "switch", "(", "problemFieldBinding", ".", "problemId", "(", ")", ")", "{", "case", "ProblemReasons", ".", "NotVisible", ":", "case", "ProblemReasons", ".", "NonStaticReferenceInStaticContext", ":", "case", "ProblemReasons", ".", "NonStaticReferenceInConstructorInvocation", ":", "ReferenceBinding", "declaringClass", "=", "problemFieldBinding", ".", "declaringClass", ";", "FieldBinding", "exactBinding", "=", "declaringClass", ".", "getField", "(", "problemFieldBinding", ".", "name", ",", "true", ")", ";", "if", "(", "exactBinding", "!=", "null", ")", "{", "IVariableBinding", "variableBinding2", "=", "(", "IVariableBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "exactBinding", ")", ";", "if", "(", "variableBinding2", "!=", "null", ")", "{", "return", "variableBinding2", ";", "}", "variableBinding2", "=", "new", "VariableBinding", "(", "this", ",", "exactBinding", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "exactBinding", ",", "variableBinding2", ")", ";", "return", "variableBinding2", ";", "}", "break", ";", "}", "}", "}", "}", "return", "null", ";", "}", "return", "this", ".", "getVariableBinding", "(", "variableBinding", ")", ";", "}", "public", "WorkingCopyOwner", "getWorkingCopyOwner", "(", ")", "{", "return", "this", ".", "workingCopyOwner", ";", "}", "synchronized", "IVariableBinding", "getVariableBinding", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "VariableBinding", "variableBinding", ")", "{", "if", "(", "variableBinding", "!=", "null", ")", "{", "if", "(", "variableBinding", ".", "isValidBinding", "(", ")", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "variableType", "=", "variableBinding", ".", "type", ";", "if", "(", "variableType", "!=", "null", ")", "{", "if", "(", "!", "this", ".", "isRecoveringBindings", "&&", "(", "(", "variableType", ".", "tagBits", "&", "TagBits", ".", "HasMissingType", ")", "!=", "0", ")", ")", "{", "return", "null", ";", "}", "IVariableBinding", "binding", "=", "(", "IVariableBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "variableBinding", ")", ";", "if", "(", "binding", "!=", "null", ")", "{", "return", "binding", ";", "}", "binding", "=", "new", "VariableBinding", "(", "this", ",", "variableBinding", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "variableBinding", ",", "binding", ")", ";", "return", "binding", ";", "}", "}", "else", "{", "if", "(", "variableBinding", "instanceof", "ProblemFieldBinding", ")", "{", "ProblemFieldBinding", "problemFieldBinding", "=", "(", "ProblemFieldBinding", ")", "variableBinding", ";", "switch", "(", "problemFieldBinding", ".", "problemId", "(", ")", ")", "{", "case", "ProblemReasons", ".", "NotVisible", ":", "case", "ProblemReasons", ".", "NonStaticReferenceInStaticContext", ":", "case", "ProblemReasons", ".", "NonStaticReferenceInConstructorInvocation", ":", "ReferenceBinding", "declaringClass", "=", "problemFieldBinding", ".", "declaringClass", ";", "FieldBinding", "exactBinding", "=", "declaringClass", ".", "getField", "(", "problemFieldBinding", ".", "name", ",", "true", ")", ";", "if", "(", "exactBinding", "!=", "null", ")", "{", "IVariableBinding", "variableBinding2", "=", "(", "IVariableBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "exactBinding", ")", ";", "if", "(", "variableBinding2", "!=", "null", ")", "{", "return", "variableBinding2", ";", "}", "variableBinding2", "=", "new", "VariableBinding", "(", "this", ",", "exactBinding", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "exactBinding", ",", "variableBinding2", ")", ";", "return", "variableBinding2", ";", "}", "break", ";", "}", "}", "}", "}", "return", "null", ";", "}", "synchronized", "IAnnotationBinding", "getAnnotationInstance", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "AnnotationBinding", "internalInstance", ")", "{", "if", "(", "internalInstance", "==", "null", ")", "return", "null", ";", "ReferenceBinding", "annotationType", "=", "internalInstance", ".", "getAnnotationType", "(", ")", ";", "if", "(", "!", "this", ".", "isRecoveringBindings", ")", "{", "if", "(", "annotationType", "==", "null", "||", "(", "(", "annotationType", ".", "tagBits", "&", "TagBits", ".", "HasMissingType", ")", "!=", "0", ")", ")", "{", "return", "null", ";", "}", "}", "IAnnotationBinding", "domInstance", "=", "(", "IAnnotationBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "internalInstance", ")", ";", "if", "(", "domInstance", "!=", "null", ")", "return", "domInstance", ";", "domInstance", "=", "new", "AnnotationBinding", "(", "internalInstance", ",", "this", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "internalInstance", ",", "domInstance", ")", ";", "return", "domInstance", ";", "}", "boolean", "isResolvedTypeInferredFromExpectedType", "(", "MethodInvocation", "methodInvocation", ")", "{", "Object", "oldNode", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "methodInvocation", ")", ";", "if", "(", "oldNode", "instanceof", "MessageSend", ")", "{", "MessageSend", "messageSend", "=", "(", "MessageSend", ")", "oldNode", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", "methodBinding", "=", "messageSend", ".", "binding", ";", "if", "(", "methodBinding", "instanceof", "ParameterizedGenericMethodBinding", ")", "{", "ParameterizedGenericMethodBinding", "genericMethodBinding", "=", "(", "ParameterizedGenericMethodBinding", ")", "methodBinding", ";", "return", "genericMethodBinding", ".", "inferredReturnType", ";", "}", "}", "return", "false", ";", "}", "boolean", "isResolvedTypeInferredFromExpectedType", "(", "SuperMethodInvocation", "superMethodInvocation", ")", "{", "Object", "oldNode", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "superMethodInvocation", ")", ";", "if", "(", "oldNode", "instanceof", "MessageSend", ")", "{", "MessageSend", "messageSend", "=", "(", "MessageSend", ")", "oldNode", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", "methodBinding", "=", "messageSend", ".", "binding", ";", "if", "(", "methodBinding", "instanceof", "ParameterizedGenericMethodBinding", ")", "{", "ParameterizedGenericMethodBinding", "genericMethodBinding", "=", "(", "ParameterizedGenericMethodBinding", ")", "methodBinding", ";", "return", "genericMethodBinding", ".", "inferredReturnType", ";", "}", "}", "return", "false", ";", "}", "boolean", "isResolvedTypeInferredFromExpectedType", "(", "ClassInstanceCreation", "classInstanceCreation", ")", "{", "Object", "oldNode", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "classInstanceCreation", ")", ";", "if", "(", "oldNode", "instanceof", "AllocationExpression", ")", "{", "AllocationExpression", "allocationExpression", "=", "(", "AllocationExpression", ")", "oldNode", ";", "return", "allocationExpression", ".", "inferredReturnType", ";", "}", "return", "false", ";", "}", "LookupEnvironment", "lookupEnvironment", "(", ")", "{", "return", "this", ".", "scope", ".", "environment", "(", ")", ";", "}", "synchronized", "void", "recordScope", "(", "ASTNode", "astNode", ",", "BlockScope", "blockScope", ")", "{", "this", ".", "astNodesToBlockScope", ".", "put", "(", "astNode", ",", "blockScope", ")", ";", "}", "boolean", "resolveBoxing", "(", "Expression", "expression", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "expression", ")", ";", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", "compilerExpression", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ")", "node", ";", "return", "(", "compilerExpression", ".", "implicitConversion", "&", "TypeIds", ".", "BOXING", ")", "!=", "0", ";", "}", "return", "false", ";", "}", "boolean", "resolveUnboxing", "(", "Expression", "expression", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "expression", ")", ";", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", "compilerExpression", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ")", "node", ";", "return", "(", "compilerExpression", ".", "implicitConversion", "&", "TypeIds", ".", "UNBOXING", ")", "!=", "0", ";", "}", "return", "false", ";", "}", "Object", "resolveConstantExpressionValue", "(", "Expression", "expression", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "expression", ")", ";", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", "compilerExpression", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ")", "node", ";", "Constant", "constant", "=", "compilerExpression", ".", "constant", ";", "if", "(", "constant", "!=", "null", "&&", "constant", "!=", "Constant", ".", "NotAConstant", ")", "{", "switch", "(", "constant", ".", "typeID", "(", ")", ")", "{", "case", "TypeIds", ".", "T_int", ":", "return", "new", "Integer", "(", "constant", ".", "intValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_byte", ":", "return", "new", "Byte", "(", "constant", ".", "byteValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_short", ":", "return", "new", "Short", "(", "constant", ".", "shortValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_char", ":", "return", "new", "Character", "(", "constant", ".", "charValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_float", ":", "return", "new", "Float", "(", "constant", ".", "floatValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_double", ":", "return", "new", "Double", "(", "constant", ".", "doubleValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_boolean", ":", "return", "constant", ".", "booleanValue", "(", ")", "?", "Boolean", ".", "TRUE", ":", "Boolean", ".", "FALSE", ";", "case", "TypeIds", ".", "T_long", ":", "return", "new", "Long", "(", "constant", ".", "longValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_JavaLangString", ":", "return", "constant", ".", "stringValue", "(", ")", ";", "}", "return", "null", ";", "}", "}", "return", "null", ";", "}", "synchronized", "IMethodBinding", "resolveConstructor", "(", "ClassInstanceCreation", "expression", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "expression", ")", ";", "if", "(", "node", "!=", "null", "&&", "(", "node", ".", "bits", "&", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ".", "IsAnonymousType", ")", "!=", "0", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "anonymousLocalTypeDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "node", ";", "return", "getMethodBinding", "(", "anonymousLocalTypeDeclaration", ".", "allocation", ".", "binding", ")", ";", "}", "else", "if", "(", "node", "instanceof", "AllocationExpression", ")", "{", "return", "getMethodBinding", "(", "(", "(", "AllocationExpression", ")", "node", ")", ".", "binding", ")", ";", "}", "return", "null", ";", "}", "synchronized", "IMethodBinding", "resolveConstructor", "(", "ConstructorInvocation", "expression", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "expression", ")", ";", "if", "(", "node", "instanceof", "ExplicitConstructorCall", ")", "{", "ExplicitConstructorCall", "explicitConstructorCall", "=", "(", "ExplicitConstructorCall", ")", "node", ";", "return", "getMethodBinding", "(", "explicitConstructorCall", ".", "binding", ")", ";", "}", "return", "null", ";", "}", "IMethodBinding", "resolveConstructor", "(", "EnumConstantDeclaration", "enumConstantDeclaration", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "enumConstantDeclaration", ")", ";", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", "fieldDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", ")", "node", ";", "if", "(", "fieldDeclaration", ".", "getKind", "(", ")", "==", "AbstractVariableDeclaration", ".", "ENUM_CONSTANT", "&&", "fieldDeclaration", ".", "initialization", "!=", "null", ")", "{", "AllocationExpression", "allocationExpression", "=", "(", "AllocationExpression", ")", "fieldDeclaration", ".", "initialization", ";", "return", "getMethodBinding", "(", "allocationExpression", ".", "binding", ")", ";", "}", "}", "return", "null", ";", "}", "synchronized", "IMethodBinding", "resolveConstructor", "(", "SuperConstructorInvocation", "expression", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "expression", ")", ";", "if", "(", "node", "instanceof", "ExplicitConstructorCall", ")", "{", "ExplicitConstructorCall", "explicitConstructorCall", "=", "(", "ExplicitConstructorCall", ")", "node", ";", "return", "getMethodBinding", "(", "explicitConstructorCall", ".", "binding", ")", ";", "}", "return", "null", ";", "}", "synchronized", "ITypeBinding", "resolveExpressionType", "(", "Expression", "expression", ")", "{", "try", "{", "switch", "(", "expression", ".", "getNodeType", "(", ")", ")", "{", "case", "ASTNode", ".", "CLASS_INSTANCE_CREATION", ":", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "astNode", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "expression", ")", ";", "if", "(", "astNode", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "typeDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "astNode", ";", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "typeDeclaration", ".", "binding", ")", ";", "if", "(", "typeBinding", "!=", "null", ")", "{", "return", "typeBinding", ";", "}", "}", "else", "if", "(", "astNode", "instanceof", "AllocationExpression", ")", "{", "AllocationExpression", "allocationExpression", "=", "(", "AllocationExpression", ")", "astNode", ";", "return", "this", ".", "getTypeBinding", "(", "allocationExpression", ".", "resolvedType", ")", ";", "}", "break", ";", "case", "ASTNode", ".", "SIMPLE_NAME", ":", "case", "ASTNode", ".", "QUALIFIED_NAME", ":", "return", "resolveTypeBindingForName", "(", "(", "Name", ")", "expression", ")", ";", "case", "ASTNode", ".", "ARRAY_INITIALIZER", ":", "case", "ASTNode", ".", "ARRAY_CREATION", ":", "case", "ASTNode", ".", "ASSIGNMENT", ":", "case", "ASTNode", ".", "POSTFIX_EXPRESSION", ":", "case", "ASTNode", ".", "PREFIX_EXPRESSION", ":", "case", "ASTNode", ".", "CAST_EXPRESSION", ":", "case", "ASTNode", ".", "TYPE_LITERAL", ":", "case", "ASTNode", ".", "INFIX_EXPRESSION", ":", "case", "ASTNode", ".", "INSTANCEOF_EXPRESSION", ":", "case", "ASTNode", ".", "FIELD_ACCESS", ":", "case", "ASTNode", ".", "SUPER_FIELD_ACCESS", ":", "case", "ASTNode", ".", "ARRAY_ACCESS", ":", "case", "ASTNode", ".", "METHOD_INVOCATION", ":", "case", "ASTNode", ".", "SUPER_METHOD_INVOCATION", ":", "case", "ASTNode", ".", "CONDITIONAL_EXPRESSION", ":", "case", "ASTNode", ".", "MARKER_ANNOTATION", ":", "case", "ASTNode", ".", "NORMAL_ANNOTATION", ":", "case", "ASTNode", ".", "SINGLE_MEMBER_ANNOTATION", ":", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", "compilerExpression", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "expression", ")", ";", "if", "(", "compilerExpression", "!=", "null", ")", "{", "return", "this", ".", "getTypeBinding", "(", "compilerExpression", ".", "resolvedType", ")", ";", "}", "break", ";", "case", "ASTNode", ".", "STRING_LITERAL", ":", "if", "(", "this", ".", "scope", "!=", "null", ")", "{", "return", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getJavaLangString", "(", ")", ")", ";", "}", "break", ";", "case", "ASTNode", ".", "BOOLEAN_LITERAL", ":", "case", "ASTNode", ".", "NULL_LITERAL", ":", "case", "ASTNode", ".", "CHARACTER_LITERAL", ":", "case", "ASTNode", ".", "NUMBER_LITERAL", ":", "Literal", "literal", "=", "(", "Literal", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "expression", ")", ";", "if", "(", "literal", "!=", "null", ")", "{", "return", "this", ".", "getTypeBinding", "(", "literal", ".", "literalType", "(", "null", ")", ")", ";", "}", "break", ";", "case", "ASTNode", ".", "THIS_EXPRESSION", ":", "ThisReference", "thisReference", "=", "(", "ThisReference", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "expression", ")", ";", "BlockScope", "blockScope", "=", "(", "BlockScope", ")", "this", ".", "astNodesToBlockScope", ".", "get", "(", "expression", ")", ";", "if", "(", "blockScope", "!=", "null", ")", "{", "return", "this", ".", "getTypeBinding", "(", "thisReference", ".", "resolveType", "(", "blockScope", ")", ")", ";", "}", "break", ";", "case", "ASTNode", ".", "PARENTHESIZED_EXPRESSION", ":", "ParenthesizedExpression", "parenthesizedExpression", "=", "(", "ParenthesizedExpression", ")", "expression", ";", "return", "resolveExpressionType", "(", "parenthesizedExpression", ".", "getExpression", "(", ")", ")", ";", "case", "ASTNode", ".", "VARIABLE_DECLARATION_EXPRESSION", ":", "VariableDeclarationExpression", "variableDeclarationExpression", "=", "(", "VariableDeclarationExpression", ")", "expression", ";", "Type", "type", "=", "variableDeclarationExpression", ".", "getType", "(", ")", ";", "if", "(", "type", "!=", "null", ")", "{", "return", "type", ".", "resolveBinding", "(", ")", ";", "}", "break", ";", "}", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "}", "return", "null", ";", "}", "synchronized", "IVariableBinding", "resolveField", "(", "FieldAccess", "fieldAccess", ")", "{", "Object", "oldNode", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "fieldAccess", ")", ";", "if", "(", "oldNode", "instanceof", "FieldReference", ")", "{", "FieldReference", "fieldReference", "=", "(", "FieldReference", ")", "oldNode", ";", "return", "this", ".", "getVariableBinding", "(", "fieldReference", ".", "binding", ")", ";", "}", "return", "null", ";", "}", "synchronized", "IVariableBinding", "resolveField", "(", "SuperFieldAccess", "fieldAccess", ")", "{", "Object", "oldNode", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "fieldAccess", ")", ";", "if", "(", "oldNode", "instanceof", "FieldReference", ")", "{", "FieldReference", "fieldReference", "=", "(", "FieldReference", ")", "oldNode", ";", "return", "this", ".", "getVariableBinding", "(", "fieldReference", ".", "binding", ")", ";", "}", "return", "null", ";", "}", "synchronized", "IBinding", "resolveImport", "(", "ImportDeclaration", "importDeclaration", ")", "{", "if", "(", "this", ".", "scope", "==", "null", ")", "return", "null", ";", "try", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "importDeclaration", ")", ";", "if", "(", "node", "instanceof", "ImportReference", ")", "{", "ImportReference", "importReference", "=", "(", "ImportReference", ")", "node", ";", "final", "boolean", "isStatic", "=", "importReference", ".", "isStatic", "(", ")", ";", "if", "(", "(", "importReference", ".", "bits", "&", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ".", "OnDemand", ")", "!=", "0", ")", "{", "Binding", "binding", "=", "this", ".", "scope", ".", "getImport", "(", "CharOperation", ".", "subarray", "(", "importReference", ".", "tokens", ",", "0", ",", "importReference", ".", "tokens", ".", "length", ")", ",", "true", ",", "isStatic", ")", ";", "if", "(", "binding", "!=", "null", ")", "{", "if", "(", "isStatic", ")", "{", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "{", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "binding", ")", ";", "return", "typeBinding", "==", "null", "?", "null", ":", "typeBinding", ";", "}", "}", "else", "{", "if", "(", "(", "binding", ".", "kind", "(", ")", "&", "Binding", ".", "PACKAGE", ")", "!=", "0", ")", "{", "IPackageBinding", "packageBinding", "=", "getPackageBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "binding", ")", ";", "if", "(", "packageBinding", "==", "null", ")", "{", "return", "null", ";", "}", "return", "packageBinding", ";", "}", "else", "{", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "binding", ")", ";", "if", "(", "typeBinding", "==", "null", ")", "{", "return", "null", ";", "}", "return", "typeBinding", ";", "}", "}", "}", "}", "else", "{", "Binding", "binding", "=", "this", ".", "scope", ".", "getImport", "(", "importReference", ".", "tokens", ",", "false", ",", "isStatic", ")", ";", "if", "(", "binding", "!=", "null", ")", "{", "if", "(", "isStatic", ")", "{", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "{", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "binding", ")", ";", "return", "typeBinding", "==", "null", "?", "null", ":", "typeBinding", ";", "}", "else", "if", "(", "binding", "instanceof", "FieldBinding", ")", "{", "IVariableBinding", "variableBinding", "=", "this", ".", "getVariableBinding", "(", "(", "FieldBinding", ")", "binding", ")", ";", "return", "variableBinding", "==", "null", "?", "null", ":", "variableBinding", ";", "}", "else", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ")", "{", "return", "getMethodBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ")", "binding", ")", ";", "}", "}", "else", "{", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "{", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "binding", ")", ";", "return", "typeBinding", "==", "null", "?", "null", ":", "typeBinding", ";", "}", "}", "}", "}", "}", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "}", "return", "null", ";", "}", "IMethodBinding", "resolveMember", "(", "AnnotationTypeMemberDeclaration", "declaration", ")", "{", "Object", "oldNode", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "declaration", ")", ";", "if", "(", "oldNode", "instanceof", "AbstractMethodDeclaration", ")", "{", "AbstractMethodDeclaration", "methodDeclaration", "=", "(", "AbstractMethodDeclaration", ")", "oldNode", ";", "IMethodBinding", "methodBinding", "=", "getMethodBinding", "(", "methodDeclaration", ".", "binding", ")", ";", "if", "(", "methodBinding", "==", "null", ")", "{", "return", "null", ";", "}", "this", ".", "bindingsToAstNodes", ".", "put", "(", "methodBinding", ",", "declaration", ")", ";", "String", "key", "=", "methodBinding", ".", "getKey", "(", ")", ";", "if", "(", "key", "!=", "null", ")", "{", "this", ".", "bindingTables", ".", "bindingKeysToBindings", ".", "put", "(", "key", ",", "methodBinding", ")", ";", "}", "return", "methodBinding", ";", "}", "return", "null", ";", "}", "synchronized", "IMethodBinding", "resolveMethod", "(", "MethodDeclaration", "method", ")", "{", "Object", "oldNode", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "method", ")", ";", "if", "(", "oldNode", "instanceof", "AbstractMethodDeclaration", ")", "{", "AbstractMethodDeclaration", "methodDeclaration", "=", "(", "AbstractMethodDeclaration", ")", "oldNode", ";", "IMethodBinding", "methodBinding", "=", "getMethodBinding", "(", "methodDeclaration", ".", "binding", ")", ";", "if", "(", "methodBinding", "==", "null", ")", "{", "return", "null", ";", "}", "this", ".", "bindingsToAstNodes", ".", "put", "(", "methodBinding", ",", "method", ")", ";", "String", "key", "=", "methodBinding", ".", "getKey", "(", ")", ";", "if", "(", "key", "!=", "null", ")", "{", "this", ".", "bindingTables", ".", "bindingKeysToBindings", ".", "put", "(", "key", ",", "methodBinding", ")", ";", "}", "return", "methodBinding", ";", "}", "return", "null", ";", "}", "synchronized", "IMethodBinding", "resolveMethod", "(", "MethodInvocation", "method", ")", "{", "Object", "oldNode", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "method", ")", ";", "if", "(", "oldNode", "instanceof", "MessageSend", ")", "{", "MessageSend", "messageSend", "=", "(", "MessageSend", ")", "oldNode", ";", "return", "getMethodBinding", "(", "messageSend", ".", "binding", ")", ";", "}", "return", "null", ";", "}", "synchronized", "IMethodBinding", "resolveMethod", "(", "SuperMethodInvocation", "method", ")", "{", "Object", "oldNode", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "method", ")", ";", "if", "(", "oldNode", "instanceof", "MessageSend", ")", "{", "MessageSend", "messageSend", "=", "(", "MessageSend", ")", "oldNode", ";", "return", "getMethodBinding", "(", "messageSend", ".", "binding", ")", ";", "}", "return", "null", ";", "}", "synchronized", "ITypeBinding", "resolveTypeBindingForName", "(", "Name", "name", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "name", ")", ";", "int", "index", "=", "name", ".", "index", ";", "if", "(", "node", "instanceof", "QualifiedNameReference", ")", "{", "QualifiedNameReference", "qualifiedNameReference", "=", "(", "QualifiedNameReference", ")", "node", ";", "final", "char", "[", "]", "[", "]", "tokens", "=", "qualifiedNameReference", ".", "tokens", ";", "if", "(", "tokens", ".", "length", "==", "index", ")", "{", "return", "this", ".", "getTypeBinding", "(", "qualifiedNameReference", ".", "resolvedType", ")", ";", "}", "int", "indexOfFirstFieldBinding", "=", "qualifiedNameReference", ".", "indexOfFirstFieldBinding", ";", "if", "(", "index", "<", "indexOfFirstFieldBinding", ")", "{", "BlockScope", "internalScope", "=", "(", "BlockScope", ")", "this", ".", "astNodesToBlockScope", ".", "get", "(", "name", ")", ";", "Binding", "binding", "=", "null", ";", "try", "{", "if", "(", "internalScope", "==", "null", ")", "{", "if", "(", "this", ".", "scope", "==", "null", ")", "return", "null", ";", "binding", "=", "this", ".", "scope", ".", "getTypeOrPackage", "(", "CharOperation", ".", "subarray", "(", "tokens", ",", "0", ",", "index", ")", ")", ";", "}", "else", "{", "binding", "=", "internalScope", ".", "getTypeOrPackage", "(", "CharOperation", ".", "subarray", "(", "tokens", ",", "0", ",", "index", ")", ")", ";", "}", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "}", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "{", "return", "null", ";", "}", "else", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "{", "return", "this", ".", "getTypeBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "binding", ")", ";", "}", "}", "else", "if", "(", "index", "==", "indexOfFirstFieldBinding", ")", "{", "if", "(", "qualifiedNameReference", ".", "isTypeReference", "(", ")", ")", "{", "return", "this", ".", "getTypeBinding", "(", "qualifiedNameReference", ".", "resolvedType", ")", ";", "}", "else", "{", "if", "(", "qualifiedNameReference", ".", "otherBindings", "==", "null", ")", "{", "return", "null", ";", "}", "FieldBinding", "fieldBinding", "=", "qualifiedNameReference", ".", "otherBindings", "[", "0", "]", ";", "if", "(", "fieldBinding", "==", "null", ")", "return", "null", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "type", "=", "fieldBinding", ".", "declaringClass", ";", "if", "(", "type", "==", "null", ")", "{", "switch", "(", "qualifiedNameReference", ".", "bits", "&", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ".", "RestrictiveFlagMASK", ")", "{", "case", "Binding", ".", "FIELD", ":", "type", "=", "(", "(", "FieldBinding", ")", "qualifiedNameReference", ".", "binding", ")", ".", "type", ";", "break", ";", "case", "Binding", ".", "LOCAL", ":", "type", "=", "(", "(", "LocalVariableBinding", ")", "qualifiedNameReference", ".", "binding", ")", ".", "type", ";", "break", ";", "}", "}", "return", "this", ".", "getTypeBinding", "(", "type", ")", ";", "}", "}", "else", "{", "if", "(", "qualifiedNameReference", ".", "otherBindings", "==", "null", ")", "return", "null", ";", "final", "int", "otherBindingsLength", "=", "qualifiedNameReference", ".", "otherBindings", ".", "length", ";", "if", "(", "otherBindingsLength", "==", "(", "index", "-", "indexOfFirstFieldBinding", ")", ")", "{", "return", "this", ".", "getTypeBinding", "(", "qualifiedNameReference", ".", "resolvedType", ")", ";", "}", "FieldBinding", "fieldBinding", "=", "qualifiedNameReference", ".", "otherBindings", "[", "index", "-", "indexOfFirstFieldBinding", "]", ";", "if", "(", "fieldBinding", "==", "null", ")", "return", "null", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "type", "=", "fieldBinding", ".", "declaringClass", ";", "if", "(", "type", "==", "null", ")", "{", "fieldBinding", "=", "qualifiedNameReference", ".", "otherBindings", "[", "index", "-", "indexOfFirstFieldBinding", "-", "1", "]", ";", "if", "(", "fieldBinding", "==", "null", ")", "return", "null", ";", "type", "=", "fieldBinding", ".", "type", ";", "}", "return", "this", ".", "getTypeBinding", "(", "type", ")", ";", "}", "}", "else", "if", "(", "node", "instanceof", "QualifiedTypeReference", ")", "{", "QualifiedTypeReference", "qualifiedTypeReference", "=", "(", "QualifiedTypeReference", ")", "node", ";", "if", "(", "qualifiedTypeReference", ".", "resolvedType", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "index", "==", "qualifiedTypeReference", ".", "tokens", ".", "length", ")", "{", "if", "(", "!", "qualifiedTypeReference", ".", "resolvedType", ".", "isValidBinding", "(", ")", "&&", "qualifiedTypeReference", "instanceof", "JavadocQualifiedTypeReference", ")", "{", "JavadocQualifiedTypeReference", "typeRef", "=", "(", "JavadocQualifiedTypeReference", ")", "node", ";", "if", "(", "typeRef", ".", "packageBinding", "!=", "null", ")", "{", "return", "null", ";", "}", "}", "return", "this", ".", "getTypeBinding", "(", "qualifiedTypeReference", ".", "resolvedType", ".", "leafComponentType", "(", ")", ")", ";", "}", "else", "{", "if", "(", "index", ">=", "0", ")", "{", "BlockScope", "internalScope", "=", "(", "BlockScope", ")", "this", ".", "astNodesToBlockScope", ".", "get", "(", "name", ")", ";", "Binding", "binding", "=", "null", ";", "try", "{", "if", "(", "internalScope", "==", "null", ")", "{", "if", "(", "this", ".", "scope", "==", "null", ")", "return", "null", ";", "binding", "=", "this", ".", "scope", ".", "getTypeOrPackage", "(", "CharOperation", ".", "subarray", "(", "qualifiedTypeReference", ".", "tokens", ",", "0", ",", "index", ")", ")", ";", "}", "else", "{", "binding", "=", "internalScope", ".", "getTypeOrPackage", "(", "CharOperation", ".", "subarray", "(", "qualifiedTypeReference", ".", "tokens", ",", "0", ",", "index", ")", ")", ";", "}", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "}", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "{", "return", "null", ";", "}", "else", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "{", "return", "this", ".", "getTypeBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "binding", ")", ";", "}", "else", "{", "return", "null", ";", "}", "}", "}", "}", "else", "if", "(", "node", "instanceof", "ImportReference", ")", "{", "ImportReference", "importReference", "=", "(", "ImportReference", ")", "node", ";", "int", "importReferenceLength", "=", "importReference", ".", "tokens", ".", "length", ";", "if", "(", "index", ">=", "0", ")", "{", "Binding", "binding", "=", "null", ";", "if", "(", "this", ".", "scope", "==", "null", ")", "return", "null", ";", "if", "(", "importReferenceLength", "==", "index", ")", "{", "try", "{", "binding", "=", "this", ".", "scope", ".", "getImport", "(", "CharOperation", ".", "subarray", "(", "importReference", ".", "tokens", ",", "0", ",", "index", ")", ",", "(", "importReference", ".", "bits", "&", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ".", "OnDemand", ")", "!=", "0", ",", "importReference", ".", "isStatic", "(", ")", ")", ";", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "}", "}", "else", "{", "try", "{", "binding", "=", "this", ".", "scope", ".", "getImport", "(", "CharOperation", ".", "subarray", "(", "importReference", ".", "tokens", ",", "0", ",", "index", ")", ",", "true", ",", "importReference", ".", "isStatic", "(", ")", ")", ";", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "}", "}", "if", "(", "binding", "!=", "null", ")", "{", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "{", "return", "this", ".", "getTypeBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "binding", ")", ";", "}", "return", "null", ";", "}", "}", "}", "else", "if", "(", "node", "instanceof", "AbstractMethodDeclaration", ")", "{", "AbstractMethodDeclaration", "methodDeclaration", "=", "(", "AbstractMethodDeclaration", ")", "node", ";", "IMethodBinding", "method", "=", "getMethodBinding", "(", "methodDeclaration", ".", "binding", ")", ";", "if", "(", "method", "==", "null", ")", "return", "null", ";", "return", "method", ".", "getReturnType", "(", ")", ";", "}", "else", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "typeDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "node", ";", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "typeDeclaration", ".", "binding", ")", ";", "if", "(", "typeBinding", "!=", "null", ")", "{", "return", "typeBinding", ";", "}", "}", "if", "(", "node", "instanceof", "JavadocSingleNameReference", ")", "{", "JavadocSingleNameReference", "singleNameReference", "=", "(", "JavadocSingleNameReference", ")", "node", ";", "LocalVariableBinding", "localVariable", "=", "(", "LocalVariableBinding", ")", "singleNameReference", ".", "binding", ";", "if", "(", "localVariable", "!=", "null", ")", "{", "return", "this", ".", "getTypeBinding", "(", "localVariable", ".", "type", ")", ";", "}", "}", "if", "(", "node", "instanceof", "SingleNameReference", ")", "{", "SingleNameReference", "singleNameReference", "=", "(", "SingleNameReference", ")", "node", ";", "return", "this", ".", "getTypeBinding", "(", "singleNameReference", ".", "resolvedType", ")", ";", "}", "else", "if", "(", "node", "instanceof", "QualifiedSuperReference", ")", "{", "QualifiedSuperReference", "qualifiedSuperReference", "=", "(", "QualifiedSuperReference", ")", "node", ";", "return", "this", ".", "getTypeBinding", "(", "qualifiedSuperReference", ".", "qualification", ".", "resolvedType", ")", ";", "}", "else", "if", "(", "node", "instanceof", "LocalDeclaration", ")", "{", "IVariableBinding", "variable", "=", "this", ".", "getVariableBinding", "(", "(", "(", "LocalDeclaration", ")", "node", ")", ".", "binding", ")", ";", "if", "(", "variable", "==", "null", ")", "return", "null", ";", "return", "variable", ".", "getType", "(", ")", ";", "}", "else", "if", "(", "node", "instanceof", "JavadocFieldReference", ")", "{", "JavadocFieldReference", "fieldRef", "=", "(", "JavadocFieldReference", ")", "node", ";", "if", "(", "fieldRef", ".", "methodBinding", "!=", "null", ")", "{", "return", "getMethodBinding", "(", "fieldRef", ".", "methodBinding", ")", ".", "getReturnType", "(", ")", ";", "}", "return", "getTypeBinding", "(", "fieldRef", ".", "resolvedType", ")", ";", "}", "else", "if", "(", "node", "instanceof", "FieldReference", ")", "{", "return", "getTypeBinding", "(", "(", "(", "FieldReference", ")", "node", ")", ".", "resolvedType", ")", ";", "}", "else", "if", "(", "node", "instanceof", "SingleTypeReference", ")", "{", "SingleTypeReference", "singleTypeReference", "=", "(", "SingleTypeReference", ")", "node", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "binding", "=", "singleTypeReference", ".", "resolvedType", ";", "if", "(", "binding", "!=", "null", ")", "{", "return", "this", ".", "getTypeBinding", "(", "binding", ".", "leafComponentType", "(", ")", ")", ";", "}", "}", "else", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", "fieldDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", ")", "node", ";", "IVariableBinding", "field", "=", "this", ".", "getVariableBinding", "(", "fieldDeclaration", ".", "binding", ")", ";", "if", "(", "field", "==", "null", ")", "return", "null", ";", "return", "field", ".", "getType", "(", ")", ";", "}", "else", "if", "(", "node", "instanceof", "MessageSend", ")", "{", "MessageSend", "messageSend", "=", "(", "MessageSend", ")", "node", ";", "IMethodBinding", "method", "=", "getMethodBinding", "(", "messageSend", ".", "binding", ")", ";", "if", "(", "method", "==", "null", ")", "return", "null", ";", "return", "method", ".", "getReturnType", "(", ")", ";", "}", "else", "if", "(", "node", "instanceof", "AllocationExpression", ")", "{", "AllocationExpression", "allocation", "=", "(", "AllocationExpression", ")", "node", ";", "return", "getTypeBinding", "(", "allocation", ".", "resolvedType", ")", ";", "}", "else", "if", "(", "node", "instanceof", "JavadocImplicitTypeReference", ")", "{", "JavadocImplicitTypeReference", "implicitRef", "=", "(", "JavadocImplicitTypeReference", ")", "node", ";", "return", "getTypeBinding", "(", "implicitRef", ".", "resolvedType", ")", ";", "}", "else", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeParameter", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeParameter", "typeParameter", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeParameter", ")", "node", ";", "return", "this", ".", "getTypeBinding", "(", "typeParameter", ".", "binding", ")", ";", "}", "else", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "MemberValuePair", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "MemberValuePair", "memberValuePair", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "MemberValuePair", ")", "node", ";", "IMethodBinding", "method", "=", "getMethodBinding", "(", "memberValuePair", ".", "binding", ")", ";", "if", "(", "method", "==", "null", ")", "return", "null", ";", "return", "method", ".", "getReturnType", "(", ")", ";", "}", "return", "null", ";", "}", "synchronized", "IBinding", "resolveName", "(", "Name", "name", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "name", ")", ";", "int", "index", "=", "name", ".", "index", ";", "if", "(", "node", "instanceof", "QualifiedNameReference", ")", "{", "QualifiedNameReference", "qualifiedNameReference", "=", "(", "QualifiedNameReference", ")", "node", ";", "final", "char", "[", "]", "[", "]", "tokens", "=", "qualifiedNameReference", ".", "tokens", ";", "int", "indexOfFirstFieldBinding", "=", "qualifiedNameReference", ".", "indexOfFirstFieldBinding", ";", "if", "(", "index", "<", "indexOfFirstFieldBinding", ")", "{", "BlockScope", "internalScope", "=", "(", "BlockScope", ")", "this", ".", "astNodesToBlockScope", ".", "get", "(", "name", ")", ";", "Binding", "binding", "=", "null", ";", "try", "{", "if", "(", "internalScope", "==", "null", ")", "{", "if", "(", "this", ".", "scope", "==", "null", ")", "return", "null", ";", "binding", "=", "this", ".", "scope", ".", "getTypeOrPackage", "(", "CharOperation", ".", "subarray", "(", "tokens", ",", "0", ",", "index", ")", ")", ";", "}", "else", "{", "binding", "=", "internalScope", ".", "getTypeOrPackage", "(", "CharOperation", ".", "subarray", "(", "tokens", ",", "0", ",", "index", ")", ")", ";", "}", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "}", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "{", "return", "getPackageBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "binding", ")", ";", "}", "else", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "{", "return", "this", ".", "getTypeBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "binding", ")", ";", "}", "}", "else", "if", "(", "index", "==", "indexOfFirstFieldBinding", ")", "{", "if", "(", "qualifiedNameReference", ".", "isTypeReference", "(", ")", ")", "{", "return", "this", ".", "getTypeBinding", "(", "qualifiedNameReference", ".", "resolvedType", ")", ";", "}", "else", "{", "Binding", "binding", "=", "qualifiedNameReference", ".", "binding", ";", "if", "(", "binding", "!=", "null", ")", "{", "if", "(", "binding", ".", "isValidBinding", "(", ")", ")", "{", "return", "this", ".", "getVariableBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "VariableBinding", ")", "binding", ")", ";", "}", "else", "if", "(", "binding", "instanceof", "ProblemFieldBinding", ")", "{", "ProblemFieldBinding", "problemFieldBinding", "=", "(", "ProblemFieldBinding", ")", "binding", ";", "switch", "(", "problemFieldBinding", ".", "problemId", "(", ")", ")", "{", "case", "ProblemReasons", ".", "NotVisible", ":", "case", "ProblemReasons", ".", "NonStaticReferenceInStaticContext", ":", "ReferenceBinding", "declaringClass", "=", "problemFieldBinding", ".", "declaringClass", ";", "if", "(", "declaringClass", "!=", "null", ")", "{", "FieldBinding", "exactBinding", "=", "declaringClass", ".", "getField", "(", "tokens", "[", "tokens", ".", "length", "-", "1", "]", ",", "true", ")", ";", "if", "(", "exactBinding", "!=", "null", ")", "{", "if", "(", "exactBinding", ".", "type", "!=", "null", ")", "{", "IVariableBinding", "variableBinding", "=", "(", "IVariableBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "exactBinding", ")", ";", "if", "(", "variableBinding", "!=", "null", ")", "{", "return", "variableBinding", ";", "}", "variableBinding", "=", "new", "VariableBinding", "(", "this", ",", "exactBinding", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "exactBinding", ",", "variableBinding", ")", ";", "return", "variableBinding", ";", "}", "}", "}", "break", ";", "}", "}", "}", "}", "}", "else", "{", "if", "(", "qualifiedNameReference", ".", "otherBindings", "==", "null", "||", "(", "index", "-", "indexOfFirstFieldBinding", "-", "1", ")", "<", "0", ")", "{", "return", "null", ";", "}", "else", "{", "return", "this", ".", "getVariableBinding", "(", "qualifiedNameReference", ".", "otherBindings", "[", "index", "-", "indexOfFirstFieldBinding", "-", "1", "]", ")", ";", "}", "}", "}", "else", "if", "(", "node", "instanceof", "QualifiedTypeReference", ")", "{", "QualifiedTypeReference", "qualifiedTypeReference", "=", "(", "QualifiedTypeReference", ")", "node", ";", "if", "(", "qualifiedTypeReference", ".", "resolvedType", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "index", "==", "qualifiedTypeReference", ".", "tokens", ".", "length", ")", "{", "if", "(", "!", "qualifiedTypeReference", ".", "resolvedType", ".", "isValidBinding", "(", ")", "&&", "qualifiedTypeReference", "instanceof", "JavadocQualifiedTypeReference", ")", "{", "JavadocQualifiedTypeReference", "typeRef", "=", "(", "JavadocQualifiedTypeReference", ")", "node", ";", "if", "(", "typeRef", ".", "packageBinding", "!=", "null", ")", "{", "return", "getPackageBinding", "(", "typeRef", ".", "packageBinding", ")", ";", "}", "}", "return", "this", ".", "getTypeBinding", "(", "qualifiedTypeReference", ".", "resolvedType", ".", "leafComponentType", "(", ")", ")", ";", "}", "else", "{", "if", "(", "index", ">=", "0", ")", "{", "BlockScope", "internalScope", "=", "(", "BlockScope", ")", "this", ".", "astNodesToBlockScope", ".", "get", "(", "name", ")", ";", "Binding", "binding", "=", "null", ";", "try", "{", "if", "(", "internalScope", "==", "null", ")", "{", "if", "(", "this", ".", "scope", "==", "null", ")", "return", "null", ";", "binding", "=", "this", ".", "scope", ".", "getTypeOrPackage", "(", "CharOperation", ".", "subarray", "(", "qualifiedTypeReference", ".", "tokens", ",", "0", ",", "index", ")", ")", ";", "}", "else", "{", "binding", "=", "internalScope", ".", "getTypeOrPackage", "(", "CharOperation", ".", "subarray", "(", "qualifiedTypeReference", ".", "tokens", ",", "0", ",", "index", ")", ")", ";", "}", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "}", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "{", "return", "getPackageBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "binding", ")", ";", "}", "else", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "{", "return", "this", ".", "getTypeBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "binding", ")", ";", "}", "else", "{", "return", "null", ";", "}", "}", "}", "}", "else", "if", "(", "node", "instanceof", "ImportReference", ")", "{", "ImportReference", "importReference", "=", "(", "ImportReference", ")", "node", ";", "int", "importReferenceLength", "=", "importReference", ".", "tokens", ".", "length", ";", "if", "(", "index", ">=", "0", ")", "{", "Binding", "binding", "=", "null", ";", "if", "(", "this", ".", "scope", "==", "null", ")", "return", "null", ";", "if", "(", "importReferenceLength", "==", "index", ")", "{", "try", "{", "binding", "=", "this", ".", "scope", ".", "getImport", "(", "CharOperation", ".", "subarray", "(", "importReference", ".", "tokens", ",", "0", ",", "index", ")", ",", "(", "importReference", ".", "bits", "&", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ".", "OnDemand", ")", "!=", "0", ",", "importReference", ".", "isStatic", "(", ")", ")", ";", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "}", "}", "else", "{", "try", "{", "binding", "=", "this", ".", "scope", ".", "getImport", "(", "CharOperation", ".", "subarray", "(", "importReference", ".", "tokens", ",", "0", ",", "index", ")", ",", "true", ",", "importReference", ".", "isStatic", "(", ")", ")", ";", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "}", "}", "if", "(", "binding", "!=", "null", ")", "{", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "{", "return", "getPackageBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "binding", ")", ";", "}", "else", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "{", "return", "this", ".", "getTypeBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "binding", ")", ";", "}", "else", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ")", "{", "return", "this", ".", "getVariableBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ")", "binding", ")", ";", "}", "else", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ")", "{", "return", "getMethodBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ")", "binding", ")", ";", "}", "else", "{", "return", "null", ";", "}", "}", "}", "}", "else", "if", "(", "node", "instanceof", "CompilationUnitDeclaration", ")", "{", "CompilationUnitDeclaration", "compilationUnitDeclaration", "=", "(", "CompilationUnitDeclaration", ")", "node", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "[", "]", "types", "=", "compilationUnitDeclaration", ".", "types", ";", "if", "(", "types", "==", "null", "||", "types", ".", "length", "==", "0", ")", "{", "return", "null", ";", "}", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "type", "=", "types", "[", "0", "]", ";", "if", "(", "type", "!=", "null", ")", "{", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "type", ".", "binding", ")", ";", "if", "(", "typeBinding", "!=", "null", ")", "{", "return", "typeBinding", ".", "getPackage", "(", ")", ";", "}", "}", "}", "else", "if", "(", "node", "instanceof", "AbstractMethodDeclaration", ")", "{", "AbstractMethodDeclaration", "methodDeclaration", "=", "(", "AbstractMethodDeclaration", ")", "node", ";", "IMethodBinding", "methodBinding", "=", "getMethodBinding", "(", "methodDeclaration", ".", "binding", ")", ";", "if", "(", "methodBinding", "!=", "null", ")", "{", "return", "methodBinding", ";", "}", "}", "else", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "typeDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "node", ";", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "typeDeclaration", ".", "binding", ")", ";", "if", "(", "typeBinding", "!=", "null", ")", "{", "return", "typeBinding", ";", "}", "}", "if", "(", "node", "instanceof", "SingleNameReference", ")", "{", "SingleNameReference", "singleNameReference", "=", "(", "SingleNameReference", ")", "node", ";", "if", "(", "singleNameReference", ".", "isTypeReference", "(", ")", ")", "{", "return", "this", ".", "getTypeBinding", "(", "singleNameReference", ".", "resolvedType", ")", ";", "}", "else", "{", "Binding", "binding", "=", "singleNameReference", ".", "binding", ";", "if", "(", "binding", "!=", "null", ")", "{", "if", "(", "binding", ".", "isValidBinding", "(", ")", ")", "{", "return", "this", ".", "getVariableBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "VariableBinding", ")", "binding", ")", ";", "}", "else", "{", "if", "(", "binding", "instanceof", "ProblemFieldBinding", ")", "{", "ProblemFieldBinding", "problemFieldBinding", "=", "(", "ProblemFieldBinding", ")", "binding", ";", "switch", "(", "problemFieldBinding", ".", "problemId", "(", ")", ")", "{", "case", "ProblemReasons", ".", "NotVisible", ":", "case", "ProblemReasons", ".", "NonStaticReferenceInStaticContext", ":", "case", "ProblemReasons", ".", "NonStaticReferenceInConstructorInvocation", ":", "ReferenceBinding", "declaringClass", "=", "problemFieldBinding", ".", "declaringClass", ";", "FieldBinding", "exactBinding", "=", "declaringClass", ".", "getField", "(", "problemFieldBinding", ".", "name", ",", "true", ")", ";", "if", "(", "exactBinding", "!=", "null", ")", "{", "if", "(", "exactBinding", ".", "type", "!=", "null", ")", "{", "IVariableBinding", "variableBinding2", "=", "(", "IVariableBinding", ")", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "get", "(", "exactBinding", ")", ";", "if", "(", "variableBinding2", "!=", "null", ")", "{", "return", "variableBinding2", ";", "}", "variableBinding2", "=", "new", "VariableBinding", "(", "this", ",", "exactBinding", ")", ";", "this", ".", "bindingTables", ".", "compilerBindingsToASTBindings", ".", "put", "(", "exactBinding", ",", "variableBinding2", ")", ";", "return", "variableBinding2", ";", "}", "}", "break", ";", "}", "}", "}", "}", "}", "}", "else", "if", "(", "node", "instanceof", "QualifiedSuperReference", ")", "{", "QualifiedSuperReference", "qualifiedSuperReference", "=", "(", "QualifiedSuperReference", ")", "node", ";", "return", "this", ".", "getTypeBinding", "(", "qualifiedSuperReference", ".", "qualification", ".", "resolvedType", ")", ";", "}", "else", "if", "(", "node", "instanceof", "LocalDeclaration", ")", "{", "return", "this", ".", "getVariableBinding", "(", "(", "(", "LocalDeclaration", ")", "node", ")", ".", "binding", ")", ";", "}", "else", "if", "(", "node", "instanceof", "JavadocFieldReference", ")", "{", "JavadocFieldReference", "fieldRef", "=", "(", "JavadocFieldReference", ")", "node", ";", "if", "(", "fieldRef", ".", "methodBinding", "!=", "null", ")", "{", "return", "getMethodBinding", "(", "fieldRef", ".", "methodBinding", ")", ";", "}", "return", "getVariableBinding", "(", "fieldRef", ".", "binding", ")", ";", "}", "else", "if", "(", "node", "instanceof", "FieldReference", ")", "{", "return", "getVariableBinding", "(", "(", "(", "FieldReference", ")", "node", ")", ".", "binding", ")", ";", "}", "else", "if", "(", "node", "instanceof", "SingleTypeReference", ")", "{", "if", "(", "node", "instanceof", "JavadocSingleTypeReference", ")", "{", "JavadocSingleTypeReference", "typeRef", "=", "(", "JavadocSingleTypeReference", ")", "node", ";", "if", "(", "typeRef", ".", "packageBinding", "!=", "null", ")", "{", "return", "getPackageBinding", "(", "typeRef", ".", "packageBinding", ")", ";", "}", "}", "SingleTypeReference", "singleTypeReference", "=", "(", "SingleTypeReference", ")", "node", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "binding", "=", "singleTypeReference", ".", "resolvedType", ";", "if", "(", "binding", "==", "null", ")", "{", "return", "null", ";", "}", "return", "this", ".", "getTypeBinding", "(", "binding", ".", "leafComponentType", "(", ")", ")", ";", "}", "else", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", "fieldDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", ")", "node", ";", "return", "this", ".", "getVariableBinding", "(", "fieldDeclaration", ".", "binding", ")", ";", "}", "else", "if", "(", "node", "instanceof", "MessageSend", ")", "{", "MessageSend", "messageSend", "=", "(", "MessageSend", ")", "node", ";", "return", "getMethodBinding", "(", "messageSend", ".", "binding", ")", ";", "}", "else", "if", "(", "node", "instanceof", "AllocationExpression", ")", "{", "AllocationExpression", "allocation", "=", "(", "AllocationExpression", ")", "node", ";", "return", "getMethodBinding", "(", "allocation", ".", "binding", ")", ";", "}", "else", "if", "(", "node", "instanceof", "JavadocImplicitTypeReference", ")", "{", "JavadocImplicitTypeReference", "implicitRef", "=", "(", "JavadocImplicitTypeReference", ")", "node", ";", "return", "getTypeBinding", "(", "implicitRef", ".", "resolvedType", ")", ";", "}", "else", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeParameter", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeParameter", "typeParameter", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeParameter", ")", "node", ";", "return", "this", ".", "getTypeBinding", "(", "typeParameter", ".", "binding", ")", ";", "}", "else", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "MemberValuePair", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "MemberValuePair", "memberValuePair", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "MemberValuePair", ")", "node", ";", "return", "getMethodBinding", "(", "memberValuePair", ".", "binding", ")", ";", "}", "return", "null", ";", "}", "synchronized", "IPackageBinding", "resolvePackage", "(", "PackageDeclaration", "pkg", ")", "{", "if", "(", "this", ".", "scope", "==", "null", ")", "return", "null", ";", "try", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "pkg", ")", ";", "if", "(", "node", "instanceof", "ImportReference", ")", "{", "ImportReference", "importReference", "=", "(", "ImportReference", ")", "node", ";", "Binding", "binding", "=", "this", ".", "scope", ".", "getTypeOrPackage", "(", "CharOperation", ".", "subarray", "(", "importReference", ".", "tokens", ",", "0", ",", "importReference", ".", "tokens", ".", "length", ")", ")", ";", "if", "(", "(", "binding", "!=", "null", ")", "&&", "(", "binding", ".", "isValidBinding", "(", ")", ")", ")", "{", "if", "(", "binding", "instanceof", "ReferenceBinding", ")", "{", "ReferenceBinding", "referenceBinding", "=", "(", "ReferenceBinding", ")", "binding", ";", "binding", "=", "referenceBinding", ".", "fPackage", ";", "}", "if", "(", "binding", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "{", "IPackageBinding", "packageBinding", "=", "getPackageBinding", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "binding", ")", ";", "if", "(", "packageBinding", "==", "null", ")", "{", "return", "null", ";", "}", "this", ".", "bindingsToAstNodes", ".", "put", "(", "packageBinding", ",", "pkg", ")", ";", "String", "key", "=", "packageBinding", ".", "getKey", "(", ")", ";", "if", "(", "key", "!=", "null", ")", "{", "this", ".", "bindingTables", ".", "bindingKeysToBindings", ".", "put", "(", "key", ",", "packageBinding", ")", ";", "}", "return", "packageBinding", ";", "}", "}", "}", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "}", "return", "null", ";", "}", "synchronized", "IBinding", "resolveReference", "(", "MemberRef", "ref", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", "expression", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "ref", ")", ";", "if", "(", "expression", "instanceof", "TypeReference", ")", "{", "return", "getTypeBinding", "(", "expression", ".", "resolvedType", ")", ";", "}", "else", "if", "(", "expression", "instanceof", "JavadocFieldReference", ")", "{", "JavadocFieldReference", "fieldRef", "=", "(", "JavadocFieldReference", ")", "expression", ";", "if", "(", "fieldRef", ".", "methodBinding", "!=", "null", ")", "{", "return", "getMethodBinding", "(", "fieldRef", ".", "methodBinding", ")", ";", "}", "return", "getVariableBinding", "(", "fieldRef", ".", "binding", ")", ";", "}", "return", "null", ";", "}", "synchronized", "IMemberValuePairBinding", "resolveMemberValuePair", "(", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ".", "MemberValuePair", "memberValuePair", ")", "{", "MemberValuePair", "valuePair", "=", "(", "MemberValuePair", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "memberValuePair", ")", ";", "if", "(", "valuePair", "!=", "null", ")", "{", "return", "getMemberValuePairBinding", "(", "valuePair", ".", "compilerElementPair", ")", ";", "}", "return", "null", ";", "}", "synchronized", "IBinding", "resolveReference", "(", "MethodRef", "ref", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", "expression", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Expression", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "ref", ")", ";", "if", "(", "expression", "instanceof", "JavadocMessageSend", ")", "{", "return", "getMethodBinding", "(", "(", "(", "JavadocMessageSend", ")", "expression", ")", ".", "binding", ")", ";", "}", "else", "if", "(", "expression", "instanceof", "JavadocAllocationExpression", ")", "{", "return", "getMethodBinding", "(", "(", "(", "JavadocAllocationExpression", ")", "expression", ")", ".", "binding", ")", ";", "}", "return", "null", ";", "}", "ITypeBinding", "resolveType", "(", "AnnotationTypeDeclaration", "type", ")", "{", "final", "Object", "node", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "type", ")", ";", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "typeDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "node", ";", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "typeDeclaration", ".", "binding", ")", ";", "if", "(", "typeBinding", "==", "null", ")", "{", "return", "null", ";", "}", "this", ".", "bindingsToAstNodes", ".", "put", "(", "typeBinding", ",", "type", ")", ";", "String", "key", "=", "typeBinding", ".", "getKey", "(", ")", ";", "if", "(", "key", "!=", "null", ")", "{", "this", ".", "bindingTables", ".", "bindingKeysToBindings", ".", "put", "(", "key", ",", "typeBinding", ")", ";", "}", "return", "typeBinding", ";", "}", "return", "null", ";", "}", "synchronized", "ITypeBinding", "resolveType", "(", "AnonymousClassDeclaration", "type", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "type", ")", ";", "if", "(", "node", "!=", "null", "&&", "(", "node", ".", "bits", "&", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ".", "IsAnonymousType", ")", "!=", "0", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "anonymousLocalTypeDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "node", ";", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "anonymousLocalTypeDeclaration", ".", "binding", ")", ";", "if", "(", "typeBinding", "==", "null", ")", "{", "return", "null", ";", "}", "this", ".", "bindingsToAstNodes", ".", "put", "(", "typeBinding", ",", "type", ")", ";", "String", "key", "=", "typeBinding", ".", "getKey", "(", ")", ";", "if", "(", "key", "!=", "null", ")", "{", "this", ".", "bindingTables", ".", "bindingKeysToBindings", ".", "put", "(", "key", ",", "typeBinding", ")", ";", "}", "return", "typeBinding", ";", "}", "return", "null", ";", "}", "ITypeBinding", "resolveType", "(", "EnumDeclaration", "type", ")", "{", "final", "Object", "node", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "type", ")", ";", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "typeDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "node", ";", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "typeDeclaration", ".", "binding", ")", ";", "if", "(", "typeBinding", "==", "null", ")", "{", "return", "null", ";", "}", "this", ".", "bindingsToAstNodes", ".", "put", "(", "typeBinding", ",", "type", ")", ";", "String", "key", "=", "typeBinding", ".", "getKey", "(", ")", ";", "if", "(", "key", "!=", "null", ")", "{", "this", ".", "bindingTables", ".", "bindingKeysToBindings", ".", "put", "(", "key", ",", "typeBinding", ")", ";", "}", "return", "typeBinding", ";", "}", "return", "null", ";", "}", "synchronized", "ITypeBinding", "resolveType", "(", "Type", "type", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", ")", "this", ".", "newAstToOldAst", ".", "get", "(", "type", ")", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "binding", "=", "null", ";", "if", "(", "node", "!=", "null", ")", "{", "if", "(", "node", "instanceof", "ParameterizedQualifiedTypeReference", ")", "{", "ParameterizedQualifiedTypeReference", "typeReference", "=", "(", "ParameterizedQualifiedTypeReference", ")", "node", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "typeBinding", "=", "typeReference", ".", "resolvedType", ";", "if", "(", "type", ".", "isArrayType", "(", ")", ")", "{", "if", "(", "this", ".", "scope", "==", "null", ")", "{", "return", "null", ";", "}", "ArrayType", "arrayType", "=", "(", "ArrayType", ")", "type", ";", "ArrayBinding", "arrayBinding", "=", "(", "ArrayBinding", ")", "typeBinding", ";", "return", "getTypeBinding", "(", "this", ".", "scope", ".", "createArrayType", "(", "arrayBinding", ".", "leafComponentType", ",", "arrayType", ".", "getDimensions", "(", ")", ")", ")", ";", "}", "if", "(", "typeBinding", ".", "isArrayType", "(", ")", ")", "{", "typeBinding", "=", "(", "(", "ArrayBinding", ")", "typeBinding", ")", ".", "leafComponentType", ";", "}", "int", "index", ";", "if", "(", "type", ".", "isQualifiedType", "(", ")", ")", "{", "index", "=", "(", "(", "QualifiedType", ")", "type", ")", ".", "index", ";", "}", "else", "if", "(", "type", ".", "isParameterizedType", "(", ")", ")", "{", "index", "=", "(", "(", "ParameterizedType", ")", "type", ")", ".", "index", ";", "}", "else", "{", "index", "=", "1", ";", "}", "final", "int", "numberOfTypeArgumentsNotNull", "=", "getTypeArguments", "(", "typeReference", ")", ";", "if", "(", "index", "!=", "numberOfTypeArgumentsNotNull", ")", "{", "int", "i", "=", "numberOfTypeArgumentsNotNull", ";", "while", "(", "i", "!=", "index", ")", "{", "typeBinding", "=", "typeBinding", ".", "enclosingType", "(", ")", ";", "i", "--", ";", "}", "binding", "=", "typeBinding", ";", "}", "else", "{", "binding", "=", "typeBinding", ";", "}", "}", "else", "if", "(", "node", "instanceof", "TypeReference", ")", "{", "TypeReference", "typeReference", "=", "(", "TypeReference", ")", "node", ";", "binding", "=", "typeReference", ".", "resolvedType", ";", "}", "else", "if", "(", "node", "instanceof", "SingleNameReference", "&&", "(", "(", "SingleNameReference", ")", "node", ")", ".", "isTypeReference", "(", ")", ")", "{", "binding", "=", "(", "(", "(", "SingleNameReference", ")", "node", ")", ".", "resolvedType", ")", ";", "}", "else", "if", "(", "node", "instanceof", "QualifiedNameReference", "&&", "(", "(", "QualifiedNameReference", ")", "node", ")", ".", "isTypeReference", "(", ")", ")", "{", "binding", "=", "(", "(", "(", "QualifiedNameReference", ")", "node", ")", ".", "resolvedType", ")", ";", "}", "else", "if", "(", "node", "instanceof", "ArrayAllocationExpression", ")", "{", "binding", "=", "(", "(", "ArrayAllocationExpression", ")", "node", ")", ".", "resolvedType", ";", "}", "if", "(", "binding", "!=", "null", ")", "{", "if", "(", "type", ".", "isArrayType", "(", ")", ")", "{", "ArrayType", "arrayType", "=", "(", "ArrayType", ")", "type", ";", "if", "(", "this", ".", "scope", "==", "null", ")", "{", "return", "null", ";", "}", "ArrayBinding", "arrayBinding", "=", "(", "ArrayBinding", ")", "binding", ";", "return", "getTypeBinding", "(", "this", ".", "scope", ".", "createArrayType", "(", "arrayBinding", ".", "leafComponentType", ",", "arrayType", ".", "getDimensions", "(", ")", ")", ")", ";", "}", "else", "if", "(", "binding", ".", "isArrayType", "(", ")", ")", "{", "ArrayBinding", "arrayBinding", "=", "(", "ArrayBinding", ")", "binding", ";", "return", "getTypeBinding", "(", "arrayBinding", ".", "leafComponentType", ")", ";", "}", "return", "getTypeBinding", "(", "binding", ")", ";", "}", "}", "else", "if", "(", "type", ".", "isPrimitiveType", "(", ")", ")", "{", "if", "(", "(", "(", "PrimitiveType", ")", "type", ")", ".", "getPrimitiveTypeCode", "(", ")", "==", "PrimitiveType", ".", "VOID", ")", "{", "return", "this", ".", "getTypeBinding", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ".", "VOID", ")", ";", "}", "}", "return", "null", ";", "}", "synchronized", "ITypeBinding", "resolveType", "(", "TypeDeclaration", "type", ")", "{", "final", "Object", "node", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "type", ")", ";", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "typeDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "node", ";", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "typeDeclaration", ".", "binding", ")", ";", "if", "(", "typeBinding", "==", "null", ")", "{", "return", "null", ";", "}", "this", ".", "bindingsToAstNodes", ".", "put", "(", "typeBinding", ",", "type", ")", ";", "String", "key", "=", "typeBinding", ".", "getKey", "(", ")", ";", "if", "(", "key", "!=", "null", ")", "{", "this", ".", "bindingTables", ".", "bindingKeysToBindings", ".", "put", "(", "key", ",", "typeBinding", ")", ";", "}", "return", "typeBinding", ";", "}", "return", "null", ";", "}", "synchronized", "ITypeBinding", "resolveTypeParameter", "(", "TypeParameter", "typeParameter", ")", "{", "final", "Object", "node", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "typeParameter", ")", ";", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeParameter", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeParameter", "typeParameter2", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeParameter", ")", "node", ";", "ITypeBinding", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "typeParameter2", ".", "binding", ")", ";", "if", "(", "typeBinding", "==", "null", ")", "{", "return", "null", ";", "}", "this", ".", "bindingsToAstNodes", ".", "put", "(", "typeBinding", ",", "typeParameter", ")", ";", "String", "key", "=", "typeBinding", ".", "getKey", "(", ")", ";", "if", "(", "key", "!=", "null", ")", "{", "this", ".", "bindingTables", ".", "bindingKeysToBindings", ".", "put", "(", "key", ",", "typeBinding", ")", ";", "}", "return", "typeBinding", ";", "}", "return", "null", ";", "}", "synchronized", "IVariableBinding", "resolveVariable", "(", "EnumConstantDeclaration", "enumConstant", ")", "{", "final", "Object", "node", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "enumConstant", ")", ";", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", "fieldDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", ")", "node", ";", "IVariableBinding", "variableBinding", "=", "this", ".", "getVariableBinding", "(", "fieldDeclaration", ".", "binding", ")", ";", "if", "(", "variableBinding", "==", "null", ")", "{", "return", "null", ";", "}", "this", ".", "bindingsToAstNodes", ".", "put", "(", "variableBinding", ",", "enumConstant", ")", ";", "String", "key", "=", "variableBinding", ".", "getKey", "(", ")", ";", "if", "(", "key", "!=", "null", ")", "{", "this", ".", "bindingTables", ".", "bindingKeysToBindings", ".", "put", "(", "key", ",", "variableBinding", ")", ";", "}", "return", "variableBinding", ";", "}", "return", "null", ";", "}", "synchronized", "IVariableBinding", "resolveVariable", "(", "VariableDeclaration", "variable", ")", "{", "final", "Object", "node", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "variable", ")", ";", "if", "(", "node", "instanceof", "AbstractVariableDeclaration", ")", "{", "AbstractVariableDeclaration", "abstractVariableDeclaration", "=", "(", "AbstractVariableDeclaration", ")", "node", ";", "IVariableBinding", "variableBinding", "=", "null", ";", "if", "(", "abstractVariableDeclaration", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", "fieldDeclaration", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", ")", "abstractVariableDeclaration", ";", "variableBinding", "=", "this", ".", "getVariableBinding", "(", "fieldDeclaration", ".", "binding", ",", "variable", ")", ";", "}", "else", "{", "variableBinding", "=", "this", ".", "getVariableBinding", "(", "(", "(", "LocalDeclaration", ")", "abstractVariableDeclaration", ")", ".", "binding", ",", "variable", ")", ";", "}", "if", "(", "variableBinding", "==", "null", ")", "{", "return", "null", ";", "}", "this", ".", "bindingsToAstNodes", ".", "put", "(", "variableBinding", ",", "variable", ")", ";", "String", "key", "=", "variableBinding", ".", "getKey", "(", ")", ";", "if", "(", "key", "!=", "null", ")", "{", "this", ".", "bindingTables", ".", "bindingKeysToBindings", ".", "put", "(", "key", ",", "variableBinding", ")", ";", "}", "return", "variableBinding", ";", "}", "return", "null", ";", "}", "synchronized", "ITypeBinding", "resolveWellKnownType", "(", "String", "name", ")", "{", "if", "(", "this", ".", "scope", "==", "null", ")", "return", "null", ";", "ITypeBinding", "typeBinding", "=", "null", ";", "try", "{", "if", "(", "(", "\"boolean\"", ".", "equals", "(", "name", ")", ")", "||", "(", "\"char\"", ".", "equals", "(", "name", ")", ")", "||", "(", "\"byte\"", ".", "equals", "(", "name", ")", ")", "||", "(", "\"short\"", ".", "equals", "(", "name", ")", ")", "||", "(", "\"int\"", ".", "equals", "(", "name", ")", ")", "||", "(", "\"long\"", ".", "equals", "(", "name", ")", ")", "||", "(", "\"float\"", ".", "equals", "(", "name", ")", ")", "||", "(", "\"double\"", ".", "equals", "(", "name", ")", ")", "||", "(", "\"void\"", ".", "equals", "(", "name", ")", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "Scope", ".", "getBaseType", "(", "name", ".", "toCharArray", "(", ")", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getJavaLangObject", "(", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getJavaLangString", "(", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_STRINGBUFFER", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getJavaLangThrowable", "(", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_EXCEPTION", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_RUNTIMEEXCEPTION", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_ERROR", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getJavaLangClass", "(", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getJavaLangCloneable", "(", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getJavaIoSerializable", "(", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_BOOLEAN", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_BYTE", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_CHARACTER", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_DOUBLE", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_FLOAT", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_INTEGER", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_LONG", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_SHORT", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_VOID", ",", "3", ")", ")", ";", "}", "else", "if", "(", "\"\"", ".", "equals", "(", "name", ")", ")", "{", "typeBinding", "=", "this", ".", "getTypeBinding", "(", "this", ".", "scope", ".", "getType", "(", "TypeConstants", ".", "JAVA_LANG_ASSERTIONERROR", ",", "3", ")", ")", ";", "}", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "}", "if", "(", "typeBinding", "!=", "null", "&&", "!", "typeBinding", ".", "isRecovered", "(", ")", ")", "{", "return", "typeBinding", ";", "}", "return", "null", ";", "}", "synchronized", "IAnnotationBinding", "resolveAnnotation", "(", "final", "Annotation", "domASTNode", ")", "{", "Object", "oldNode", "=", "this", ".", "newAstToOldAst", ".", "get", "(", "domASTNode", ")", ";", "if", "(", "oldNode", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Annotation", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Annotation", "internalAstNode", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Annotation", ")", "oldNode", ";", "IAnnotationBinding", "domAnnotation", "=", "getAnnotationInstance", "(", "internalAstNode", ".", "getCompilerAnnotation", "(", ")", ")", ";", "if", "(", "domAnnotation", "==", "null", ")", "return", "null", ";", "this", ".", "bindingsToAstNodes", ".", "put", "(", "domAnnotation", ",", "domASTNode", ")", ";", "return", "domAnnotation", ";", "}", "return", "null", ";", "}", "public", "CompilationUnitScope", "scope", "(", ")", "{", "return", "this", ".", "scope", ";", "}", "synchronized", "void", "store", "(", "ASTNode", "node", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "oldASTNode", ")", "{", "this", ".", "newAstToOldAst", ".", "put", "(", "node", ",", "oldASTNode", ")", ";", "}", "synchronized", "void", "updateKey", "(", "ASTNode", "node", ",", "ASTNode", "newNode", ")", "{", "Object", "astNode", "=", "this", ".", "newAstToOldAst", ".", "remove", "(", "node", ")", ";", "if", "(", "astNode", "!=", "null", ")", "{", "this", ".", "newAstToOldAst", ".", "put", "(", "newNode", ",", "astNode", ")", ";", "}", "}", "ITypeBinding", "resolveArrayType", "(", "ITypeBinding", "typeBinding", ",", "int", "dimensions", ")", "{", "if", "(", "typeBinding", "instanceof", "RecoveredTypeBinding", ")", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "ITypeBinding", "leafComponentType", "=", "typeBinding", ";", "int", "actualDimensions", "=", "dimensions", ";", "if", "(", "typeBinding", ".", "isArray", "(", ")", ")", "{", "leafComponentType", "=", "typeBinding", ".", "getElementType", "(", ")", ";", "actualDimensions", "+=", "typeBinding", ".", "getDimensions", "(", ")", ";", "}", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "leafTypeBinding", "=", "null", ";", "if", "(", "leafComponentType", ".", "isPrimitive", "(", ")", ")", "{", "String", "name", "=", "leafComponentType", ".", "getBinaryName", "(", ")", ";", "switch", "(", "name", ".", "charAt", "(", "0", ")", ")", "{", "case", "'I'", ":", "leafTypeBinding", "=", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ".", "INT", ";", "break", ";", "case", "'B'", ":", "leafTypeBinding", "=", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ".", "BYTE", ";", "break", ";", "case", "'Z'", ":", "leafTypeBinding", "=", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ".", "BOOLEAN", ";", "break", ";", "case", "'C'", ":", "leafTypeBinding", "=", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ".", "CHAR", ";", "break", ";", "case", "'J'", ":", "leafTypeBinding", "=", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ".", "LONG", ";", "break", ";", "case", "'S'", ":", "leafTypeBinding", "=", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ".", "SHORT", ";", "break", ";", "case", "'D'", ":", "leafTypeBinding", "=", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ".", "DOUBLE", ";", "break", ";", "case", "'F'", ":", "leafTypeBinding", "=", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ".", "FLOAT", ";", "break", ";", "case", "'V'", ":", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "else", "{", "if", "(", "!", "(", "leafComponentType", "instanceof", "TypeBinding", ")", ")", "return", "null", ";", "leafTypeBinding", "=", "(", "(", "TypeBinding", ")", "leafComponentType", ")", ".", "binding", ";", "}", "return", "this", ".", "getTypeBinding", "(", "lookupEnvironment", "(", ")", ".", "createArrayType", "(", "leafTypeBinding", ",", "actualDimensions", ")", ")", ";", "}", "}", "</s>" ]
4,479
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "Iterator", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "VariableDeclarationExpression", "extends", "Expression", "{", "public", "static", "final", "SimplePropertyDescriptor", "MODIFIERS_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "VariableDeclarationExpression", ".", "class", ",", "\"modifiers\"", ",", "int", ".", "class", ",", "MANDATORY", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "MODIFIERS2_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "VariableDeclarationExpression", ".", "class", ",", "\"modifiers\"", ",", "IExtendedModifier", ".", "class", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "TYPE_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "VariableDeclarationExpression", ".", "class", ",", "\"type\"", ",", "Type", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "FRAGMENTS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "VariableDeclarationExpression", ".", "class", ",", "\"fragments\"", ",", "VariableDeclarationFragment", ".", "class", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "VariableDeclarationExpression", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "MODIFIERS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "TYPE_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "FRAGMENTS_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "propertyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "VariableDeclarationExpression", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "MODIFIERS2_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "TYPE_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "FRAGMENTS_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "ASTNode", ".", "NodeList", "modifiers", "=", "null", ";", "private", "int", "modifierFlags", "=", "Modifier", ".", "NONE", ";", "private", "Type", "baseType", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "variableDeclarationFragments", "=", "new", "ASTNode", ".", "NodeList", "(", "FRAGMENTS_PROPERTY", ")", ";", "VariableDeclarationExpression", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "if", "(", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "this", ".", "modifiers", "=", "new", "ASTNode", ".", "NodeList", "(", "MODIFIERS2_PROPERTY", ")", ";", "}", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "int", "internalGetSetIntProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "int", "value", ")", "{", "if", "(", "property", "==", "MODIFIERS_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getModifiers", "(", ")", ";", "}", "else", "{", "setModifiers", "(", "value", ")", ";", "return", "0", ";", "}", "}", "return", "super", ".", "internalGetSetIntProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "TYPE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getType", "(", ")", ";", "}", "else", "{", "setType", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "MODIFIERS2_PROPERTY", ")", "{", "return", "modifiers", "(", ")", ";", "}", "if", "(", "property", "==", "FRAGMENTS_PROPERTY", ")", "{", "return", "fragments", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "VARIABLE_DECLARATION_EXPRESSION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "VariableDeclarationExpression", "result", "=", "new", "VariableDeclarationExpression", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "result", ".", "setModifiers", "(", "getModifiers", "(", ")", ")", ";", "}", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "modifiers", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "modifiers", "(", ")", ")", ")", ";", "}", "result", ".", "setType", "(", "(", "Type", ")", "getType", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "fragments", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "fragments", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "modifiers", ")", ";", "}", "acceptChild", "(", "visitor", ",", "getType", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "variableDeclarationFragments", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "List", "modifiers", "(", ")", "{", "if", "(", "this", ".", "modifiers", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "return", "this", ".", "modifiers", ";", "}", "public", "int", "getModifiers", "(", ")", "{", "if", "(", "this", ".", "modifiers", "==", "null", ")", "{", "return", "this", ".", "modifierFlags", ";", "}", "else", "{", "int", "computedModifierFlags", "=", "Modifier", ".", "NONE", ";", "for", "(", "Iterator", "it", "=", "modifiers", "(", ")", ".", "iterator", "(", ")", ";", "it", ".", "hasNext", "(", ")", ";", ")", "{", "Object", "x", "=", "it", ".", "next", "(", ")", ";", "if", "(", "x", "instanceof", "Modifier", ")", "{", "computedModifierFlags", "|=", "(", "(", "Modifier", ")", "x", ")", ".", "getKeyword", "(", ")", ".", "toFlagValue", "(", ")", ";", "}", "}", "return", "computedModifierFlags", ";", "}", "}", "public", "void", "setModifiers", "(", "int", "modifiers", ")", "{", "internalSetModifiers", "(", "modifiers", ")", ";", "}", "final", "void", "internalSetModifiers", "(", "int", "pmodifiers", ")", "{", "supportedOnlyIn2", "(", ")", ";", "preValueChange", "(", "MODIFIERS_PROPERTY", ")", ";", "this", ".", "modifierFlags", "=", "pmodifiers", ";", "postValueChange", "(", "MODIFIERS_PROPERTY", ")", ";", "}", "public", "Type", "getType", "(", ")", "{", "if", "(", "this", ".", "baseType", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "baseType", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "baseType", "=", "this", ".", "ast", ".", "newPrimitiveType", "(", "PrimitiveType", ".", "INT", ")", ";", "postLazyInit", "(", "this", ".", "baseType", ",", "TYPE_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "baseType", ";", "}", "public", "void", "setType", "(", "Type", "type", ")", "{", "if", "(", "type", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "baseType", ";", "preReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "this", ".", "baseType", "=", "type", ";", "postReplaceChild", "(", "oldChild", ",", "type", ",", "TYPE_PROPERTY", ")", ";", "}", "public", "List", "fragments", "(", ")", "{", "return", "this", ".", "variableDeclarationFragments", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "4", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "modifiers", "==", "null", "?", "0", ":", "this", ".", "modifiers", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "baseType", "==", "null", "?", "0", ":", "getType", "(", ")", ".", "treeSize", "(", ")", ")", "+", "this", ".", "variableDeclarationFragments", ".", "listSize", "(", ")", ";", "}", "}", "</s>" ]
4,480
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "AnnotationTypeDeclaration", "extends", "AbstractTypeDeclaration", "{", "public", "static", "final", "ChildPropertyDescriptor", "JAVADOC_PROPERTY", "=", "internalJavadocPropertyFactory", "(", "AnnotationTypeDeclaration", ".", "class", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "MODIFIERS2_PROPERTY", "=", "internalModifiers2PropertyFactory", "(", "AnnotationTypeDeclaration", ".", "class", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "internalNamePropertyFactory", "(", "AnnotationTypeDeclaration", ".", "class", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "BODY_DECLARATIONS_PROPERTY", "=", "internalBodyDeclarationPropertyFactory", "(", "AnnotationTypeDeclaration", ".", "class", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "5", ")", ";", "createPropertyList", "(", "AnnotationTypeDeclaration", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "JAVADOC_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "MODIFIERS2_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "BODY_DECLARATIONS_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "AnnotationTypeDeclaration", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "unsupportedIn2", "(", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "JAVADOC_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getJavadoc", "(", ")", ";", "}", "else", "{", "setJavadoc", "(", "(", "Javadoc", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "MODIFIERS2_PROPERTY", ")", "{", "return", "modifiers", "(", ")", ";", "}", "if", "(", "property", "==", "BODY_DECLARATIONS_PROPERTY", ")", "{", "return", "bodyDeclarations", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "ChildPropertyDescriptor", "internalJavadocProperty", "(", ")", "{", "return", "JAVADOC_PROPERTY", ";", "}", "final", "ChildListPropertyDescriptor", "internalModifiers2Property", "(", ")", "{", "return", "MODIFIERS2_PROPERTY", ";", "}", "final", "SimplePropertyDescriptor", "internalModifiersProperty", "(", ")", "{", "return", "null", ";", "}", "final", "ChildPropertyDescriptor", "internalNameProperty", "(", ")", "{", "return", "NAME_PROPERTY", ";", "}", "final", "ChildListPropertyDescriptor", "internalBodyDeclarationsProperty", "(", ")", "{", "return", "BODY_DECLARATIONS_PROPERTY", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "ANNOTATION_TYPE_DECLARATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "AnnotationTypeDeclaration", "result", "=", "new", "AnnotationTypeDeclaration", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setJavadoc", "(", "(", "Javadoc", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getJavadoc", "(", ")", ")", ")", ";", "result", ".", "modifiers", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "modifiers", "(", ")", ")", ")", ";", "result", ".", "setName", "(", "(", "SimpleName", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "bodyDeclarations", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "bodyDeclarations", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getJavadoc", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "modifiers", ")", ";", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "bodyDeclarations", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "ITypeBinding", "internalResolveBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveType", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalDocComment", "==", "null", "?", "0", ":", "getJavadoc", "(", ")", ".", "treeSize", "(", ")", ")", "+", "this", ".", "modifiers", ".", "listSize", "(", ")", "+", "(", "this", ".", "typeName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", "+", "this", ".", "bodyDeclarations", ".", "listSize", "(", ")", ";", "}", "}", "</s>" ]
4,481
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "class", "DefaultASTVisitor", "extends", "ASTVisitor", "{", "public", "DefaultASTVisitor", "(", ")", "{", "super", "(", ")", ";", "}", "public", "DefaultASTVisitor", "(", "boolean", "visitDocTags", ")", "{", "super", "(", "visitDocTags", ")", ";", "}", "public", "void", "endVisit", "(", "AnnotationTypeDeclaration", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "AnnotationTypeMemberDeclaration", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "AnonymousClassDeclaration", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ArrayAccess", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ArrayCreation", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ArrayInitializer", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ArrayType", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "AssertStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "Assignment", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "Block", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "BlockComment", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "BooleanLiteral", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "BreakStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "CastExpression", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "CatchClause", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "CharacterLiteral", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ClassInstanceCreation", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "CompilationUnit", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ConditionalExpression", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ConstructorInvocation", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ContinueStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "DoStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "EmptyStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "EnhancedForStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "EnumConstantDeclaration", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "EnumDeclaration", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ExpressionStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "FieldAccess", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "FieldDeclaration", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ForStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "IfStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ImportDeclaration", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "InfixExpression", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "Initializer", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "InstanceofExpression", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "Javadoc", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "LabeledStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "LineComment", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "MarkerAnnotation", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "MemberRef", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "MemberValuePair", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "MethodDeclaration", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "MethodInvocation", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "MethodRef", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "MethodRefParameter", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "Modifier", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "NormalAnnotation", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "NullLiteral", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "NumberLiteral", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "PackageDeclaration", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ParameterizedType", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ParenthesizedExpression", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "PostfixExpression", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "PrefixExpression", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "PrimitiveType", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "QualifiedName", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "QualifiedType", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ReturnStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "SimpleName", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "SimpleType", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "SingleMemberAnnotation", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "SingleVariableDeclaration", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "StringLiteral", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "SuperConstructorInvocation", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "SuperFieldAccess", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "SuperMethodInvocation", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "SwitchCase", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "SwitchStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "SynchronizedStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "TagElement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "TextElement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ThisExpression", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "ThrowStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "TryStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "TypeDeclaration", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "TypeDeclarationStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "TypeLiteral", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "TypeParameter", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "UnionType", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "VariableDeclarationExpression", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "VariableDeclarationFragment", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "VariableDeclarationStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "WhileStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "public", "void", "endVisit", "(", "WildcardType", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "}", "protected", "void", "endVisitNode", "(", "ASTNode", "node", ")", "{", "}", "public", "boolean", "visit", "(", "AnnotationTypeDeclaration", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "AnnotationTypeMemberDeclaration", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "AnonymousClassDeclaration", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ArrayAccess", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ArrayCreation", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ArrayInitializer", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ArrayType", "node", ")", "{", "visitNode", "(", "node", ")", ";", "return", "false", ";", "}", "public", "boolean", "visit", "(", "AssertStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "Assignment", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "Block", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "BlockComment", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "BooleanLiteral", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "BreakStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "CastExpression", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "CatchClause", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "CharacterLiteral", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ClassInstanceCreation", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "CompilationUnit", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ConditionalExpression", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ConstructorInvocation", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ContinueStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "DoStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "EmptyStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "EnhancedForStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "EnumConstantDeclaration", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "EnumDeclaration", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ExpressionStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "FieldAccess", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "FieldDeclaration", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ForStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "IfStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ImportDeclaration", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "InfixExpression", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "Initializer", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "InstanceofExpression", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "Javadoc", "node", ")", "{", "if", "(", "super", ".", "visit", "(", "node", ")", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "return", "false", ";", "}", "public", "boolean", "visit", "(", "LabeledStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "LineComment", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "MarkerAnnotation", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "MemberRef", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "MemberValuePair", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "MethodDeclaration", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "MethodInvocation", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "MethodRef", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "Modifier", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "MethodRefParameter", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "NormalAnnotation", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "NullLiteral", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "NumberLiteral", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "PackageDeclaration", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ParameterizedType", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ParenthesizedExpression", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "PostfixExpression", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "PrefixExpression", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "PrimitiveType", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "QualifiedName", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "QualifiedType", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ReturnStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "SimpleName", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "SimpleType", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "SingleMemberAnnotation", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "SingleVariableDeclaration", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "StringLiteral", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "SuperConstructorInvocation", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "SuperFieldAccess", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "SuperMethodInvocation", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "SwitchCase", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "SwitchStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "SynchronizedStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "TagElement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "TextElement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ThisExpression", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ThrowStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "TryStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "TypeDeclaration", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "TypeDeclarationStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "TypeLiteral", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "TypeParameter", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "UnionType", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "VariableDeclarationExpression", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "VariableDeclarationFragment", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "VariableDeclarationStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "WhileStatement", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "WildcardType", "node", ")", "{", "return", "visitNode", "(", "node", ")", ";", "}", "protected", "boolean", "visitNode", "(", "ASTNode", "node", ")", "{", "return", "true", ";", "}", "}", "</s>" ]
4,482
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CategorizedProblem", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "IProblem", ";", "class", "ASTSyntaxErrorPropagator", "extends", "ASTVisitor", "{", "private", "CategorizedProblem", "[", "]", "problems", ";", "ASTSyntaxErrorPropagator", "(", "CategorizedProblem", "[", "]", "problems", ")", "{", "super", "(", "true", ")", ";", "this", ".", "problems", "=", "problems", ";", "}", "private", "boolean", "checkAndTagAsMalformed", "(", "ASTNode", "node", ")", "{", "boolean", "tagWithErrors", "=", "false", ";", "search", ":", "for", "(", "int", "i", "=", "0", ",", "max", "=", "this", ".", "problems", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "CategorizedProblem", "problem", "=", "this", ".", "problems", "[", "i", "]", ";", "switch", "(", "problem", ".", "getID", "(", ")", ")", "{", "case", "IProblem", ".", "ParsingErrorOnKeywordNoSuggestion", ":", "case", "IProblem", ".", "ParsingErrorOnKeyword", ":", "case", "IProblem", ".", "ParsingError", ":", "case", "IProblem", ".", "ParsingErrorNoSuggestion", ":", "case", "IProblem", ".", "ParsingErrorInsertTokenBefore", ":", "case", "IProblem", ".", "ParsingErrorInsertTokenAfter", ":", "case", "IProblem", ".", "ParsingErrorDeleteToken", ":", "case", "IProblem", ".", "ParsingErrorDeleteTokens", ":", "case", "IProblem", ".", "ParsingErrorMergeTokens", ":", "case", "IProblem", ".", "ParsingErrorInvalidToken", ":", "case", "IProblem", ".", "ParsingErrorMisplacedConstruct", ":", "case", "IProblem", ".", "ParsingErrorReplaceTokens", ":", "case", "IProblem", ".", "ParsingErrorNoSuggestionForTokens", ":", "case", "IProblem", ".", "ParsingErrorUnexpectedEOF", ":", "case", "IProblem", ".", "ParsingErrorInsertToComplete", ":", "case", "IProblem", ".", "ParsingErrorInsertToCompleteScope", ":", "case", "IProblem", ".", "ParsingErrorInsertToCompletePhrase", ":", "case", "IProblem", ".", "EndOfSource", ":", "case", "IProblem", ".", "InvalidHexa", ":", "case", "IProblem", ".", "InvalidOctal", ":", "case", "IProblem", ".", "InvalidCharacterConstant", ":", "case", "IProblem", ".", "InvalidEscape", ":", "case", "IProblem", ".", "InvalidInput", ":", "case", "IProblem", ".", "InvalidUnicodeEscape", ":", "case", "IProblem", ".", "InvalidFloat", ":", "case", "IProblem", ".", "NullSourceString", ":", "case", "IProblem", ".", "UnterminatedString", ":", "case", "IProblem", ".", "UnterminatedComment", ":", "case", "IProblem", ".", "InvalidDigit", ":", "break", ";", "default", ":", "continue", "search", ";", "}", "int", "position", "=", "problem", ".", "getSourceStart", "(", ")", ";", "int", "start", "=", "node", ".", "getStartPosition", "(", ")", ";", "int", "end", "=", "start", "+", "node", ".", "getLength", "(", ")", ";", "if", "(", "(", "start", "<=", "position", ")", "&&", "(", "position", "<=", "end", ")", ")", "{", "node", ".", "setFlags", "(", "node", ".", "getFlags", "(", ")", "|", "ASTNode", ".", "MALFORMED", ")", ";", "ASTNode", "currentNode", "=", "node", ".", "getParent", "(", ")", ";", "while", "(", "currentNode", "!=", "null", ")", "{", "currentNode", ".", "setFlags", "(", "currentNode", ".", "getFlags", "(", ")", "&", "~", "ASTNode", ".", "MALFORMED", ")", ";", "currentNode", "=", "currentNode", ".", "getParent", "(", ")", ";", "}", "tagWithErrors", "=", "true", ";", "}", "}", "return", "tagWithErrors", ";", "}", "public", "boolean", "visit", "(", "FieldDeclaration", "node", ")", "{", "return", "checkAndTagAsMalformed", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "MethodDeclaration", "node", ")", "{", "return", "checkAndTagAsMalformed", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "PackageDeclaration", "node", ")", "{", "return", "checkAndTagAsMalformed", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "ImportDeclaration", "node", ")", "{", "return", "checkAndTagAsMalformed", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "CompilationUnit", "node", ")", "{", "return", "checkAndTagAsMalformed", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "AnnotationTypeDeclaration", "node", ")", "{", "return", "checkAndTagAsMalformed", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "EnumDeclaration", "node", ")", "{", "return", "checkAndTagAsMalformed", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "TypeDeclaration", "node", ")", "{", "return", "checkAndTagAsMalformed", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "Initializer", "node", ")", "{", "return", "checkAndTagAsMalformed", "(", "node", ")", ";", "}", "}", "</s>" ]
4,483
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Vector", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CategorizedProblem", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "IProblem", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "RecoveryScanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "RecoveryScannerData", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "TerminalTokens", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "HashtableOfObjectToIntArray", ";", "class", "ASTRecoveryPropagator", "extends", "DefaultASTVisitor", "{", "private", "static", "final", "int", "NOTHING", "=", "-", "1", ";", "HashtableOfObjectToIntArray", "endingTokens", "=", "new", "HashtableOfObjectToIntArray", "(", ")", ";", "{", "this", ".", "endingTokens", ".", "put", "(", "AnonymousClassDeclaration", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRBRACE", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ArrayAccess", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRBRACKET", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ArrayCreation", ".", "class", ",", "new", "int", "[", "]", "{", "NOTHING", ",", "TerminalTokens", ".", "TokenNameRBRACKET", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ArrayInitializer", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRBRACE", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ArrayType", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRBRACKET", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "AssertStatement", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "Block", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRBRACE", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "BooleanLiteral", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNamefalse", ",", "TerminalTokens", ".", "TokenNametrue", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "BreakStatement", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "CharacterLiteral", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameCharacterLiteral", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ClassInstanceCreation", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRBRACE", ",", "TerminalTokens", ".", "TokenNameRPAREN", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ConstructorInvocation", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ContinueStatement", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "DoStatement", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRPAREN", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "EmptyStatement", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ExpressionStatement", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "FieldDeclaration", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ImportDeclaration", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "Initializer", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRBRACE", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "MethodDeclaration", ".", "class", ",", "new", "int", "[", "]", "{", "NOTHING", ",", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "MethodInvocation", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRPAREN", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "NullLiteral", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNamenull", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "NumberLiteral", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameIntegerLiteral", ",", "TerminalTokens", ".", "TokenNameLongLiteral", ",", "TerminalTokens", ".", "TokenNameFloatingPointLiteral", ",", "TerminalTokens", ".", "TokenNameDoubleLiteral", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "PackageDeclaration", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ParenthesizedExpression", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRPAREN", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "PostfixExpression", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNamePLUS_PLUS", ",", "TerminalTokens", ".", "TokenNameMINUS_MINUS", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "PrimitiveType", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNamebyte", ",", "TerminalTokens", ".", "TokenNameshort", ",", "TerminalTokens", ".", "TokenNamechar", ",", "TerminalTokens", ".", "TokenNameint", ",", "TerminalTokens", ".", "TokenNamelong", ",", "TerminalTokens", ".", "TokenNamefloat", ",", "TerminalTokens", ".", "TokenNameboolean", ",", "TerminalTokens", ".", "TokenNamedouble", ",", "TerminalTokens", ".", "TokenNamevoid", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ReturnStatement", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "SimpleName", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameIdentifier", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "SingleVariableDeclaration", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "StringLiteral", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameStringLiteral", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "SuperConstructorInvocation", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "SuperMethodInvocation", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRPAREN", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "SwitchCase", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameCOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "SwitchStatement", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRBRACE", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "SynchronizedStatement", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRBRACE", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ThisExpression", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNamethis", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "ThrowStatement", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "TypeDeclaration", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameRBRACE", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "TypeLiteral", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameclass", "}", ")", ";", "this", ".", "endingTokens", ".", "put", "(", "VariableDeclarationStatement", ".", "class", ",", "new", "int", "[", "]", "{", "TerminalTokens", ".", "TokenNameSEMICOLON", "}", ")", ";", "}", "private", "CategorizedProblem", "[", "]", "problems", ";", "private", "boolean", "[", "]", "usedOrIrrelevantProblems", ";", "private", "RecoveryScannerData", "data", ";", "private", "int", "blockDepth", "=", "0", ";", "private", "int", "lastEnd", ";", "private", "int", "[", "]", "insertedTokensKind", ";", "private", "int", "[", "]", "insertedTokensPosition", ";", "private", "boolean", "[", "]", "insertedTokensFlagged", ";", "private", "boolean", "[", "]", "removedTokensFlagged", ";", "private", "boolean", "[", "]", "replacedTokensFlagged", ";", "private", "Vector", "stack", "=", "new", "Vector", "(", ")", ";", "ASTRecoveryPropagator", "(", "CategorizedProblem", "[", "]", "problems", ",", "RecoveryScannerData", "data", ")", "{", "this", ".", "problems", "=", "problems", ";", "this", ".", "usedOrIrrelevantProblems", "=", "new", "boolean", "[", "problems", ".", "length", "]", ";", "this", ".", "data", "=", "data", ";", "if", "(", "this", ".", "data", "!=", "null", ")", "{", "int", "length", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "data", ".", "insertedTokensPtr", "+", "1", ";", "i", "++", ")", "{", "length", "+=", "data", ".", "insertedTokens", "[", "i", "]", ".", "length", ";", "}", "this", ".", "insertedTokensKind", "=", "new", "int", "[", "length", "]", ";", "this", ".", "insertedTokensPosition", "=", "new", "int", "[", "length", "]", ";", "this", ".", "insertedTokensFlagged", "=", "new", "boolean", "[", "length", "]", ";", "int", "tokenCount", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "data", ".", "insertedTokensPtr", "+", "1", ";", "i", "++", ")", "{", "for", "(", "int", "j", "=", "0", ";", "j", "<", "data", ".", "insertedTokens", "[", "i", "]", ".", "length", ";", "j", "++", ")", "{", "this", ".", "insertedTokensKind", "[", "tokenCount", "]", "=", "data", ".", "insertedTokens", "[", "i", "]", "[", "j", "]", ";", "this", ".", "insertedTokensPosition", "[", "tokenCount", "]", "=", "data", ".", "insertedTokensPosition", "[", "i", "]", ";", "tokenCount", "++", ";", "}", "}", "if", "(", "data", ".", "removedTokensPtr", "!=", "-", "1", ")", "{", "this", ".", "removedTokensFlagged", "=", "new", "boolean", "[", "data", ".", "removedTokensPtr", "+", "1", "]", ";", "}", "if", "(", "data", ".", "replacedTokensPtr", "!=", "-", "1", ")", "{", "this", ".", "replacedTokensFlagged", "=", "new", "boolean", "[", "data", ".", "replacedTokensPtr", "+", "1", "]", ";", "}", "}", "}", "public", "void", "endVisit", "(", "Block", "node", ")", "{", "this", ".", "blockDepth", "--", ";", "if", "(", "this", ".", "blockDepth", "<=", "0", ")", "{", "flagNodeWithInsertedTokens", "(", ")", ";", "}", "super", ".", "endVisit", "(", "node", ")", ";", "}", "public", "boolean", "visit", "(", "Block", "node", ")", "{", "boolean", "visitChildren", "=", "super", ".", "visit", "(", "node", ")", ";", "this", ".", "blockDepth", "++", ";", "return", "visitChildren", ";", "}", "protected", "boolean", "visitNode", "(", "ASTNode", "node", ")", "{", "if", "(", "this", ".", "blockDepth", ">", "0", ")", "{", "int", "start", "=", "node", ".", "getStartPosition", "(", ")", ";", "int", "end", "=", "start", "+", "node", ".", "getLength", "(", ")", "-", "1", ";", "if", "(", "this", ".", "insertedTokensFlagged", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "insertedTokensFlagged", ".", "length", ";", "i", "++", ")", "{", "if", "(", "this", ".", "insertedTokensPosition", "[", "i", "]", ">=", "start", "&&", "this", ".", "insertedTokensPosition", "[", "i", "]", "<=", "end", ")", "{", "return", "true", ";", "}", "}", "}", "if", "(", "this", ".", "removedTokensFlagged", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<=", "this", ".", "data", ".", "removedTokensPtr", ";", "i", "++", ")", "{", "if", "(", "this", ".", "data", ".", "removedTokensStart", "[", "i", "]", ">=", "start", "&&", "this", ".", "data", ".", "removedTokensEnd", "[", "i", "]", "<=", "end", ")", "{", "return", "true", ";", "}", "}", "}", "if", "(", "this", ".", "replacedTokensFlagged", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<=", "this", ".", "data", ".", "replacedTokensPtr", ";", "i", "++", ")", "{", "if", "(", "this", ".", "data", ".", "replacedTokensStart", "[", "i", "]", ">=", "start", "&&", "this", ".", "data", ".", "replacedTokensEnd", "[", "i", "]", "<=", "end", ")", "{", "return", "true", ";", "}", "}", "}", "return", "false", ";", "}", "return", "true", ";", "}", "protected", "void", "endVisitNode", "(", "ASTNode", "node", ")", "{", "int", "start", "=", "node", ".", "getStartPosition", "(", ")", ";", "int", "end", "=", "start", "+", "node", ".", "getLength", "(", ")", "-", "1", ";", "if", "(", "this", ".", "blockDepth", "<", "1", ")", "{", "switch", "(", "node", ".", "getNodeType", "(", ")", ")", "{", "case", "ASTNode", ".", "ANNOTATION_TYPE_DECLARATION", ":", "case", "ASTNode", ".", "COMPILATION_UNIT", ":", "case", "ASTNode", ".", "ENUM_DECLARATION", ":", "case", "ASTNode", ".", "FIELD_DECLARATION", ":", "case", "ASTNode", ".", "IMPORT_DECLARATION", ":", "case", "ASTNode", ".", "INITIALIZER", ":", "case", "ASTNode", ".", "METHOD_DECLARATION", ":", "case", "ASTNode", ".", "PACKAGE_DECLARATION", ":", "case", "ASTNode", ".", "TYPE_DECLARATION", ":", "case", "ASTNode", ".", "MARKER_ANNOTATION", ":", "case", "ASTNode", ".", "NORMAL_ANNOTATION", ":", "case", "ASTNode", ".", "SINGLE_MEMBER_ANNOTATION", ":", "case", "ASTNode", ".", "BLOCK", ":", "if", "(", "markIncludedProblems", "(", "start", ",", "end", ")", ")", "{", "node", ".", "setFlags", "(", "node", ".", "getFlags", "(", ")", "|", "ASTNode", ".", "RECOVERED", ")", ";", "}", "break", ";", "}", "}", "else", "{", "markIncludedProblems", "(", "start", ",", "end", ")", ";", "if", "(", "this", ".", "insertedTokensFlagged", "!=", "null", ")", "{", "if", "(", "this", ".", "lastEnd", "!=", "end", ")", "{", "flagNodeWithInsertedTokens", "(", ")", ";", "}", "this", ".", "stack", ".", "add", "(", "node", ")", ";", "}", "if", "(", "this", ".", "removedTokensFlagged", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<=", "this", ".", "data", ".", "removedTokensPtr", ";", "i", "++", ")", "{", "if", "(", "!", "this", ".", "removedTokensFlagged", "[", "i", "]", "&&", "this", ".", "data", ".", "removedTokensStart", "[", "i", "]", ">=", "start", "&&", "this", ".", "data", ".", "removedTokensEnd", "[", "i", "]", "<=", "end", ")", "{", "node", ".", "setFlags", "(", "node", ".", "getFlags", "(", ")", "|", "ASTNode", ".", "RECOVERED", ")", ";", "this", ".", "removedTokensFlagged", "[", "i", "]", "=", "true", ";", "}", "}", "}", "if", "(", "this", ".", "replacedTokensFlagged", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<=", "this", ".", "data", ".", "replacedTokensPtr", ";", "i", "++", ")", "{", "if", "(", "!", "this", ".", "replacedTokensFlagged", "[", "i", "]", "&&", "this", ".", "data", ".", "replacedTokensStart", "[", "i", "]", ">=", "start", "&&", "this", ".", "data", ".", "replacedTokensEnd", "[", "i", "]", "<=", "end", ")", "{", "node", ".", "setFlags", "(", "node", ".", "getFlags", "(", ")", "|", "ASTNode", ".", "RECOVERED", ")", ";", "this", ".", "replacedTokensFlagged", "[", "i", "]", "=", "true", ";", "}", "}", "}", "}", "this", ".", "lastEnd", "=", "end", ";", "}", "private", "void", "flagNodeWithInsertedTokens", "(", ")", "{", "if", "(", "this", ".", "insertedTokensKind", "!=", "null", "&&", "this", ".", "insertedTokensKind", ".", "length", ">", "0", ")", "{", "int", "s", "=", "this", ".", "stack", ".", "size", "(", ")", ";", "for", "(", "int", "i", "=", "s", "-", "1", ";", "i", ">", "-", "1", ";", "i", "--", ")", "{", "flagNodesWithInsertedTokensAtEnd", "(", "(", "ASTNode", ")", "this", ".", "stack", ".", "get", "(", "i", ")", ")", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "s", ";", "i", "++", ")", "{", "flagNodesWithInsertedTokensInside", "(", "(", "ASTNode", ")", "this", ".", "stack", ".", "get", "(", "i", ")", ")", ";", "}", "this", ".", "stack", "=", "new", "Vector", "(", ")", ";", "}", "}", "private", "boolean", "flagNodesWithInsertedTokensAtEnd", "(", "ASTNode", "node", ")", "{", "int", "[", "]", "expectedEndingToken", "=", "this", ".", "endingTokens", ".", "get", "(", "node", ".", "getClass", "(", ")", ")", ";", "if", "(", "expectedEndingToken", "!=", "null", ")", "{", "int", "start", "=", "node", ".", "getStartPosition", "(", ")", ";", "int", "end", "=", "start", "+", "node", ".", "getLength", "(", ")", "-", "1", ";", "boolean", "flagParent", "=", "false", ";", "done", ":", "for", "(", "int", "i", "=", "this", ".", "insertedTokensKind", ".", "length", "-", "1", ";", "i", ">", "-", "1", ";", "i", "--", ")", "{", "if", "(", "!", "this", ".", "insertedTokensFlagged", "[", "i", "]", "&&", "this", ".", "insertedTokensPosition", "[", "i", "]", "==", "end", ")", "{", "this", ".", "insertedTokensFlagged", "[", "i", "]", "=", "true", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "expectedEndingToken", ".", "length", ";", "j", "++", ")", "{", "if", "(", "expectedEndingToken", "[", "j", "]", "==", "this", ".", "insertedTokensKind", "[", "i", "]", ")", "{", "node", ".", "setFlags", "(", "node", ".", "getFlags", "(", ")", "|", "ASTNode", ".", "RECOVERED", ")", ";", "break", "done", ";", "}", "}", "flagParent", "=", "true", ";", "}", "}", "if", "(", "flagParent", ")", "{", "ASTNode", "parent", "=", "node", ".", "getParent", "(", ")", ";", "while", "(", "parent", "!=", "null", ")", "{", "parent", ".", "setFlags", "(", "node", ".", "getFlags", "(", ")", "|", "ASTNode", ".", "RECOVERED", ")", ";", "if", "(", "(", "parent", ".", "getStartPosition", "(", ")", "+", "parent", ".", "getLength", "(", ")", "-", "1", ")", "!=", "end", ")", "{", "parent", "=", "null", ";", "}", "else", "{", "parent", "=", "parent", ".", "getParent", "(", ")", ";", "}", "}", "}", "}", "return", "true", ";", "}", "private", "boolean", "flagNodesWithInsertedTokensInside", "(", "ASTNode", "node", ")", "{", "int", "start", "=", "node", ".", "getStartPosition", "(", ")", ";", "int", "end", "=", "start", "+", "node", ".", "getLength", "(", ")", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "insertedTokensKind", ".", "length", ";", "i", "++", ")", "{", "if", "(", "!", "this", ".", "insertedTokensFlagged", "[", "i", "]", "&&", "start", "<=", "this", ".", "insertedTokensPosition", "[", "i", "]", "&&", "this", ".", "insertedTokensPosition", "[", "i", "]", "<", "end", ")", "{", "node", ".", "setFlags", "(", "node", ".", "getFlags", "(", ")", "|", "ASTNode", ".", "RECOVERED", ")", ";", "this", ".", "insertedTokensFlagged", "[", "i", "]", "=", "true", ";", "}", "}", "return", "true", ";", "}", "private", "boolean", "markIncludedProblems", "(", "int", "start", ",", "int", "end", ")", "{", "boolean", "foundProblems", "=", "false", ";", "next", ":", "for", "(", "int", "i", "=", "0", ",", "max", "=", "this", ".", "problems", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "CategorizedProblem", "problem", "=", "this", ".", "problems", "[", "i", "]", ";", "if", "(", "this", ".", "usedOrIrrelevantProblems", "[", "i", "]", ")", "continue", "next", ";", "switch", "(", "problem", ".", "getID", "(", ")", ")", "{", "case", "IProblem", ".", "ParsingErrorOnKeywordNoSuggestion", ":", "case", "IProblem", ".", "ParsingErrorOnKeyword", ":", "case", "IProblem", ".", "ParsingError", ":", "case", "IProblem", ".", "ParsingErrorNoSuggestion", ":", "case", "IProblem", ".", "ParsingErrorInsertTokenBefore", ":", "case", "IProblem", ".", "ParsingErrorInsertTokenAfter", ":", "case", "IProblem", ".", "ParsingErrorDeleteToken", ":", "case", "IProblem", ".", "ParsingErrorDeleteTokens", ":", "case", "IProblem", ".", "ParsingErrorMergeTokens", ":", "case", "IProblem", ".", "ParsingErrorInvalidToken", ":", "case", "IProblem", ".", "ParsingErrorMisplacedConstruct", ":", "case", "IProblem", ".", "ParsingErrorReplaceTokens", ":", "case", "IProblem", ".", "ParsingErrorNoSuggestionForTokens", ":", "case", "IProblem", ".", "ParsingErrorUnexpectedEOF", ":", "case", "IProblem", ".", "ParsingErrorInsertToComplete", ":", "case", "IProblem", ".", "ParsingErrorInsertToCompleteScope", ":", "case", "IProblem", ".", "ParsingErrorInsertToCompletePhrase", ":", "case", "IProblem", ".", "EndOfSource", ":", "case", "IProblem", ".", "InvalidHexa", ":", "case", "IProblem", ".", "InvalidOctal", ":", "case", "IProblem", ".", "InvalidCharacterConstant", ":", "case", "IProblem", ".", "InvalidEscape", ":", "case", "IProblem", ".", "InvalidInput", ":", "case", "IProblem", ".", "InvalidUnicodeEscape", ":", "case", "IProblem", ".", "InvalidFloat", ":", "case", "IProblem", ".", "NullSourceString", ":", "case", "IProblem", ".", "UnterminatedString", ":", "case", "IProblem", ".", "UnterminatedComment", ":", "case", "IProblem", ".", "InvalidDigit", ":", "break", ";", "default", ":", "this", ".", "usedOrIrrelevantProblems", "[", "i", "]", "=", "true", ";", "continue", "next", ";", "}", "int", "problemStart", "=", "problem", ".", "getSourceStart", "(", ")", ";", "int", "problemEnd", "=", "problem", ".", "getSourceEnd", "(", ")", ";", "if", "(", "(", "start", "<=", "problemStart", ")", "&&", "(", "problemStart", "<=", "end", ")", "||", "(", "start", "<=", "problemEnd", ")", "&&", "(", "problemEnd", "<=", "end", ")", ")", "{", "this", ".", "usedOrIrrelevantProblems", "[", "i", "]", "=", "true", ";", "foundProblems", "=", "true", ";", "}", "}", "return", "foundProblems", ";", "}", "public", "void", "endVisit", "(", "ExpressionStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "if", "(", "(", "node", ".", "getFlags", "(", ")", "&", "ASTNode", ".", "RECOVERED", ")", "==", "0", ")", "return", ";", "Expression", "expression", "=", "node", ".", "getExpression", "(", ")", ";", "if", "(", "expression", ".", "getNodeType", "(", ")", "==", "ASTNode", ".", "ASSIGNMENT", ")", "{", "Assignment", "assignment", "=", "(", "Assignment", ")", "expression", ";", "Expression", "rightHandSide", "=", "assignment", ".", "getRightHandSide", "(", ")", ";", "if", "(", "rightHandSide", ".", "getNodeType", "(", ")", "==", "ASTNode", ".", "SIMPLE_NAME", ")", "{", "SimpleName", "simpleName", "=", "(", "SimpleName", ")", "rightHandSide", ";", "if", "(", "CharOperation", ".", "equals", "(", "RecoveryScanner", ".", "FAKE_IDENTIFIER", ",", "simpleName", ".", "getIdentifier", "(", ")", ".", "toCharArray", "(", ")", ")", ")", "{", "Expression", "expression2", "=", "assignment", ".", "getLeftHandSide", "(", ")", ";", "expression2", ".", "setParent", "(", "null", ",", "null", ")", ";", "expression2", ".", "setFlags", "(", "expression2", ".", "getFlags", "(", ")", "|", "ASTNode", ".", "RECOVERED", ")", ";", "node", ".", "setExpression", "(", "expression2", ")", ";", "}", "}", "}", "}", "public", "void", "endVisit", "(", "ForStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "List", "initializers", "=", "node", ".", "initializers", "(", ")", ";", "if", "(", "initializers", ".", "size", "(", ")", "==", "1", ")", "{", "Expression", "expression", "=", "(", "Expression", ")", "initializers", ".", "get", "(", "0", ")", ";", "if", "(", "expression", ".", "getNodeType", "(", ")", "==", "ASTNode", ".", "VARIABLE_DECLARATION_EXPRESSION", ")", "{", "VariableDeclarationExpression", "variableDeclarationExpression", "=", "(", "VariableDeclarationExpression", ")", "expression", ";", "List", "fragments", "=", "variableDeclarationExpression", ".", "fragments", "(", ")", ";", "for", "(", "int", "i", "=", "0", ",", "max", "=", "fragments", ".", "size", "(", ")", ";", "i", "<", "max", ";", "i", "++", ")", "{", "VariableDeclarationFragment", "fragment", "=", "(", "VariableDeclarationFragment", ")", "fragments", ".", "get", "(", "i", ")", ";", "SimpleName", "simpleName", "=", "fragment", ".", "getName", "(", ")", ";", "if", "(", "CharOperation", ".", "equals", "(", "RecoveryScanner", ".", "FAKE_IDENTIFIER", ",", "simpleName", ".", "getIdentifier", "(", ")", ".", "toCharArray", "(", ")", ")", ")", "{", "fragments", ".", "remove", "(", "fragment", ")", ";", "variableDeclarationExpression", ".", "setFlags", "(", "variableDeclarationExpression", ".", "getFlags", "(", ")", "|", "ASTNode", ".", "RECOVERED", ")", ";", "}", "}", "}", "}", "}", "public", "void", "endVisit", "(", "VariableDeclarationStatement", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "List", "fragments", "=", "node", ".", "fragments", "(", ")", ";", "for", "(", "int", "i", "=", "0", ",", "max", "=", "fragments", ".", "size", "(", ")", ";", "i", "<", "max", ";", "i", "++", ")", "{", "VariableDeclarationFragment", "fragment", "=", "(", "VariableDeclarationFragment", ")", "fragments", ".", "get", "(", "i", ")", ";", "Expression", "expression", "=", "fragment", ".", "getInitializer", "(", ")", ";", "if", "(", "expression", "==", "null", ")", "continue", ";", "if", "(", "(", "expression", ".", "getFlags", "(", ")", "&", "ASTNode", ".", "RECOVERED", ")", "==", "0", ")", "continue", ";", "if", "(", "expression", ".", "getNodeType", "(", ")", "==", "ASTNode", ".", "SIMPLE_NAME", ")", "{", "SimpleName", "simpleName", "=", "(", "SimpleName", ")", "expression", ";", "if", "(", "CharOperation", ".", "equals", "(", "RecoveryScanner", ".", "FAKE_IDENTIFIER", ",", "simpleName", ".", "getIdentifier", "(", ")", ".", "toCharArray", "(", ")", ")", ")", "{", "fragment", ".", "setInitializer", "(", "null", ")", ";", "fragment", ".", "setFlags", "(", "fragment", ".", "getFlags", "(", ")", "|", "ASTNode", ".", "RECOVERED", ")", ";", "}", "}", "}", "}", "public", "void", "endVisit", "(", "NormalAnnotation", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "if", "(", "this", ".", "blockDepth", "<", "1", ")", "{", "List", "values", "=", "node", ".", "values", "(", ")", ";", "int", "size", "=", "values", ".", "size", "(", ")", ";", "if", "(", "size", ">", "0", ")", "{", "MemberValuePair", "lastMemberValuePair", "=", "(", "MemberValuePair", ")", "values", ".", "get", "(", "size", "-", "1", ")", ";", "int", "annotationEnd", "=", "node", ".", "getStartPosition", "(", ")", "+", "node", ".", "getLength", "(", ")", ";", "int", "lastMemberValuePairEnd", "=", "lastMemberValuePair", ".", "getStartPosition", "(", ")", "+", "lastMemberValuePair", ".", "getLength", "(", ")", ";", "if", "(", "annotationEnd", "==", "lastMemberValuePairEnd", ")", "{", "node", ".", "setFlags", "(", "node", ".", "getFlags", "(", ")", "|", "ASTNode", ".", "RECOVERED", ")", ";", "}", "}", "}", "}", "public", "void", "endVisit", "(", "SingleMemberAnnotation", "node", ")", "{", "endVisitNode", "(", "node", ")", ";", "if", "(", "this", ".", "blockDepth", "<", "1", ")", "{", "Expression", "value", "=", "node", ".", "getValue", "(", ")", ";", "int", "annotationEnd", "=", "node", ".", "getStartPosition", "(", ")", "+", "node", ".", "getLength", "(", ")", ";", "int", "valueEnd", "=", "value", ".", "getStartPosition", "(", ")", "+", "value", ".", "getLength", "(", ")", ";", "if", "(", "annotationEnd", "==", "valueEnd", ")", "{", "node", ".", "setFlags", "(", "node", ".", "getFlags", "(", ")", "|", "ASTNode", ".", "RECOVERED", ")", ";", "}", "}", "}", "}", "</s>" ]
4,484
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "io", ".", "File", ";", "import", "java", ".", "io", ".", "IOException", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "HashMap", ";", "import", "java", ".", "util", ".", "Iterator", ";", "import", "java", ".", "util", ".", "List", ";", "import", "java", ".", "util", ".", "Map", ";", "import", "org", ".", "codehaus", ".", "jdt", ".", "groovy", ".", "integration", ".", "LanguageSupportFactory", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "IProgressMonitor", ";", "import", "org", ".", "eclipse", ".", "core", ".", "runtime", ".", "OperationCanceledException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "ICompilationUnit", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaElement", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaProject", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaModelException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "WorkingCopyOwner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CategorizedProblem", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ".", "CompilerUtils", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "CompilationResult", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "Compiler", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "DefaultErrorHandlingPolicies", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ICompilerRequestor", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "IErrorHandlingPolicy", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "IProblemFactory", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "AbstractMethodDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "CompilationUnitDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "batch", ".", "FileSystem", ".", "Classpath", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "AccessRestriction", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "INameEnvironment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ISourceType", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "CompilerOptions", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "AnnotationBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Binding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ExtraCompilerModifiers", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "Parser", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "problem", ".", "AbortCompilation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "problem", ".", "DefaultProblemFactory", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "problem", ".", "ProblemReporter", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "HashtableOfObject", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "HashtableOfObjectToInt", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "Messages", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "util", ".", "Util", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "BinaryMember", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "CancelableNameEnvironment", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "CancelableProblemFactory", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "INameEnvironmentWithProgress", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "JavaProject", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "NameLookup", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "SourceRefElement", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "SourceTypeElementInfo", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "BindingKeyResolver", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "CommentRecorderParser", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "DOMFinder", ";", "public", "class", "CompilationUnitResolver", "extends", "Compiler", "{", "public", "static", "final", "int", "RESOLVE_BINDING", "=", "0x1", ";", "public", "static", "final", "int", "PARTIAL", "=", "0x2", ";", "public", "static", "final", "int", "STATEMENT_RECOVERY", "=", "0x4", ";", "public", "static", "final", "int", "IGNORE_METHOD_BODIES", "=", "0x8", ";", "public", "static", "final", "int", "BINDING_RECOVERY", "=", "0x10", ";", "public", "static", "final", "int", "INCLUDE_RUNNING_VM_BOOTCLASSPATH", "=", "0x20", ";", "static", "class", "IntArrayList", "{", "public", "int", "[", "]", "list", "=", "new", "int", "[", "5", "]", ";", "public", "int", "length", "=", "0", ";", "public", "void", "add", "(", "int", "i", ")", "{", "if", "(", "this", ".", "list", ".", "length", "==", "this", ".", "length", ")", "{", "System", ".", "arraycopy", "(", "this", ".", "list", ",", "0", ",", "this", ".", "list", "=", "new", "int", "[", "this", ".", "length", "*", "2", "]", ",", "0", ",", "this", ".", "length", ")", ";", "}", "this", ".", "list", "[", "this", ".", "length", "++", "]", "=", "i", ";", "}", "}", "HashtableOfObject", "requestedSources", ";", "HashtableOfObject", "requestedKeys", ";", "DefaultBindingResolver", ".", "BindingTables", "bindingTables", ";", "boolean", "hasCompilationAborted", ";", "private", "IProgressMonitor", "monitor", ";", "boolean", "fromJavaProject", ";", "public", "CompilationUnitResolver", "(", "INameEnvironment", "environment", ",", "IErrorHandlingPolicy", "policy", ",", "CompilerOptions", "compilerOptions", ",", "ICompilerRequestor", "requestor", ",", "IProblemFactory", "problemFactory", ",", "IProgressMonitor", "monitor", ",", "boolean", "fromJavaProject", ")", "{", "super", "(", "environment", ",", "policy", ",", "compilerOptions", ",", "requestor", ",", "problemFactory", ")", ";", "this", ".", "hasCompilationAborted", "=", "false", ";", "this", ".", "monitor", "=", "monitor", ";", "this", ".", "fromJavaProject", "=", "fromJavaProject", ";", "}", "public", "void", "accept", "(", "ISourceType", "[", "]", "sourceTypes", ",", "PackageBinding", "packageBinding", ",", "AccessRestriction", "accessRestriction", ")", "{", "SourceTypeElementInfo", "sourceType", "=", "(", "SourceTypeElementInfo", ")", "sourceTypes", "[", "0", "]", ";", "accept", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", ")", "sourceType", ".", "getHandle", "(", ")", ".", "getCompilationUnit", "(", ")", ",", "accessRestriction", ")", ";", "}", "public", "synchronized", "void", "accept", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", ",", "AccessRestriction", "accessRestriction", ")", "{", "super", ".", "accept", "(", "sourceUnit", ",", "accessRestriction", ")", ";", "}", "protected", "void", "beginToCompile", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "[", "]", "sourceUnits", ",", "String", "[", "]", "bindingKeys", ")", "{", "int", "sourceLength", "=", "sourceUnits", ".", "length", ";", "int", "keyLength", "=", "bindingKeys", ".", "length", ";", "int", "maxUnits", "=", "sourceLength", "+", "keyLength", ";", "this", ".", "totalUnits", "=", "0", ";", "this", ".", "unitsToProcess", "=", "new", "CompilationUnitDeclaration", "[", "maxUnits", "]", ";", "int", "index", "=", "0", ";", "this", ".", "requestedSources", "=", "new", "HashtableOfObject", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "sourceLength", ";", "i", "++", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", "=", "sourceUnits", "[", "i", "]", ";", "CompilationUnitDeclaration", "parsedUnit", ";", "CompilationResult", "unitResult", "=", "new", "CompilationResult", "(", "sourceUnit", ",", "index", "++", ",", "maxUnits", ",", "this", ".", "options", ".", "maxProblemsPerUnit", ")", ";", "try", "{", "if", "(", "this", ".", "options", ".", "verbose", ")", "{", "this", ".", "out", ".", "println", "(", "Messages", ".", "bind", "(", "Messages", ".", "compilation_request", ",", "new", "String", "[", "]", "{", "String", ".", "valueOf", "(", "index", "++", "+", "1", ")", ",", "String", ".", "valueOf", "(", "maxUnits", ")", ",", "new", "String", "(", "sourceUnit", ".", "getFileName", "(", ")", ")", "}", ")", ")", ";", "}", "if", "(", "this", ".", "totalUnits", "<", "this", ".", "parseThreshold", ")", "{", "parsedUnit", "=", "this", ".", "parser", ".", "parse", "(", "sourceUnit", ",", "unitResult", ")", ";", "}", "else", "{", "parsedUnit", "=", "this", ".", "parser", ".", "dietParse", "(", "sourceUnit", ",", "unitResult", ")", ";", "}", "this", ".", "lookupEnvironment", ".", "buildTypeBindings", "(", "parsedUnit", ",", "null", ")", ";", "addCompilationUnit", "(", "sourceUnit", ",", "parsedUnit", ")", ";", "this", ".", "requestedSources", ".", "put", "(", "unitResult", ".", "getFileName", "(", ")", ",", "sourceUnit", ")", ";", "worked", "(", "1", ")", ";", "}", "finally", "{", "sourceUnits", "[", "i", "]", "=", "null", ";", "}", "}", "this", ".", "requestedKeys", "=", "new", "HashtableOfObject", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "keyLength", ";", "i", "++", ")", "{", "BindingKeyResolver", "resolver", "=", "new", "BindingKeyResolver", "(", "bindingKeys", "[", "i", "]", ",", "this", ",", "this", ".", "lookupEnvironment", ")", ";", "resolver", ".", "parse", "(", "true", ")", ";", "CompilationUnitDeclaration", "parsedUnit", "=", "resolver", ".", "hasTypeName", "(", ")", "?", "resolver", ".", "getCompilationUnitDeclaration", "(", ")", ":", "null", ";", "if", "(", "parsedUnit", "!=", "null", ")", "{", "char", "[", "]", "fileName", "=", "parsedUnit", ".", "compilationResult", ".", "getFileName", "(", ")", ";", "Object", "existing", "=", "this", ".", "requestedKeys", ".", "get", "(", "fileName", ")", ";", "if", "(", "existing", "==", "null", ")", "this", ".", "requestedKeys", ".", "put", "(", "fileName", ",", "resolver", ")", ";", "else", "if", "(", "existing", "instanceof", "ArrayList", ")", "(", "(", "ArrayList", ")", "existing", ")", ".", "add", "(", "resolver", ")", ";", "else", "{", "ArrayList", "list", "=", "new", "ArrayList", "(", ")", ";", "list", ".", "add", "(", "existing", ")", ";", "list", ".", "add", "(", "resolver", ")", ";", "this", ".", "requestedKeys", ".", "put", "(", "fileName", ",", "list", ")", ";", "}", "}", "else", "{", "char", "[", "]", "key", "=", "resolver", ".", "hasTypeName", "(", ")", "?", "resolver", ".", "getKey", "(", ")", ".", "toCharArray", "(", ")", ":", "CharOperation", ".", "concatWith", "(", "resolver", ".", "compoundName", "(", ")", ",", "'.'", ")", ";", "this", ".", "requestedKeys", ".", "put", "(", "key", ",", "resolver", ")", ";", "}", "worked", "(", "1", ")", ";", "}", "this", ".", "lookupEnvironment", ".", "completeTypeBindings", "(", ")", ";", "}", "IBinding", "createBinding", "(", "String", "key", ")", "{", "if", "(", "this", ".", "bindingTables", "==", "null", ")", "throw", "new", "RuntimeException", "(", "\"\"", ")", ";", "BindingKeyResolver", "keyResolver", "=", "new", "BindingKeyResolver", "(", "key", ",", "this", ",", "this", ".", "lookupEnvironment", ")", ";", "Binding", "compilerBinding", "=", "keyResolver", ".", "getCompilerBinding", "(", ")", ";", "if", "(", "compilerBinding", "==", "null", ")", "return", "null", ";", "DefaultBindingResolver", "resolver", "=", "new", "DefaultBindingResolver", "(", "this", ".", "lookupEnvironment", ",", "null", ",", "this", ".", "bindingTables", ",", "false", ",", "this", ".", "fromJavaProject", ")", ";", "return", "resolver", ".", "getBinding", "(", "compilerBinding", ")", ";", "}", "public", "static", "CompilationUnit", "convert", "(", "CompilationUnitDeclaration", "compilationUnitDeclaration", ",", "char", "[", "]", "source", ",", "int", "apiLevel", ",", "Map", "options", ",", "boolean", "needToResolveBindings", ",", "WorkingCopyOwner", "owner", ",", "DefaultBindingResolver", ".", "BindingTables", "bindingTables", ",", "int", "flags", ",", "IProgressMonitor", "monitor", ",", "boolean", "fromJavaProject", ")", "{", "BindingResolver", "resolver", "=", "null", ";", "AST", "ast", "=", "AST", ".", "newAST", "(", "apiLevel", ")", ";", "ast", ".", "setDefaultNodeFlag", "(", "ASTNode", ".", "ORIGINAL", ")", ";", "CompilationUnit", "compilationUnit", "=", "null", ";", "ASTConverter", "converter", "=", "new", "ASTConverter", "(", "options", ",", "needToResolveBindings", ",", "monitor", ")", ";", "if", "(", "needToResolveBindings", ")", "{", "resolver", "=", "new", "DefaultBindingResolver", "(", "compilationUnitDeclaration", ".", "scope", ",", "owner", ",", "bindingTables", ",", "(", "flags", "&", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ")", "!=", "0", ",", "fromJavaProject", ")", ";", "ast", ".", "setFlag", "(", "flags", "|", "AST", ".", "RESOLVED_BINDINGS", ")", ";", "}", "else", "{", "resolver", "=", "new", "BindingResolver", "(", ")", ";", "ast", ".", "setFlag", "(", "flags", ")", ";", "}", "ast", ".", "setBindingResolver", "(", "resolver", ")", ";", "converter", ".", "setAST", "(", "ast", ")", ";", "compilationUnit", "=", "converter", ".", "convert", "(", "compilationUnitDeclaration", ",", "source", ")", ";", "compilationUnit", ".", "setLineEndTable", "(", "compilationUnitDeclaration", ".", "compilationResult", ".", "getLineSeparatorPositions", "(", ")", ")", ";", "ast", ".", "setDefaultNodeFlag", "(", "0", ")", ";", "ast", ".", "setOriginalModificationCount", "(", "ast", ".", "modificationCount", "(", ")", ")", ";", "return", "compilationUnit", ";", "}", "protected", "static", "CompilerOptions", "getCompilerOptions", "(", "Map", "options", ",", "boolean", "statementsRecovery", ")", "{", "CompilerOptions", "compilerOptions", "=", "new", "CompilerOptions", "(", "options", ")", ";", "compilerOptions", ".", "performMethodsFullRecovery", "=", "statementsRecovery", ";", "compilerOptions", ".", "performStatementsRecovery", "=", "statementsRecovery", ";", "compilerOptions", ".", "parseLiteralExpressionsAsConstants", "=", "false", ";", "compilerOptions", ".", "storeAnnotations", "=", "true", ";", "return", "compilerOptions", ";", "}", "protected", "static", "IErrorHandlingPolicy", "getHandlingPolicy", "(", ")", "{", "return", "new", "IErrorHandlingPolicy", "(", ")", "{", "public", "boolean", "stopOnFirstError", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "proceedOnErrors", "(", ")", "{", "return", "false", ";", "}", "}", ";", "}", "protected", "static", "ICompilerRequestor", "getRequestor", "(", ")", "{", "return", "new", "ICompilerRequestor", "(", ")", "{", "public", "void", "acceptResult", "(", "CompilationResult", "compilationResult", ")", "{", "}", "}", ";", "}", "public", "void", "initializeParser", "(", ")", "{", "this", ".", "parser", "=", "LanguageSupportFactory", ".", "getParser", "(", "this", ",", "this", ".", "lookupEnvironment", "==", "null", "?", "null", ":", "this", ".", "lookupEnvironment", ".", "globalOptions", ",", "this", ".", "problemReporter", ",", "false", ",", "LanguageSupportFactory", ".", "CommentRecorderParserVariant", ")", ";", "}", "public", "void", "process", "(", "CompilationUnitDeclaration", "unit", ",", "int", "i", ")", "{", "char", "[", "]", "fileName", "=", "unit", ".", "compilationResult", ".", "getFileName", "(", ")", ";", "if", "(", "this", ".", "requestedKeys", ".", "get", "(", "fileName", ")", "==", "null", "&&", "this", ".", "requestedSources", ".", "get", "(", "fileName", ")", "==", "null", ")", "super", ".", "process", "(", "unit", ",", "i", ")", ";", "}", "protected", "void", "handleInternalException", "(", "Throwable", "internalException", ",", "CompilationUnitDeclaration", "unit", ",", "CompilationResult", "result", ")", "{", "super", ".", "handleInternalException", "(", "internalException", ",", "unit", ",", "result", ")", ";", "if", "(", "unit", "!=", "null", ")", "{", "removeUnresolvedBindings", "(", "unit", ")", ";", "}", "}", "protected", "void", "handleInternalException", "(", "AbortCompilation", "abortException", ",", "CompilationUnitDeclaration", "unit", ")", "{", "super", ".", "handleInternalException", "(", "abortException", ",", "unit", ")", ";", "if", "(", "unit", "!=", "null", ")", "{", "removeUnresolvedBindings", "(", "unit", ")", ";", "}", "this", ".", "hasCompilationAborted", "=", "true", ";", "}", "public", "static", "void", "parse", "(", "ICompilationUnit", "[", "]", "compilationUnits", ",", "ASTRequestor", "astRequestor", ",", "int", "apiLevel", ",", "Map", "options", ",", "int", "flags", ",", "IProgressMonitor", "monitor", ")", "{", "try", "{", "CompilerOptions", "compilerOptions", "=", "new", "CompilerOptions", "(", "options", ")", ";", "compilerOptions", ".", "ignoreMethodBodies", "=", "(", "flags", "&", "ICompilationUnit", ".", "IGNORE_METHOD_BODIES", ")", "!=", "0", ";", "Parser", "parser", "=", "new", "CommentRecorderParser", "(", "new", "ProblemReporter", "(", "DefaultErrorHandlingPolicies", ".", "proceedWithAllProblems", "(", ")", ",", "compilerOptions", ",", "new", "DefaultProblemFactory", "(", ")", ")", ",", "false", ")", ";", "int", "unitLength", "=", "compilationUnits", ".", "length", ";", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "beginTask", "(", "\"\"", ",", "unitLength", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "unitLength", ";", "i", "++", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", ")", "compilationUnits", "[", "i", "]", ";", "CompilationResult", "compilationResult", "=", "new", "CompilationResult", "(", "sourceUnit", ",", "0", ",", "0", ",", "compilerOptions", ".", "maxProblemsPerUnit", ")", ";", "CompilationUnitDeclaration", "compilationUnitDeclaration", "=", "parser", ".", "dietParse", "(", "sourceUnit", ",", "compilationResult", ")", ";", "if", "(", "compilationUnitDeclaration", ".", "ignoreMethodBodies", ")", "{", "compilationUnitDeclaration", ".", "ignoreFurtherInvestigation", "=", "true", ";", "continue", ";", "}", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "[", "]", "types", "=", "compilationUnitDeclaration", ".", "types", ";", "if", "(", "types", "!=", "null", ")", "{", "for", "(", "int", "j", "=", "0", ",", "typeLength", "=", "types", ".", "length", ";", "j", "<", "typeLength", ";", "j", "++", ")", "{", "types", "[", "j", "]", ".", "parseMethods", "(", "parser", ",", "compilationUnitDeclaration", ")", ";", "}", "}", "CompilationUnit", "node", "=", "convert", "(", "compilationUnitDeclaration", ",", "parser", ".", "scanner", ".", "getSource", "(", ")", ",", "apiLevel", ",", "options", ",", "false", ",", "null", ",", "null", ",", "flags", ",", "monitor", ",", "true", ")", ";", "node", ".", "setTypeRoot", "(", "compilationUnits", "[", "i", "]", ")", ";", "astRequestor", ".", "acceptAST", "(", "compilationUnits", "[", "i", "]", ",", "node", ")", ";", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "worked", "(", "1", ")", ";", "}", "}", "finally", "{", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "done", "(", ")", ";", "}", "}", "public", "static", "void", "parse", "(", "String", "[", "]", "sourceUnits", ",", "String", "[", "]", "encodings", ",", "FileASTRequestor", "astRequestor", ",", "int", "apiLevel", ",", "Map", "options", ",", "int", "flags", ",", "IProgressMonitor", "monitor", ")", "{", "try", "{", "CompilerOptions", "compilerOptions", "=", "new", "CompilerOptions", "(", "options", ")", ";", "compilerOptions", ".", "ignoreMethodBodies", "=", "(", "flags", "&", "ICompilationUnit", ".", "IGNORE_METHOD_BODIES", ")", "!=", "0", ";", "Parser", "parser", "=", "new", "CommentRecorderParser", "(", "new", "ProblemReporter", "(", "DefaultErrorHandlingPolicies", ".", "proceedWithAllProblems", "(", ")", ",", "compilerOptions", ",", "new", "DefaultProblemFactory", "(", ")", ")", ",", "false", ")", ";", "int", "unitLength", "=", "sourceUnits", ".", "length", ";", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "beginTask", "(", "\"\"", ",", "unitLength", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "unitLength", ";", "i", "++", ")", "{", "char", "[", "]", "contents", "=", "null", ";", "String", "encoding", "=", "encodings", "!=", "null", "?", "encodings", "[", "i", "]", ":", "null", ";", "try", "{", "contents", "=", "Util", ".", "getFileCharContent", "(", "new", "File", "(", "sourceUnits", "[", "i", "]", ")", ",", "encoding", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "continue", ";", "}", "if", "(", "contents", "==", "null", ")", "{", "continue", ";", "}", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "batch", ".", "CompilationUnit", "compilationUnit", "=", "new", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "batch", ".", "CompilationUnit", "(", "contents", ",", "sourceUnits", "[", "i", "]", ",", "encoding", ")", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", "=", "compilationUnit", ";", "CompilationResult", "compilationResult", "=", "new", "CompilationResult", "(", "sourceUnit", ",", "0", ",", "0", ",", "compilerOptions", ".", "maxProblemsPerUnit", ")", ";", "CompilationUnitDeclaration", "compilationUnitDeclaration", "=", "parser", ".", "dietParse", "(", "sourceUnit", ",", "compilationResult", ")", ";", "if", "(", "compilationUnitDeclaration", ".", "ignoreMethodBodies", ")", "{", "compilationUnitDeclaration", ".", "ignoreFurtherInvestigation", "=", "true", ";", "continue", ";", "}", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "[", "]", "types", "=", "compilationUnitDeclaration", ".", "types", ";", "if", "(", "types", "!=", "null", ")", "{", "for", "(", "int", "j", "=", "0", ",", "typeLength", "=", "types", ".", "length", ";", "j", "<", "typeLength", ";", "j", "++", ")", "{", "types", "[", "j", "]", ".", "parseMethods", "(", "parser", ",", "compilationUnitDeclaration", ")", ";", "}", "}", "CompilationUnit", "node", "=", "convert", "(", "compilationUnitDeclaration", ",", "parser", ".", "scanner", ".", "getSource", "(", ")", ",", "apiLevel", ",", "options", ",", "false", ",", "null", ",", "null", ",", "flags", ",", "monitor", ",", "true", ")", ";", "node", ".", "setTypeRoot", "(", "null", ")", ";", "astRequestor", ".", "acceptAST", "(", "sourceUnits", "[", "i", "]", ",", "node", ")", ";", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "worked", "(", "1", ")", ";", "}", "}", "finally", "{", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "done", "(", ")", ";", "}", "}", "public", "static", "CompilationUnitDeclaration", "parse", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", ",", "NodeSearcher", "nodeSearcher", ",", "Map", "settings", ",", "int", "flags", ")", "{", "if", "(", "sourceUnit", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", ")", ";", "}", "CompilerOptions", "compilerOptions", "=", "new", "CompilerOptions", "(", "settings", ")", ";", "boolean", "statementsRecovery", "=", "(", "flags", "&", "ICompilationUnit", ".", "ENABLE_STATEMENTS_RECOVERY", ")", "!=", "0", ";", "compilerOptions", ".", "performMethodsFullRecovery", "=", "statementsRecovery", ";", "compilerOptions", ".", "performStatementsRecovery", "=", "statementsRecovery", ";", "compilerOptions", ".", "ignoreMethodBodies", "=", "(", "flags", "&", "ICompilationUnit", ".", "IGNORE_METHOD_BODIES", ")", "!=", "0", ";", "Parser", "parser", "=", "LanguageSupportFactory", ".", "getParser", "(", "null", ",", "compilerOptions", ",", "new", "ProblemReporter", "(", "DefaultErrorHandlingPolicies", ".", "proceedWithAllProblems", "(", ")", ",", "compilerOptions", ",", "new", "DefaultProblemFactory", "(", ")", ")", ",", "false", ",", "2", ")", ";", "CompilationResult", "compilationResult", "=", "new", "CompilationResult", "(", "sourceUnit", ",", "0", ",", "0", ",", "compilerOptions", ".", "maxProblemsPerUnit", ")", ";", "CompilationUnitDeclaration", "compilationUnitDeclaration", "=", "parser", ".", "dietParse", "(", "sourceUnit", ",", "compilationResult", ")", ";", "if", "(", "compilationUnitDeclaration", ".", "ignoreMethodBodies", ")", "{", "compilationUnitDeclaration", ".", "ignoreFurtherInvestigation", "=", "true", ";", "return", "compilationUnitDeclaration", ";", "}", "if", "(", "nodeSearcher", "!=", "null", ")", "{", "char", "[", "]", "source", "=", "parser", ".", "scanner", ".", "getSource", "(", ")", ";", "int", "searchPosition", "=", "nodeSearcher", ".", "position", ";", "if", "(", "searchPosition", "<", "0", "||", "searchPosition", ">", "source", ".", "length", ")", "{", "return", "compilationUnitDeclaration", ";", "}", "compilationUnitDeclaration", ".", "traverse", "(", "nodeSearcher", ",", "compilationUnitDeclaration", ".", "scope", ")", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "nodeSearcher", ".", "found", ";", "if", "(", "node", "==", "null", ")", "{", "return", "compilationUnitDeclaration", ";", "}", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "enclosingTypeDeclaration", "=", "nodeSearcher", ".", "enclosingType", ";", "if", "(", "node", "instanceof", "AbstractMethodDeclaration", ")", "{", "(", "(", "AbstractMethodDeclaration", ")", "node", ")", ".", "parseStatements", "(", "parser", ",", "compilationUnitDeclaration", ")", ";", "}", "else", "if", "(", "enclosingTypeDeclaration", "!=", "null", ")", "{", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Initializer", ")", "{", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Initializer", ")", "node", ")", ".", "parseStatements", "(", "parser", ",", "enclosingTypeDeclaration", ",", "compilationUnitDeclaration", ")", ";", "}", "else", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "{", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "node", ")", ".", "parseMethods", "(", "parser", ",", "compilationUnitDeclaration", ")", ";", "}", "}", "}", "else", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "[", "]", "types", "=", "compilationUnitDeclaration", ".", "types", ";", "if", "(", "types", "!=", "null", ")", "{", "for", "(", "int", "j", "=", "0", ",", "typeLength", "=", "types", ".", "length", ";", "j", "<", "typeLength", ";", "j", "++", ")", "{", "types", "[", "j", "]", ".", "parseMethods", "(", "parser", ",", "compilationUnitDeclaration", ")", ";", "}", "}", "}", "return", "compilationUnitDeclaration", ";", "}", "public", "static", "void", "resolve", "(", "ICompilationUnit", "[", "]", "compilationUnits", ",", "String", "[", "]", "bindingKeys", ",", "ASTRequestor", "requestor", ",", "int", "apiLevel", ",", "Map", "options", ",", "IJavaProject", "javaProject", ",", "WorkingCopyOwner", "owner", ",", "int", "flags", ",", "IProgressMonitor", "monitor", ")", "{", "CancelableNameEnvironment", "environment", "=", "null", ";", "CancelableProblemFactory", "problemFactory", "=", "null", ";", "try", "{", "if", "(", "monitor", "!=", "null", ")", "{", "int", "amountOfWork", "=", "(", "compilationUnits", ".", "length", "+", "bindingKeys", ".", "length", ")", "*", "2", ";", "monitor", ".", "beginTask", "(", "\"\"", ",", "amountOfWork", ")", ";", "}", "environment", "=", "new", "CancelableNameEnvironment", "(", "(", "(", "JavaProject", ")", "javaProject", ")", ",", "owner", ",", "monitor", ")", ";", "problemFactory", "=", "new", "CancelableProblemFactory", "(", "monitor", ")", ";", "CompilerOptions", "compilerOptions", "=", "getCompilerOptions", "(", "options", ",", "(", "flags", "&", "ICompilationUnit", ".", "ENABLE_STATEMENTS_RECOVERY", ")", "!=", "0", ")", ";", "compilerOptions", ".", "ignoreMethodBodies", "=", "(", "flags", "&", "ICompilationUnit", ".", "IGNORE_METHOD_BODIES", ")", "!=", "0", ";", "CompilerUtils", ".", "configureOptionsBasedOnNature", "(", "compilerOptions", ",", "javaProject", ")", ";", "CompilationUnitResolver", "resolver", "=", "new", "CompilationUnitResolver", "(", "environment", ",", "getHandlingPolicy", "(", ")", ",", "compilerOptions", ",", "getRequestor", "(", ")", ",", "problemFactory", ",", "monitor", ",", "javaProject", "!=", "null", ")", ";", "resolver", ".", "resolve", "(", "compilationUnits", ",", "bindingKeys", ",", "requestor", ",", "apiLevel", ",", "options", ",", "owner", ",", "flags", ")", ";", "if", "(", "NameLookup", ".", "VERBOSE", ")", "{", "System", ".", "out", ".", "println", "(", "Thread", ".", "currentThread", "(", ")", "+", "\"\"", "+", "environment", ".", "nameLookup", ".", "timeSpentInSeekTypesInSourcePackage", "+", "\"ms\"", ")", ";", "System", ".", "out", ".", "println", "(", "Thread", ".", "currentThread", "(", ")", "+", "\"\"", "+", "environment", ".", "nameLookup", ".", "timeSpentInSeekTypesInBinaryPackage", "+", "\"ms\"", ")", ";", "}", "}", "catch", "(", "JavaModelException", "e", ")", "{", "parse", "(", "compilationUnits", ",", "requestor", ",", "apiLevel", ",", "options", ",", "flags", ",", "monitor", ")", ";", "}", "finally", "{", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "done", "(", ")", ";", "if", "(", "environment", "!=", "null", ")", "{", "environment", ".", "setMonitor", "(", "null", ")", ";", "}", "if", "(", "problemFactory", "!=", "null", ")", "{", "problemFactory", ".", "monitor", "=", "null", ";", "}", "}", "}", "public", "static", "void", "resolve", "(", "String", "[", "]", "sourceUnits", ",", "String", "[", "]", "encodings", ",", "String", "[", "]", "bindingKeys", ",", "FileASTRequestor", "requestor", ",", "int", "apiLevel", ",", "Map", "options", ",", "List", "classpaths", ",", "int", "flags", ",", "IProgressMonitor", "monitor", ")", "{", "INameEnvironmentWithProgress", "environment", "=", "null", ";", "CancelableProblemFactory", "problemFactory", "=", "null", ";", "try", "{", "if", "(", "monitor", "!=", "null", ")", "{", "int", "amountOfWork", "=", "(", "sourceUnits", ".", "length", "+", "bindingKeys", ".", "length", ")", "*", "2", ";", "monitor", ".", "beginTask", "(", "\"\"", ",", "amountOfWork", ")", ";", "}", "Classpath", "[", "]", "allEntries", "=", "new", "Classpath", "[", "classpaths", ".", "size", "(", ")", "]", ";", "classpaths", ".", "toArray", "(", "allEntries", ")", ";", "environment", "=", "new", "NameEnvironmentWithProgress", "(", "allEntries", ",", "null", ",", "monitor", ")", ";", "problemFactory", "=", "new", "CancelableProblemFactory", "(", "monitor", ")", ";", "CompilerOptions", "compilerOptions", "=", "getCompilerOptions", "(", "options", ",", "(", "flags", "&", "ICompilationUnit", ".", "ENABLE_STATEMENTS_RECOVERY", ")", "!=", "0", ")", ";", "compilerOptions", ".", "ignoreMethodBodies", "=", "(", "flags", "&", "ICompilationUnit", ".", "IGNORE_METHOD_BODIES", ")", "!=", "0", ";", "CompilationUnitResolver", "resolver", "=", "new", "CompilationUnitResolver", "(", "environment", ",", "getHandlingPolicy", "(", ")", ",", "compilerOptions", ",", "getRequestor", "(", ")", ",", "problemFactory", ",", "monitor", ",", "false", ")", ";", "resolver", ".", "resolve", "(", "sourceUnits", ",", "encodings", ",", "bindingKeys", ",", "requestor", ",", "apiLevel", ",", "options", ",", "flags", ")", ";", "if", "(", "NameLookup", ".", "VERBOSE", "&&", "(", "environment", "instanceof", "CancelableNameEnvironment", ")", ")", "{", "CancelableNameEnvironment", "cancelableNameEnvironment", "=", "(", "CancelableNameEnvironment", ")", "environment", ";", "System", ".", "out", ".", "println", "(", "Thread", ".", "currentThread", "(", ")", "+", "\"\"", "+", "cancelableNameEnvironment", ".", "nameLookup", ".", "timeSpentInSeekTypesInSourcePackage", "+", "\"ms\"", ")", ";", "System", ".", "out", ".", "println", "(", "Thread", ".", "currentThread", "(", ")", "+", "\"\"", "+", "cancelableNameEnvironment", ".", "nameLookup", ".", "timeSpentInSeekTypesInBinaryPackage", "+", "\"ms\"", ")", ";", "}", "}", "finally", "{", "if", "(", "monitor", "!=", "null", ")", "monitor", ".", "done", "(", ")", ";", "if", "(", "environment", "!=", "null", ")", "{", "environment", ".", "setMonitor", "(", "null", ")", ";", "}", "if", "(", "problemFactory", "!=", "null", ")", "{", "problemFactory", ".", "monitor", "=", "null", ";", "}", "}", "}", "public", "static", "CompilationUnitDeclaration", "resolve", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", ",", "IJavaProject", "javaProject", ",", "List", "classpaths", ",", "NodeSearcher", "nodeSearcher", ",", "Map", "options", ",", "WorkingCopyOwner", "owner", ",", "int", "flags", ",", "IProgressMonitor", "monitor", ")", "throws", "JavaModelException", "{", "CompilationUnitDeclaration", "unit", "=", "null", ";", "INameEnvironmentWithProgress", "environment", "=", "null", ";", "CancelableProblemFactory", "problemFactory", "=", "null", ";", "CompilationUnitResolver", "resolver", "=", "null", ";", "try", "{", "if", "(", "javaProject", "==", "null", ")", "{", "Classpath", "[", "]", "allEntries", "=", "new", "Classpath", "[", "classpaths", ".", "size", "(", ")", "]", ";", "classpaths", ".", "toArray", "(", "allEntries", ")", ";", "environment", "=", "new", "NameEnvironmentWithProgress", "(", "allEntries", ",", "null", ",", "monitor", ")", ";", "}", "else", "{", "environment", "=", "new", "CancelableNameEnvironment", "(", "(", "JavaProject", ")", "javaProject", ",", "owner", ",", "monitor", ")", ";", "}", "problemFactory", "=", "new", "CancelableProblemFactory", "(", "monitor", ")", ";", "CompilerOptions", "compilerOptions", "=", "getCompilerOptions", "(", "options", ",", "(", "flags", "&", "ICompilationUnit", ".", "ENABLE_STATEMENTS_RECOVERY", ")", "!=", "0", ")", ";", "boolean", "ignoreMethodBodies", "=", "(", "flags", "&", "ICompilationUnit", ".", "IGNORE_METHOD_BODIES", ")", "!=", "0", ";", "compilerOptions", ".", "ignoreMethodBodies", "=", "ignoreMethodBodies", ";", "CompilerUtils", ".", "configureOptionsBasedOnNature", "(", "compilerOptions", ",", "javaProject", ")", ";", "resolver", "=", "new", "CompilationUnitResolver", "(", "environment", ",", "getHandlingPolicy", "(", ")", ",", "compilerOptions", ",", "getRequestor", "(", ")", ",", "problemFactory", ",", "monitor", ",", "javaProject", "!=", "null", ")", ";", "boolean", "analyzeAndGenerateCode", "=", "!", "ignoreMethodBodies", ";", "unit", "=", "resolver", ".", "resolve", "(", "null", ",", "sourceUnit", ",", "nodeSearcher", ",", "true", ",", "analyzeAndGenerateCode", ",", "analyzeAndGenerateCode", ")", ";", "if", "(", "resolver", ".", "hasCompilationAborted", ")", "{", "CompilationUnitDeclaration", "unitDeclaration", "=", "parse", "(", "sourceUnit", ",", "nodeSearcher", ",", "options", ",", "flags", ")", ";", "final", "int", "problemCount", "=", "unit", ".", "compilationResult", ".", "problemCount", ";", "if", "(", "problemCount", "!=", "0", ")", "{", "unitDeclaration", ".", "compilationResult", ".", "problems", "=", "new", "CategorizedProblem", "[", "problemCount", "]", ";", "System", ".", "arraycopy", "(", "unit", ".", "compilationResult", ".", "problems", ",", "0", ",", "unitDeclaration", ".", "compilationResult", ".", "problems", ",", "0", ",", "problemCount", ")", ";", "unitDeclaration", ".", "compilationResult", ".", "problemCount", "=", "problemCount", ";", "}", "return", "unitDeclaration", ";", "}", "if", "(", "NameLookup", ".", "VERBOSE", "&&", "environment", "instanceof", "CancelableNameEnvironment", ")", "{", "CancelableNameEnvironment", "cancelableNameEnvironment", "=", "(", "CancelableNameEnvironment", ")", "environment", ";", "System", ".", "out", ".", "println", "(", "Thread", ".", "currentThread", "(", ")", "+", "\"\"", "+", "cancelableNameEnvironment", ".", "nameLookup", ".", "timeSpentInSeekTypesInSourcePackage", "+", "\"ms\"", ")", ";", "System", ".", "out", ".", "println", "(", "Thread", ".", "currentThread", "(", ")", "+", "\"\"", "+", "cancelableNameEnvironment", ".", "nameLookup", ".", "timeSpentInSeekTypesInBinaryPackage", "+", "\"ms\"", ")", ";", "}", "return", "unit", ";", "}", "finally", "{", "if", "(", "environment", "!=", "null", ")", "{", "environment", ".", "setMonitor", "(", "null", ")", ";", "}", "if", "(", "problemFactory", "!=", "null", ")", "{", "problemFactory", ".", "monitor", "=", "null", ";", "}", "}", "}", "public", "static", "IBinding", "[", "]", "resolve", "(", "final", "IJavaElement", "[", "]", "elements", ",", "int", "apiLevel", ",", "Map", "compilerOptions", ",", "IJavaProject", "javaProject", ",", "WorkingCopyOwner", "owner", ",", "int", "flags", ",", "IProgressMonitor", "monitor", ")", "{", "final", "int", "length", "=", "elements", ".", "length", ";", "final", "HashMap", "sourceElementPositions", "=", "new", "HashMap", "(", ")", ";", "int", "cuNumber", "=", "0", ";", "final", "HashtableOfObjectToInt", "binaryElementPositions", "=", "new", "HashtableOfObjectToInt", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "IJavaElement", "element", "=", "elements", "[", "i", "]", ";", "if", "(", "!", "(", "element", "instanceof", "SourceRefElement", ")", ")", "throw", "new", "IllegalStateException", "(", "element", "+", "\"\"", ")", ";", "Object", "cu", "=", "element", ".", "getAncestor", "(", "IJavaElement", ".", "COMPILATION_UNIT", ")", ";", "if", "(", "cu", "!=", "null", ")", "{", "IntArrayList", "intList", "=", "(", "IntArrayList", ")", "sourceElementPositions", ".", "get", "(", "cu", ")", ";", "if", "(", "intList", "==", "null", ")", "{", "sourceElementPositions", ".", "put", "(", "cu", ",", "intList", "=", "new", "IntArrayList", "(", ")", ")", ";", "cuNumber", "++", ";", "}", "intList", ".", "add", "(", "i", ")", ";", "}", "else", "{", "try", "{", "String", "key", "=", "(", "(", "BinaryMember", ")", "element", ")", ".", "getKey", "(", "true", ")", ";", "binaryElementPositions", ".", "put", "(", "key", ",", "i", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", "element", "+", "\"\"", ")", ";", "}", "}", "}", "ICompilationUnit", "[", "]", "cus", "=", "new", "ICompilationUnit", "[", "cuNumber", "]", ";", "sourceElementPositions", ".", "keySet", "(", ")", ".", "toArray", "(", "cus", ")", ";", "int", "bindingKeyNumber", "=", "binaryElementPositions", ".", "size", "(", ")", ";", "String", "[", "]", "bindingKeys", "=", "new", "String", "[", "bindingKeyNumber", "]", ";", "binaryElementPositions", ".", "keysToArray", "(", "bindingKeys", ")", ";", "class", "Requestor", "extends", "ASTRequestor", "{", "IBinding", "[", "]", "bindings", "=", "new", "IBinding", "[", "length", "]", ";", "public", "void", "acceptAST", "(", "ICompilationUnit", "source", ",", "CompilationUnit", "ast", ")", "{", "IntArrayList", "intList", "=", "(", "IntArrayList", ")", "sourceElementPositions", ".", "get", "(", "source", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "intList", ".", "length", ";", "i", "++", ")", "{", "final", "int", "index", "=", "intList", ".", "list", "[", "i", "]", ";", "SourceRefElement", "element", "=", "(", "SourceRefElement", ")", "elements", "[", "index", "]", ";", "DOMFinder", "finder", "=", "new", "DOMFinder", "(", "ast", ",", "element", ",", "true", ")", ";", "try", "{", "finder", ".", "search", "(", ")", ";", "}", "catch", "(", "JavaModelException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", "element", "+", "\"\"", ")", ";", "}", "this", ".", "bindings", "[", "index", "]", "=", "finder", ".", "foundBinding", ";", "}", "}", "public", "void", "acceptBinding", "(", "String", "bindingKey", ",", "IBinding", "binding", ")", "{", "int", "index", "=", "binaryElementPositions", ".", "get", "(", "bindingKey", ")", ";", "this", ".", "bindings", "[", "index", "]", "=", "binding", ";", "}", "}", "Requestor", "requestor", "=", "new", "Requestor", "(", ")", ";", "resolve", "(", "cus", ",", "bindingKeys", ",", "requestor", ",", "apiLevel", ",", "compilerOptions", ",", "javaProject", ",", "owner", ",", "flags", ",", "monitor", ")", ";", "return", "requestor", ".", "bindings", ";", "}", "public", "void", "removeUnresolvedBindings", "(", "CompilationUnitDeclaration", "compilationUnitDeclaration", ")", "{", "final", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "[", "]", "types", "=", "compilationUnitDeclaration", ".", "types", ";", "if", "(", "types", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ",", "max", "=", "types", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "removeUnresolvedBindings", "(", "types", "[", "i", "]", ")", ";", "}", "}", "}", "private", "void", "removeUnresolvedBindings", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "type", ")", "{", "final", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "[", "]", "memberTypes", "=", "type", ".", "memberTypes", ";", "if", "(", "memberTypes", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ",", "max", "=", "memberTypes", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "removeUnresolvedBindings", "(", "memberTypes", "[", "i", "]", ")", ";", "}", "}", "if", "(", "type", ".", "binding", "!=", "null", "&&", "(", "type", ".", "binding", ".", "modifiers", "&", "ExtraCompilerModifiers", ".", "AccUnresolved", ")", "!=", "0", ")", "{", "type", ".", "binding", "=", "null", ";", "}", "final", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "FieldDeclaration", "[", "]", "fields", "=", "type", ".", "fields", ";", "if", "(", "fields", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ",", "max", "=", "fields", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "if", "(", "fields", "[", "i", "]", ".", "binding", "!=", "null", "&&", "(", "fields", "[", "i", "]", ".", "binding", ".", "modifiers", "&", "ExtraCompilerModifiers", ".", "AccUnresolved", ")", "!=", "0", ")", "{", "fields", "[", "i", "]", ".", "binding", "=", "null", ";", "}", "}", "}", "final", "AbstractMethodDeclaration", "[", "]", "methods", "=", "type", ".", "methods", ";", "if", "(", "methods", "!=", "null", ")", "{", "for", "(", "int", "i", "=", "0", ",", "max", "=", "methods", ".", "length", ";", "i", "<", "max", ";", "i", "++", ")", "{", "if", "(", "methods", "[", "i", "]", ".", "binding", "!=", "null", "&&", "(", "methods", "[", "i", "]", ".", "binding", ".", "modifiers", "&", "ExtraCompilerModifiers", ".", "AccUnresolved", ")", "!=", "0", ")", "{", "methods", "[", "i", "]", ".", "binding", "=", "null", ";", "}", "}", "}", "}", "private", "void", "resolve", "(", "ICompilationUnit", "[", "]", "compilationUnits", ",", "String", "[", "]", "bindingKeys", ",", "ASTRequestor", "astRequestor", ",", "int", "apiLevel", ",", "Map", "compilerOptions", ",", "WorkingCopyOwner", "owner", ",", "int", "flags", ")", "{", "astRequestor", ".", "compilationUnitResolver", "=", "this", ";", "this", ".", "bindingTables", "=", "new", "DefaultBindingResolver", ".", "BindingTables", "(", ")", ";", "CompilationUnitDeclaration", "unit", "=", "null", ";", "try", "{", "int", "length", "=", "compilationUnits", ".", "length", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "[", "]", "sourceUnits", "=", "new", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "[", "length", "]", ";", "System", ".", "arraycopy", "(", "compilationUnits", ",", "0", ",", "sourceUnits", ",", "0", ",", "length", ")", ";", "beginToCompile", "(", "sourceUnits", ",", "bindingKeys", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "totalUnits", ";", "i", "++", ")", "{", "if", "(", "resolvedRequestedSourcesAndKeys", "(", "i", ")", ")", "{", "for", "(", ";", "i", "<", "this", ".", "totalUnits", ";", "i", "++", ")", "{", "this", ".", "unitsToProcess", "[", "i", "]", ".", "cleanUp", "(", ")", ";", "this", ".", "unitsToProcess", "[", "i", "]", "=", "null", ";", "}", "break", ";", "}", "unit", "=", "this", ".", "unitsToProcess", "[", "i", "]", ";", "try", "{", "super", ".", "process", "(", "unit", ",", "i", ")", ";", "char", "[", "]", "fileName", "=", "unit", ".", "compilationResult", ".", "getFileName", "(", ")", ";", "ICompilationUnit", "source", "=", "(", "ICompilationUnit", ")", "this", ".", "requestedSources", ".", "get", "(", "fileName", ")", ";", "if", "(", "source", "!=", "null", ")", "{", "CompilationResult", "compilationResult", "=", "unit", ".", "compilationResult", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", "=", "compilationResult", ".", "compilationUnit", ";", "char", "[", "]", "contents", "=", "sourceUnit", ".", "getContents", "(", ")", ";", "AST", "ast", "=", "AST", ".", "newAST", "(", "apiLevel", ")", ";", "ast", ".", "setFlag", "(", "flags", "|", "AST", ".", "RESOLVED_BINDINGS", ")", ";", "ast", ".", "setDefaultNodeFlag", "(", "ASTNode", ".", "ORIGINAL", ")", ";", "ASTConverter", "converter", "=", "new", "ASTConverter", "(", "compilerOptions", ",", "true", ",", "this", ".", "monitor", ")", ";", "BindingResolver", "resolver", "=", "new", "DefaultBindingResolver", "(", "unit", ".", "scope", ",", "owner", ",", "this", ".", "bindingTables", ",", "(", "flags", "&", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ")", "!=", "0", ",", "this", ".", "fromJavaProject", ")", ";", "ast", ".", "setBindingResolver", "(", "resolver", ")", ";", "converter", ".", "setAST", "(", "ast", ")", ";", "CompilationUnit", "compilationUnit", "=", "converter", ".", "convert", "(", "unit", ",", "contents", ")", ";", "compilationUnit", ".", "setTypeRoot", "(", "source", ")", ";", "compilationUnit", ".", "setLineEndTable", "(", "compilationResult", ".", "getLineSeparatorPositions", "(", ")", ")", ";", "ast", ".", "setDefaultNodeFlag", "(", "0", ")", ";", "ast", ".", "setOriginalModificationCount", "(", "ast", ".", "modificationCount", "(", ")", ")", ";", "astRequestor", ".", "acceptAST", "(", "source", ",", "compilationUnit", ")", ";", "worked", "(", "1", ")", ";", "this", ".", "requestedSources", ".", "put", "(", "fileName", ",", "null", ")", ";", "}", "Object", "key", "=", "this", ".", "requestedKeys", ".", "get", "(", "fileName", ")", ";", "if", "(", "key", "!=", "null", ")", "{", "if", "(", "key", "instanceof", "BindingKeyResolver", ")", "{", "reportBinding", "(", "key", ",", "astRequestor", ",", "owner", ",", "unit", ")", ";", "worked", "(", "1", ")", ";", "}", "else", "if", "(", "key", "instanceof", "ArrayList", ")", "{", "Iterator", "iterator", "=", "(", "(", "ArrayList", ")", "key", ")", ".", "iterator", "(", ")", ";", "while", "(", "iterator", ".", "hasNext", "(", ")", ")", "{", "reportBinding", "(", "iterator", ".", "next", "(", ")", ",", "astRequestor", ",", "owner", ",", "unit", ")", ";", "worked", "(", "1", ")", ";", "}", "}", "this", ".", "requestedKeys", ".", "put", "(", "fileName", ",", "null", ")", ";", "}", "}", "finally", "{", "unit", ".", "cleanUp", "(", ")", ";", "}", "this", ".", "unitsToProcess", "[", "i", "]", "=", "null", ";", "this", ".", "requestor", ".", "acceptResult", "(", "unit", ".", "compilationResult", ".", "tagAsAccepted", "(", ")", ")", ";", "}", "DefaultBindingResolver", "resolver", "=", "new", "DefaultBindingResolver", "(", "this", ".", "lookupEnvironment", ",", "owner", ",", "this", ".", "bindingTables", ",", "(", "flags", "&", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ")", "!=", "0", ",", "true", ")", ";", "Object", "[", "]", "keys", "=", "this", ".", "requestedKeys", ".", "valueTable", ";", "for", "(", "int", "j", "=", "0", ",", "keysLength", "=", "keys", ".", "length", ";", "j", "<", "keysLength", ";", "j", "++", ")", "{", "BindingKeyResolver", "keyResolver", "=", "(", "BindingKeyResolver", ")", "keys", "[", "j", "]", ";", "if", "(", "keyResolver", "==", "null", ")", "continue", ";", "Binding", "compilerBinding", "=", "keyResolver", ".", "getCompilerBinding", "(", ")", ";", "IBinding", "binding", "=", "compilerBinding", "==", "null", "?", "null", ":", "resolver", ".", "getBinding", "(", "compilerBinding", ")", ";", "astRequestor", ".", "acceptBinding", "(", "(", "(", "BindingKeyResolver", ")", "this", ".", "requestedKeys", ".", "valueTable", "[", "j", "]", ")", ".", "getKey", "(", ")", ",", "binding", ")", ";", "worked", "(", "1", ")", ";", "}", "}", "catch", "(", "OperationCanceledException", "e", ")", "{", "throw", "e", ";", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "this", ".", "handleInternalException", "(", "e", ",", "unit", ")", ";", "}", "catch", "(", "Error", "e", ")", "{", "this", ".", "handleInternalException", "(", "e", ",", "unit", ",", "null", ")", ";", "throw", "e", ";", "}", "catch", "(", "RuntimeException", "e", ")", "{", "this", ".", "handleInternalException", "(", "e", ",", "unit", ",", "null", ")", ";", "throw", "e", ";", "}", "finally", "{", "astRequestor", ".", "compilationUnitResolver", "=", "null", ";", "}", "}", "private", "void", "resolve", "(", "String", "[", "]", "sourceCompilationUnits", ",", "String", "[", "]", "encodings", ",", "String", "[", "]", "bindingKeys", ",", "FileASTRequestor", "astRequestor", ",", "int", "apiLevel", ",", "Map", "compilerOptions", ",", "int", "flags", ")", "{", "astRequestor", ".", "compilationUnitResolver", "=", "this", ";", "this", ".", "bindingTables", "=", "new", "DefaultBindingResolver", ".", "BindingTables", "(", ")", ";", "CompilationUnitDeclaration", "unit", "=", "null", ";", "try", "{", "int", "length", "=", "sourceCompilationUnits", ".", "length", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "[", "]", "sourceUnits", "=", "new", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "[", "length", "]", ";", "int", "count", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "char", "[", "]", "contents", "=", "null", ";", "String", "encoding", "=", "encodings", "!=", "null", "?", "encodings", "[", "i", "]", ":", "null", ";", "String", "sourceUnitPath", "=", "sourceCompilationUnits", "[", "i", "]", ";", "try", "{", "contents", "=", "Util", ".", "getFileCharContent", "(", "new", "File", "(", "sourceUnitPath", ")", ",", "encoding", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "continue", ";", "}", "if", "(", "contents", "==", "null", ")", "{", "continue", ";", "}", "sourceUnits", "[", "count", "++", "]", "=", "new", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "batch", ".", "CompilationUnit", "(", "contents", ",", "sourceUnitPath", ",", "encoding", ")", ";", "}", "beginToCompile", "(", "sourceUnits", ",", "bindingKeys", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "this", ".", "totalUnits", ";", "i", "++", ")", "{", "if", "(", "resolvedRequestedSourcesAndKeys", "(", "i", ")", ")", "{", "for", "(", ";", "i", "<", "this", ".", "totalUnits", ";", "i", "++", ")", "{", "this", ".", "unitsToProcess", "[", "i", "]", ".", "cleanUp", "(", ")", ";", "this", ".", "unitsToProcess", "[", "i", "]", "=", "null", ";", "}", "break", ";", "}", "unit", "=", "this", ".", "unitsToProcess", "[", "i", "]", ";", "try", "{", "super", ".", "process", "(", "unit", ",", "i", ")", ";", "char", "[", "]", "fileName", "=", "unit", ".", "compilationResult", ".", "getFileName", "(", ")", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "source", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", ")", "this", ".", "requestedSources", ".", "get", "(", "fileName", ")", ";", "if", "(", "source", "!=", "null", ")", "{", "CompilationResult", "compilationResult", "=", "unit", ".", "compilationResult", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", "=", "compilationResult", ".", "compilationUnit", ";", "char", "[", "]", "contents", "=", "sourceUnit", ".", "getContents", "(", ")", ";", "AST", "ast", "=", "AST", ".", "newAST", "(", "apiLevel", ")", ";", "ast", ".", "setFlag", "(", "flags", "|", "AST", ".", "RESOLVED_BINDINGS", ")", ";", "ast", ".", "setDefaultNodeFlag", "(", "ASTNode", ".", "ORIGINAL", ")", ";", "ASTConverter", "converter", "=", "new", "ASTConverter", "(", "compilerOptions", ",", "true", ",", "this", ".", "monitor", ")", ";", "BindingResolver", "resolver", "=", "new", "DefaultBindingResolver", "(", "unit", ".", "scope", ",", "null", ",", "this", ".", "bindingTables", ",", "(", "flags", "&", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ")", "!=", "0", ",", "this", ".", "fromJavaProject", ")", ";", "ast", ".", "setBindingResolver", "(", "resolver", ")", ";", "converter", ".", "setAST", "(", "ast", ")", ";", "CompilationUnit", "compilationUnit", "=", "converter", ".", "convert", "(", "unit", ",", "contents", ")", ";", "compilationUnit", ".", "setTypeRoot", "(", "null", ")", ";", "compilationUnit", ".", "setLineEndTable", "(", "compilationResult", ".", "getLineSeparatorPositions", "(", ")", ")", ";", "ast", ".", "setDefaultNodeFlag", "(", "0", ")", ";", "ast", ".", "setOriginalModificationCount", "(", "ast", ".", "modificationCount", "(", ")", ")", ";", "astRequestor", ".", "acceptAST", "(", "new", "String", "(", "source", ".", "getFileName", "(", ")", ")", ",", "compilationUnit", ")", ";", "worked", "(", "1", ")", ";", "this", ".", "requestedSources", ".", "put", "(", "fileName", ",", "null", ")", ";", "}", "Object", "key", "=", "this", ".", "requestedKeys", ".", "get", "(", "fileName", ")", ";", "if", "(", "key", "!=", "null", ")", "{", "if", "(", "key", "instanceof", "BindingKeyResolver", ")", "{", "reportBinding", "(", "key", ",", "astRequestor", ",", "unit", ")", ";", "worked", "(", "1", ")", ";", "}", "else", "if", "(", "key", "instanceof", "ArrayList", ")", "{", "Iterator", "iterator", "=", "(", "(", "ArrayList", ")", "key", ")", ".", "iterator", "(", ")", ";", "while", "(", "iterator", ".", "hasNext", "(", ")", ")", "{", "reportBinding", "(", "iterator", ".", "next", "(", ")", ",", "astRequestor", ",", "unit", ")", ";", "worked", "(", "1", ")", ";", "}", "}", "this", ".", "requestedKeys", ".", "put", "(", "fileName", ",", "null", ")", ";", "}", "}", "finally", "{", "unit", ".", "cleanUp", "(", ")", ";", "}", "this", ".", "unitsToProcess", "[", "i", "]", "=", "null", ";", "this", ".", "requestor", ".", "acceptResult", "(", "unit", ".", "compilationResult", ".", "tagAsAccepted", "(", ")", ")", ";", "}", "DefaultBindingResolver", "resolver", "=", "new", "DefaultBindingResolver", "(", "this", ".", "lookupEnvironment", ",", "null", ",", "this", ".", "bindingTables", ",", "(", "flags", "&", "ICompilationUnit", ".", "ENABLE_BINDINGS_RECOVERY", ")", "!=", "0", ",", "true", ")", ";", "Object", "[", "]", "keys", "=", "this", ".", "requestedKeys", ".", "valueTable", ";", "for", "(", "int", "j", "=", "0", ",", "keysLength", "=", "keys", ".", "length", ";", "j", "<", "keysLength", ";", "j", "++", ")", "{", "BindingKeyResolver", "keyResolver", "=", "(", "BindingKeyResolver", ")", "keys", "[", "j", "]", ";", "if", "(", "keyResolver", "==", "null", ")", "continue", ";", "Binding", "compilerBinding", "=", "keyResolver", ".", "getCompilerBinding", "(", ")", ";", "IBinding", "binding", "=", "compilerBinding", "==", "null", "?", "null", ":", "resolver", ".", "getBinding", "(", "compilerBinding", ")", ";", "astRequestor", ".", "acceptBinding", "(", "(", "(", "BindingKeyResolver", ")", "this", ".", "requestedKeys", ".", "valueTable", "[", "j", "]", ")", ".", "getKey", "(", ")", ",", "binding", ")", ";", "worked", "(", "1", ")", ";", "}", "}", "catch", "(", "OperationCanceledException", "e", ")", "{", "throw", "e", ";", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "this", ".", "handleInternalException", "(", "e", ",", "unit", ")", ";", "}", "catch", "(", "Error", "e", ")", "{", "this", ".", "handleInternalException", "(", "e", ",", "unit", ",", "null", ")", ";", "throw", "e", ";", "}", "catch", "(", "RuntimeException", "e", ")", "{", "this", ".", "handleInternalException", "(", "e", ",", "unit", ",", "null", ")", ";", "throw", "e", ";", "}", "finally", "{", "astRequestor", ".", "compilationUnitResolver", "=", "null", ";", "}", "}", "private", "void", "reportBinding", "(", "Object", "key", ",", "ASTRequestor", "astRequestor", ",", "WorkingCopyOwner", "owner", ",", "CompilationUnitDeclaration", "unit", ")", "{", "BindingKeyResolver", "keyResolver", "=", "(", "BindingKeyResolver", ")", "key", ";", "Binding", "compilerBinding", "=", "keyResolver", ".", "getCompilerBinding", "(", ")", ";", "if", "(", "compilerBinding", "!=", "null", ")", "{", "DefaultBindingResolver", "resolver", "=", "new", "DefaultBindingResolver", "(", "unit", ".", "scope", ",", "owner", ",", "this", ".", "bindingTables", ",", "false", ",", "this", ".", "fromJavaProject", ")", ";", "AnnotationBinding", "annotationBinding", "=", "keyResolver", ".", "getAnnotationBinding", "(", ")", ";", "IBinding", "binding", ";", "if", "(", "annotationBinding", "!=", "null", ")", "{", "binding", "=", "resolver", ".", "getAnnotationInstance", "(", "annotationBinding", ")", ";", "}", "else", "{", "binding", "=", "resolver", ".", "getBinding", "(", "compilerBinding", ")", ";", "}", "if", "(", "binding", "!=", "null", ")", "astRequestor", ".", "acceptBinding", "(", "keyResolver", ".", "getKey", "(", ")", ",", "binding", ")", ";", "}", "}", "private", "void", "reportBinding", "(", "Object", "key", ",", "FileASTRequestor", "astRequestor", ",", "CompilationUnitDeclaration", "unit", ")", "{", "BindingKeyResolver", "keyResolver", "=", "(", "BindingKeyResolver", ")", "key", ";", "Binding", "compilerBinding", "=", "keyResolver", ".", "getCompilerBinding", "(", ")", ";", "if", "(", "compilerBinding", "!=", "null", ")", "{", "DefaultBindingResolver", "resolver", "=", "new", "DefaultBindingResolver", "(", "unit", ".", "scope", ",", "null", ",", "this", ".", "bindingTables", ",", "false", ",", "this", ".", "fromJavaProject", ")", ";", "AnnotationBinding", "annotationBinding", "=", "keyResolver", ".", "getAnnotationBinding", "(", ")", ";", "IBinding", "binding", ";", "if", "(", "annotationBinding", "!=", "null", ")", "{", "binding", "=", "resolver", ".", "getAnnotationInstance", "(", "annotationBinding", ")", ";", "}", "else", "{", "binding", "=", "resolver", ".", "getBinding", "(", "compilerBinding", ")", ";", "}", "if", "(", "binding", "!=", "null", ")", "astRequestor", ".", "acceptBinding", "(", "keyResolver", ".", "getKey", "(", ")", ",", "binding", ")", ";", "}", "}", "private", "CompilationUnitDeclaration", "resolve", "(", "CompilationUnitDeclaration", "unit", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", ",", "NodeSearcher", "nodeSearcher", ",", "boolean", "verifyMethods", ",", "boolean", "analyzeCode", ",", "boolean", "generateCode", ")", "{", "try", "{", "if", "(", "unit", "==", "null", ")", "{", "this", ".", "parseThreshold", "=", "0", ";", "beginToCompile", "(", "new", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "[", "]", "{", "sourceUnit", "}", ")", ";", "for", "(", "int", "i", "=", "0", ",", "max", "=", "this", ".", "totalUnits", ";", "i", "<", "max", ";", "i", "++", ")", "{", "CompilationUnitDeclaration", "currentCompilationUnitDeclaration", "=", "this", ".", "unitsToProcess", "[", "i", "]", ";", "if", "(", "currentCompilationUnitDeclaration", "!=", "null", "&&", "currentCompilationUnitDeclaration", ".", "compilationResult", ".", "compilationUnit", "==", "sourceUnit", ")", "{", "unit", "=", "currentCompilationUnitDeclaration", ";", "break", ";", "}", "}", "if", "(", "unit", "==", "null", ")", "{", "unit", "=", "this", ".", "unitsToProcess", "[", "0", "]", ";", "}", "}", "else", "{", "this", ".", "lookupEnvironment", ".", "buildTypeBindings", "(", "unit", ",", "null", ")", ";", "this", ".", "lookupEnvironment", ".", "completeTypeBindings", "(", ")", ";", "}", "if", "(", "nodeSearcher", "==", "null", ")", "{", "this", ".", "parser", ".", "getMethodBodies", "(", "unit", ")", ";", "}", "else", "{", "int", "searchPosition", "=", "nodeSearcher", ".", "position", ";", "char", "[", "]", "source", "=", "sourceUnit", ".", "getContents", "(", ")", ";", "int", "length", "=", "source", ".", "length", ";", "if", "(", "searchPosition", ">=", "0", "&&", "searchPosition", "<=", "length", ")", "{", "unit", ".", "traverse", "(", "nodeSearcher", ",", "unit", ".", "scope", ")", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "ASTNode", "node", "=", "nodeSearcher", ".", "found", ";", "if", "(", "node", "!=", "null", ")", "{", "int", "[", "]", "oldLineEnds", "=", "this", ".", "parser", ".", "scanner", ".", "lineEnds", ";", "int", "oldLinePtr", "=", "this", ".", "parser", ".", "scanner", ".", "linePtr", ";", "this", ".", "parser", ".", "scanner", ".", "setSource", "(", "source", ",", "unit", ".", "compilationResult", ")", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", "enclosingTypeDeclaration", "=", "nodeSearcher", ".", "enclosingType", ";", "if", "(", "node", "instanceof", "AbstractMethodDeclaration", ")", "{", "(", "(", "AbstractMethodDeclaration", ")", "node", ")", ".", "parseStatements", "(", "this", ".", "parser", ",", "unit", ")", ";", "}", "else", "if", "(", "enclosingTypeDeclaration", "!=", "null", ")", "{", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Initializer", ")", "{", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Initializer", ")", "node", ")", ".", "parseStatements", "(", "this", ".", "parser", ",", "enclosingTypeDeclaration", ",", "unit", ")", ";", "}", "else", "if", "(", "node", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "{", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ")", "node", ")", ".", "parseMethods", "(", "this", ".", "parser", ",", "unit", ")", ";", "}", "}", "this", ".", "parser", ".", "scanner", ".", "lineEnds", "=", "oldLineEnds", ";", "this", ".", "parser", ".", "scanner", ".", "linePtr", "=", "oldLinePtr", ";", "}", "}", "}", "if", "(", "unit", ".", "scope", "!=", "null", ")", "{", "unit", ".", "scope", ".", "faultInTypes", "(", ")", ";", "if", "(", "unit", ".", "scope", "!=", "null", "&&", "verifyMethods", ")", "{", "unit", ".", "scope", ".", "verifyMethods", "(", "this", ".", "lookupEnvironment", ".", "methodVerifier", "(", ")", ")", ";", "}", "unit", ".", "resolve", "(", ")", ";", "if", "(", "analyzeCode", ")", "unit", ".", "analyseCode", "(", ")", ";", "if", "(", "generateCode", ")", "unit", ".", "generateCode", "(", ")", ";", "unit", ".", "finalizeProblems", "(", ")", ";", "}", "if", "(", "this", ".", "unitsToProcess", "!=", "null", ")", "this", ".", "unitsToProcess", "[", "0", "]", "=", "null", ";", "this", ".", "requestor", ".", "acceptResult", "(", "unit", ".", "compilationResult", ".", "tagAsAccepted", "(", ")", ")", ";", "return", "unit", ";", "}", "catch", "(", "AbortCompilation", "e", ")", "{", "this", ".", "handleInternalException", "(", "e", ",", "unit", ")", ";", "return", "unit", "==", "null", "?", "this", ".", "unitsToProcess", "[", "0", "]", ":", "unit", ";", "}", "catch", "(", "Error", "e", ")", "{", "this", ".", "handleInternalException", "(", "e", ",", "unit", ",", "null", ")", ";", "throw", "e", ";", "}", "catch", "(", "RuntimeException", "e", ")", "{", "this", ".", "handleInternalException", "(", "e", ",", "unit", ",", "null", ")", ";", "throw", "e", ";", "}", "finally", "{", "}", "}", "public", "CompilationUnitDeclaration", "resolve", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", ",", "boolean", "verifyMethods", ",", "boolean", "analyzeCode", ",", "boolean", "generateCode", ")", "{", "return", "resolve", "(", "null", ",", "sourceUnit", ",", "null", ",", "verifyMethods", ",", "analyzeCode", ",", "generateCode", ")", ";", "}", "boolean", "resolvedRequestedSourcesAndKeys", "(", "int", "unitIndexToProcess", ")", "{", "if", "(", "unitIndexToProcess", "<", "this", ".", "requestedSources", ".", "size", "(", ")", "&&", "unitIndexToProcess", "<", "this", ".", "requestedKeys", ".", "size", "(", ")", ")", "return", "false", ";", "Object", "[", "]", "sources", "=", "this", ".", "requestedSources", ".", "valueTable", ";", "for", "(", "int", "i", "=", "0", ",", "l", "=", "sources", ".", "length", ";", "i", "<", "l", ";", "i", "++", ")", "if", "(", "sources", "[", "i", "]", "!=", "null", ")", "return", "false", ";", "Object", "[", "]", "keys", "=", "this", ".", "requestedKeys", ".", "valueTable", ";", "for", "(", "int", "i", "=", "0", ",", "l", "=", "keys", ".", "length", ";", "i", "<", "l", ";", "i", "++", ")", "if", "(", "keys", "[", "i", "]", "!=", "null", ")", "return", "false", ";", "return", "true", ";", "}", "public", "CompilationUnitDeclaration", "resolve", "(", "CompilationUnitDeclaration", "unit", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "env", ".", "ICompilationUnit", "sourceUnit", ",", "boolean", "verifyMethods", ",", "boolean", "analyzeCode", ",", "boolean", "generateCode", ")", "{", "return", "resolve", "(", "unit", ",", "sourceUnit", ",", "null", ",", "verifyMethods", ",", "analyzeCode", ",", "generateCode", ")", ";", "}", "private", "void", "worked", "(", "int", "work", ")", "{", "if", "(", "this", ".", "monitor", "!=", "null", ")", "{", "if", "(", "this", ".", "monitor", ".", "isCanceled", "(", ")", ")", "throw", "new", "OperationCanceledException", "(", ")", ";", "this", ".", "monitor", ".", "worked", "(", "work", ")", ";", "}", "}", "}", "</s>" ]
4,485
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "InvalidInputException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "Scanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "ScannerHelper", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "TerminalTokens", ";", "public", "class", "CharacterLiteral", "extends", "Expression", "{", "public", "static", "final", "SimplePropertyDescriptor", "ESCAPED_VALUE_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "CharacterLiteral", ".", "class", ",", "\"escapedValue\"", ",", "String", ".", "class", ",", "MANDATORY", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "CharacterLiteral", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "ESCAPED_VALUE_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "String", "escapedValue", "=", "\"'X'\"", ";", "CharacterLiteral", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "Object", "internalGetSetObjectProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "Object", "value", ")", "{", "if", "(", "property", "==", "ESCAPED_VALUE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getEscapedValue", "(", ")", ";", "}", "else", "{", "setEscapedValue", "(", "(", "String", ")", "value", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetObjectProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "CHARACTER_LITERAL", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "CharacterLiteral", "result", "=", "new", "CharacterLiteral", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setEscapedValue", "(", "getEscapedValue", "(", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "visitor", ".", "visit", "(", "this", ")", ";", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "String", "getEscapedValue", "(", ")", "{", "return", "this", ".", "escapedValue", ";", "}", "public", "void", "setEscapedValue", "(", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "Scanner", "scanner", "=", "this", ".", "ast", ".", "scanner", ";", "char", "[", "]", "source", "=", "value", ".", "toCharArray", "(", ")", ";", "scanner", ".", "setSource", "(", "source", ")", ";", "scanner", ".", "resetTo", "(", "0", ",", "source", ".", "length", ")", ";", "try", "{", "int", "tokenType", "=", "scanner", ".", "getNextToken", "(", ")", ";", "switch", "(", "tokenType", ")", "{", "case", "TerminalTokens", ".", "TokenNameCharacterLiteral", ":", "break", ";", "default", ":", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "preValueChange", "(", "ESCAPED_VALUE_PROPERTY", ")", ";", "this", ".", "escapedValue", "=", "value", ";", "postValueChange", "(", "ESCAPED_VALUE_PROPERTY", ")", ";", "}", "void", "internalSetEscapedValue", "(", "String", "value", ")", "{", "preValueChange", "(", "ESCAPED_VALUE_PROPERTY", ")", ";", "this", ".", "escapedValue", "=", "value", ";", "postValueChange", "(", "ESCAPED_VALUE_PROPERTY", ")", ";", "}", "public", "char", "charValue", "(", ")", "{", "Scanner", "scanner", "=", "this", ".", "ast", ".", "scanner", ";", "char", "[", "]", "source", "=", "this", ".", "escapedValue", ".", "toCharArray", "(", ")", ";", "scanner", ".", "setSource", "(", "source", ")", ";", "scanner", ".", "resetTo", "(", "0", ",", "source", ".", "length", ")", ";", "int", "firstChar", "=", "scanner", ".", "getNextChar", "(", ")", ";", "int", "secondChar", "=", "scanner", ".", "getNextChar", "(", ")", ";", "if", "(", "firstChar", "==", "-", "1", "||", "firstChar", "!=", "'\\''", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "char", "value", "=", "(", "char", ")", "secondChar", ";", "int", "nextChar", "=", "scanner", ".", "getNextChar", "(", ")", ";", "if", "(", "secondChar", "==", "'\\\\'", ")", "{", "if", "(", "nextChar", "==", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "switch", "(", "nextChar", ")", "{", "case", "'b'", ":", "value", "=", "'\\b'", ";", "break", ";", "case", "'t'", ":", "value", "=", "'\\t'", ";", "break", ";", "case", "'n'", ":", "value", "=", "'\\n'", ";", "break", ";", "case", "'f'", ":", "value", "=", "'\\f'", ";", "break", ";", "case", "'r'", ":", "value", "=", "'\\r'", ";", "break", ";", "case", "'\\\"'", ":", "value", "=", "'\\\"'", ";", "break", ";", "case", "'\\''", ":", "value", "=", "'\\''", ";", "break", ";", "case", "'\\\\'", ":", "value", "=", "'\\\\'", ";", "break", ";", "default", ":", "try", "{", "if", "(", "ScannerHelper", ".", "isDigit", "(", "(", "char", ")", "nextChar", ")", ")", "{", "int", "number", "=", "ScannerHelper", ".", "getNumericValue", "(", "(", "char", ")", "nextChar", ")", ";", "nextChar", "=", "scanner", ".", "getNextChar", "(", ")", ";", "if", "(", "nextChar", "==", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "if", "(", "nextChar", "!=", "'\\''", ")", "{", "if", "(", "!", "ScannerHelper", ".", "isDigit", "(", "(", "char", ")", "nextChar", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "number", "=", "(", "number", "*", "8", ")", "+", "ScannerHelper", ".", "getNumericValue", "(", "(", "char", ")", "nextChar", ")", ";", "nextChar", "=", "scanner", ".", "getNextChar", "(", ")", ";", "if", "(", "nextChar", "==", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "if", "(", "nextChar", "!=", "'\\''", ")", "{", "if", "(", "!", "ScannerHelper", ".", "isDigit", "(", "(", "char", ")", "nextChar", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "number", "=", "(", "number", "*", "8", ")", "+", "ScannerHelper", ".", "getNumericValue", "(", "(", "char", ")", "nextChar", ")", ";", "}", "}", "return", "(", "char", ")", "number", ";", "}", "else", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "}", "nextChar", "=", "scanner", ".", "getNextChar", "(", ")", ";", "if", "(", "nextChar", "==", "-", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "}", "if", "(", "nextChar", "==", "-", "1", "||", "nextChar", "!=", "'\\''", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"\"", ")", ";", "}", "return", "value", ";", "}", "public", "void", "setCharValue", "(", "char", "value", ")", "{", "StringBuffer", "b", "=", "new", "StringBuffer", "(", "3", ")", ";", "b", ".", "append", "(", "'\\''", ")", ";", "switch", "(", "value", ")", "{", "case", "'\\b'", ":", "b", ".", "append", "(", "\"\\\\b\"", ")", ";", "break", ";", "case", "'\\t'", ":", "b", ".", "append", "(", "\"\\\\t\"", ")", ";", "break", ";", "case", "'\\n'", ":", "b", ".", "append", "(", "\"\\\\n\"", ")", ";", "break", ";", "case", "'\\f'", ":", "b", ".", "append", "(", "\"\\\\f\"", ")", ";", "break", ";", "case", "'\\r'", ":", "b", ".", "append", "(", "\"\\\\r\"", ")", ";", "break", ";", "case", "'\\\"'", ":", "b", ".", "append", "(", "\"\\\\\\\"\"", ")", ";", "break", ";", "case", "'\\''", ":", "b", ".", "append", "(", "\"\\\\'\"", ")", ";", "break", ";", "case", "'\\\\'", ":", "b", ".", "append", "(", "\"\\\\\\\\\"", ")", ";", "break", ";", "case", "'\\0'", ":", "b", ".", "append", "(", "\"\\\\0\"", ")", ";", "break", ";", "case", "'\\1'", ":", "b", ".", "append", "(", "\"\\\\1\"", ")", ";", "break", ";", "case", "'\\2'", ":", "b", ".", "append", "(", "\"\\\\2\"", ")", ";", "break", ";", "case", "'\\3'", ":", "b", ".", "append", "(", "\"\\\\3\"", ")", ";", "break", ";", "case", "'\\4'", ":", "b", ".", "append", "(", "\"\\\\4\"", ")", ";", "break", ";", "case", "'\\5'", ":", "b", ".", "append", "(", "\"\\\\5\"", ")", ";", "break", ";", "case", "'\\6'", ":", "b", ".", "append", "(", "\"\\\\6\"", ")", ";", "break", ";", "case", "'\\7'", ":", "b", ".", "append", "(", "\"\\\\7\"", ")", ";", "break", ";", "default", ":", "b", ".", "append", "(", "value", ")", ";", "}", "b", ".", "append", "(", "'\\''", ")", ";", "setEscapedValue", "(", "b", ".", "toString", "(", ")", ")", ";", "}", "int", "memSize", "(", ")", "{", "int", "size", "=", "BASE_NODE_SIZE", "+", "1", "*", "4", "+", "stringSize", "(", "this", ".", "escapedValue", ")", ";", "return", "size", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", ";", "}", "}", "</s>" ]
4,486
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "SwitchCase", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "SwitchCase", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "OPTIONAL", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "SwitchCase", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Expression", "optionalExpression", "=", "null", ";", "private", "boolean", "expressionInitialized", "=", "false", ";", "SwitchCase", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "SWITCH_CASE", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "SwitchCase", "result", "=", "new", "SwitchCase", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getExpression", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "if", "(", "!", "this", ".", "expressionInitialized", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "!", "this", ".", "expressionInitialized", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "optionalExpression", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "this", ".", "expressionInitialized", "=", "true", ";", "postLazyInit", "(", "this", ".", "optionalExpression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "optionalExpression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalExpression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "optionalExpression", "=", "expression", ";", "this", ".", "expressionInitialized", "=", "true", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "public", "boolean", "isDefault", "(", ")", "{", "return", "getExpression", "(", ")", "==", "null", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "2", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalExpression", "==", "null", "?", "0", ":", "this", ".", "optionalExpression", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,487
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "HashSet", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "CharOperation", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "Binding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "CaptureBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ExtraCompilerModifiers", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ImportBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ParameterizedTypeBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "ReferenceBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeVariableBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "VariableBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "WildcardBinding", ";", "class", "BindingComparator", "{", "static", "boolean", "isEqual", "(", "TypeVariableBinding", "[", "]", "bindings", ",", "TypeVariableBinding", "[", "]", "otherBindings", ")", "{", "if", "(", "bindings", "==", "null", ")", "{", "return", "otherBindings", "==", "null", ";", "}", "if", "(", "otherBindings", "==", "null", ")", "{", "return", "false", ";", "}", "int", "length", "=", "bindings", ".", "length", ";", "int", "otherLength", "=", "otherBindings", ".", "length", ";", "if", "(", "length", "!=", "otherLength", ")", "{", "return", "false", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "TypeVariableBinding", "typeVariableBinding", "=", "bindings", "[", "i", "]", ";", "TypeVariableBinding", "typeVariableBinding2", "=", "otherBindings", "[", "i", "]", ";", "if", "(", "!", "isEqual", "(", "typeVariableBinding", ",", "typeVariableBinding2", ")", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "static", "boolean", "isEqual", "(", "Binding", "declaringElement", ",", "Binding", "declaringElement2", ",", "HashSet", "visitedTypes", ")", "{", "if", "(", "declaringElement", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "{", "if", "(", "!", "(", "declaringElement2", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", ")", "{", "return", "false", ";", "}", "return", "isEqual", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "declaringElement", ",", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", ")", "declaringElement2", ",", "visitedTypes", ")", ";", "}", "else", "if", "(", "declaringElement", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ")", "{", "if", "(", "!", "(", "declaringElement2", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ")", ")", "{", "return", "false", ";", "}", "return", "isEqual", "(", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ")", "declaringElement", ",", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", ")", "declaringElement2", ",", "visitedTypes", ")", ";", "}", "else", "if", "(", "declaringElement", "instanceof", "VariableBinding", ")", "{", "if", "(", "!", "(", "declaringElement2", "instanceof", "VariableBinding", ")", ")", "{", "return", "false", ";", "}", "return", "isEqual", "(", "(", "VariableBinding", ")", "declaringElement", ",", "(", "VariableBinding", ")", "declaringElement2", ")", ";", "}", "else", "if", "(", "declaringElement", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "{", "if", "(", "!", "(", "declaringElement2", "instanceof", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", ")", "{", "return", "false", ";", "}", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", "packageBinding", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "declaringElement", ";", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", "packageBinding2", "=", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "PackageBinding", ")", "declaringElement2", ";", "return", "CharOperation", ".", "equals", "(", "packageBinding", ".", "compoundName", ",", "packageBinding2", ".", "compoundName", ")", ";", "}", "else", "if", "(", "declaringElement", "instanceof", "ImportBinding", ")", "{", "if", "(", "!", "(", "declaringElement2", "instanceof", "ImportBinding", ")", ")", "{", "return", "false", ";", "}", "ImportBinding", "importBinding", "=", "(", "ImportBinding", ")", "declaringElement", ";", "ImportBinding", "importBinding2", "=", "(", "ImportBinding", ")", "declaringElement2", ";", "return", "importBinding", ".", "isStatic", "(", ")", "==", "importBinding2", ".", "isStatic", "(", ")", "&&", "importBinding", ".", "onDemand", "==", "importBinding2", ".", "onDemand", "&&", "CharOperation", ".", "equals", "(", "importBinding", ".", "compoundName", ",", "importBinding2", ".", "compoundName", ")", ";", "}", "return", "false", ";", "}", "static", "boolean", "isEqual", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", "methodBinding", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", "methodBinding2", ")", "{", "return", "isEqual", "(", "methodBinding", ",", "methodBinding2", ",", "new", "HashSet", "(", ")", ")", ";", "}", "static", "boolean", "isEqual", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", "methodBinding", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "MethodBinding", "methodBinding2", ",", "HashSet", "visitedTypes", ")", "{", "if", "(", "methodBinding", "==", "null", ")", "{", "return", "methodBinding2", "==", "null", ";", "}", "if", "(", "methodBinding2", "==", "null", ")", "return", "false", ";", "return", "CharOperation", ".", "equals", "(", "methodBinding", ".", "selector", ",", "methodBinding2", ".", "selector", ")", "&&", "isEqual", "(", "methodBinding", ".", "returnType", ",", "methodBinding2", ".", "returnType", ",", "visitedTypes", ")", "&&", "isEqual", "(", "methodBinding", ".", "thrownExceptions", ",", "methodBinding2", ".", "thrownExceptions", ",", "visitedTypes", ")", "&&", "isEqual", "(", "methodBinding", ".", "declaringClass", ",", "methodBinding2", ".", "declaringClass", ",", "visitedTypes", ")", "&&", "isEqual", "(", "methodBinding", ".", "typeVariables", ",", "methodBinding2", ".", "typeVariables", ",", "visitedTypes", ")", "&&", "isEqual", "(", "methodBinding", ".", "parameters", ",", "methodBinding2", ".", "parameters", ",", "visitedTypes", ")", ";", "}", "static", "boolean", "isEqual", "(", "VariableBinding", "variableBinding", ",", "VariableBinding", "variableBinding2", ")", "{", "return", "(", "variableBinding", ".", "modifiers", "&", "ExtraCompilerModifiers", ".", "AccJustFlag", ")", "==", "(", "variableBinding2", ".", "modifiers", "&", "ExtraCompilerModifiers", ".", "AccJustFlag", ")", "&&", "CharOperation", ".", "equals", "(", "variableBinding", ".", "name", ",", "variableBinding2", ".", "name", ")", "&&", "isEqual", "(", "variableBinding", ".", "type", ",", "variableBinding2", ".", "type", ")", "&&", "(", "variableBinding", ".", "id", "==", "variableBinding2", ".", "id", ")", ";", "}", "static", "boolean", "isEqual", "(", "FieldBinding", "fieldBinding", ",", "FieldBinding", "fieldBinding2", ")", "{", "HashSet", "visitedTypes", "=", "new", "HashSet", "(", ")", ";", "return", "(", "fieldBinding", ".", "modifiers", "&", "ExtraCompilerModifiers", ".", "AccJustFlag", ")", "==", "(", "fieldBinding2", ".", "modifiers", "&", "ExtraCompilerModifiers", ".", "AccJustFlag", ")", "&&", "CharOperation", ".", "equals", "(", "fieldBinding", ".", "name", ",", "fieldBinding2", ".", "name", ")", "&&", "isEqual", "(", "fieldBinding", ".", "type", ",", "fieldBinding2", ".", "type", ",", "visitedTypes", ")", "&&", "isEqual", "(", "fieldBinding", ".", "declaringClass", ",", "fieldBinding2", ".", "declaringClass", ",", "visitedTypes", ")", ";", "}", "static", "boolean", "isEqual", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "[", "]", "bindings", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "[", "]", "otherBindings", ")", "{", "return", "isEqual", "(", "bindings", ",", "otherBindings", ",", "new", "HashSet", "(", ")", ")", ";", "}", "static", "boolean", "isEqual", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "[", "]", "bindings", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "[", "]", "otherBindings", ",", "HashSet", "visitedTypes", ")", "{", "if", "(", "bindings", "==", "null", ")", "{", "return", "otherBindings", "==", "null", ";", "}", "if", "(", "otherBindings", "==", "null", ")", "{", "return", "false", ";", "}", "int", "length", "=", "bindings", ".", "length", ";", "int", "otherLength", "=", "otherBindings", ".", "length", ";", "if", "(", "length", "!=", "otherLength", ")", "{", "return", "false", ";", "}", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "if", "(", "!", "isEqual", "(", "bindings", "[", "i", "]", ",", "otherBindings", "[", "i", "]", ",", "visitedTypes", ")", ")", "{", "return", "false", ";", "}", "}", "return", "true", ";", "}", "static", "boolean", "isEqual", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "typeBinding", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "typeBinding2", ",", "HashSet", "visitedTypes", ")", "{", "if", "(", "typeBinding", "==", "typeBinding2", ")", "return", "true", ";", "if", "(", "typeBinding", "==", "null", "||", "typeBinding2", "==", "null", ")", "return", "false", ";", "switch", "(", "typeBinding", ".", "kind", "(", ")", ")", "{", "case", "Binding", ".", "BASE_TYPE", ":", "if", "(", "!", "typeBinding2", ".", "isBaseType", "(", ")", ")", "{", "return", "false", ";", "}", "return", "typeBinding", ".", "id", "==", "typeBinding2", ".", "id", ";", "case", "Binding", ".", "ARRAY_TYPE", ":", "if", "(", "!", "typeBinding2", ".", "isArrayType", "(", ")", ")", "{", "return", "false", ";", "}", "return", "typeBinding", ".", "dimensions", "(", ")", "==", "typeBinding2", ".", "dimensions", "(", ")", "&&", "isEqual", "(", "typeBinding", ".", "leafComponentType", "(", ")", ",", "typeBinding2", ".", "leafComponentType", "(", ")", ",", "visitedTypes", ")", ";", "case", "Binding", ".", "PARAMETERIZED_TYPE", ":", "if", "(", "!", "typeBinding2", ".", "isParameterizedType", "(", ")", ")", "{", "return", "false", ";", "}", "ParameterizedTypeBinding", "parameterizedTypeBinding", "=", "(", "ParameterizedTypeBinding", ")", "typeBinding", ";", "ParameterizedTypeBinding", "parameterizedTypeBinding2", "=", "(", "ParameterizedTypeBinding", ")", "typeBinding2", ";", "return", "CharOperation", ".", "equals", "(", "parameterizedTypeBinding", ".", "compoundName", ",", "parameterizedTypeBinding2", ".", "compoundName", ")", "&&", "(", "parameterizedTypeBinding", ".", "modifiers", "&", "(", "ExtraCompilerModifiers", ".", "AccJustFlag", "|", "ClassFileConstants", ".", "AccInterface", "|", "ClassFileConstants", ".", "AccEnum", "|", "ClassFileConstants", ".", "AccAnnotation", ")", ")", "==", "(", "parameterizedTypeBinding2", ".", "modifiers", "&", "(", "ExtraCompilerModifiers", ".", "AccJustFlag", "|", "ClassFileConstants", ".", "AccInterface", "|", "ClassFileConstants", ".", "AccEnum", "|", "ClassFileConstants", ".", "AccAnnotation", ")", ")", "&&", "isEqual", "(", "parameterizedTypeBinding", ".", "arguments", ",", "parameterizedTypeBinding2", ".", "arguments", ",", "visitedTypes", ")", "&&", "isEqual", "(", "parameterizedTypeBinding", ".", "enclosingType", "(", ")", ",", "parameterizedTypeBinding2", ".", "enclosingType", "(", ")", ",", "visitedTypes", ")", ";", "case", "Binding", ".", "WILDCARD_TYPE", ":", "if", "(", "typeBinding2", ".", "kind", "(", ")", "!=", "Binding", ".", "WILDCARD_TYPE", ")", "{", "return", "false", ";", "}", "WildcardBinding", "wildcardBinding", "=", "(", "WildcardBinding", ")", "typeBinding", ";", "WildcardBinding", "wildcardBinding2", "=", "(", "WildcardBinding", ")", "typeBinding2", ";", "return", "isEqual", "(", "wildcardBinding", ".", "bound", ",", "wildcardBinding2", ".", "bound", ",", "visitedTypes", ")", "&&", "wildcardBinding", ".", "boundKind", "==", "wildcardBinding2", ".", "boundKind", ";", "case", "Binding", ".", "INTERSECTION_TYPE", ":", "if", "(", "typeBinding2", ".", "kind", "(", ")", "!=", "Binding", ".", "INTERSECTION_TYPE", ")", "{", "return", "false", ";", "}", "WildcardBinding", "intersectionBinding", "=", "(", "WildcardBinding", ")", "typeBinding", ";", "WildcardBinding", "intersectionBinding2", "=", "(", "WildcardBinding", ")", "typeBinding2", ";", "return", "isEqual", "(", "intersectionBinding", ".", "bound", ",", "intersectionBinding2", ".", "bound", ",", "visitedTypes", ")", "&&", "isEqual", "(", "intersectionBinding", ".", "otherBounds", ",", "intersectionBinding2", ".", "otherBounds", ",", "visitedTypes", ")", ";", "case", "Binding", ".", "TYPE_PARAMETER", ":", "if", "(", "!", "(", "typeBinding2", ".", "isTypeVariable", "(", ")", ")", ")", "{", "return", "false", ";", "}", "if", "(", "typeBinding", ".", "isCapture", "(", ")", ")", "{", "if", "(", "!", "(", "typeBinding2", ".", "isCapture", "(", ")", ")", ")", "{", "return", "false", ";", "}", "CaptureBinding", "captureBinding", "=", "(", "CaptureBinding", ")", "typeBinding", ";", "CaptureBinding", "captureBinding2", "=", "(", "CaptureBinding", ")", "typeBinding2", ";", "if", "(", "captureBinding", ".", "position", "==", "captureBinding2", ".", "position", ")", "{", "if", "(", "visitedTypes", ".", "contains", "(", "typeBinding", ")", ")", "return", "true", ";", "visitedTypes", ".", "add", "(", "typeBinding", ")", ";", "return", "isEqual", "(", "captureBinding", ".", "wildcard", ",", "captureBinding2", ".", "wildcard", ",", "visitedTypes", ")", "&&", "isEqual", "(", "captureBinding", ".", "sourceType", ",", "captureBinding2", ".", "sourceType", ",", "visitedTypes", ")", ";", "}", "return", "false", ";", "}", "TypeVariableBinding", "typeVariableBinding", "=", "(", "TypeVariableBinding", ")", "typeBinding", ";", "TypeVariableBinding", "typeVariableBinding2", "=", "(", "TypeVariableBinding", ")", "typeBinding2", ";", "if", "(", "CharOperation", ".", "equals", "(", "typeVariableBinding", ".", "sourceName", ",", "typeVariableBinding2", ".", "sourceName", ")", ")", "{", "if", "(", "visitedTypes", ".", "contains", "(", "typeBinding", ")", ")", "return", "true", ";", "visitedTypes", ".", "add", "(", "typeBinding", ")", ";", "return", "isEqual", "(", "typeVariableBinding", ".", "declaringElement", ",", "typeVariableBinding2", ".", "declaringElement", ",", "visitedTypes", ")", "&&", "isEqual", "(", "typeVariableBinding", ".", "superclass", "(", ")", ",", "typeVariableBinding2", ".", "superclass", "(", ")", ",", "visitedTypes", ")", "&&", "isEqual", "(", "typeVariableBinding", ".", "superInterfaces", "(", ")", ",", "typeVariableBinding2", ".", "superInterfaces", "(", ")", ",", "visitedTypes", ")", ";", "}", "return", "false", ";", "case", "Binding", ".", "GENERIC_TYPE", ":", "if", "(", "!", "typeBinding2", ".", "isGenericType", "(", ")", ")", "{", "return", "false", ";", "}", "ReferenceBinding", "referenceBinding", "=", "(", "ReferenceBinding", ")", "typeBinding", ";", "ReferenceBinding", "referenceBinding2", "=", "(", "ReferenceBinding", ")", "typeBinding2", ";", "return", "CharOperation", ".", "equals", "(", "referenceBinding", ".", "compoundName", ",", "referenceBinding2", ".", "compoundName", ")", "&&", "(", "referenceBinding", ".", "modifiers", "&", "(", "ExtraCompilerModifiers", ".", "AccJustFlag", "|", "ClassFileConstants", ".", "AccInterface", "|", "ClassFileConstants", ".", "AccEnum", "|", "ClassFileConstants", ".", "AccAnnotation", ")", ")", "==", "(", "referenceBinding2", ".", "modifiers", "&", "(", "ExtraCompilerModifiers", ".", "AccJustFlag", "|", "ClassFileConstants", ".", "AccInterface", "|", "ClassFileConstants", ".", "AccEnum", "|", "ClassFileConstants", ".", "AccAnnotation", ")", ")", "&&", "isEqual", "(", "referenceBinding", ".", "typeVariables", "(", ")", ",", "referenceBinding2", ".", "typeVariables", "(", ")", ",", "visitedTypes", ")", "&&", "isEqual", "(", "referenceBinding", ".", "enclosingType", "(", ")", ",", "referenceBinding2", ".", "enclosingType", "(", ")", ",", "visitedTypes", ")", ";", "case", "Binding", ".", "RAW_TYPE", ":", "default", ":", "if", "(", "!", "(", "typeBinding2", "instanceof", "ReferenceBinding", ")", ")", "{", "return", "false", ";", "}", "referenceBinding", "=", "(", "ReferenceBinding", ")", "typeBinding", ";", "referenceBinding2", "=", "(", "ReferenceBinding", ")", "typeBinding2", ";", "char", "[", "]", "constantPoolName", "=", "referenceBinding", ".", "constantPoolName", "(", ")", ";", "char", "[", "]", "constantPoolName2", "=", "referenceBinding2", ".", "constantPoolName", "(", ")", ";", "if", "(", "constantPoolName", "==", "null", ")", "{", "if", "(", "constantPoolName2", "!=", "null", ")", "{", "return", "false", ";", "}", "if", "(", "!", "CharOperation", ".", "equals", "(", "referenceBinding", ".", "computeUniqueKey", "(", ")", ",", "referenceBinding2", ".", "computeUniqueKey", "(", ")", ")", ")", "{", "return", "false", ";", "}", "}", "else", "{", "if", "(", "constantPoolName2", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "!", "CharOperation", ".", "equals", "(", "constantPoolName", ",", "constantPoolName2", ")", ")", "{", "return", "false", ";", "}", "}", "return", "CharOperation", ".", "equals", "(", "referenceBinding", ".", "compoundName", ",", "referenceBinding2", ".", "compoundName", ")", "&&", "(", "!", "referenceBinding2", ".", "isGenericType", "(", ")", ")", "&&", "(", "referenceBinding", ".", "isRawType", "(", ")", "==", "referenceBinding2", ".", "isRawType", "(", ")", ")", "&&", "(", "(", "referenceBinding", ".", "modifiers", "&", "~", "ClassFileConstants", ".", "AccSuper", ")", "&", "(", "ExtraCompilerModifiers", ".", "AccJustFlag", "|", "ClassFileConstants", ".", "AccInterface", "|", "ClassFileConstants", ".", "AccEnum", "|", "ClassFileConstants", ".", "AccAnnotation", ")", ")", "==", "(", "(", "referenceBinding2", ".", "modifiers", "&", "~", "ClassFileConstants", ".", "AccSuper", ")", "&", "(", "ExtraCompilerModifiers", ".", "AccJustFlag", "|", "ClassFileConstants", ".", "AccInterface", "|", "ClassFileConstants", ".", "AccEnum", "|", "ClassFileConstants", ".", "AccAnnotation", ")", ")", "&&", "isEqual", "(", "referenceBinding", ".", "enclosingType", "(", ")", ",", "referenceBinding2", ".", "enclosingType", "(", ")", ",", "visitedTypes", ")", ";", "}", "}", "static", "boolean", "isEqual", "(", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "typeBinding", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeBinding", "typeBinding2", ")", "{", "return", "isEqual", "(", "typeBinding", ",", "typeBinding2", ",", "new", "HashSet", "(", ")", ")", ";", "}", "}", "</s>" ]
4,488
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "EnhancedForStatement", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "PARAMETER_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "EnhancedForStatement", ".", "class", ",", "\"parameter\"", ",", "SingleVariableDeclaration", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "EnhancedForStatement", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "BODY_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "EnhancedForStatement", ".", "class", ",", "\"body\"", ",", "Statement", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "EnhancedForStatement", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "PARAMETER_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "BODY_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "SingleVariableDeclaration", "parameter", "=", "null", ";", "private", "Expression", "expression", "=", "null", ";", "private", "Statement", "body", "=", "null", ";", "EnhancedForStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "unsupportedIn2", "(", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "PARAMETER_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getParameter", "(", ")", ";", "}", "else", "{", "setParameter", "(", "(", "SingleVariableDeclaration", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "BODY_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getBody", "(", ")", ";", "}", "else", "{", "setBody", "(", "(", "Statement", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "ENHANCED_FOR_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "EnhancedForStatement", "result", "=", "new", "EnhancedForStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "result", ".", "setParameter", "(", "(", "SingleVariableDeclaration", ")", "getParameter", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "getExpression", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setBody", "(", "(", "Statement", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getBody", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getParameter", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getBody", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "SingleVariableDeclaration", "getParameter", "(", ")", "{", "if", "(", "this", ".", "parameter", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "parameter", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "parameter", "=", "this", ".", "ast", ".", "newSingleVariableDeclaration", "(", ")", ";", "postLazyInit", "(", "this", ".", "parameter", ",", "PARAMETER_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "parameter", ";", "}", "public", "void", "setParameter", "(", "SingleVariableDeclaration", "parameter", ")", "{", "if", "(", "parameter", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "parameter", ";", "preReplaceChild", "(", "oldChild", ",", "parameter", ",", "PARAMETER_PROPERTY", ")", ";", "this", ".", "parameter", "=", "parameter", ";", "postReplaceChild", "(", "oldChild", ",", "parameter", ",", "PARAMETER_PROPERTY", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "expression", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "expression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "expression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "expression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "public", "Statement", "getBody", "(", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "body", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "body", "=", "new", "Block", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "body", ",", "BODY_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "body", ";", "}", "public", "void", "setBody", "(", "Statement", "statement", ")", "{", "if", "(", "statement", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "body", ";", "preReplaceChild", "(", "oldChild", ",", "statement", ",", "BODY_PROPERTY", ")", ";", "this", ".", "body", "=", "statement", ";", "postReplaceChild", "(", "oldChild", ",", "statement", ",", "BODY_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "3", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "parameter", "==", "null", "?", "0", ":", "getParameter", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "expression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "body", "==", "null", "?", "0", ":", "getBody", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,489
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaElement", ";", "class", "RecoveredVariableBinding", "implements", "IVariableBinding", "{", "private", "VariableDeclaration", "variableDeclaration", ";", "private", "BindingResolver", "resolver", ";", "RecoveredVariableBinding", "(", "BindingResolver", "resolver", ",", "VariableDeclaration", "variableDeclaration", ")", "{", "this", ".", "resolver", "=", "resolver", ";", "this", ".", "variableDeclaration", "=", "variableDeclaration", ";", "}", "public", "Object", "getConstantValue", "(", ")", "{", "return", "null", ";", "}", "public", "ITypeBinding", "getDeclaringClass", "(", ")", "{", "ASTNode", "parent", "=", "this", ".", "variableDeclaration", ".", "getParent", "(", ")", ";", "while", "(", "parent", "!=", "null", "&&", "parent", ".", "getNodeType", "(", ")", "!=", "ASTNode", ".", "TYPE_DECLARATION", ")", "{", "parent", "=", "parent", ".", "getParent", "(", ")", ";", "}", "if", "(", "parent", "!=", "null", ")", "{", "return", "(", "(", "TypeDeclaration", ")", "parent", ")", ".", "resolveBinding", "(", ")", ";", "}", "return", "null", ";", "}", "public", "IMethodBinding", "getDeclaringMethod", "(", ")", "{", "ASTNode", "parent", "=", "this", ".", "variableDeclaration", ".", "getParent", "(", ")", ";", "while", "(", "parent", "!=", "null", "&&", "parent", ".", "getNodeType", "(", ")", "!=", "ASTNode", ".", "METHOD_DECLARATION", ")", "{", "parent", "=", "parent", ".", "getParent", "(", ")", ";", "}", "if", "(", "parent", "!=", "null", ")", "{", "return", "(", "(", "MethodDeclaration", ")", "parent", ")", ".", "resolveBinding", "(", ")", ";", "}", "return", "null", ";", "}", "public", "String", "getName", "(", ")", "{", "return", "this", ".", "variableDeclaration", ".", "getName", "(", ")", ".", "getIdentifier", "(", ")", ";", "}", "public", "ITypeBinding", "getType", "(", ")", "{", "return", "this", ".", "resolver", ".", "getTypeBinding", "(", "this", ".", "variableDeclaration", ")", ";", "}", "public", "IVariableBinding", "getVariableDeclaration", "(", ")", "{", "return", "this", ";", "}", "public", "int", "getVariableId", "(", ")", "{", "return", "0", ";", "}", "public", "boolean", "isEnumConstant", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isField", "(", ")", "{", "return", "this", ".", "variableDeclaration", ".", "getParent", "(", ")", "instanceof", "FieldDeclaration", ";", "}", "public", "boolean", "isParameter", "(", ")", "{", "return", "this", ".", "variableDeclaration", "instanceof", "SingleVariableDeclaration", ";", "}", "public", "IAnnotationBinding", "[", "]", "getAnnotations", "(", ")", "{", "return", "AnnotationBinding", ".", "NoAnnotations", ";", "}", "public", "IJavaElement", "getJavaElement", "(", ")", "{", "return", "null", ";", "}", "public", "String", "getKey", "(", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "buffer", ".", "append", "(", "\"Recovered#\"", ")", ";", "if", "(", "this", ".", "variableDeclaration", "!=", "null", ")", "{", "buffer", ".", "append", "(", "\"\"", ")", ".", "append", "(", "this", ".", "variableDeclaration", ".", "getClass", "(", ")", ")", ".", "append", "(", "this", ".", "variableDeclaration", ".", "getName", "(", ")", ".", "getIdentifier", "(", ")", ")", ".", "append", "(", "this", ".", "variableDeclaration", ".", "getExtraDimensions", "(", ")", ")", ";", "}", "return", "String", ".", "valueOf", "(", "buffer", ")", ";", "}", "public", "int", "getKind", "(", ")", "{", "return", "IBinding", ".", "VARIABLE", ";", "}", "public", "int", "getModifiers", "(", ")", "{", "return", "0", ";", "}", "public", "boolean", "isDeprecated", "(", ")", "{", "return", "false", ";", "}", "public", "boolean", "isEqualTo", "(", "IBinding", "binding", ")", "{", "if", "(", "binding", ".", "isRecovered", "(", ")", "&&", "binding", ".", "getKind", "(", ")", "==", "IBinding", ".", "VARIABLE", ")", "{", "return", "getKey", "(", ")", ".", "equals", "(", "binding", ".", "getKey", "(", ")", ")", ";", "}", "return", "false", ";", "}", "public", "boolean", "isRecovered", "(", ")", "{", "return", "true", ";", "}", "public", "boolean", "isSynthetic", "(", ")", "{", "return", "false", ";", "}", "}", "</s>" ]
4,490
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "IJavaElement", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "JavaCore", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "util", ".", "IModifierConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "AbstractMethodDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "Initializer", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "ast", ".", "TypeDeclaration", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "classfmt", ".", "ClassFileConstants", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "Constant", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "impl", ".", "ReferenceContext", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "BlockScope", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "FieldBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "LocalVariableBinding", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TagBits", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "TypeIds", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "JavaElement", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "LocalVariable", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "core", ".", "util", ".", "Util", ";", "class", "VariableBinding", "implements", "IVariableBinding", "{", "private", "static", "final", "int", "VALID_MODIFIERS", "=", "Modifier", ".", "PUBLIC", "|", "Modifier", ".", "PROTECTED", "|", "Modifier", ".", "PRIVATE", "|", "Modifier", ".", "STATIC", "|", "Modifier", ".", "FINAL", "|", "Modifier", ".", "TRANSIENT", "|", "Modifier", ".", "VOLATILE", ";", "private", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "VariableBinding", "binding", ";", "private", "ITypeBinding", "declaringClass", ";", "private", "String", "key", ";", "private", "String", "name", ";", "private", "BindingResolver", "resolver", ";", "private", "ITypeBinding", "type", ";", "private", "IAnnotationBinding", "[", "]", "annotations", ";", "VariableBinding", "(", "BindingResolver", "resolver", ",", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "VariableBinding", "binding", ")", "{", "this", ".", "resolver", "=", "resolver", ";", "this", ".", "binding", "=", "binding", ";", "}", "public", "IAnnotationBinding", "[", "]", "getAnnotations", "(", ")", "{", "if", "(", "this", ".", "annotations", "!=", "null", ")", "{", "return", "this", ".", "annotations", ";", "}", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "AnnotationBinding", "[", "]", "internalAnnotations", "=", "this", ".", "binding", ".", "getAnnotations", "(", ")", ";", "int", "length", "=", "internalAnnotations", "==", "null", "?", "0", ":", "internalAnnotations", ".", "length", ";", "if", "(", "length", "!=", "0", ")", "{", "IAnnotationBinding", "[", "]", "tempAnnotations", "=", "new", "IAnnotationBinding", "[", "length", "]", ";", "int", "convertedAnnotationCount", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "AnnotationBinding", "internalAnnotation", "=", "internalAnnotations", "[", "i", "]", ";", "final", "IAnnotationBinding", "annotationInstance", "=", "this", ".", "resolver", ".", "getAnnotationInstance", "(", "internalAnnotation", ")", ";", "if", "(", "annotationInstance", "==", "null", ")", "{", "continue", ";", "}", "tempAnnotations", "[", "convertedAnnotationCount", "++", "]", "=", "annotationInstance", ";", "}", "if", "(", "convertedAnnotationCount", "!=", "length", ")", "{", "if", "(", "convertedAnnotationCount", "==", "0", ")", "{", "return", "this", ".", "annotations", "=", "AnnotationBinding", ".", "NoAnnotations", ";", "}", "System", ".", "arraycopy", "(", "tempAnnotations", ",", "0", ",", "(", "tempAnnotations", "=", "new", "IAnnotationBinding", "[", "convertedAnnotationCount", "]", ")", ",", "0", ",", "convertedAnnotationCount", ")", ";", "}", "return", "this", ".", "annotations", "=", "tempAnnotations", ";", "}", "return", "this", ".", "annotations", "=", "AnnotationBinding", ".", "NoAnnotations", ";", "}", "public", "Object", "getConstantValue", "(", ")", "{", "Constant", "c", "=", "this", ".", "binding", ".", "constant", "(", ")", ";", "if", "(", "c", "==", "null", "||", "c", "==", "Constant", ".", "NotAConstant", ")", "return", "null", ";", "switch", "(", "c", ".", "typeID", "(", ")", ")", "{", "case", "TypeIds", ".", "T_boolean", ":", "return", "Boolean", ".", "valueOf", "(", "c", ".", "booleanValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_byte", ":", "return", "new", "Byte", "(", "c", ".", "byteValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_char", ":", "return", "new", "Character", "(", "c", ".", "charValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_double", ":", "return", "new", "Double", "(", "c", ".", "doubleValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_float", ":", "return", "new", "Float", "(", "c", ".", "floatValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_int", ":", "return", "new", "Integer", "(", "c", ".", "intValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_long", ":", "return", "new", "Long", "(", "c", ".", "longValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_short", ":", "return", "new", "Short", "(", "c", ".", "shortValue", "(", ")", ")", ";", "case", "TypeIds", ".", "T_JavaLangString", ":", "return", "c", ".", "stringValue", "(", ")", ";", "}", "return", "null", ";", "}", "public", "ITypeBinding", "getDeclaringClass", "(", ")", "{", "if", "(", "isField", "(", ")", ")", "{", "if", "(", "this", ".", "declaringClass", "==", "null", ")", "{", "FieldBinding", "fieldBinding", "=", "(", "FieldBinding", ")", "this", ".", "binding", ";", "this", ".", "declaringClass", "=", "this", ".", "resolver", ".", "getTypeBinding", "(", "fieldBinding", ".", "declaringClass", ")", ";", "}", "return", "this", ".", "declaringClass", ";", "}", "else", "{", "return", "null", ";", "}", "}", "public", "IMethodBinding", "getDeclaringMethod", "(", ")", "{", "if", "(", "!", "isField", "(", ")", ")", "{", "ASTNode", "node", "=", "this", ".", "resolver", ".", "findDeclaringNode", "(", "this", ")", ";", "while", "(", "true", ")", "{", "if", "(", "node", "==", "null", ")", "{", "if", "(", "this", ".", "binding", "instanceof", "LocalVariableBinding", ")", "{", "LocalVariableBinding", "localVariableBinding", "=", "(", "LocalVariableBinding", ")", "this", ".", "binding", ";", "BlockScope", "blockScope", "=", "localVariableBinding", ".", "declaringScope", ";", "if", "(", "blockScope", "!=", "null", ")", "{", "ReferenceContext", "referenceContext", "=", "blockScope", ".", "referenceContext", "(", ")", ";", "if", "(", "referenceContext", "instanceof", "Initializer", ")", "{", "return", "null", ";", "}", "if", "(", "referenceContext", "instanceof", "AbstractMethodDeclaration", ")", "{", "return", "this", ".", "resolver", ".", "getMethodBinding", "(", "(", "(", "AbstractMethodDeclaration", ")", "referenceContext", ")", ".", "binding", ")", ";", "}", "}", "}", "return", "null", ";", "}", "switch", "(", "node", ".", "getNodeType", "(", ")", ")", "{", "case", "ASTNode", ".", "INITIALIZER", ":", "return", "null", ";", "case", "ASTNode", ".", "METHOD_DECLARATION", ":", "MethodDeclaration", "methodDeclaration", "=", "(", "MethodDeclaration", ")", "node", ";", "return", "methodDeclaration", ".", "resolveBinding", "(", ")", ";", "default", ":", "node", "=", "node", ".", "getParent", "(", ")", ";", "}", "}", "}", "return", "null", ";", "}", "public", "IJavaElement", "getJavaElement", "(", ")", "{", "JavaElement", "element", "=", "getUnresolvedJavaElement", "(", ")", ";", "if", "(", "element", "==", "null", ")", "return", "null", ";", "return", "element", ".", "resolved", "(", "this", ".", "binding", ")", ";", "}", "public", "String", "getKey", "(", ")", "{", "if", "(", "this", ".", "key", "==", "null", ")", "{", "this", ".", "key", "=", "new", "String", "(", "this", ".", "binding", ".", "computeUniqueKey", "(", ")", ")", ";", "}", "return", "this", ".", "key", ";", "}", "public", "int", "getKind", "(", ")", "{", "return", "IBinding", ".", "VARIABLE", ";", "}", "public", "int", "getModifiers", "(", ")", "{", "if", "(", "isField", "(", ")", ")", "{", "return", "(", "(", "FieldBinding", ")", "this", ".", "binding", ")", ".", "getAccessFlags", "(", ")", "&", "VALID_MODIFIERS", ";", "}", "if", "(", "this", ".", "binding", ".", "isFinal", "(", ")", ")", "{", "return", "IModifierConstants", ".", "ACC_FINAL", ";", "}", "return", "Modifier", ".", "NONE", ";", "}", "public", "String", "getName", "(", ")", "{", "if", "(", "this", ".", "name", "==", "null", ")", "{", "this", ".", "name", "=", "new", "String", "(", "this", ".", "binding", ".", "name", ")", ";", "}", "return", "this", ".", "name", ";", "}", "public", "ITypeBinding", "getType", "(", ")", "{", "if", "(", "this", ".", "type", "==", "null", ")", "{", "this", ".", "type", "=", "this", ".", "resolver", ".", "getTypeBinding", "(", "this", ".", "binding", ".", "type", ")", ";", "}", "return", "this", ".", "type", ";", "}", "private", "JavaElement", "getUnresolvedJavaElement", "(", ")", "{", "if", "(", "JavaCore", ".", "getPlugin", "(", ")", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "isField", "(", ")", ")", "{", "if", "(", "this", ".", "resolver", "instanceof", "DefaultBindingResolver", ")", "{", "DefaultBindingResolver", "defaultBindingResolver", "=", "(", "DefaultBindingResolver", ")", "this", ".", "resolver", ";", "if", "(", "!", "defaultBindingResolver", ".", "fromJavaProject", ")", "return", "null", ";", "return", "Util", ".", "getUnresolvedJavaElement", "(", "(", "FieldBinding", ")", "this", ".", "binding", ",", "defaultBindingResolver", ".", "workingCopyOwner", ",", "defaultBindingResolver", ".", "getBindingsToNodesMap", "(", ")", ")", ";", "}", "return", "null", ";", "}", "if", "(", "!", "(", "this", ".", "resolver", "instanceof", "DefaultBindingResolver", ")", ")", "return", "null", ";", "DefaultBindingResolver", "defaultBindingResolver", "=", "(", "DefaultBindingResolver", ")", "this", ".", "resolver", ";", "if", "(", "!", "defaultBindingResolver", ".", "fromJavaProject", ")", "return", "null", ";", "VariableDeclaration", "localVar", "=", "(", "VariableDeclaration", ")", "defaultBindingResolver", ".", "bindingsToAstNodes", ".", "get", "(", "this", ")", ";", "if", "(", "localVar", "==", "null", ")", "return", "null", ";", "int", "nameStart", ";", "int", "nameLength", ";", "int", "sourceStart", ";", "int", "sourceLength", ";", "int", "modifiers", "=", "0", ";", "if", "(", "localVar", "instanceof", "SingleVariableDeclaration", ")", "{", "sourceStart", "=", "localVar", ".", "getStartPosition", "(", ")", ";", "sourceLength", "=", "localVar", ".", "getLength", "(", ")", ";", "final", "SingleVariableDeclaration", "singleVariableDeclaration", "=", "(", "SingleVariableDeclaration", ")", "localVar", ";", "SimpleName", "simpleName", "=", "singleVariableDeclaration", ".", "getName", "(", ")", ";", "nameStart", "=", "simpleName", ".", "getStartPosition", "(", ")", ";", "nameLength", "=", "simpleName", ".", "getLength", "(", ")", ";", "modifiers", "=", "singleVariableDeclaration", ".", "getModifiers", "(", ")", ";", "}", "else", "{", "nameStart", "=", "localVar", ".", "getStartPosition", "(", ")", ";", "nameLength", "=", "localVar", ".", "getLength", "(", ")", ";", "ASTNode", "node", "=", "localVar", ".", "getParent", "(", ")", ";", "sourceStart", "=", "node", ".", "getStartPosition", "(", ")", ";", "sourceLength", "=", "node", ".", "getLength", "(", ")", ";", "VariableDeclarationFragment", "fragment", "=", "(", "VariableDeclarationFragment", ")", "localVar", ";", "final", "ASTNode", "parent", "=", "fragment", ".", "getParent", "(", ")", ";", "switch", "(", "parent", ".", "getNodeType", "(", ")", ")", "{", "case", "ASTNode", ".", "VARIABLE_DECLARATION_EXPRESSION", ":", "VariableDeclarationExpression", "expression", "=", "(", "VariableDeclarationExpression", ")", "parent", ";", "modifiers", "=", "expression", ".", "getModifiers", "(", ")", ";", "break", ";", "case", "ASTNode", ".", "VARIABLE_DECLARATION_STATEMENT", ":", "VariableDeclarationStatement", "statement", "=", "(", "VariableDeclarationStatement", ")", "parent", ";", "modifiers", "=", "statement", ".", "getModifiers", "(", ")", ";", "break", ";", "case", "ASTNode", ".", "FIELD_DECLARATION", ":", "FieldDeclaration", "fieldDeclaration", "=", "(", "FieldDeclaration", ")", "parent", ";", "modifiers", "=", "fieldDeclaration", ".", "getModifiers", "(", ")", ";", "break", ";", "}", "}", "int", "sourceEnd", "=", "sourceStart", "+", "sourceLength", "-", "1", ";", "char", "[", "]", "typeSig", "=", "this", ".", "binding", ".", "type", ".", "genericTypeSignature", "(", ")", ";", "JavaElement", "parent", "=", "null", ";", "IMethodBinding", "declaringMethod", "=", "getDeclaringMethod", "(", ")", ";", "final", "LocalVariableBinding", "localVariableBinding", "=", "(", "LocalVariableBinding", ")", "this", ".", "binding", ";", "if", "(", "declaringMethod", "==", "null", ")", "{", "ReferenceContext", "referenceContext", "=", "localVariableBinding", ".", "declaringScope", ".", "referenceContext", "(", ")", ";", "if", "(", "referenceContext", "instanceof", "TypeDeclaration", ")", "{", "TypeDeclaration", "typeDeclaration", "=", "(", "TypeDeclaration", ")", "referenceContext", ";", "JavaElement", "typeHandle", "=", "null", ";", "typeHandle", "=", "Util", ".", "getUnresolvedJavaElement", "(", "typeDeclaration", ".", "binding", ",", "defaultBindingResolver", ".", "workingCopyOwner", ",", "defaultBindingResolver", ".", "getBindingsToNodesMap", "(", ")", ")", ";", "parent", "=", "Util", ".", "getUnresolvedJavaElement", "(", "sourceStart", ",", "sourceEnd", ",", "typeHandle", ")", ";", "}", "else", "{", "return", "null", ";", "}", "}", "else", "{", "parent", "=", "(", "JavaElement", ")", "declaringMethod", ".", "getJavaElement", "(", ")", ";", "}", "if", "(", "parent", "==", "null", ")", "return", "null", ";", "return", "new", "LocalVariable", "(", "parent", ",", "localVar", ".", "getName", "(", ")", ".", "getIdentifier", "(", ")", ",", "sourceStart", ",", "sourceEnd", ",", "nameStart", ",", "nameStart", "+", "nameLength", "-", "1", ",", "new", "String", "(", "typeSig", ")", ",", "localVariableBinding", ".", "declaration", ".", "annotations", ",", "modifiers", ",", "(", "localVariableBinding", ".", "tagBits", "&", "TagBits", ".", "IsArgument", ")", "!=", "0", ")", ";", "}", "public", "IVariableBinding", "getVariableDeclaration", "(", ")", "{", "if", "(", "isField", "(", ")", ")", "{", "FieldBinding", "fieldBinding", "=", "(", "FieldBinding", ")", "this", ".", "binding", ";", "return", "this", ".", "resolver", ".", "getVariableBinding", "(", "fieldBinding", ".", "original", "(", ")", ")", ";", "}", "return", "this", ";", "}", "public", "int", "getVariableId", "(", ")", "{", "return", "this", ".", "binding", ".", "id", ";", "}", "public", "boolean", "isParameter", "(", ")", "{", "return", "(", "this", ".", "binding", ".", "tagBits", "&", "TagBits", ".", "IsArgument", ")", "!=", "0", ";", "}", "public", "boolean", "isDeprecated", "(", ")", "{", "if", "(", "isField", "(", ")", ")", "{", "return", "(", "(", "FieldBinding", ")", "this", ".", "binding", ")", ".", "isDeprecated", "(", ")", ";", "}", "return", "false", ";", "}", "public", "boolean", "isEnumConstant", "(", ")", "{", "return", "(", "this", ".", "binding", ".", "modifiers", "&", "ClassFileConstants", ".", "AccEnum", ")", "!=", "0", ";", "}", "public", "boolean", "isEqualTo", "(", "IBinding", "other", ")", "{", "if", "(", "other", "==", "this", ")", "{", "return", "true", ";", "}", "if", "(", "other", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "!", "(", "other", "instanceof", "VariableBinding", ")", ")", "{", "return", "false", ";", "}", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "lookup", ".", "VariableBinding", "otherBinding", "=", "(", "(", "VariableBinding", ")", "other", ")", ".", "binding", ";", "if", "(", "this", ".", "binding", "instanceof", "FieldBinding", ")", "{", "if", "(", "otherBinding", "instanceof", "FieldBinding", ")", "{", "return", "BindingComparator", ".", "isEqual", "(", "(", "FieldBinding", ")", "this", ".", "binding", ",", "(", "FieldBinding", ")", "otherBinding", ")", ";", "}", "else", "{", "return", "false", ";", "}", "}", "else", "{", "if", "(", "BindingComparator", ".", "isEqual", "(", "this", ".", "binding", ",", "otherBinding", ")", ")", "{", "IMethodBinding", "declaringMethod", "=", "getDeclaringMethod", "(", ")", ";", "IMethodBinding", "otherDeclaringMethod", "=", "(", "(", "VariableBinding", ")", "other", ")", ".", "getDeclaringMethod", "(", ")", ";", "if", "(", "declaringMethod", "==", "null", ")", "{", "if", "(", "otherDeclaringMethod", "!=", "null", ")", "{", "return", "false", ";", "}", "return", "true", ";", "}", "return", "declaringMethod", ".", "isEqualTo", "(", "otherDeclaringMethod", ")", ";", "}", "return", "false", ";", "}", "}", "public", "boolean", "isField", "(", ")", "{", "return", "this", ".", "binding", "instanceof", "FieldBinding", ";", "}", "public", "boolean", "isSynthetic", "(", ")", "{", "if", "(", "isField", "(", ")", ")", "{", "return", "(", "(", "FieldBinding", ")", "this", ".", "binding", ")", ".", "isSynthetic", "(", ")", ";", "}", "return", "false", ";", "}", "public", "boolean", "isRecovered", "(", ")", "{", "return", "false", ";", "}", "public", "String", "toString", "(", ")", "{", "return", "this", ".", "binding", ".", "toString", "(", ")", ";", "}", "}", "</s>" ]
4,491
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "SwitchStatement", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "SwitchStatement", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "STATEMENTS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "SwitchStatement", ".", "class", ",", "\"statements\"", ",", "Statement", ".", "class", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "3", ")", ";", "createPropertyList", "(", "SwitchStatement", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "STATEMENTS_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Expression", "expression", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "statements", "=", "new", "ASTNode", ".", "NodeList", "(", "STATEMENTS_PROPERTY", ")", ";", "SwitchStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "STATEMENTS_PROPERTY", ")", "{", "return", "statements", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "SWITCH_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "SwitchStatement", "result", "=", "new", "SwitchStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "getExpression", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "statements", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "statements", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "statements", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "expression", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "expression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "expression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "expression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "public", "List", "statements", "(", ")", "{", "return", "this", ".", "statements", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "2", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "expression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", "+", "this", ".", "statements", ".", "listSize", "(", ")", ";", "}", "}", "</s>" ]
4,492
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ArrayInitializer", "extends", "Expression", "{", "public", "static", "final", "ChildListPropertyDescriptor", "EXPRESSIONS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "ArrayInitializer", ".", "class", ",", "\"expressions\"", ",", "Expression", ".", "class", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "ArrayInitializer", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "EXPRESSIONS_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "ASTNode", ".", "NodeList", "expressions", "=", "new", "ASTNode", ".", "NodeList", "(", "EXPRESSIONS_PROPERTY", ")", ";", "ArrayInitializer", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "EXPRESSIONS_PROPERTY", ")", "{", "return", "expressions", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "ARRAY_INITIALIZER", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "ArrayInitializer", "result", "=", "new", "ArrayInitializer", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "expressions", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "expressions", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "expressions", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "List", "expressions", "(", ")", "{", "return", "this", ".", "expressions", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "this", ".", "expressions", ".", "listSize", "(", ")", ";", "}", "}", "</s>" ]
4,493
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "compiler", ".", "InvalidInputException", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "Scanner", ";", "import", "org", ".", "eclipse", ".", "jdt", ".", "internal", ".", "compiler", ".", "parser", ".", "TerminalTokens", ";", "public", "abstract", "class", "Statement", "extends", "ASTNode", "{", "private", "String", "optionalLeadingComment", "=", "null", ";", "Statement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "public", "String", "getLeadingComment", "(", ")", "{", "return", "this", ".", "optionalLeadingComment", ";", "}", "public", "void", "setLeadingComment", "(", "String", "comment", ")", "{", "if", "(", "comment", "!=", "null", ")", "{", "char", "[", "]", "source", "=", "comment", ".", "toCharArray", "(", ")", ";", "Scanner", "scanner", "=", "this", ".", "ast", ".", "scanner", ";", "scanner", ".", "resetTo", "(", "0", ",", "source", ".", "length", ")", ";", "scanner", ".", "setSource", "(", "source", ")", ";", "try", "{", "int", "token", ";", "boolean", "onlyOneComment", "=", "false", ";", "while", "(", "(", "token", "=", "scanner", ".", "getNextToken", "(", ")", ")", "!=", "TerminalTokens", ".", "TokenNameEOF", ")", "{", "switch", "(", "token", ")", "{", "case", "TerminalTokens", ".", "TokenNameCOMMENT_BLOCK", ":", "case", "TerminalTokens", ".", "TokenNameCOMMENT_JAVADOC", ":", "case", "TerminalTokens", ".", "TokenNameCOMMENT_LINE", ":", "if", "(", "onlyOneComment", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "onlyOneComment", "=", "true", ";", "break", ";", "default", ":", "onlyOneComment", "=", "false", ";", "}", "}", "if", "(", "!", "onlyOneComment", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "catch", "(", "InvalidInputException", "e", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "}", "checkModifiable", "(", ")", ";", "this", ".", "optionalLeadingComment", "=", "comment", ";", "}", "void", "copyLeadingComment", "(", "Statement", "source", ")", "{", "setLeadingComment", "(", "source", ".", "getLeadingComment", "(", ")", ")", ";", "}", "int", "memSize", "(", ")", "{", "int", "size", "=", "BASE_NODE_SIZE", "+", "1", "*", "4", "+", "stringSize", "(", "getLeadingComment", "(", ")", ")", ";", "return", "size", ";", "}", "}", "</s>" ]
4,494
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "public", "interface", "IPackageBinding", "extends", "IBinding", "{", "public", "String", "getName", "(", ")", ";", "public", "boolean", "isUnnamed", "(", ")", ";", "public", "String", "[", "]", "getNameComponents", "(", ")", ";", "}", "</s>" ]
4,495
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "ExpressionStatement", "extends", "Statement", "{", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "ExpressionStatement", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "MANDATORY", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "ExpressionStatement", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Expression", "expression", "=", "null", ";", "ExpressionStatement", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "EXPRESSION_STATEMENT", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "ExpressionStatement", "result", "=", "new", "ExpressionStatement", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "copyLeadingComment", "(", "this", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "getExpression", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "expression", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "expression", "=", "new", "MethodInvocation", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "expression", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "if", "(", "expression", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "expression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "expression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "expression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,496
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "BooleanLiteral", "extends", "Expression", "{", "public", "static", "final", "SimplePropertyDescriptor", "BOOLEAN_VALUE_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "BooleanLiteral", ".", "class", ",", "\"booleanValue\"", ",", "boolean", ".", "class", ",", "MANDATORY", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "2", ")", ";", "createPropertyList", "(", "BooleanLiteral", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "BOOLEAN_VALUE_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "boolean", "value", "=", "false", ";", "BooleanLiteral", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "boolean", "internalGetSetBooleanProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "boolean", "newValue", ")", "{", "if", "(", "property", "==", "BOOLEAN_VALUE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "booleanValue", "(", ")", ";", "}", "else", "{", "setBooleanValue", "(", "newValue", ")", ";", "return", "false", ";", "}", "}", "return", "super", ".", "internalGetSetBooleanProperty", "(", "property", ",", "get", ",", "newValue", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "BOOLEAN_LITERAL", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "BooleanLiteral", "result", "=", "new", "BooleanLiteral", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setBooleanValue", "(", "booleanValue", "(", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "visitor", ".", "visit", "(", "this", ")", ";", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "boolean", "booleanValue", "(", ")", "{", "return", "this", ".", "value", ";", "}", "public", "void", "setBooleanValue", "(", "boolean", "value", ")", "{", "preValueChange", "(", "BOOLEAN_VALUE_PROPERTY", ")", ";", "this", ".", "value", "=", "value", ";", "postValueChange", "(", "BOOLEAN_VALUE_PROPERTY", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "1", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", ";", "}", "}", "</s>" ]
4,497
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "MethodRef", "extends", "ASTNode", "implements", "IDocElement", "{", "public", "static", "final", "ChildPropertyDescriptor", "QUALIFIER_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "MethodRef", ".", "class", ",", "\"qualifier\"", ",", "Name", ".", "class", ",", "OPTIONAL", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "MethodRef", ".", "class", ",", "\"name\"", ",", "SimpleName", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "PARAMETERS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "MethodRef", ".", "class", ",", "\"parameters\"", ",", "MethodRefParameter", ".", "class", ",", "NO_CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "MethodRef", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "QUALIFIER_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "PARAMETERS_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "return", "PROPERTY_DESCRIPTORS", ";", "}", "private", "Name", "optionalQualifier", "=", "null", ";", "private", "SimpleName", "methodName", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "parameters", "=", "new", "ASTNode", ".", "NodeList", "(", "PARAMETERS_PROPERTY", ")", ";", "MethodRef", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "QUALIFIER_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getQualifier", "(", ")", ";", "}", "else", "{", "setQualifier", "(", "(", "Name", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "PARAMETERS_PROPERTY", ")", "{", "return", "parameters", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "METHOD_REF", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "MethodRef", "result", "=", "new", "MethodRef", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setQualifier", "(", "(", "Name", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getQualifier", "(", ")", ")", ")", ";", "result", ".", "setName", "(", "(", "SimpleName", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getName", "(", ")", ")", ")", ";", "result", ".", "parameters", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "parameters", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getQualifier", "(", ")", ")", ";", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "parameters", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Name", "getQualifier", "(", ")", "{", "return", "this", ".", "optionalQualifier", ";", "}", "public", "void", "setQualifier", "(", "Name", "name", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalQualifier", ";", "preReplaceChild", "(", "oldChild", ",", "name", ",", "QUALIFIER_PROPERTY", ")", ";", "this", ".", "optionalQualifier", "=", "name", ";", "postReplaceChild", "(", "oldChild", ",", "name", ",", "QUALIFIER_PROPERTY", ")", ";", "}", "public", "SimpleName", "getName", "(", ")", "{", "if", "(", "this", ".", "methodName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "methodName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "methodName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "methodName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "methodName", ";", "}", "public", "void", "setName", "(", "SimpleName", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "methodName", ";", "preReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "this", ".", "methodName", "=", "name", ";", "postReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "}", "public", "List", "parameters", "(", ")", "{", "return", "this", ".", "parameters", ";", "}", "public", "final", "IBinding", "resolveBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveReference", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "3", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalQualifier", "==", "null", "?", "0", ":", "getQualifier", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "methodName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", "+", "this", ".", "parameters", ".", "listSize", "(", ")", ";", "}", "}", "</s>" ]
4,498
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "MethodDeclaration", "extends", "BodyDeclaration", "{", "public", "static", "final", "ChildPropertyDescriptor", "JAVADOC_PROPERTY", "=", "internalJavadocPropertyFactory", "(", "MethodDeclaration", ".", "class", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "MODIFIERS_PROPERTY", "=", "internalModifiersPropertyFactory", "(", "MethodDeclaration", ".", "class", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "MODIFIERS2_PROPERTY", "=", "internalModifiers2PropertyFactory", "(", "MethodDeclaration", ".", "class", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "CONSTRUCTOR_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "MethodDeclaration", ".", "class", ",", "\"constructor\"", ",", "boolean", ".", "class", ",", "MANDATORY", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "MethodDeclaration", ".", "class", ",", "\"name\"", ",", "SimpleName", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "RETURN_TYPE_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "MethodDeclaration", ".", "class", ",", "\"returnType\"", ",", "Type", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "RETURN_TYPE2_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "MethodDeclaration", ".", "class", ",", "\"returnType2\"", ",", "Type", ".", "class", ",", "OPTIONAL", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "SimplePropertyDescriptor", "EXTRA_DIMENSIONS_PROPERTY", "=", "new", "SimplePropertyDescriptor", "(", "MethodDeclaration", ".", "class", ",", "\"\"", ",", "int", ".", "class", ",", "MANDATORY", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "TYPE_PARAMETERS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "MethodDeclaration", ".", "class", ",", "\"\"", ",", "TypeParameter", ".", "class", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "PARAMETERS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "MethodDeclaration", ".", "class", ",", "\"parameters\"", ",", "SingleVariableDeclaration", ".", "class", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "THROWN_EXCEPTIONS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "MethodDeclaration", ".", "class", ",", "\"\"", ",", "Name", ".", "class", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "BODY_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "MethodDeclaration", ".", "class", ",", "\"body\"", ",", "Block", ".", "class", ",", "OPTIONAL", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "propertyList", "=", "new", "ArrayList", "(", "10", ")", ";", "createPropertyList", "(", "MethodDeclaration", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "JAVADOC_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "MODIFIERS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "CONSTRUCTOR_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "RETURN_TYPE_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "PARAMETERS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "EXTRA_DIMENSIONS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "THROWN_EXCEPTIONS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "BODY_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "propertyList", "=", "new", "ArrayList", "(", "11", ")", ";", "createPropertyList", "(", "MethodDeclaration", ".", "class", ",", "propertyList", ")", ";", "addProperty", "(", "JAVADOC_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "MODIFIERS2_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "CONSTRUCTOR_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "TYPE_PARAMETERS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "RETURN_TYPE2_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "PARAMETERS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "EXTRA_DIMENSIONS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "THROWN_EXCEPTIONS_PROPERTY", ",", "propertyList", ")", ";", "addProperty", "(", "BODY_PROPERTY", ",", "propertyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "propertyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "boolean", "isConstructor", "=", "false", ";", "private", "SimpleName", "methodName", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "parameters", "=", "new", "ASTNode", ".", "NodeList", "(", "PARAMETERS_PROPERTY", ")", ";", "private", "Type", "returnType", "=", "null", ";", "private", "boolean", "returnType2Initialized", "=", "false", ";", "private", "ASTNode", ".", "NodeList", "typeParameters", "=", "null", ";", "private", "int", "extraArrayDimensions", "=", "0", ";", "private", "ASTNode", ".", "NodeList", "thrownExceptions", "=", "new", "ASTNode", ".", "NodeList", "(", "THROWN_EXCEPTIONS_PROPERTY", ")", ";", "private", "Block", "optionalBody", "=", "null", ";", "MethodDeclaration", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "if", "(", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "this", ".", "typeParameters", "=", "new", "ASTNode", ".", "NodeList", "(", "TYPE_PARAMETERS_PROPERTY", ")", ";", "}", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "int", "internalGetSetIntProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "int", "value", ")", "{", "if", "(", "property", "==", "MODIFIERS_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getModifiers", "(", ")", ";", "}", "else", "{", "internalSetModifiers", "(", "value", ")", ";", "return", "0", ";", "}", "}", "if", "(", "property", "==", "EXTRA_DIMENSIONS_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExtraDimensions", "(", ")", ";", "}", "else", "{", "setExtraDimensions", "(", "value", ")", ";", "return", "0", ";", "}", "}", "return", "super", ".", "internalGetSetIntProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "boolean", "internalGetSetBooleanProperty", "(", "SimplePropertyDescriptor", "property", ",", "boolean", "get", ",", "boolean", "value", ")", "{", "if", "(", "property", "==", "CONSTRUCTOR_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "isConstructor", "(", ")", ";", "}", "else", "{", "setConstructor", "(", "value", ")", ";", "return", "false", ";", "}", "}", "return", "super", ".", "internalGetSetBooleanProperty", "(", "property", ",", "get", ",", "value", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "JAVADOC_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getJavadoc", "(", ")", ";", "}", "else", "{", "setJavadoc", "(", "(", "Javadoc", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "RETURN_TYPE_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getReturnType", "(", ")", ";", "}", "else", "{", "setReturnType", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "RETURN_TYPE2_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getReturnType2", "(", ")", ";", "}", "else", "{", "setReturnType2", "(", "(", "Type", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "BODY_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getBody", "(", ")", ";", "}", "else", "{", "setBody", "(", "(", "Block", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "MODIFIERS2_PROPERTY", ")", "{", "return", "modifiers", "(", ")", ";", "}", "if", "(", "property", "==", "TYPE_PARAMETERS_PROPERTY", ")", "{", "return", "typeParameters", "(", ")", ";", "}", "if", "(", "property", "==", "PARAMETERS_PROPERTY", ")", "{", "return", "parameters", "(", ")", ";", "}", "if", "(", "property", "==", "THROWN_EXCEPTIONS_PROPERTY", ")", "{", "return", "thrownExceptions", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "ChildPropertyDescriptor", "internalJavadocProperty", "(", ")", "{", "return", "JAVADOC_PROPERTY", ";", "}", "final", "ChildListPropertyDescriptor", "internalModifiers2Property", "(", ")", "{", "return", "MODIFIERS2_PROPERTY", ";", "}", "final", "SimplePropertyDescriptor", "internalModifiersProperty", "(", ")", "{", "return", "MODIFIERS_PROPERTY", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "METHOD_DECLARATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "MethodDeclaration", "result", "=", "new", "MethodDeclaration", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setJavadoc", "(", "(", "Javadoc", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getJavadoc", "(", ")", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "result", ".", "internalSetModifiers", "(", "getModifiers", "(", ")", ")", ";", "result", ".", "setReturnType", "(", "(", "Type", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getReturnType", "(", ")", ")", ")", ";", "}", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "modifiers", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "modifiers", "(", ")", ")", ")", ";", "result", ".", "typeParameters", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "typeParameters", "(", ")", ")", ")", ";", "result", ".", "setReturnType2", "(", "(", "Type", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getReturnType2", "(", ")", ")", ")", ";", "}", "result", ".", "setConstructor", "(", "isConstructor", "(", ")", ")", ";", "result", ".", "setExtraDimensions", "(", "getExtraDimensions", "(", ")", ")", ";", "result", ".", "setName", "(", "(", "SimpleName", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "parameters", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "parameters", "(", ")", ")", ")", ";", "result", ".", "thrownExceptions", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "thrownExceptions", "(", ")", ")", ")", ";", "result", ".", "setBody", "(", "(", "Block", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getBody", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getJavadoc", "(", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "acceptChild", "(", "visitor", ",", "getReturnType", "(", ")", ")", ";", "}", "else", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "modifiers", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "typeParameters", ")", ";", "acceptChild", "(", "visitor", ",", "getReturnType2", "(", ")", ")", ";", "}", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "parameters", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "thrownExceptions", ")", ";", "acceptChild", "(", "visitor", ",", "getBody", "(", ")", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "boolean", "isConstructor", "(", ")", "{", "return", "this", ".", "isConstructor", ";", "}", "public", "void", "setConstructor", "(", "boolean", "isConstructor", ")", "{", "preValueChange", "(", "CONSTRUCTOR_PROPERTY", ")", ";", "this", ".", "isConstructor", "=", "isConstructor", ";", "postValueChange", "(", "CONSTRUCTOR_PROPERTY", ")", ";", "}", "public", "List", "typeParameters", "(", ")", "{", "if", "(", "this", ".", "typeParameters", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "return", "this", ".", "typeParameters", ";", "}", "public", "SimpleName", "getName", "(", ")", "{", "if", "(", "this", ".", "methodName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "methodName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "methodName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "methodName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "methodName", ";", "}", "public", "void", "setName", "(", "SimpleName", "methodName", ")", "{", "if", "(", "methodName", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "methodName", ";", "preReplaceChild", "(", "oldChild", ",", "methodName", ",", "NAME_PROPERTY", ")", ";", "this", ".", "methodName", "=", "methodName", ";", "postReplaceChild", "(", "oldChild", ",", "methodName", ",", "NAME_PROPERTY", ")", ";", "}", "public", "List", "parameters", "(", ")", "{", "return", "this", ".", "parameters", ";", "}", "public", "boolean", "isVarargs", "(", ")", "{", "if", "(", "this", ".", "modifiers", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "if", "(", "parameters", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "return", "false", ";", "}", "else", "{", "SingleVariableDeclaration", "v", "=", "(", "SingleVariableDeclaration", ")", "parameters", "(", ")", ".", "get", "(", "parameters", "(", ")", ".", "size", "(", ")", "-", "1", ")", ";", "return", "v", ".", "isVarargs", "(", ")", ";", "}", "}", "public", "List", "thrownExceptions", "(", ")", "{", "return", "this", ".", "thrownExceptions", ";", "}", "public", "Type", "getReturnType", "(", ")", "{", "return", "internalGetReturnType", "(", ")", ";", "}", "final", "Type", "internalGetReturnType", "(", ")", "{", "supportedOnlyIn2", "(", ")", ";", "if", "(", "this", ".", "returnType", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "returnType", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "returnType", "=", "this", ".", "ast", ".", "newPrimitiveType", "(", "PrimitiveType", ".", "VOID", ")", ";", "postLazyInit", "(", "this", ".", "returnType", ",", "RETURN_TYPE_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "returnType", ";", "}", "public", "void", "setReturnType", "(", "Type", "type", ")", "{", "internalSetReturnType", "(", "type", ")", ";", "}", "void", "internalSetReturnType", "(", "Type", "type", ")", "{", "supportedOnlyIn2", "(", ")", ";", "if", "(", "type", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "returnType", ";", "preReplaceChild", "(", "oldChild", ",", "type", ",", "RETURN_TYPE_PROPERTY", ")", ";", "this", ".", "returnType", "=", "type", ";", "postReplaceChild", "(", "oldChild", ",", "type", ",", "RETURN_TYPE_PROPERTY", ")", ";", "}", "public", "Type", "getReturnType2", "(", ")", "{", "unsupportedIn2", "(", ")", ";", "if", "(", "this", ".", "returnType", "==", "null", "&&", "!", "this", ".", "returnType2Initialized", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "returnType", "==", "null", "&&", "!", "this", ".", "returnType2Initialized", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "returnType", "=", "this", ".", "ast", ".", "newPrimitiveType", "(", "PrimitiveType", ".", "VOID", ")", ";", "this", ".", "returnType2Initialized", "=", "true", ";", "postLazyInit", "(", "this", ".", "returnType", ",", "RETURN_TYPE2_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "returnType", ";", "}", "public", "void", "setReturnType2", "(", "Type", "type", ")", "{", "unsupportedIn2", "(", ")", ";", "this", ".", "returnType2Initialized", "=", "true", ";", "ASTNode", "oldChild", "=", "this", ".", "returnType", ";", "preReplaceChild", "(", "oldChild", ",", "type", ",", "RETURN_TYPE2_PROPERTY", ")", ";", "this", ".", "returnType", "=", "type", ";", "postReplaceChild", "(", "oldChild", ",", "type", ",", "RETURN_TYPE2_PROPERTY", ")", ";", "}", "public", "int", "getExtraDimensions", "(", ")", "{", "return", "this", ".", "extraArrayDimensions", ";", "}", "public", "void", "setExtraDimensions", "(", "int", "dimensions", ")", "{", "if", "(", "dimensions", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "preValueChange", "(", "EXTRA_DIMENSIONS_PROPERTY", ")", ";", "this", ".", "extraArrayDimensions", "=", "dimensions", ";", "postValueChange", "(", "EXTRA_DIMENSIONS_PROPERTY", ")", ";", "}", "public", "Block", "getBody", "(", ")", "{", "return", "this", ".", "optionalBody", ";", "}", "public", "void", "setBody", "(", "Block", "body", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalBody", ";", "preReplaceChild", "(", "oldChild", ",", "body", ",", "BODY_PROPERTY", ")", ";", "this", ".", "optionalBody", "=", "body", ";", "postReplaceChild", "(", "oldChild", ",", "body", ",", "BODY_PROPERTY", ")", ";", "}", "public", "IMethodBinding", "resolveBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveMethod", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "super", ".", "memSize", "(", ")", "+", "9", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalDocComment", "==", "null", "?", "0", ":", "getJavadoc", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "modifiers", "==", "null", "?", "0", ":", "this", ".", "modifiers", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "typeParameters", "==", "null", "?", "0", ":", "this", ".", "typeParameters", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "methodName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "returnType", "==", "null", "?", "0", ":", "this", ".", "returnType", ".", "treeSize", "(", ")", ")", "+", "this", ".", "parameters", ".", "listSize", "(", ")", "+", "this", ".", "thrownExceptions", ".", "listSize", "(", ")", "+", "(", "this", ".", "optionalBody", "==", "null", "?", "0", ":", "getBody", "(", ")", ".", "treeSize", "(", ")", ")", ";", "}", "}", "</s>" ]
4,499
[ "<s>", "package", "org", ".", "eclipse", ".", "jdt", ".", "core", ".", "dom", ";", "import", "java", ".", "util", ".", "ArrayList", ";", "import", "java", ".", "util", ".", "List", ";", "public", "class", "MethodInvocation", "extends", "Expression", "{", "public", "static", "final", "ChildPropertyDescriptor", "EXPRESSION_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "MethodInvocation", ".", "class", ",", "\"expression\"", ",", "Expression", ".", "class", ",", "OPTIONAL", ",", "CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "TYPE_ARGUMENTS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "MethodInvocation", ".", "class", ",", "\"\"", ",", "Type", ".", "class", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildPropertyDescriptor", "NAME_PROPERTY", "=", "new", "ChildPropertyDescriptor", "(", "MethodInvocation", ".", "class", ",", "\"name\"", ",", "SimpleName", ".", "class", ",", "MANDATORY", ",", "NO_CYCLE_RISK", ")", ";", "public", "static", "final", "ChildListPropertyDescriptor", "ARGUMENTS_PROPERTY", "=", "new", "ChildListPropertyDescriptor", "(", "MethodInvocation", ".", "class", ",", "\"arguments\"", ",", "Expression", ".", "class", ",", "CYCLE_RISK", ")", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_2_0", ";", "private", "static", "final", "List", "PROPERTY_DESCRIPTORS_3_0", ";", "static", "{", "List", "properyList", "=", "new", "ArrayList", "(", "4", ")", ";", "createPropertyList", "(", "MethodInvocation", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "ARGUMENTS_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_2_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "properyList", "=", "new", "ArrayList", "(", "5", ")", ";", "createPropertyList", "(", "MethodInvocation", ".", "class", ",", "properyList", ")", ";", "addProperty", "(", "EXPRESSION_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "TYPE_ARGUMENTS_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "NAME_PROPERTY", ",", "properyList", ")", ";", "addProperty", "(", "ARGUMENTS_PROPERTY", ",", "properyList", ")", ";", "PROPERTY_DESCRIPTORS_3_0", "=", "reapPropertyList", "(", "properyList", ")", ";", "}", "public", "static", "List", "propertyDescriptors", "(", "int", "apiLevel", ")", "{", "if", "(", "apiLevel", "==", "AST", ".", "JLS2_INTERNAL", ")", "{", "return", "PROPERTY_DESCRIPTORS_2_0", ";", "}", "else", "{", "return", "PROPERTY_DESCRIPTORS_3_0", ";", "}", "}", "private", "Expression", "optionalExpression", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "typeArguments", "=", "null", ";", "private", "SimpleName", "methodName", "=", "null", ";", "private", "ASTNode", ".", "NodeList", "arguments", "=", "new", "ASTNode", ".", "NodeList", "(", "ARGUMENTS_PROPERTY", ")", ";", "MethodInvocation", "(", "AST", "ast", ")", "{", "super", "(", "ast", ")", ";", "if", "(", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "this", ".", "typeArguments", "=", "new", "ASTNode", ".", "NodeList", "(", "TYPE_ARGUMENTS_PROPERTY", ")", ";", "}", "}", "final", "List", "internalStructuralPropertiesForType", "(", "int", "apiLevel", ")", "{", "return", "propertyDescriptors", "(", "apiLevel", ")", ";", "}", "final", "ASTNode", "internalGetSetChildProperty", "(", "ChildPropertyDescriptor", "property", ",", "boolean", "get", ",", "ASTNode", "child", ")", "{", "if", "(", "property", "==", "NAME_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getName", "(", ")", ";", "}", "else", "{", "setName", "(", "(", "SimpleName", ")", "child", ")", ";", "return", "null", ";", "}", "}", "if", "(", "property", "==", "EXPRESSION_PROPERTY", ")", "{", "if", "(", "get", ")", "{", "return", "getExpression", "(", ")", ";", "}", "else", "{", "setExpression", "(", "(", "Expression", ")", "child", ")", ";", "return", "null", ";", "}", "}", "return", "super", ".", "internalGetSetChildProperty", "(", "property", ",", "get", ",", "child", ")", ";", "}", "final", "List", "internalGetChildListProperty", "(", "ChildListPropertyDescriptor", "property", ")", "{", "if", "(", "property", "==", "ARGUMENTS_PROPERTY", ")", "{", "return", "arguments", "(", ")", ";", "}", "if", "(", "property", "==", "TYPE_ARGUMENTS_PROPERTY", ")", "{", "return", "typeArguments", "(", ")", ";", "}", "return", "super", ".", "internalGetChildListProperty", "(", "property", ")", ";", "}", "final", "int", "getNodeType0", "(", ")", "{", "return", "METHOD_INVOCATION", ";", "}", "ASTNode", "clone0", "(", "AST", "target", ")", "{", "MethodInvocation", "result", "=", "new", "MethodInvocation", "(", "target", ")", ";", "result", ".", "setSourceRange", "(", "getStartPosition", "(", ")", ",", "getLength", "(", ")", ")", ";", "result", ".", "setName", "(", "(", "SimpleName", ")", "getName", "(", ")", ".", "clone", "(", "target", ")", ")", ";", "result", ".", "setExpression", "(", "(", "Expression", ")", "ASTNode", ".", "copySubtree", "(", "target", ",", "getExpression", "(", ")", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "result", ".", "typeArguments", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "typeArguments", "(", ")", ")", ")", ";", "}", "result", ".", "arguments", "(", ")", ".", "addAll", "(", "ASTNode", ".", "copySubtrees", "(", "target", ",", "arguments", "(", ")", ")", ")", ";", "return", "result", ";", "}", "final", "boolean", "subtreeMatch0", "(", "ASTMatcher", "matcher", ",", "Object", "other", ")", "{", "return", "matcher", ".", "match", "(", "this", ",", "other", ")", ";", "}", "void", "accept0", "(", "ASTVisitor", "visitor", ")", "{", "boolean", "visitChildren", "=", "visitor", ".", "visit", "(", "this", ")", ";", "if", "(", "visitChildren", ")", "{", "acceptChild", "(", "visitor", ",", "getExpression", "(", ")", ")", ";", "if", "(", "this", ".", "ast", ".", "apiLevel", ">=", "AST", ".", "JLS3", ")", "{", "acceptChildren", "(", "visitor", ",", "this", ".", "typeArguments", ")", ";", "}", "acceptChild", "(", "visitor", ",", "getName", "(", ")", ")", ";", "acceptChildren", "(", "visitor", ",", "this", ".", "arguments", ")", ";", "}", "visitor", ".", "endVisit", "(", "this", ")", ";", "}", "public", "Expression", "getExpression", "(", ")", "{", "return", "this", ".", "optionalExpression", ";", "}", "public", "boolean", "isResolvedTypeInferredFromExpectedType", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "isResolvedTypeInferredFromExpectedType", "(", "this", ")", ";", "}", "public", "void", "setExpression", "(", "Expression", "expression", ")", "{", "ASTNode", "oldChild", "=", "this", ".", "optionalExpression", ";", "preReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "this", ".", "optionalExpression", "=", "expression", ";", "postReplaceChild", "(", "oldChild", ",", "expression", ",", "EXPRESSION_PROPERTY", ")", ";", "}", "public", "List", "typeArguments", "(", ")", "{", "if", "(", "this", ".", "typeArguments", "==", "null", ")", "{", "unsupportedIn2", "(", ")", ";", "}", "return", "this", ".", "typeArguments", ";", "}", "public", "SimpleName", "getName", "(", ")", "{", "if", "(", "this", ".", "methodName", "==", "null", ")", "{", "synchronized", "(", "this", ")", "{", "if", "(", "this", ".", "methodName", "==", "null", ")", "{", "preLazyInit", "(", ")", ";", "this", ".", "methodName", "=", "new", "SimpleName", "(", "this", ".", "ast", ")", ";", "postLazyInit", "(", "this", ".", "methodName", ",", "NAME_PROPERTY", ")", ";", "}", "}", "}", "return", "this", ".", "methodName", ";", "}", "public", "void", "setName", "(", "SimpleName", "name", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "ASTNode", "oldChild", "=", "this", ".", "methodName", ";", "preReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "this", ".", "methodName", "=", "name", ";", "postReplaceChild", "(", "oldChild", ",", "name", ",", "NAME_PROPERTY", ")", ";", "}", "public", "List", "arguments", "(", ")", "{", "return", "this", ".", "arguments", ";", "}", "public", "IMethodBinding", "resolveMethodBinding", "(", ")", "{", "return", "this", ".", "ast", ".", "getBindingResolver", "(", ")", ".", "resolveMethod", "(", "this", ")", ";", "}", "int", "memSize", "(", ")", "{", "return", "BASE_NODE_SIZE", "+", "4", "*", "4", ";", "}", "int", "treeSize", "(", ")", "{", "return", "memSize", "(", ")", "+", "(", "this", ".", "optionalExpression", "==", "null", "?", "0", ":", "getExpression", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "typeArguments", "==", "null", "?", "0", ":", "this", ".", "typeArguments", ".", "listSize", "(", ")", ")", "+", "(", "this", ".", "methodName", "==", "null", "?", "0", ":", "getName", "(", ")", ".", "treeSize", "(", ")", ")", "+", "(", "this", ".", "arguments", "==", "null", "?", "0", ":", "this", ".", "arguments", ".", "listSize", "(", ")", ")", ";", "}", "}", "</s>" ]