id
int32 0
12.9k
| code
listlengths 2
264k
|
---|---|
4,300 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryNestedType",
";",
"public",
"class",
"InnerClassInfo",
"extends",
"ClassFileStruct",
"implements",
"IBinaryNestedType",
"{",
"int",
"innerClassNameIndex",
"=",
"-",
"1",
";",
"int",
"outerClassNameIndex",
"=",
"-",
"1",
";",
"int",
"innerNameIndex",
"=",
"-",
"1",
";",
"private",
"char",
"[",
"]",
"innerClassName",
";",
"private",
"char",
"[",
"]",
"outerClassName",
";",
"private",
"char",
"[",
"]",
"innerName",
";",
"private",
"int",
"accessFlags",
"=",
"-",
"1",
";",
"private",
"boolean",
"readInnerClassName",
"=",
"false",
";",
"private",
"boolean",
"readOuterClassName",
"=",
"false",
";",
"private",
"boolean",
"readInnerName",
"=",
"false",
";",
"public",
"InnerClassInfo",
"(",
"byte",
"classFileBytes",
"[",
"]",
",",
"int",
"offsets",
"[",
"]",
",",
"int",
"offset",
")",
"{",
"super",
"(",
"classFileBytes",
",",
"offsets",
",",
"offset",
")",
";",
"this",
".",
"innerClassNameIndex",
"=",
"u2At",
"(",
"0",
")",
";",
"this",
".",
"outerClassNameIndex",
"=",
"u2At",
"(",
"2",
")",
";",
"this",
".",
"innerNameIndex",
"=",
"u2At",
"(",
"4",
")",
";",
"}",
"public",
"char",
"[",
"]",
"getEnclosingTypeName",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"readOuterClassName",
")",
"{",
"this",
".",
"readOuterClassName",
"=",
"true",
";",
"if",
"(",
"this",
".",
"outerClassNameIndex",
"!=",
"0",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"constantPoolOffsets",
"[",
"this",
".",
"outerClassNameIndex",
"]",
"-",
"this",
".",
"structOffset",
"+",
"1",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"this",
".",
"outerClassName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"}",
"}",
"return",
"this",
".",
"outerClassName",
";",
"}",
"public",
"int",
"getModifiers",
"(",
")",
"{",
"if",
"(",
"this",
".",
"accessFlags",
"==",
"-",
"1",
")",
"{",
"this",
".",
"accessFlags",
"=",
"u2At",
"(",
"6",
")",
";",
"}",
"return",
"this",
".",
"accessFlags",
";",
"}",
"public",
"char",
"[",
"]",
"getName",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"readInnerClassName",
")",
"{",
"this",
".",
"readInnerClassName",
"=",
"true",
";",
"if",
"(",
"this",
".",
"innerClassNameIndex",
"!=",
"0",
")",
"{",
"int",
"classOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"this",
".",
"innerClassNameIndex",
"]",
"-",
"this",
".",
"structOffset",
";",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"classOffset",
"+",
"1",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"this",
".",
"innerClassName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"}",
"}",
"return",
"this",
".",
"innerClassName",
";",
"}",
"public",
"char",
"[",
"]",
"getSourceName",
"(",
")",
"{",
"if",
"(",
"!",
"this",
".",
"readInnerName",
")",
"{",
"this",
".",
"readInnerName",
"=",
"true",
";",
"if",
"(",
"this",
".",
"innerNameIndex",
"!=",
"0",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"this",
".",
"innerNameIndex",
"]",
"-",
"this",
".",
"structOffset",
";",
"this",
".",
"innerName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"}",
"}",
"return",
"this",
".",
"innerName",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"getName",
"(",
")",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"getName",
"(",
")",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"\"n\"",
")",
";",
"if",
"(",
"getEnclosingTypeName",
"(",
")",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"getEnclosingTypeName",
"(",
")",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"\"n\"",
")",
";",
"if",
"(",
"getSourceName",
"(",
")",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"getSourceName",
"(",
")",
")",
";",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"void",
"initialize",
"(",
")",
"{",
"getModifiers",
"(",
")",
";",
"getName",
"(",
")",
";",
"getSourceName",
"(",
")",
";",
"getEnclosingTypeName",
"(",
")",
";",
"reset",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,301 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"AttributeNamesConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"ConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryMethod",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"MethodInfo",
"extends",
"ClassFileStruct",
"implements",
"IBinaryMethod",
",",
"Comparable",
"{",
"static",
"private",
"final",
"char",
"[",
"]",
"[",
"]",
"noException",
"=",
"CharOperation",
".",
"NO_CHAR_CHAR",
";",
"static",
"private",
"final",
"char",
"[",
"]",
"[",
"]",
"noArgumentNames",
"=",
"CharOperation",
".",
"NO_CHAR_CHAR",
";",
"protected",
"int",
"accessFlags",
";",
"protected",
"int",
"attributeBytes",
";",
"protected",
"char",
"[",
"]",
"descriptor",
";",
"protected",
"char",
"[",
"]",
"[",
"]",
"exceptionNames",
";",
"protected",
"char",
"[",
"]",
"name",
";",
"protected",
"char",
"[",
"]",
"signature",
";",
"protected",
"int",
"signatureUtf8Offset",
";",
"protected",
"long",
"tagBits",
";",
"protected",
"char",
"[",
"]",
"[",
"]",
"argumentNames",
";",
"protected",
"int",
"argumentNamesIndex",
";",
"public",
"static",
"MethodInfo",
"createMethod",
"(",
"byte",
"classFileBytes",
"[",
"]",
",",
"int",
"offsets",
"[",
"]",
",",
"int",
"offset",
")",
"{",
"MethodInfo",
"methodInfo",
"=",
"new",
"MethodInfo",
"(",
"classFileBytes",
",",
"offsets",
",",
"offset",
")",
";",
"int",
"attributesCount",
"=",
"methodInfo",
".",
"u2At",
"(",
"6",
")",
";",
"int",
"readOffset",
"=",
"8",
";",
"AnnotationInfo",
"[",
"]",
"annotations",
"=",
"null",
";",
"AnnotationInfo",
"[",
"]",
"[",
"]",
"parameterAnnotations",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"attributesCount",
";",
"i",
"++",
")",
"{",
"int",
"utf8Offset",
"=",
"methodInfo",
".",
"constantPoolOffsets",
"[",
"methodInfo",
".",
"u2At",
"(",
"readOffset",
")",
"]",
"-",
"methodInfo",
".",
"structOffset",
";",
"char",
"[",
"]",
"attributeName",
"=",
"methodInfo",
".",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"methodInfo",
".",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"if",
"(",
"attributeName",
".",
"length",
">",
"0",
")",
"{",
"switch",
"(",
"attributeName",
"[",
"0",
"]",
")",
"{",
"case",
"'S'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"AttributeNamesConstants",
".",
"SignatureName",
",",
"attributeName",
")",
")",
"methodInfo",
".",
"signatureUtf8Offset",
"=",
"methodInfo",
".",
"constantPoolOffsets",
"[",
"methodInfo",
".",
"u2At",
"(",
"readOffset",
"+",
"6",
")",
"]",
"-",
"methodInfo",
".",
"structOffset",
";",
"break",
";",
"case",
"'R'",
":",
"AnnotationInfo",
"[",
"]",
"methodAnnotations",
"=",
"null",
";",
"AnnotationInfo",
"[",
"]",
"[",
"]",
"paramAnnotations",
"=",
"null",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"RuntimeVisibleAnnotationsName",
")",
")",
"{",
"methodAnnotations",
"=",
"decodeMethodAnnotations",
"(",
"readOffset",
",",
"true",
",",
"methodInfo",
")",
";",
"}",
"else",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"RuntimeInvisibleAnnotationsName",
")",
")",
"{",
"methodAnnotations",
"=",
"decodeMethodAnnotations",
"(",
"readOffset",
",",
"false",
",",
"methodInfo",
")",
";",
"}",
"else",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"RuntimeVisibleParameterAnnotationsName",
")",
")",
"{",
"paramAnnotations",
"=",
"decodeParamAnnotations",
"(",
"readOffset",
",",
"true",
",",
"methodInfo",
")",
";",
"}",
"else",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"RuntimeInvisibleParameterAnnotationsName",
")",
")",
"{",
"paramAnnotations",
"=",
"decodeParamAnnotations",
"(",
"readOffset",
",",
"false",
",",
"methodInfo",
")",
";",
"}",
"if",
"(",
"methodAnnotations",
"!=",
"null",
")",
"{",
"if",
"(",
"annotations",
"==",
"null",
")",
"{",
"annotations",
"=",
"methodAnnotations",
";",
"}",
"else",
"{",
"int",
"length",
"=",
"annotations",
".",
"length",
";",
"AnnotationInfo",
"[",
"]",
"newAnnotations",
"=",
"new",
"AnnotationInfo",
"[",
"length",
"+",
"methodAnnotations",
".",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"annotations",
",",
"0",
",",
"newAnnotations",
",",
"0",
",",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"methodAnnotations",
",",
"0",
",",
"newAnnotations",
",",
"length",
",",
"methodAnnotations",
".",
"length",
")",
";",
"annotations",
"=",
"newAnnotations",
";",
"}",
"}",
"else",
"if",
"(",
"paramAnnotations",
"!=",
"null",
")",
"{",
"int",
"numberOfParameters",
"=",
"paramAnnotations",
".",
"length",
";",
"if",
"(",
"parameterAnnotations",
"==",
"null",
")",
"{",
"parameterAnnotations",
"=",
"paramAnnotations",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"p",
"=",
"0",
";",
"p",
"<",
"numberOfParameters",
";",
"p",
"++",
")",
"{",
"int",
"numberOfAnnotations",
"=",
"paramAnnotations",
"[",
"p",
"]",
"==",
"null",
"?",
"0",
":",
"paramAnnotations",
"[",
"p",
"]",
".",
"length",
";",
"if",
"(",
"numberOfAnnotations",
">",
"0",
")",
"{",
"if",
"(",
"parameterAnnotations",
"[",
"p",
"]",
"==",
"null",
")",
"{",
"parameterAnnotations",
"[",
"p",
"]",
"=",
"paramAnnotations",
"[",
"p",
"]",
";",
"}",
"else",
"{",
"int",
"length",
"=",
"parameterAnnotations",
"[",
"p",
"]",
".",
"length",
";",
"AnnotationInfo",
"[",
"]",
"newAnnotations",
"=",
"new",
"AnnotationInfo",
"[",
"length",
"+",
"numberOfAnnotations",
"]",
";",
"System",
".",
"arraycopy",
"(",
"parameterAnnotations",
"[",
"p",
"]",
",",
"0",
",",
"newAnnotations",
",",
"0",
",",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"paramAnnotations",
"[",
"p",
"]",
",",
"0",
",",
"newAnnotations",
",",
"length",
",",
"numberOfAnnotations",
")",
";",
"parameterAnnotations",
"[",
"p",
"]",
"=",
"newAnnotations",
";",
"}",
"}",
"}",
"}",
"}",
"break",
";",
"}",
"}",
"readOffset",
"+=",
"(",
"6",
"+",
"methodInfo",
".",
"u4At",
"(",
"readOffset",
"+",
"2",
")",
")",
";",
"}",
"methodInfo",
".",
"attributeBytes",
"=",
"readOffset",
";",
"if",
"(",
"parameterAnnotations",
"!=",
"null",
")",
"return",
"new",
"MethodInfoWithParameterAnnotations",
"(",
"methodInfo",
",",
"annotations",
",",
"parameterAnnotations",
")",
";",
"if",
"(",
"annotations",
"!=",
"null",
")",
"return",
"new",
"MethodInfoWithAnnotations",
"(",
"methodInfo",
",",
"annotations",
")",
";",
"return",
"methodInfo",
";",
"}",
"static",
"AnnotationInfo",
"[",
"]",
"decodeAnnotations",
"(",
"int",
"offset",
",",
"boolean",
"runtimeVisible",
",",
"int",
"numberOfAnnotations",
",",
"MethodInfo",
"methodInfo",
")",
"{",
"AnnotationInfo",
"[",
"]",
"result",
"=",
"new",
"AnnotationInfo",
"[",
"numberOfAnnotations",
"]",
";",
"int",
"readOffset",
"=",
"offset",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfAnnotations",
";",
"i",
"++",
")",
"{",
"result",
"[",
"i",
"]",
"=",
"new",
"AnnotationInfo",
"(",
"methodInfo",
".",
"reference",
",",
"methodInfo",
".",
"constantPoolOffsets",
",",
"readOffset",
"+",
"methodInfo",
".",
"structOffset",
",",
"runtimeVisible",
",",
"false",
")",
";",
"readOffset",
"+=",
"result",
"[",
"i",
"]",
".",
"readOffset",
";",
"}",
"return",
"result",
";",
"}",
"static",
"AnnotationInfo",
"[",
"]",
"decodeMethodAnnotations",
"(",
"int",
"offset",
",",
"boolean",
"runtimeVisible",
",",
"MethodInfo",
"methodInfo",
")",
"{",
"int",
"numberOfAnnotations",
"=",
"methodInfo",
".",
"u2At",
"(",
"offset",
"+",
"6",
")",
";",
"if",
"(",
"numberOfAnnotations",
">",
"0",
")",
"{",
"AnnotationInfo",
"[",
"]",
"annos",
"=",
"decodeAnnotations",
"(",
"offset",
"+",
"8",
",",
"runtimeVisible",
",",
"numberOfAnnotations",
",",
"methodInfo",
")",
";",
"if",
"(",
"runtimeVisible",
")",
"{",
"int",
"numStandardAnnotations",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfAnnotations",
";",
"i",
"++",
")",
"{",
"long",
"standardAnnoTagBits",
"=",
"annos",
"[",
"i",
"]",
".",
"standardAnnotationTagBits",
";",
"methodInfo",
".",
"tagBits",
"|=",
"standardAnnoTagBits",
";",
"if",
"(",
"standardAnnoTagBits",
"!=",
"0",
")",
"{",
"annos",
"[",
"i",
"]",
"=",
"null",
";",
"numStandardAnnotations",
"++",
";",
"}",
"}",
"if",
"(",
"numStandardAnnotations",
"!=",
"0",
")",
"{",
"if",
"(",
"numStandardAnnotations",
"==",
"numberOfAnnotations",
")",
"return",
"null",
";",
"AnnotationInfo",
"[",
"]",
"temp",
"=",
"new",
"AnnotationInfo",
"[",
"numberOfAnnotations",
"-",
"numStandardAnnotations",
"]",
";",
"int",
"tmpIndex",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfAnnotations",
";",
"i",
"++",
")",
"if",
"(",
"annos",
"[",
"i",
"]",
"!=",
"null",
")",
"temp",
"[",
"tmpIndex",
"++",
"]",
"=",
"annos",
"[",
"i",
"]",
";",
"annos",
"=",
"temp",
";",
"}",
"}",
"return",
"annos",
";",
"}",
"return",
"null",
";",
"}",
"static",
"AnnotationInfo",
"[",
"]",
"[",
"]",
"decodeParamAnnotations",
"(",
"int",
"offset",
",",
"boolean",
"runtimeVisible",
",",
"MethodInfo",
"methodInfo",
")",
"{",
"AnnotationInfo",
"[",
"]",
"[",
"]",
"allParamAnnotations",
"=",
"null",
";",
"int",
"numberOfParameters",
"=",
"methodInfo",
".",
"u1At",
"(",
"offset",
"+",
"6",
")",
";",
"if",
"(",
"numberOfParameters",
">",
"0",
")",
"{",
"int",
"readOffset",
"=",
"offset",
"+",
"7",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfParameters",
";",
"i",
"++",
")",
"{",
"int",
"numberOfAnnotations",
"=",
"methodInfo",
".",
"u2At",
"(",
"readOffset",
")",
";",
"readOffset",
"+=",
"2",
";",
"if",
"(",
"numberOfAnnotations",
">",
"0",
")",
"{",
"if",
"(",
"allParamAnnotations",
"==",
"null",
")",
"allParamAnnotations",
"=",
"new",
"AnnotationInfo",
"[",
"numberOfParameters",
"]",
"[",
"]",
";",
"AnnotationInfo",
"[",
"]",
"annos",
"=",
"decodeAnnotations",
"(",
"readOffset",
",",
"runtimeVisible",
",",
"numberOfAnnotations",
",",
"methodInfo",
")",
";",
"allParamAnnotations",
"[",
"i",
"]",
"=",
"annos",
";",
"for",
"(",
"int",
"aIndex",
"=",
"0",
";",
"aIndex",
"<",
"annos",
".",
"length",
";",
"aIndex",
"++",
")",
"readOffset",
"+=",
"annos",
"[",
"aIndex",
"]",
".",
"readOffset",
";",
"}",
"}",
"}",
"return",
"allParamAnnotations",
";",
"}",
"protected",
"MethodInfo",
"(",
"byte",
"classFileBytes",
"[",
"]",
",",
"int",
"offsets",
"[",
"]",
",",
"int",
"offset",
")",
"{",
"super",
"(",
"classFileBytes",
",",
"offsets",
",",
"offset",
")",
";",
"this",
".",
"accessFlags",
"=",
"-",
"1",
";",
"this",
".",
"signatureUtf8Offset",
"=",
"-",
"1",
";",
"}",
"public",
"int",
"compareTo",
"(",
"Object",
"o",
")",
"{",
"MethodInfo",
"otherMethod",
"=",
"(",
"MethodInfo",
")",
"o",
";",
"int",
"result",
"=",
"new",
"String",
"(",
"getSelector",
"(",
")",
")",
".",
"compareTo",
"(",
"new",
"String",
"(",
"otherMethod",
".",
"getSelector",
"(",
")",
")",
")",
";",
"if",
"(",
"result",
"!=",
"0",
")",
"return",
"result",
";",
"return",
"new",
"String",
"(",
"getMethodDescriptor",
"(",
")",
")",
".",
"compareTo",
"(",
"new",
"String",
"(",
"otherMethod",
".",
"getMethodDescriptor",
"(",
")",
")",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"MethodInfo",
")",
")",
"{",
"return",
"false",
";",
"}",
"MethodInfo",
"otherMethod",
"=",
"(",
"MethodInfo",
")",
"o",
";",
"return",
"CharOperation",
".",
"equals",
"(",
"getSelector",
"(",
")",
",",
"otherMethod",
".",
"getSelector",
"(",
")",
")",
"&&",
"CharOperation",
".",
"equals",
"(",
"getMethodDescriptor",
"(",
")",
",",
"otherMethod",
".",
"getMethodDescriptor",
"(",
")",
")",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"CharOperation",
".",
"hashCode",
"(",
"getSelector",
"(",
")",
")",
"+",
"CharOperation",
".",
"hashCode",
"(",
"getMethodDescriptor",
"(",
")",
")",
";",
"}",
"public",
"IBinaryAnnotation",
"[",
"]",
"getAnnotations",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"char",
"[",
"]",
"[",
"]",
"getArgumentNames",
"(",
")",
"{",
"if",
"(",
"this",
".",
"argumentNames",
"==",
"null",
")",
"{",
"readCodeAttribute",
"(",
")",
";",
"}",
"return",
"this",
".",
"argumentNames",
";",
"}",
"public",
"Object",
"getDefaultValue",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"char",
"[",
"]",
"[",
"]",
"getExceptionTypeNames",
"(",
")",
"{",
"if",
"(",
"this",
".",
"exceptionNames",
"==",
"null",
")",
"{",
"readExceptionAttributes",
"(",
")",
";",
"}",
"return",
"this",
".",
"exceptionNames",
";",
"}",
"public",
"char",
"[",
"]",
"getGenericSignature",
"(",
")",
"{",
"if",
"(",
"this",
".",
"signatureUtf8Offset",
"!=",
"-",
"1",
")",
"{",
"if",
"(",
"this",
".",
"signature",
"==",
"null",
")",
"{",
"this",
".",
"signature",
"=",
"utf8At",
"(",
"this",
".",
"signatureUtf8Offset",
"+",
"3",
",",
"u2At",
"(",
"this",
".",
"signatureUtf8Offset",
"+",
"1",
")",
")",
";",
"}",
"return",
"this",
".",
"signature",
";",
"}",
"return",
"null",
";",
"}",
"public",
"char",
"[",
"]",
"getMethodDescriptor",
"(",
")",
"{",
"if",
"(",
"this",
".",
"descriptor",
"==",
"null",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"4",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"this",
".",
"descriptor",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"}",
"return",
"this",
".",
"descriptor",
";",
"}",
"public",
"int",
"getModifiers",
"(",
")",
"{",
"if",
"(",
"this",
".",
"accessFlags",
"==",
"-",
"1",
")",
"{",
"this",
".",
"accessFlags",
"=",
"u2At",
"(",
"0",
")",
";",
"readModifierRelatedAttributes",
"(",
")",
";",
"}",
"return",
"this",
".",
"accessFlags",
";",
"}",
"public",
"IBinaryAnnotation",
"[",
"]",
"getParameterAnnotations",
"(",
"int",
"index",
")",
"{",
"return",
"null",
";",
"}",
"public",
"char",
"[",
"]",
"getSelector",
"(",
")",
"{",
"if",
"(",
"this",
".",
"name",
"==",
"null",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"2",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"this",
".",
"name",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"}",
"return",
"this",
".",
"name",
";",
"}",
"public",
"long",
"getTagBits",
"(",
")",
"{",
"return",
"this",
".",
"tagBits",
";",
"}",
"protected",
"void",
"initialize",
"(",
")",
"{",
"getModifiers",
"(",
")",
";",
"getSelector",
"(",
")",
";",
"getMethodDescriptor",
"(",
")",
";",
"getExceptionTypeNames",
"(",
")",
";",
"getGenericSignature",
"(",
")",
";",
"getArgumentNames",
"(",
")",
";",
"reset",
"(",
")",
";",
"}",
"public",
"boolean",
"isClinit",
"(",
")",
"{",
"char",
"[",
"]",
"selector",
"=",
"getSelector",
"(",
")",
";",
"return",
"selector",
"[",
"0",
"]",
"==",
"'<'",
"&&",
"selector",
".",
"length",
"==",
"8",
";",
"}",
"public",
"boolean",
"isConstructor",
"(",
")",
"{",
"char",
"[",
"]",
"selector",
"=",
"getSelector",
"(",
")",
";",
"return",
"selector",
"[",
"0",
"]",
"==",
"'<'",
"&&",
"selector",
".",
"length",
"==",
"6",
";",
"}",
"public",
"boolean",
"isSynthetic",
"(",
")",
"{",
"return",
"(",
"getModifiers",
"(",
")",
"&",
"ClassFileConstants",
".",
"AccSynthetic",
")",
"!=",
"0",
";",
"}",
"private",
"void",
"readExceptionAttributes",
"(",
")",
"{",
"int",
"attributesCount",
"=",
"u2At",
"(",
"6",
")",
";",
"int",
"readOffset",
"=",
"8",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"attributesCount",
";",
"i",
"++",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"attributeName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"ExceptionsName",
")",
")",
"{",
"int",
"entriesNumber",
"=",
"u2At",
"(",
"readOffset",
"+",
"6",
")",
";",
"readOffset",
"+=",
"8",
";",
"if",
"(",
"entriesNumber",
"==",
"0",
")",
"{",
"this",
".",
"exceptionNames",
"=",
"noException",
";",
"}",
"else",
"{",
"this",
".",
"exceptionNames",
"=",
"new",
"char",
"[",
"entriesNumber",
"]",
"[",
"]",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"entriesNumber",
";",
"j",
"++",
")",
"{",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
"+",
"1",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"this",
".",
"exceptionNames",
"[",
"j",
"]",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"readOffset",
"+=",
"2",
";",
"}",
"}",
"}",
"else",
"{",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"readOffset",
"+",
"2",
")",
")",
";",
"}",
"}",
"if",
"(",
"this",
".",
"exceptionNames",
"==",
"null",
")",
"{",
"this",
".",
"exceptionNames",
"=",
"noException",
";",
"}",
"}",
"private",
"void",
"readModifierRelatedAttributes",
"(",
")",
"{",
"int",
"attributesCount",
"=",
"u2At",
"(",
"6",
")",
";",
"int",
"readOffset",
"=",
"8",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"attributesCount",
";",
"i",
"++",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"attributeName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"if",
"(",
"attributeName",
".",
"length",
"!=",
"0",
")",
"{",
"switch",
"(",
"attributeName",
"[",
"0",
"]",
")",
"{",
"case",
"'D'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"DeprecatedName",
")",
")",
"this",
".",
"accessFlags",
"|=",
"ClassFileConstants",
".",
"AccDeprecated",
";",
"break",
";",
"case",
"'S'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"SyntheticName",
")",
")",
"this",
".",
"accessFlags",
"|=",
"ClassFileConstants",
".",
"AccSynthetic",
";",
"break",
";",
"case",
"'A'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"AnnotationDefaultName",
")",
")",
"this",
".",
"accessFlags",
"|=",
"ClassFileConstants",
".",
"AccAnnotationDefault",
";",
"break",
";",
"case",
"'V'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"VarargsName",
")",
")",
"this",
".",
"accessFlags",
"|=",
"ClassFileConstants",
".",
"AccVarargs",
";",
"}",
"}",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"readOffset",
"+",
"2",
")",
")",
";",
"}",
"}",
"public",
"int",
"sizeInBytes",
"(",
")",
"{",
"return",
"this",
".",
"attributeBytes",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"toString",
"(",
"buffer",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"void",
"toString",
"(",
"StringBuffer",
"buffer",
")",
"{",
"buffer",
".",
"append",
"(",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
";",
"toStringContent",
"(",
"buffer",
")",
";",
"}",
"protected",
"void",
"toStringContent",
"(",
"StringBuffer",
"buffer",
")",
"{",
"int",
"modifiers",
"=",
"getModifiers",
"(",
")",
";",
"char",
"[",
"]",
"desc",
"=",
"getGenericSignature",
"(",
")",
";",
"if",
"(",
"desc",
"==",
"null",
")",
"desc",
"=",
"getMethodDescriptor",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"'{'",
")",
".",
"append",
"(",
"(",
"(",
"modifiers",
"&",
"ClassFileConstants",
".",
"AccDeprecated",
")",
"!=",
"0",
"?",
"\"deprecated",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0001",
")",
"==",
"1",
"?",
"\"public",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0002",
")",
"==",
"0x0002",
"?",
"\"private",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0004",
")",
"==",
"0x0004",
"?",
"\"protected",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0008",
")",
"==",
"0x000008",
"?",
"\"static",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0010",
")",
"==",
"0x0010",
"?",
"\"final",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0040",
")",
"==",
"0x0040",
"?",
"\"bridge",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0080",
")",
"==",
"0x0080",
"?",
"\"varargs",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
")",
".",
"append",
"(",
"getSelector",
"(",
")",
")",
".",
"append",
"(",
"desc",
")",
".",
"append",
"(",
"'}'",
")",
";",
"}",
"private",
"void",
"readCodeAttribute",
"(",
")",
"{",
"int",
"attributesCount",
"=",
"u2At",
"(",
"6",
")",
";",
"int",
"readOffset",
"=",
"8",
";",
"if",
"(",
"attributesCount",
"!=",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"attributesCount",
";",
"i",
"++",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"attributeName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"CodeName",
")",
")",
"{",
"decodeCodeAttribute",
"(",
"readOffset",
")",
";",
"if",
"(",
"this",
".",
"argumentNames",
"==",
"null",
")",
"{",
"this",
".",
"argumentNames",
"=",
"noArgumentNames",
";",
"}",
"return",
";",
"}",
"else",
"{",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"readOffset",
"+",
"2",
")",
")",
";",
"}",
"}",
"}",
"this",
".",
"argumentNames",
"=",
"noArgumentNames",
";",
"}",
"private",
"void",
"decodeCodeAttribute",
"(",
"int",
"offset",
")",
"{",
"int",
"readOffset",
"=",
"offset",
"+",
"10",
";",
"int",
"codeLength",
"=",
"(",
"int",
")",
"u4At",
"(",
"readOffset",
")",
";",
"readOffset",
"+=",
"(",
"4",
"+",
"codeLength",
")",
";",
"int",
"exceptionTableLength",
"=",
"u2At",
"(",
"readOffset",
")",
";",
"readOffset",
"+=",
"2",
";",
"if",
"(",
"exceptionTableLength",
"!=",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"exceptionTableLength",
";",
"i",
"++",
")",
"{",
"readOffset",
"+=",
"8",
";",
"}",
"}",
"int",
"attributesCount",
"=",
"u2At",
"(",
"readOffset",
")",
";",
"readOffset",
"+=",
"2",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"attributesCount",
";",
"i",
"++",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"attributeName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"LocalVariableTableName",
")",
")",
"{",
"decodeLocalVariableAttribute",
"(",
"readOffset",
",",
"codeLength",
")",
";",
"}",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"readOffset",
"+",
"2",
")",
")",
";",
"}",
"}",
"private",
"void",
"decodeLocalVariableAttribute",
"(",
"int",
"offset",
",",
"int",
"codeLength",
")",
"{",
"int",
"readOffset",
"=",
"offset",
"+",
"6",
";",
"final",
"int",
"length",
"=",
"u2At",
"(",
"readOffset",
")",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"readOffset",
"+=",
"2",
";",
"this",
".",
"argumentNames",
"=",
"new",
"char",
"[",
"length",
"]",
"[",
"]",
";",
"this",
".",
"argumentNamesIndex",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"int",
"startPC",
"=",
"u2At",
"(",
"readOffset",
")",
";",
"if",
"(",
"startPC",
"==",
"0",
")",
"{",
"int",
"nameIndex",
"=",
"u2At",
"(",
"4",
"+",
"readOffset",
")",
";",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"nameIndex",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"localVariableName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"localVariableName",
",",
"ConstantPool",
".",
"This",
")",
")",
"{",
"this",
".",
"argumentNames",
"[",
"this",
".",
"argumentNamesIndex",
"++",
"]",
"=",
"localVariableName",
";",
"}",
"}",
"else",
"{",
"break",
";",
"}",
"readOffset",
"+=",
"10",
";",
"}",
"if",
"(",
"this",
".",
"argumentNamesIndex",
"!=",
"this",
".",
"argumentNames",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"argumentNames",
",",
"0",
",",
"(",
"this",
".",
"argumentNames",
"=",
"new",
"char",
"[",
"this",
".",
"argumentNamesIndex",
"]",
"[",
"]",
")",
",",
"0",
",",
"this",
".",
"argumentNamesIndex",
")",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
4,302 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"AttributeNamesConstants",
";",
"public",
"class",
"AnnotationMethodInfo",
"extends",
"MethodInfo",
"{",
"protected",
"Object",
"defaultValue",
"=",
"null",
";",
"public",
"static",
"MethodInfo",
"createAnnotationMethod",
"(",
"byte",
"classFileBytes",
"[",
"]",
",",
"int",
"offsets",
"[",
"]",
",",
"int",
"offset",
")",
"{",
"MethodInfo",
"methodInfo",
"=",
"new",
"MethodInfo",
"(",
"classFileBytes",
",",
"offsets",
",",
"offset",
")",
";",
"int",
"attributesCount",
"=",
"methodInfo",
".",
"u2At",
"(",
"6",
")",
";",
"int",
"readOffset",
"=",
"8",
";",
"AnnotationInfo",
"[",
"]",
"annotations",
"=",
"null",
";",
"Object",
"defaultValue",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"attributesCount",
";",
"i",
"++",
")",
"{",
"int",
"utf8Offset",
"=",
"methodInfo",
".",
"constantPoolOffsets",
"[",
"methodInfo",
".",
"u2At",
"(",
"readOffset",
")",
"]",
"-",
"methodInfo",
".",
"structOffset",
";",
"char",
"[",
"]",
"attributeName",
"=",
"methodInfo",
".",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"methodInfo",
".",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"if",
"(",
"attributeName",
".",
"length",
">",
"0",
")",
"{",
"switch",
"(",
"attributeName",
"[",
"0",
"]",
")",
"{",
"case",
"'A'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"AnnotationDefaultName",
")",
")",
"{",
"AnnotationInfo",
"info",
"=",
"new",
"AnnotationInfo",
"(",
"methodInfo",
".",
"reference",
",",
"methodInfo",
".",
"constantPoolOffsets",
",",
"readOffset",
"+",
"6",
"+",
"methodInfo",
".",
"structOffset",
")",
";",
"defaultValue",
"=",
"info",
".",
"decodeDefaultValue",
"(",
")",
";",
"}",
"break",
";",
"case",
"'S'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"AttributeNamesConstants",
".",
"SignatureName",
",",
"attributeName",
")",
")",
"methodInfo",
".",
"signatureUtf8Offset",
"=",
"methodInfo",
".",
"constantPoolOffsets",
"[",
"methodInfo",
".",
"u2At",
"(",
"readOffset",
"+",
"6",
")",
"]",
"-",
"methodInfo",
".",
"structOffset",
";",
"break",
";",
"case",
"'R'",
":",
"AnnotationInfo",
"[",
"]",
"methodAnnotations",
"=",
"null",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"RuntimeVisibleAnnotationsName",
")",
")",
"{",
"methodAnnotations",
"=",
"decodeMethodAnnotations",
"(",
"readOffset",
",",
"true",
",",
"methodInfo",
")",
";",
"}",
"else",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"RuntimeInvisibleAnnotationsName",
")",
")",
"{",
"methodAnnotations",
"=",
"decodeMethodAnnotations",
"(",
"readOffset",
",",
"false",
",",
"methodInfo",
")",
";",
"}",
"if",
"(",
"methodAnnotations",
"!=",
"null",
")",
"{",
"if",
"(",
"annotations",
"==",
"null",
")",
"{",
"annotations",
"=",
"methodAnnotations",
";",
"}",
"else",
"{",
"int",
"length",
"=",
"annotations",
".",
"length",
";",
"AnnotationInfo",
"[",
"]",
"newAnnotations",
"=",
"new",
"AnnotationInfo",
"[",
"length",
"+",
"methodAnnotations",
".",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"annotations",
",",
"0",
",",
"newAnnotations",
",",
"0",
",",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"methodAnnotations",
",",
"0",
",",
"newAnnotations",
",",
"length",
",",
"methodAnnotations",
".",
"length",
")",
";",
"annotations",
"=",
"newAnnotations",
";",
"}",
"}",
"break",
";",
"}",
"}",
"readOffset",
"+=",
"(",
"6",
"+",
"methodInfo",
".",
"u4At",
"(",
"readOffset",
"+",
"2",
")",
")",
";",
"}",
"methodInfo",
".",
"attributeBytes",
"=",
"readOffset",
";",
"if",
"(",
"defaultValue",
"!=",
"null",
")",
"{",
"if",
"(",
"annotations",
"!=",
"null",
")",
"{",
"return",
"new",
"AnnotationMethodInfoWithAnnotations",
"(",
"methodInfo",
",",
"defaultValue",
",",
"annotations",
")",
";",
"}",
"return",
"new",
"AnnotationMethodInfo",
"(",
"methodInfo",
",",
"defaultValue",
")",
";",
"}",
"if",
"(",
"annotations",
"!=",
"null",
")",
"return",
"new",
"MethodInfoWithAnnotations",
"(",
"methodInfo",
",",
"annotations",
")",
";",
"return",
"methodInfo",
";",
"}",
"AnnotationMethodInfo",
"(",
"MethodInfo",
"methodInfo",
",",
"Object",
"defaultValue",
")",
"{",
"super",
"(",
"methodInfo",
".",
"reference",
",",
"methodInfo",
".",
"constantPoolOffsets",
",",
"methodInfo",
".",
"structOffset",
")",
";",
"this",
".",
"defaultValue",
"=",
"defaultValue",
";",
"this",
".",
"accessFlags",
"=",
"methodInfo",
".",
"accessFlags",
";",
"this",
".",
"attributeBytes",
"=",
"methodInfo",
".",
"attributeBytes",
";",
"this",
".",
"descriptor",
"=",
"methodInfo",
".",
"descriptor",
";",
"this",
".",
"exceptionNames",
"=",
"methodInfo",
".",
"exceptionNames",
";",
"this",
".",
"name",
"=",
"methodInfo",
".",
"name",
";",
"this",
".",
"signature",
"=",
"methodInfo",
".",
"signature",
";",
"this",
".",
"signatureUtf8Offset",
"=",
"methodInfo",
".",
"signatureUtf8Offset",
";",
"this",
".",
"tagBits",
"=",
"methodInfo",
".",
"tagBits",
";",
"}",
"public",
"Object",
"getDefaultValue",
"(",
")",
"{",
"return",
"this",
".",
"defaultValue",
";",
"}",
"protected",
"void",
"toStringContent",
"(",
"StringBuffer",
"buffer",
")",
"{",
"super",
".",
"toStringContent",
"(",
"buffer",
")",
";",
"if",
"(",
"this",
".",
"defaultValue",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"",
"default",
"\"",
")",
";",
"if",
"(",
"this",
".",
"defaultValue",
"instanceof",
"Object",
"[",
"]",
")",
"{",
"buffer",
".",
"append",
"(",
"'{'",
")",
";",
"Object",
"[",
"]",
"elements",
"=",
"(",
"Object",
"[",
"]",
")",
"this",
".",
"defaultValue",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"len",
"=",
"elements",
".",
"length",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
">",
"0",
")",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"buffer",
".",
"append",
"(",
"elements",
"[",
"i",
"]",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"'}'",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"this",
".",
"defaultValue",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"}",
"}",
"</s>"
] |
4,303 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
";",
"import",
"java",
".",
"util",
".",
"Arrays",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Annotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"ConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TagBits",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"AnnotationInfo",
"extends",
"ClassFileStruct",
"implements",
"IBinaryAnnotation",
"{",
"private",
"char",
"[",
"]",
"typename",
";",
"private",
"ElementValuePairInfo",
"[",
"]",
"pairs",
";",
"long",
"standardAnnotationTagBits",
"=",
"0",
";",
"int",
"readOffset",
"=",
"0",
";",
"static",
"Object",
"[",
"]",
"EmptyValueArray",
"=",
"new",
"Object",
"[",
"0",
"]",
";",
"AnnotationInfo",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"int",
"[",
"]",
"contantPoolOffsets",
",",
"int",
"offset",
")",
"{",
"super",
"(",
"classFileBytes",
",",
"contantPoolOffsets",
",",
"offset",
")",
";",
"}",
"AnnotationInfo",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"int",
"[",
"]",
"contantPoolOffsets",
",",
"int",
"offset",
",",
"boolean",
"runtimeVisible",
",",
"boolean",
"populate",
")",
"{",
"this",
"(",
"classFileBytes",
",",
"contantPoolOffsets",
",",
"offset",
")",
";",
"if",
"(",
"populate",
")",
"decodeAnnotation",
"(",
")",
";",
"else",
"this",
".",
"readOffset",
"=",
"scanAnnotation",
"(",
"0",
",",
"runtimeVisible",
",",
"true",
")",
";",
"}",
"private",
"void",
"decodeAnnotation",
"(",
")",
"{",
"this",
".",
"readOffset",
"=",
"0",
";",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"0",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"this",
".",
"typename",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"int",
"numberOfPairs",
"=",
"u2At",
"(",
"2",
")",
";",
"this",
".",
"readOffset",
"+=",
"4",
";",
"this",
".",
"pairs",
"=",
"numberOfPairs",
"==",
"0",
"?",
"ElementValuePairInfo",
".",
"NoMembers",
":",
"new",
"ElementValuePairInfo",
"[",
"numberOfPairs",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfPairs",
";",
"i",
"++",
")",
"{",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"membername",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"Object",
"value",
"=",
"decodeDefaultValue",
"(",
")",
";",
"this",
".",
"pairs",
"[",
"i",
"]",
"=",
"new",
"ElementValuePairInfo",
"(",
"membername",
",",
"value",
")",
";",
"}",
"}",
"Object",
"decodeDefaultValue",
"(",
")",
"{",
"Object",
"value",
"=",
"null",
";",
"int",
"tag",
"=",
"u1At",
"(",
"this",
".",
"readOffset",
")",
";",
"this",
".",
"readOffset",
"++",
";",
"int",
"constValueOffset",
"=",
"-",
"1",
";",
"switch",
"(",
"tag",
")",
"{",
"case",
"'Z'",
":",
"constValueOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"value",
"=",
"BooleanConstant",
".",
"fromValue",
"(",
"i4At",
"(",
"constValueOffset",
"+",
"1",
")",
"==",
"1",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'I'",
":",
"constValueOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"value",
"=",
"IntConstant",
".",
"fromValue",
"(",
"i4At",
"(",
"constValueOffset",
"+",
"1",
")",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'C'",
":",
"constValueOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"value",
"=",
"CharConstant",
".",
"fromValue",
"(",
"(",
"char",
")",
"i4At",
"(",
"constValueOffset",
"+",
"1",
")",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'B'",
":",
"constValueOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"value",
"=",
"ByteConstant",
".",
"fromValue",
"(",
"(",
"byte",
")",
"i4At",
"(",
"constValueOffset",
"+",
"1",
")",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'S'",
":",
"constValueOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"value",
"=",
"ShortConstant",
".",
"fromValue",
"(",
"(",
"short",
")",
"i4At",
"(",
"constValueOffset",
"+",
"1",
")",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'D'",
":",
"constValueOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"value",
"=",
"DoubleConstant",
".",
"fromValue",
"(",
"doubleAt",
"(",
"constValueOffset",
"+",
"1",
")",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'F'",
":",
"constValueOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"value",
"=",
"FloatConstant",
".",
"fromValue",
"(",
"floatAt",
"(",
"constValueOffset",
"+",
"1",
")",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'J'",
":",
"constValueOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"value",
"=",
"LongConstant",
".",
"fromValue",
"(",
"i8At",
"(",
"constValueOffset",
"+",
"1",
")",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'s'",
":",
"constValueOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"value",
"=",
"StringConstant",
".",
"fromValue",
"(",
"String",
".",
"valueOf",
"(",
"utf8At",
"(",
"constValueOffset",
"+",
"3",
",",
"u2At",
"(",
"constValueOffset",
"+",
"1",
")",
")",
")",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'e'",
":",
"constValueOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"typeName",
"=",
"utf8At",
"(",
"constValueOffset",
"+",
"3",
",",
"u2At",
"(",
"constValueOffset",
"+",
"1",
")",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"constValueOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"constName",
"=",
"utf8At",
"(",
"constValueOffset",
"+",
"3",
",",
"u2At",
"(",
"constValueOffset",
"+",
"1",
")",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"value",
"=",
"new",
"EnumConstantSignature",
"(",
"typeName",
",",
"constName",
")",
";",
"break",
";",
"case",
"'c'",
":",
"constValueOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"className",
"=",
"utf8At",
"(",
"constValueOffset",
"+",
"3",
",",
"u2At",
"(",
"constValueOffset",
"+",
"1",
")",
")",
";",
"value",
"=",
"new",
"ClassSignature",
"(",
"className",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'@'",
":",
"value",
"=",
"new",
"AnnotationInfo",
"(",
"this",
".",
"reference",
",",
"this",
".",
"constantPoolOffsets",
",",
"this",
".",
"readOffset",
"+",
"this",
".",
"structOffset",
",",
"false",
",",
"true",
")",
";",
"this",
".",
"readOffset",
"+=",
"(",
"(",
"AnnotationInfo",
")",
"value",
")",
".",
"readOffset",
";",
"break",
";",
"case",
"'['",
":",
"int",
"numberOfValues",
"=",
"u2At",
"(",
"this",
".",
"readOffset",
")",
";",
"this",
".",
"readOffset",
"+=",
"2",
";",
"if",
"(",
"numberOfValues",
"==",
"0",
")",
"{",
"value",
"=",
"EmptyValueArray",
";",
"}",
"else",
"{",
"Object",
"[",
"]",
"arrayElements",
"=",
"new",
"Object",
"[",
"numberOfValues",
"]",
";",
"value",
"=",
"arrayElements",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfValues",
";",
"i",
"++",
")",
"arrayElements",
"[",
"i",
"]",
"=",
"decodeDefaultValue",
"(",
")",
";",
"}",
"break",
";",
"default",
":",
"throw",
"new",
"IllegalStateException",
"(",
"\"\"",
"+",
"(",
"char",
")",
"tag",
")",
";",
"}",
"return",
"value",
";",
"}",
"public",
"IBinaryElementValuePair",
"[",
"]",
"getElementValuePairs",
"(",
")",
"{",
"if",
"(",
"this",
".",
"pairs",
"==",
"null",
")",
"initialize",
"(",
")",
";",
"return",
"this",
".",
"pairs",
";",
"}",
"public",
"char",
"[",
"]",
"getTypeName",
"(",
")",
"{",
"return",
"this",
".",
"typename",
";",
"}",
"void",
"initialize",
"(",
")",
"{",
"if",
"(",
"this",
".",
"pairs",
"==",
"null",
")",
"decodeAnnotation",
"(",
")",
";",
"}",
"private",
"int",
"readRetentionPolicy",
"(",
"int",
"offset",
")",
"{",
"int",
"currentOffset",
"=",
"offset",
";",
"int",
"tag",
"=",
"u1At",
"(",
"currentOffset",
")",
";",
"currentOffset",
"++",
";",
"switch",
"(",
"tag",
")",
"{",
"case",
"'e'",
":",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"currentOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"typeName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"currentOffset",
"+=",
"2",
";",
"if",
"(",
"typeName",
".",
"length",
"==",
"38",
"&&",
"CharOperation",
".",
"equals",
"(",
"typeName",
",",
"ConstantPool",
".",
"JAVA_LANG_ANNOTATION_RETENTIONPOLICY",
")",
")",
"{",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"currentOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"constName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"this",
".",
"standardAnnotationTagBits",
"|=",
"Annotation",
".",
"getRetentionPolicy",
"(",
"constName",
")",
";",
"}",
"currentOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'B'",
":",
"case",
"'C'",
":",
"case",
"'D'",
":",
"case",
"'F'",
":",
"case",
"'I'",
":",
"case",
"'J'",
":",
"case",
"'S'",
":",
"case",
"'Z'",
":",
"case",
"'s'",
":",
"case",
"'c'",
":",
"currentOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'@'",
":",
"currentOffset",
"=",
"scanAnnotation",
"(",
"currentOffset",
",",
"false",
",",
"false",
")",
";",
"break",
";",
"case",
"'['",
":",
"int",
"numberOfValues",
"=",
"u2At",
"(",
"currentOffset",
")",
";",
"currentOffset",
"+=",
"2",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfValues",
";",
"i",
"++",
")",
"currentOffset",
"=",
"scanElementValue",
"(",
"currentOffset",
")",
";",
"break",
";",
"default",
":",
"throw",
"new",
"IllegalStateException",
"(",
")",
";",
"}",
"return",
"currentOffset",
";",
"}",
"private",
"int",
"readTargetValue",
"(",
"int",
"offset",
")",
"{",
"int",
"currentOffset",
"=",
"offset",
";",
"int",
"tag",
"=",
"u1At",
"(",
"currentOffset",
")",
";",
"currentOffset",
"++",
";",
"switch",
"(",
"tag",
")",
"{",
"case",
"'e'",
":",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"currentOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"typeName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"currentOffset",
"+=",
"2",
";",
"if",
"(",
"typeName",
".",
"length",
"==",
"34",
"&&",
"CharOperation",
".",
"equals",
"(",
"typeName",
",",
"ConstantPool",
".",
"JAVA_LANG_ANNOTATION_ELEMENTTYPE",
")",
")",
"{",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"currentOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"constName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"this",
".",
"standardAnnotationTagBits",
"|=",
"Annotation",
".",
"getTargetElementType",
"(",
"constName",
")",
";",
"}",
"currentOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'B'",
":",
"case",
"'C'",
":",
"case",
"'D'",
":",
"case",
"'F'",
":",
"case",
"'I'",
":",
"case",
"'J'",
":",
"case",
"'S'",
":",
"case",
"'Z'",
":",
"case",
"'s'",
":",
"case",
"'c'",
":",
"currentOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'@'",
":",
"currentOffset",
"=",
"scanAnnotation",
"(",
"currentOffset",
",",
"false",
",",
"false",
")",
";",
"break",
";",
"case",
"'['",
":",
"int",
"numberOfValues",
"=",
"u2At",
"(",
"currentOffset",
")",
";",
"currentOffset",
"+=",
"2",
";",
"if",
"(",
"numberOfValues",
"==",
"0",
")",
"{",
"this",
".",
"standardAnnotationTagBits",
"|=",
"TagBits",
".",
"AnnotationTarget",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfValues",
";",
"i",
"++",
")",
"currentOffset",
"=",
"readTargetValue",
"(",
"currentOffset",
")",
";",
"}",
"break",
";",
"default",
":",
"throw",
"new",
"IllegalStateException",
"(",
")",
";",
"}",
"return",
"currentOffset",
";",
"}",
"private",
"int",
"scanAnnotation",
"(",
"int",
"offset",
",",
"boolean",
"expectRuntimeVisibleAnno",
",",
"boolean",
"toplevel",
")",
"{",
"int",
"currentOffset",
"=",
"offset",
";",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"offset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"typeName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"if",
"(",
"toplevel",
")",
"this",
".",
"typename",
"=",
"typeName",
";",
"int",
"numberOfPairs",
"=",
"u2At",
"(",
"offset",
"+",
"2",
")",
";",
"currentOffset",
"+=",
"4",
";",
"if",
"(",
"expectRuntimeVisibleAnno",
"&&",
"toplevel",
")",
"{",
"switch",
"(",
"typeName",
".",
"length",
")",
"{",
"case",
"22",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"typeName",
",",
"ConstantPool",
".",
"JAVA_LANG_DEPRECATED",
")",
")",
"{",
"this",
".",
"standardAnnotationTagBits",
"|=",
"TagBits",
".",
"AnnotationDeprecated",
";",
"return",
"currentOffset",
";",
"}",
"break",
";",
"case",
"23",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"typeName",
",",
"ConstantPool",
".",
"JAVA_LANG_SAFEVARARGS",
")",
")",
"{",
"this",
".",
"standardAnnotationTagBits",
"|=",
"TagBits",
".",
"AnnotationSafeVarargs",
";",
"return",
"currentOffset",
";",
"}",
"break",
";",
"case",
"29",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"typeName",
",",
"ConstantPool",
".",
"JAVA_LANG_ANNOTATION_TARGET",
")",
")",
"{",
"currentOffset",
"+=",
"2",
";",
"return",
"readTargetValue",
"(",
"currentOffset",
")",
";",
"}",
"break",
";",
"case",
"32",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"typeName",
",",
"ConstantPool",
".",
"JAVA_LANG_ANNOTATION_RETENTION",
")",
")",
"{",
"currentOffset",
"+=",
"2",
";",
"return",
"readRetentionPolicy",
"(",
"currentOffset",
")",
";",
"}",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"typeName",
",",
"ConstantPool",
".",
"JAVA_LANG_ANNOTATION_INHERITED",
")",
")",
"{",
"this",
".",
"standardAnnotationTagBits",
"|=",
"TagBits",
".",
"AnnotationInherited",
";",
"return",
"currentOffset",
";",
"}",
"break",
";",
"case",
"33",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"typeName",
",",
"ConstantPool",
".",
"JAVA_LANG_ANNOTATION_DOCUMENTED",
")",
")",
"{",
"this",
".",
"standardAnnotationTagBits",
"|=",
"TagBits",
".",
"AnnotationDocumented",
";",
"return",
"currentOffset",
";",
"}",
"break",
";",
"case",
"52",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"typeName",
",",
"ConstantPool",
".",
"JAVA_LANG_INVOKE_METHODHANDLE_POLYMORPHICSIGNATURE",
")",
")",
"{",
"this",
".",
"standardAnnotationTagBits",
"|=",
"TagBits",
".",
"AnnotationPolymorphicSignature",
";",
"return",
"currentOffset",
";",
"}",
"break",
";",
"}",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfPairs",
";",
"i",
"++",
")",
"{",
"currentOffset",
"+=",
"2",
";",
"currentOffset",
"=",
"scanElementValue",
"(",
"currentOffset",
")",
";",
"}",
"return",
"currentOffset",
";",
"}",
"private",
"int",
"scanElementValue",
"(",
"int",
"offset",
")",
"{",
"int",
"currentOffset",
"=",
"offset",
";",
"int",
"tag",
"=",
"u1At",
"(",
"currentOffset",
")",
";",
"currentOffset",
"++",
";",
"switch",
"(",
"tag",
")",
"{",
"case",
"'B'",
":",
"case",
"'C'",
":",
"case",
"'D'",
":",
"case",
"'F'",
":",
"case",
"'I'",
":",
"case",
"'J'",
":",
"case",
"'S'",
":",
"case",
"'Z'",
":",
"case",
"'s'",
":",
"case",
"'c'",
":",
"currentOffset",
"+=",
"2",
";",
"break",
";",
"case",
"'e'",
":",
"currentOffset",
"+=",
"4",
";",
"break",
";",
"case",
"'@'",
":",
"currentOffset",
"=",
"scanAnnotation",
"(",
"currentOffset",
",",
"false",
",",
"false",
")",
";",
"break",
";",
"case",
"'['",
":",
"int",
"numberOfValues",
"=",
"u2At",
"(",
"currentOffset",
")",
";",
"currentOffset",
"+=",
"2",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfValues",
";",
"i",
"++",
")",
"currentOffset",
"=",
"scanElementValue",
"(",
"currentOffset",
")",
";",
"break",
";",
"default",
":",
"throw",
"new",
"IllegalStateException",
"(",
")",
";",
"}",
"return",
"currentOffset",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"'@'",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"typename",
")",
";",
"if",
"(",
"this",
".",
"pairs",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"'('",
")",
";",
"buffer",
".",
"append",
"(",
"\"nt\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"len",
"=",
"this",
".",
"pairs",
".",
"length",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
">",
"0",
")",
"buffer",
".",
"append",
"(",
"\",nt\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"pairs",
"[",
"i",
"]",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"')'",
")",
";",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"final",
"int",
"prime",
"=",
"31",
";",
"int",
"result",
"=",
"1",
";",
"result",
"=",
"prime",
"*",
"result",
"+",
"Util",
".",
"hashCode",
"(",
"this",
".",
"pairs",
")",
";",
"result",
"=",
"prime",
"*",
"result",
"+",
"CharOperation",
".",
"hashCode",
"(",
"this",
".",
"typename",
")",
";",
"return",
"result",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"this",
"==",
"obj",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"obj",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"getClass",
"(",
")",
"!=",
"obj",
".",
"getClass",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"AnnotationInfo",
"other",
"=",
"(",
"AnnotationInfo",
")",
"obj",
";",
"if",
"(",
"!",
"Arrays",
".",
"equals",
"(",
"this",
".",
"pairs",
",",
"other",
".",
"pairs",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"Arrays",
".",
"equals",
"(",
"this",
".",
"typename",
",",
"other",
".",
"typename",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"}",
"</s>"
] |
4,304 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
";",
"import",
"java",
".",
"io",
".",
"File",
";",
"import",
"java",
".",
"io",
".",
"IOException",
";",
"import",
"java",
".",
"io",
".",
"InputStream",
";",
"import",
"java",
".",
"util",
".",
"Arrays",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"AttributeNamesConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"Constant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TagBits",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeIds",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"ClassFileReader",
"extends",
"ClassFileStruct",
"implements",
"IBinaryType",
"{",
"private",
"int",
"accessFlags",
";",
"private",
"char",
"[",
"]",
"classFileName",
";",
"private",
"char",
"[",
"]",
"className",
";",
"private",
"int",
"classNameIndex",
";",
"private",
"int",
"constantPoolCount",
";",
"private",
"AnnotationInfo",
"[",
"]",
"annotations",
";",
"private",
"FieldInfo",
"[",
"]",
"fields",
";",
"private",
"int",
"fieldsCount",
";",
"private",
"InnerClassInfo",
"innerInfo",
";",
"private",
"int",
"innerInfoIndex",
";",
"private",
"InnerClassInfo",
"[",
"]",
"innerInfos",
";",
"private",
"char",
"[",
"]",
"[",
"]",
"interfaceNames",
";",
"private",
"int",
"interfacesCount",
";",
"private",
"MethodInfo",
"[",
"]",
"methods",
";",
"private",
"int",
"methodsCount",
";",
"private",
"char",
"[",
"]",
"signature",
";",
"private",
"char",
"[",
"]",
"sourceName",
";",
"private",
"char",
"[",
"]",
"sourceFileName",
";",
"private",
"char",
"[",
"]",
"superclassName",
";",
"private",
"long",
"tagBits",
";",
"private",
"long",
"version",
";",
"private",
"char",
"[",
"]",
"enclosingTypeName",
";",
"private",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"missingTypeNames",
";",
"private",
"int",
"enclosingNameAndTypeIndex",
";",
"private",
"char",
"[",
"]",
"enclosingMethod",
";",
"private",
"static",
"String",
"printTypeModifiers",
"(",
"int",
"modifiers",
")",
"{",
"java",
".",
"io",
".",
"ByteArrayOutputStream",
"out",
"=",
"new",
"java",
".",
"io",
".",
"ByteArrayOutputStream",
"(",
")",
";",
"java",
".",
"io",
".",
"PrintWriter",
"print",
"=",
"new",
"java",
".",
"io",
".",
"PrintWriter",
"(",
"out",
")",
";",
"if",
"(",
"(",
"modifiers",
"&",
"ClassFileConstants",
".",
"AccPublic",
")",
"!=",
"0",
")",
"print",
".",
"print",
"(",
"\"public",
"\"",
")",
";",
"if",
"(",
"(",
"modifiers",
"&",
"ClassFileConstants",
".",
"AccPrivate",
")",
"!=",
"0",
")",
"print",
".",
"print",
"(",
"\"private",
"\"",
")",
";",
"if",
"(",
"(",
"modifiers",
"&",
"ClassFileConstants",
".",
"AccFinal",
")",
"!=",
"0",
")",
"print",
".",
"print",
"(",
"\"final",
"\"",
")",
";",
"if",
"(",
"(",
"modifiers",
"&",
"ClassFileConstants",
".",
"AccSuper",
")",
"!=",
"0",
")",
"print",
".",
"print",
"(",
"\"super",
"\"",
")",
";",
"if",
"(",
"(",
"modifiers",
"&",
"ClassFileConstants",
".",
"AccInterface",
")",
"!=",
"0",
")",
"print",
".",
"print",
"(",
"\"interface",
"\"",
")",
";",
"if",
"(",
"(",
"modifiers",
"&",
"ClassFileConstants",
".",
"AccAbstract",
")",
"!=",
"0",
")",
"print",
".",
"print",
"(",
"\"abstract",
"\"",
")",
";",
"print",
".",
"flush",
"(",
")",
";",
"return",
"out",
".",
"toString",
"(",
")",
";",
"}",
"public",
"static",
"ClassFileReader",
"read",
"(",
"File",
"file",
")",
"throws",
"ClassFormatException",
",",
"IOException",
"{",
"return",
"read",
"(",
"file",
",",
"false",
")",
";",
"}",
"public",
"static",
"ClassFileReader",
"read",
"(",
"File",
"file",
",",
"boolean",
"fullyInitialize",
")",
"throws",
"ClassFormatException",
",",
"IOException",
"{",
"byte",
"classFileBytes",
"[",
"]",
"=",
"Util",
".",
"getFileByteContent",
"(",
"file",
")",
";",
"ClassFileReader",
"classFileReader",
"=",
"new",
"ClassFileReader",
"(",
"classFileBytes",
",",
"file",
".",
"getAbsolutePath",
"(",
")",
".",
"toCharArray",
"(",
")",
")",
";",
"if",
"(",
"fullyInitialize",
")",
"{",
"classFileReader",
".",
"initialize",
"(",
")",
";",
"}",
"return",
"classFileReader",
";",
"}",
"public",
"static",
"ClassFileReader",
"read",
"(",
"InputStream",
"stream",
",",
"String",
"fileName",
")",
"throws",
"ClassFormatException",
",",
"IOException",
"{",
"return",
"read",
"(",
"stream",
",",
"fileName",
",",
"false",
")",
";",
"}",
"public",
"static",
"ClassFileReader",
"read",
"(",
"InputStream",
"stream",
",",
"String",
"fileName",
",",
"boolean",
"fullyInitialize",
")",
"throws",
"ClassFormatException",
",",
"IOException",
"{",
"byte",
"classFileBytes",
"[",
"]",
"=",
"Util",
".",
"getInputStreamAsByteArray",
"(",
"stream",
",",
"-",
"1",
")",
";",
"ClassFileReader",
"classFileReader",
"=",
"new",
"ClassFileReader",
"(",
"classFileBytes",
",",
"fileName",
".",
"toCharArray",
"(",
")",
")",
";",
"if",
"(",
"fullyInitialize",
")",
"{",
"classFileReader",
".",
"initialize",
"(",
")",
";",
"}",
"return",
"classFileReader",
";",
"}",
"public",
"static",
"ClassFileReader",
"read",
"(",
"java",
".",
"util",
".",
"zip",
".",
"ZipFile",
"zip",
",",
"String",
"filename",
")",
"throws",
"ClassFormatException",
",",
"java",
".",
"io",
".",
"IOException",
"{",
"return",
"read",
"(",
"zip",
",",
"filename",
",",
"false",
")",
";",
"}",
"public",
"static",
"ClassFileReader",
"read",
"(",
"java",
".",
"util",
".",
"zip",
".",
"ZipFile",
"zip",
",",
"String",
"filename",
",",
"boolean",
"fullyInitialize",
")",
"throws",
"ClassFormatException",
",",
"java",
".",
"io",
".",
"IOException",
"{",
"java",
".",
"util",
".",
"zip",
".",
"ZipEntry",
"ze",
"=",
"zip",
".",
"getEntry",
"(",
"filename",
")",
";",
"if",
"(",
"ze",
"==",
"null",
")",
"return",
"null",
";",
"byte",
"classFileBytes",
"[",
"]",
"=",
"Util",
".",
"getZipEntryByteContent",
"(",
"ze",
",",
"zip",
")",
";",
"ClassFileReader",
"classFileReader",
"=",
"new",
"ClassFileReader",
"(",
"classFileBytes",
",",
"filename",
".",
"toCharArray",
"(",
")",
")",
";",
"if",
"(",
"fullyInitialize",
")",
"{",
"classFileReader",
".",
"initialize",
"(",
")",
";",
"}",
"return",
"classFileReader",
";",
"}",
"public",
"static",
"ClassFileReader",
"read",
"(",
"String",
"fileName",
")",
"throws",
"ClassFormatException",
",",
"java",
".",
"io",
".",
"IOException",
"{",
"return",
"read",
"(",
"fileName",
",",
"false",
")",
";",
"}",
"public",
"static",
"ClassFileReader",
"read",
"(",
"String",
"fileName",
",",
"boolean",
"fullyInitialize",
")",
"throws",
"ClassFormatException",
",",
"java",
".",
"io",
".",
"IOException",
"{",
"return",
"read",
"(",
"new",
"File",
"(",
"fileName",
")",
",",
"fullyInitialize",
")",
";",
"}",
"public",
"ClassFileReader",
"(",
"byte",
"classFileBytes",
"[",
"]",
",",
"char",
"[",
"]",
"fileName",
")",
"throws",
"ClassFormatException",
"{",
"this",
"(",
"classFileBytes",
",",
"fileName",
",",
"false",
")",
";",
"}",
"public",
"ClassFileReader",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"char",
"[",
"]",
"fileName",
",",
"boolean",
"fullyInitialize",
")",
"throws",
"ClassFormatException",
"{",
"super",
"(",
"classFileBytes",
",",
"null",
",",
"0",
")",
";",
"this",
".",
"classFileName",
"=",
"fileName",
";",
"int",
"readOffset",
"=",
"10",
";",
"try",
"{",
"this",
".",
"version",
"=",
"(",
"(",
"long",
")",
"u2At",
"(",
"6",
")",
"<<",
"16",
")",
"+",
"u2At",
"(",
"4",
")",
";",
"this",
".",
"constantPoolCount",
"=",
"u2At",
"(",
"8",
")",
";",
"this",
".",
"constantPoolOffsets",
"=",
"new",
"int",
"[",
"this",
".",
"constantPoolCount",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"this",
".",
"constantPoolCount",
";",
"i",
"++",
")",
"{",
"int",
"tag",
"=",
"u1At",
"(",
"readOffset",
")",
";",
"switch",
"(",
"tag",
")",
"{",
"case",
"ClassFileConstants",
".",
"Utf8Tag",
":",
"this",
".",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"u2At",
"(",
"readOffset",
"+",
"1",
")",
";",
"readOffset",
"+=",
"ClassFileConstants",
".",
"ConstantUtf8FixedSize",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"IntegerTag",
":",
"this",
".",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"ClassFileConstants",
".",
"ConstantIntegerFixedSize",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"FloatTag",
":",
"this",
".",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"ClassFileConstants",
".",
"ConstantFloatFixedSize",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"LongTag",
":",
"this",
".",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"ClassFileConstants",
".",
"ConstantLongFixedSize",
";",
"i",
"++",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"DoubleTag",
":",
"this",
".",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"ClassFileConstants",
".",
"ConstantDoubleFixedSize",
";",
"i",
"++",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"ClassTag",
":",
"this",
".",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"ClassFileConstants",
".",
"ConstantClassFixedSize",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"StringTag",
":",
"this",
".",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"ClassFileConstants",
".",
"ConstantStringFixedSize",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"FieldRefTag",
":",
"this",
".",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"ClassFileConstants",
".",
"ConstantFieldRefFixedSize",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"MethodRefTag",
":",
"this",
".",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"ClassFileConstants",
".",
"ConstantMethodRefFixedSize",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"InterfaceMethodRefTag",
":",
"this",
".",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"ClassFileConstants",
".",
"ConstantInterfaceMethodRefFixedSize",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"NameAndTypeTag",
":",
"this",
".",
"constantPoolOffsets",
"[",
"i",
"]",
"=",
"readOffset",
";",
"readOffset",
"+=",
"ClassFileConstants",
".",
"ConstantNameAndTypeFixedSize",
";",
"}",
"}",
"this",
".",
"accessFlags",
"=",
"u2At",
"(",
"readOffset",
")",
";",
"readOffset",
"+=",
"2",
";",
"this",
".",
"classNameIndex",
"=",
"u2At",
"(",
"readOffset",
")",
";",
"this",
".",
"className",
"=",
"getConstantClassNameAt",
"(",
"this",
".",
"classNameIndex",
")",
";",
"readOffset",
"+=",
"2",
";",
"int",
"superclassNameIndex",
"=",
"u2At",
"(",
"readOffset",
")",
";",
"readOffset",
"+=",
"2",
";",
"if",
"(",
"superclassNameIndex",
"!=",
"0",
")",
"{",
"this",
".",
"superclassName",
"=",
"getConstantClassNameAt",
"(",
"superclassNameIndex",
")",
";",
"}",
"this",
".",
"interfacesCount",
"=",
"u2At",
"(",
"readOffset",
")",
";",
"readOffset",
"+=",
"2",
";",
"if",
"(",
"this",
".",
"interfacesCount",
"!=",
"0",
")",
"{",
"this",
".",
"interfaceNames",
"=",
"new",
"char",
"[",
"this",
".",
"interfacesCount",
"]",
"[",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"interfacesCount",
";",
"i",
"++",
")",
"{",
"this",
".",
"interfaceNames",
"[",
"i",
"]",
"=",
"getConstantClassNameAt",
"(",
"u2At",
"(",
"readOffset",
")",
")",
";",
"readOffset",
"+=",
"2",
";",
"}",
"}",
"this",
".",
"fieldsCount",
"=",
"u2At",
"(",
"readOffset",
")",
";",
"readOffset",
"+=",
"2",
";",
"if",
"(",
"this",
".",
"fieldsCount",
"!=",
"0",
")",
"{",
"FieldInfo",
"field",
";",
"this",
".",
"fields",
"=",
"new",
"FieldInfo",
"[",
"this",
".",
"fieldsCount",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"fieldsCount",
";",
"i",
"++",
")",
"{",
"field",
"=",
"FieldInfo",
".",
"createField",
"(",
"this",
".",
"reference",
",",
"this",
".",
"constantPoolOffsets",
",",
"readOffset",
")",
";",
"this",
".",
"fields",
"[",
"i",
"]",
"=",
"field",
";",
"readOffset",
"+=",
"field",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"this",
".",
"methodsCount",
"=",
"u2At",
"(",
"readOffset",
")",
";",
"readOffset",
"+=",
"2",
";",
"if",
"(",
"this",
".",
"methodsCount",
"!=",
"0",
")",
"{",
"this",
".",
"methods",
"=",
"new",
"MethodInfo",
"[",
"this",
".",
"methodsCount",
"]",
";",
"boolean",
"isAnnotationType",
"=",
"(",
"this",
".",
"accessFlags",
"&",
"ClassFileConstants",
".",
"AccAnnotation",
")",
"!=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"methodsCount",
";",
"i",
"++",
")",
"{",
"this",
".",
"methods",
"[",
"i",
"]",
"=",
"isAnnotationType",
"?",
"AnnotationMethodInfo",
".",
"createAnnotationMethod",
"(",
"this",
".",
"reference",
",",
"this",
".",
"constantPoolOffsets",
",",
"readOffset",
")",
":",
"MethodInfo",
".",
"createMethod",
"(",
"this",
".",
"reference",
",",
"this",
".",
"constantPoolOffsets",
",",
"readOffset",
")",
";",
"readOffset",
"+=",
"this",
".",
"methods",
"[",
"i",
"]",
".",
"sizeInBytes",
"(",
")",
";",
"}",
"}",
"int",
"attributesCount",
"=",
"u2At",
"(",
"readOffset",
")",
";",
"readOffset",
"+=",
"2",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"attributesCount",
";",
"i",
"++",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
")",
"]",
";",
"char",
"[",
"]",
"attributeName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"if",
"(",
"attributeName",
".",
"length",
"==",
"0",
")",
"{",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"readOffset",
"+",
"2",
")",
")",
";",
"continue",
";",
"}",
"switch",
"(",
"attributeName",
"[",
"0",
"]",
")",
"{",
"case",
"'E'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"EnclosingMethodName",
")",
")",
"{",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
"+",
"6",
")",
"]",
"+",
"1",
")",
"]",
";",
"this",
".",
"enclosingTypeName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"this",
".",
"enclosingNameAndTypeIndex",
"=",
"u2At",
"(",
"readOffset",
"+",
"8",
")",
";",
"}",
"break",
";",
"case",
"'D'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"DeprecatedName",
")",
")",
"{",
"this",
".",
"accessFlags",
"|=",
"ClassFileConstants",
".",
"AccDeprecated",
";",
"}",
"break",
";",
"case",
"'I'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"InnerClassName",
")",
")",
"{",
"int",
"innerOffset",
"=",
"readOffset",
"+",
"6",
";",
"int",
"number_of_classes",
"=",
"u2At",
"(",
"innerOffset",
")",
";",
"if",
"(",
"number_of_classes",
"!=",
"0",
")",
"{",
"innerOffset",
"+=",
"2",
";",
"this",
".",
"innerInfos",
"=",
"new",
"InnerClassInfo",
"[",
"number_of_classes",
"]",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"number_of_classes",
";",
"j",
"++",
")",
"{",
"this",
".",
"innerInfos",
"[",
"j",
"]",
"=",
"new",
"InnerClassInfo",
"(",
"this",
".",
"reference",
",",
"this",
".",
"constantPoolOffsets",
",",
"innerOffset",
")",
";",
"if",
"(",
"this",
".",
"classNameIndex",
"==",
"this",
".",
"innerInfos",
"[",
"j",
"]",
".",
"innerClassNameIndex",
")",
"{",
"this",
".",
"innerInfo",
"=",
"this",
".",
"innerInfos",
"[",
"j",
"]",
";",
"this",
".",
"innerInfoIndex",
"=",
"j",
";",
"}",
"innerOffset",
"+=",
"8",
";",
"}",
"if",
"(",
"this",
".",
"innerInfo",
"!=",
"null",
")",
"{",
"char",
"[",
"]",
"enclosingType",
"=",
"this",
".",
"innerInfo",
".",
"getEnclosingTypeName",
"(",
")",
";",
"if",
"(",
"enclosingType",
"!=",
"null",
")",
"{",
"this",
".",
"enclosingTypeName",
"=",
"enclosingType",
";",
"}",
"}",
"}",
"}",
"else",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"InconsistentHierarchy",
")",
")",
"{",
"this",
".",
"tagBits",
"|=",
"TagBits",
".",
"HierarchyHasProblems",
";",
"}",
"break",
";",
"case",
"'S'",
":",
"if",
"(",
"attributeName",
".",
"length",
">",
"2",
")",
"{",
"switch",
"(",
"attributeName",
"[",
"1",
"]",
")",
"{",
"case",
"'o'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"SourceName",
")",
")",
"{",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
"+",
"6",
")",
"]",
";",
"this",
".",
"sourceFileName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"}",
"break",
";",
"case",
"'y'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"SyntheticName",
")",
")",
"{",
"this",
".",
"accessFlags",
"|=",
"ClassFileConstants",
".",
"AccSynthetic",
";",
"}",
"break",
";",
"case",
"'i'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"SignatureName",
")",
")",
"{",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
"+",
"6",
")",
"]",
";",
"this",
".",
"signature",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"}",
"}",
"}",
"break",
";",
"case",
"'R'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"RuntimeVisibleAnnotationsName",
")",
")",
"{",
"decodeAnnotations",
"(",
"readOffset",
",",
"true",
")",
";",
"}",
"else",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"RuntimeInvisibleAnnotationsName",
")",
")",
"{",
"decodeAnnotations",
"(",
"readOffset",
",",
"false",
")",
";",
"}",
"break",
";",
"case",
"'M'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"MissingTypesName",
")",
")",
"{",
"int",
"missingTypeOffset",
"=",
"readOffset",
"+",
"6",
";",
"int",
"numberOfMissingTypes",
"=",
"u2At",
"(",
"missingTypeOffset",
")",
";",
"if",
"(",
"numberOfMissingTypes",
"!=",
"0",
")",
"{",
"this",
".",
"missingTypeNames",
"=",
"new",
"char",
"[",
"numberOfMissingTypes",
"]",
"[",
"]",
"[",
"]",
";",
"missingTypeOffset",
"+=",
"2",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"numberOfMissingTypes",
";",
"j",
"++",
")",
"{",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"missingTypeOffset",
")",
"]",
"+",
"1",
")",
"]",
";",
"char",
"[",
"]",
"missingTypeConstantPoolName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"this",
".",
"missingTypeNames",
"[",
"j",
"]",
"=",
"CharOperation",
".",
"splitOn",
"(",
"'/'",
",",
"missingTypeConstantPoolName",
")",
";",
"missingTypeOffset",
"+=",
"2",
";",
"}",
"}",
"}",
"}",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"readOffset",
"+",
"2",
")",
")",
";",
"}",
"if",
"(",
"fullyInitialize",
")",
"{",
"initialize",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"ClassFormatException",
"e",
")",
"{",
"throw",
"e",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"ErrTruncatedInput",
",",
"readOffset",
")",
";",
"}",
"}",
"public",
"int",
"accessFlags",
"(",
")",
"{",
"return",
"this",
".",
"accessFlags",
";",
"}",
"private",
"void",
"decodeAnnotations",
"(",
"int",
"offset",
",",
"boolean",
"runtimeVisible",
")",
"{",
"int",
"numberOfAnnotations",
"=",
"u2At",
"(",
"offset",
"+",
"6",
")",
";",
"if",
"(",
"numberOfAnnotations",
">",
"0",
")",
"{",
"int",
"readOffset",
"=",
"offset",
"+",
"8",
";",
"AnnotationInfo",
"[",
"]",
"newInfos",
"=",
"null",
";",
"int",
"newInfoCount",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfAnnotations",
";",
"i",
"++",
")",
"{",
"AnnotationInfo",
"newInfo",
"=",
"new",
"AnnotationInfo",
"(",
"this",
".",
"reference",
",",
"this",
".",
"constantPoolOffsets",
",",
"readOffset",
",",
"runtimeVisible",
",",
"false",
")",
";",
"readOffset",
"+=",
"newInfo",
".",
"readOffset",
";",
"long",
"standardTagBits",
"=",
"newInfo",
".",
"standardAnnotationTagBits",
";",
"if",
"(",
"standardTagBits",
"!=",
"0",
")",
"{",
"this",
".",
"tagBits",
"|=",
"standardTagBits",
";",
"}",
"else",
"{",
"if",
"(",
"newInfos",
"==",
"null",
")",
"newInfos",
"=",
"new",
"AnnotationInfo",
"[",
"numberOfAnnotations",
"-",
"i",
"]",
";",
"newInfos",
"[",
"newInfoCount",
"++",
"]",
"=",
"newInfo",
";",
"}",
"}",
"if",
"(",
"newInfos",
"==",
"null",
")",
"return",
";",
"if",
"(",
"this",
".",
"annotations",
"==",
"null",
")",
"{",
"if",
"(",
"newInfoCount",
"!=",
"newInfos",
".",
"length",
")",
"System",
".",
"arraycopy",
"(",
"newInfos",
",",
"0",
",",
"newInfos",
"=",
"new",
"AnnotationInfo",
"[",
"newInfoCount",
"]",
",",
"0",
",",
"newInfoCount",
")",
";",
"this",
".",
"annotations",
"=",
"newInfos",
";",
"}",
"else",
"{",
"int",
"length",
"=",
"this",
".",
"annotations",
".",
"length",
";",
"AnnotationInfo",
"[",
"]",
"temp",
"=",
"new",
"AnnotationInfo",
"[",
"length",
"+",
"newInfoCount",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"annotations",
",",
"0",
",",
"temp",
",",
"0",
",",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"newInfos",
",",
"0",
",",
"temp",
",",
"length",
",",
"newInfoCount",
")",
";",
"this",
".",
"annotations",
"=",
"temp",
";",
"}",
"}",
"}",
"public",
"IBinaryAnnotation",
"[",
"]",
"getAnnotations",
"(",
")",
"{",
"return",
"this",
".",
"annotations",
";",
"}",
"private",
"char",
"[",
"]",
"getConstantClassNameAt",
"(",
"int",
"constantPoolIndex",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"this",
".",
"constantPoolOffsets",
"[",
"constantPoolIndex",
"]",
"+",
"1",
")",
"]",
";",
"return",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"}",
"public",
"int",
"[",
"]",
"getConstantPoolOffsets",
"(",
")",
"{",
"return",
"this",
".",
"constantPoolOffsets",
";",
"}",
"public",
"char",
"[",
"]",
"getEnclosingMethod",
"(",
")",
"{",
"if",
"(",
"this",
".",
"enclosingNameAndTypeIndex",
"<=",
"0",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"this",
".",
"enclosingMethod",
"==",
"null",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"int",
"nameAndTypeOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"this",
".",
"enclosingNameAndTypeIndex",
"]",
";",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"nameAndTypeOffset",
"+",
"1",
")",
"]",
";",
"buffer",
".",
"append",
"(",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
")",
";",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"nameAndTypeOffset",
"+",
"3",
")",
"]",
";",
"buffer",
".",
"append",
"(",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
")",
";",
"this",
".",
"enclosingMethod",
"=",
"String",
".",
"valueOf",
"(",
"buffer",
")",
".",
"toCharArray",
"(",
")",
";",
"}",
"return",
"this",
".",
"enclosingMethod",
";",
"}",
"public",
"char",
"[",
"]",
"getEnclosingTypeName",
"(",
")",
"{",
"return",
"this",
".",
"enclosingTypeName",
";",
"}",
"public",
"IBinaryField",
"[",
"]",
"getFields",
"(",
")",
"{",
"return",
"this",
".",
"fields",
";",
"}",
"public",
"char",
"[",
"]",
"getFileName",
"(",
")",
"{",
"return",
"this",
".",
"classFileName",
";",
"}",
"public",
"char",
"[",
"]",
"getGenericSignature",
"(",
")",
"{",
"return",
"this",
".",
"signature",
";",
"}",
"public",
"char",
"[",
"]",
"getInnerSourceName",
"(",
")",
"{",
"if",
"(",
"this",
".",
"innerInfo",
"!=",
"null",
")",
"return",
"this",
".",
"innerInfo",
".",
"getSourceName",
"(",
")",
";",
"return",
"null",
";",
"}",
"public",
"char",
"[",
"]",
"[",
"]",
"getInterfaceNames",
"(",
")",
"{",
"return",
"this",
".",
"interfaceNames",
";",
"}",
"public",
"IBinaryNestedType",
"[",
"]",
"getMemberTypes",
"(",
")",
"{",
"if",
"(",
"this",
".",
"innerInfos",
"==",
"null",
")",
"return",
"null",
";",
"int",
"length",
"=",
"this",
".",
"innerInfos",
".",
"length",
";",
"int",
"startingIndex",
"=",
"this",
".",
"innerInfo",
"!=",
"null",
"?",
"this",
".",
"innerInfoIndex",
"+",
"1",
":",
"0",
";",
"if",
"(",
"length",
"!=",
"startingIndex",
")",
"{",
"IBinaryNestedType",
"[",
"]",
"memberTypes",
"=",
"new",
"IBinaryNestedType",
"[",
"length",
"-",
"this",
".",
"innerInfoIndex",
"]",
";",
"int",
"memberTypeIndex",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"startingIndex",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"InnerClassInfo",
"currentInnerInfo",
"=",
"this",
".",
"innerInfos",
"[",
"i",
"]",
";",
"int",
"outerClassNameIdx",
"=",
"currentInnerInfo",
".",
"outerClassNameIndex",
";",
"int",
"innerNameIndex",
"=",
"currentInnerInfo",
".",
"innerNameIndex",
";",
"if",
"(",
"outerClassNameIdx",
"!=",
"0",
"&&",
"innerNameIndex",
"!=",
"0",
"&&",
"outerClassNameIdx",
"==",
"this",
".",
"classNameIndex",
"&&",
"currentInnerInfo",
".",
"getSourceName",
"(",
")",
".",
"length",
"!=",
"0",
")",
"{",
"memberTypes",
"[",
"memberTypeIndex",
"++",
"]",
"=",
"currentInnerInfo",
";",
"}",
"}",
"if",
"(",
"memberTypeIndex",
"==",
"0",
")",
"return",
"null",
";",
"if",
"(",
"memberTypeIndex",
"!=",
"memberTypes",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"memberTypes",
",",
"0",
",",
"(",
"memberTypes",
"=",
"new",
"IBinaryNestedType",
"[",
"memberTypeIndex",
"]",
")",
",",
"0",
",",
"memberTypeIndex",
")",
";",
"}",
"return",
"memberTypes",
";",
"}",
"return",
"null",
";",
"}",
"public",
"IBinaryMethod",
"[",
"]",
"getMethods",
"(",
")",
"{",
"return",
"this",
".",
"methods",
";",
"}",
"public",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"getMissingTypeNames",
"(",
")",
"{",
"return",
"this",
".",
"missingTypeNames",
";",
"}",
"public",
"int",
"getModifiers",
"(",
")",
"{",
"int",
"modifiers",
";",
"if",
"(",
"this",
".",
"innerInfo",
"!=",
"null",
")",
"{",
"modifiers",
"=",
"this",
".",
"innerInfo",
".",
"getModifiers",
"(",
")",
"|",
"(",
"this",
".",
"accessFlags",
"&",
"ClassFileConstants",
".",
"AccDeprecated",
")",
"|",
"(",
"this",
".",
"accessFlags",
"&",
"ClassFileConstants",
".",
"AccSynthetic",
")",
";",
"}",
"else",
"{",
"modifiers",
"=",
"this",
".",
"accessFlags",
";",
"}",
"return",
"modifiers",
";",
"}",
"public",
"char",
"[",
"]",
"getName",
"(",
")",
"{",
"return",
"this",
".",
"className",
";",
"}",
"public",
"char",
"[",
"]",
"getSourceName",
"(",
")",
"{",
"if",
"(",
"this",
".",
"sourceName",
"!=",
"null",
")",
"return",
"this",
".",
"sourceName",
";",
"char",
"[",
"]",
"name",
"=",
"getInnerSourceName",
"(",
")",
";",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"name",
"=",
"getName",
"(",
")",
";",
"int",
"start",
";",
"if",
"(",
"isAnonymous",
"(",
")",
")",
"{",
"start",
"=",
"CharOperation",
".",
"indexOf",
"(",
"'$'",
",",
"name",
",",
"CharOperation",
".",
"lastIndexOf",
"(",
"'/'",
",",
"name",
")",
"+",
"1",
")",
"+",
"1",
";",
"}",
"else",
"{",
"start",
"=",
"CharOperation",
".",
"lastIndexOf",
"(",
"'/'",
",",
"name",
")",
"+",
"1",
";",
"}",
"if",
"(",
"start",
">",
"0",
")",
"{",
"char",
"[",
"]",
"newName",
"=",
"new",
"char",
"[",
"name",
".",
"length",
"-",
"start",
"]",
";",
"System",
".",
"arraycopy",
"(",
"name",
",",
"start",
",",
"newName",
",",
"0",
",",
"newName",
".",
"length",
")",
";",
"name",
"=",
"newName",
";",
"}",
"}",
"return",
"this",
".",
"sourceName",
"=",
"name",
";",
"}",
"public",
"char",
"[",
"]",
"getSuperclassName",
"(",
")",
"{",
"return",
"this",
".",
"superclassName",
";",
"}",
"public",
"long",
"getTagBits",
"(",
")",
"{",
"return",
"this",
".",
"tagBits",
";",
"}",
"public",
"long",
"getVersion",
"(",
")",
"{",
"return",
"this",
".",
"version",
";",
"}",
"private",
"boolean",
"hasNonSyntheticFieldChanges",
"(",
"FieldInfo",
"[",
"]",
"currentFieldInfos",
",",
"FieldInfo",
"[",
"]",
"otherFieldInfos",
")",
"{",
"int",
"length1",
"=",
"currentFieldInfos",
"==",
"null",
"?",
"0",
":",
"currentFieldInfos",
".",
"length",
";",
"int",
"length2",
"=",
"otherFieldInfos",
"==",
"null",
"?",
"0",
":",
"otherFieldInfos",
".",
"length",
";",
"int",
"index1",
"=",
"0",
";",
"int",
"index2",
"=",
"0",
";",
"end",
":",
"while",
"(",
"index1",
"<",
"length1",
"&&",
"index2",
"<",
"length2",
")",
"{",
"while",
"(",
"currentFieldInfos",
"[",
"index1",
"]",
".",
"isSynthetic",
"(",
")",
")",
"{",
"if",
"(",
"++",
"index1",
">=",
"length1",
")",
"break",
"end",
";",
"}",
"while",
"(",
"otherFieldInfos",
"[",
"index2",
"]",
".",
"isSynthetic",
"(",
")",
")",
"{",
"if",
"(",
"++",
"index2",
">=",
"length2",
")",
"break",
"end",
";",
"}",
"if",
"(",
"hasStructuralFieldChanges",
"(",
"currentFieldInfos",
"[",
"index1",
"++",
"]",
",",
"otherFieldInfos",
"[",
"index2",
"++",
"]",
")",
")",
"return",
"true",
";",
"}",
"while",
"(",
"index1",
"<",
"length1",
")",
"{",
"if",
"(",
"!",
"currentFieldInfos",
"[",
"index1",
"++",
"]",
".",
"isSynthetic",
"(",
")",
")",
"return",
"true",
";",
"}",
"while",
"(",
"index2",
"<",
"length2",
")",
"{",
"if",
"(",
"!",
"otherFieldInfos",
"[",
"index2",
"++",
"]",
".",
"isSynthetic",
"(",
")",
")",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"private",
"boolean",
"hasNonSyntheticMethodChanges",
"(",
"MethodInfo",
"[",
"]",
"currentMethodInfos",
",",
"MethodInfo",
"[",
"]",
"otherMethodInfos",
")",
"{",
"int",
"length1",
"=",
"currentMethodInfos",
"==",
"null",
"?",
"0",
":",
"currentMethodInfos",
".",
"length",
";",
"int",
"length2",
"=",
"otherMethodInfos",
"==",
"null",
"?",
"0",
":",
"otherMethodInfos",
".",
"length",
";",
"int",
"index1",
"=",
"0",
";",
"int",
"index2",
"=",
"0",
";",
"MethodInfo",
"m",
";",
"end",
":",
"while",
"(",
"index1",
"<",
"length1",
"&&",
"index2",
"<",
"length2",
")",
"{",
"while",
"(",
"(",
"m",
"=",
"currentMethodInfos",
"[",
"index1",
"]",
")",
".",
"isSynthetic",
"(",
")",
"||",
"m",
".",
"isClinit",
"(",
")",
")",
"{",
"if",
"(",
"++",
"index1",
">=",
"length1",
")",
"break",
"end",
";",
"}",
"while",
"(",
"(",
"m",
"=",
"otherMethodInfos",
"[",
"index2",
"]",
")",
".",
"isSynthetic",
"(",
")",
"||",
"m",
".",
"isClinit",
"(",
")",
")",
"{",
"if",
"(",
"++",
"index2",
">=",
"length2",
")",
"break",
"end",
";",
"}",
"if",
"(",
"hasStructuralMethodChanges",
"(",
"currentMethodInfos",
"[",
"index1",
"++",
"]",
",",
"otherMethodInfos",
"[",
"index2",
"++",
"]",
")",
")",
"return",
"true",
";",
"}",
"while",
"(",
"index1",
"<",
"length1",
")",
"{",
"if",
"(",
"!",
"(",
"(",
"m",
"=",
"currentMethodInfos",
"[",
"index1",
"++",
"]",
")",
".",
"isSynthetic",
"(",
")",
"||",
"m",
".",
"isClinit",
"(",
")",
")",
")",
"return",
"true",
";",
"}",
"while",
"(",
"index2",
"<",
"length2",
")",
"{",
"if",
"(",
"!",
"(",
"(",
"m",
"=",
"otherMethodInfos",
"[",
"index2",
"++",
"]",
")",
".",
"isSynthetic",
"(",
")",
"||",
"m",
".",
"isClinit",
"(",
")",
")",
")",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"hasStructuralChanges",
"(",
"byte",
"[",
"]",
"newBytes",
")",
"{",
"return",
"hasStructuralChanges",
"(",
"newBytes",
",",
"true",
",",
"true",
")",
";",
"}",
"public",
"boolean",
"hasStructuralChanges",
"(",
"byte",
"[",
"]",
"newBytes",
",",
"boolean",
"orderRequired",
",",
"boolean",
"excludesSynthetic",
")",
"{",
"try",
"{",
"ClassFileReader",
"newClassFile",
"=",
"new",
"ClassFileReader",
"(",
"newBytes",
",",
"this",
".",
"classFileName",
")",
";",
"if",
"(",
"getModifiers",
"(",
")",
"!=",
"newClassFile",
".",
"getModifiers",
"(",
")",
")",
"return",
"true",
";",
"long",
"OnlyStructuralTagBits",
"=",
"TagBits",
".",
"AnnotationTargetMASK",
"|",
"TagBits",
".",
"AnnotationDeprecated",
"|",
"TagBits",
".",
"AnnotationRetentionMASK",
"|",
"TagBits",
".",
"HierarchyHasProblems",
";",
"if",
"(",
"(",
"getTagBits",
"(",
")",
"&",
"OnlyStructuralTagBits",
")",
"!=",
"(",
"newClassFile",
".",
"getTagBits",
"(",
")",
"&",
"OnlyStructuralTagBits",
")",
")",
"return",
"true",
";",
"if",
"(",
"hasStructuralAnnotationChanges",
"(",
"getAnnotations",
"(",
")",
",",
"newClassFile",
".",
"getAnnotations",
"(",
")",
")",
")",
"return",
"true",
";",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"getGenericSignature",
"(",
")",
",",
"newClassFile",
".",
"getGenericSignature",
"(",
")",
")",
")",
"return",
"true",
";",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"getSuperclassName",
"(",
")",
",",
"newClassFile",
".",
"getSuperclassName",
"(",
")",
")",
")",
"return",
"true",
";",
"char",
"[",
"]",
"[",
"]",
"newInterfacesNames",
"=",
"newClassFile",
".",
"getInterfaceNames",
"(",
")",
";",
"if",
"(",
"this",
".",
"interfaceNames",
"!=",
"newInterfacesNames",
")",
"{",
"int",
"newInterfacesLength",
"=",
"newInterfacesNames",
"==",
"null",
"?",
"0",
":",
"newInterfacesNames",
".",
"length",
";",
"if",
"(",
"newInterfacesLength",
"!=",
"this",
".",
"interfacesCount",
")",
"return",
"true",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"interfacesCount",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"this",
".",
"interfaceNames",
"[",
"i",
"]",
",",
"newInterfacesNames",
"[",
"i",
"]",
")",
")",
"return",
"true",
";",
"}",
"IBinaryNestedType",
"[",
"]",
"currentMemberTypes",
"=",
"getMemberTypes",
"(",
")",
";",
"IBinaryNestedType",
"[",
"]",
"otherMemberTypes",
"=",
"newClassFile",
".",
"getMemberTypes",
"(",
")",
";",
"if",
"(",
"currentMemberTypes",
"!=",
"otherMemberTypes",
")",
"{",
"int",
"currentMemberTypeLength",
"=",
"currentMemberTypes",
"==",
"null",
"?",
"0",
":",
"currentMemberTypes",
".",
"length",
";",
"int",
"otherMemberTypeLength",
"=",
"otherMemberTypes",
"==",
"null",
"?",
"0",
":",
"otherMemberTypes",
".",
"length",
";",
"if",
"(",
"currentMemberTypeLength",
"!=",
"otherMemberTypeLength",
")",
"return",
"true",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"currentMemberTypeLength",
";",
"i",
"++",
")",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"currentMemberTypes",
"[",
"i",
"]",
".",
"getName",
"(",
")",
",",
"otherMemberTypes",
"[",
"i",
"]",
".",
"getName",
"(",
")",
")",
"||",
"currentMemberTypes",
"[",
"i",
"]",
".",
"getModifiers",
"(",
")",
"!=",
"otherMemberTypes",
"[",
"i",
"]",
".",
"getModifiers",
"(",
")",
")",
"return",
"true",
";",
"}",
"FieldInfo",
"[",
"]",
"otherFieldInfos",
"=",
"(",
"FieldInfo",
"[",
"]",
")",
"newClassFile",
".",
"getFields",
"(",
")",
";",
"int",
"otherFieldInfosLength",
"=",
"otherFieldInfos",
"==",
"null",
"?",
"0",
":",
"otherFieldInfos",
".",
"length",
";",
"boolean",
"compareFields",
"=",
"true",
";",
"if",
"(",
"this",
".",
"fieldsCount",
"==",
"otherFieldInfosLength",
")",
"{",
"int",
"i",
"=",
"0",
";",
"for",
"(",
";",
"i",
"<",
"this",
".",
"fieldsCount",
";",
"i",
"++",
")",
"if",
"(",
"hasStructuralFieldChanges",
"(",
"this",
".",
"fields",
"[",
"i",
"]",
",",
"otherFieldInfos",
"[",
"i",
"]",
")",
")",
"break",
";",
"if",
"(",
"(",
"compareFields",
"=",
"i",
"!=",
"this",
".",
"fieldsCount",
")",
"&&",
"!",
"orderRequired",
"&&",
"!",
"excludesSynthetic",
")",
"return",
"true",
";",
"}",
"if",
"(",
"compareFields",
")",
"{",
"if",
"(",
"this",
".",
"fieldsCount",
"!=",
"otherFieldInfosLength",
"&&",
"!",
"excludesSynthetic",
")",
"return",
"true",
";",
"if",
"(",
"orderRequired",
")",
"{",
"if",
"(",
"this",
".",
"fieldsCount",
"!=",
"0",
")",
"Arrays",
".",
"sort",
"(",
"this",
".",
"fields",
")",
";",
"if",
"(",
"otherFieldInfosLength",
"!=",
"0",
")",
"Arrays",
".",
"sort",
"(",
"otherFieldInfos",
")",
";",
"}",
"if",
"(",
"excludesSynthetic",
")",
"{",
"if",
"(",
"hasNonSyntheticFieldChanges",
"(",
"this",
".",
"fields",
",",
"otherFieldInfos",
")",
")",
"return",
"true",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"fieldsCount",
";",
"i",
"++",
")",
"if",
"(",
"hasStructuralFieldChanges",
"(",
"this",
".",
"fields",
"[",
"i",
"]",
",",
"otherFieldInfos",
"[",
"i",
"]",
")",
")",
"return",
"true",
";",
"}",
"}",
"MethodInfo",
"[",
"]",
"otherMethodInfos",
"=",
"(",
"MethodInfo",
"[",
"]",
")",
"newClassFile",
".",
"getMethods",
"(",
")",
";",
"int",
"otherMethodInfosLength",
"=",
"otherMethodInfos",
"==",
"null",
"?",
"0",
":",
"otherMethodInfos",
".",
"length",
";",
"boolean",
"compareMethods",
"=",
"true",
";",
"if",
"(",
"this",
".",
"methodsCount",
"==",
"otherMethodInfosLength",
")",
"{",
"int",
"i",
"=",
"0",
";",
"for",
"(",
";",
"i",
"<",
"this",
".",
"methodsCount",
";",
"i",
"++",
")",
"if",
"(",
"hasStructuralMethodChanges",
"(",
"this",
".",
"methods",
"[",
"i",
"]",
",",
"otherMethodInfos",
"[",
"i",
"]",
")",
")",
"break",
";",
"if",
"(",
"(",
"compareMethods",
"=",
"i",
"!=",
"this",
".",
"methodsCount",
")",
"&&",
"!",
"orderRequired",
"&&",
"!",
"excludesSynthetic",
")",
"return",
"true",
";",
"}",
"if",
"(",
"compareMethods",
")",
"{",
"if",
"(",
"this",
".",
"methodsCount",
"!=",
"otherMethodInfosLength",
"&&",
"!",
"excludesSynthetic",
")",
"return",
"true",
";",
"if",
"(",
"orderRequired",
")",
"{",
"if",
"(",
"this",
".",
"methodsCount",
"!=",
"0",
")",
"Arrays",
".",
"sort",
"(",
"this",
".",
"methods",
")",
";",
"if",
"(",
"otherMethodInfosLength",
"!=",
"0",
")",
"Arrays",
".",
"sort",
"(",
"otherMethodInfos",
")",
";",
"}",
"if",
"(",
"excludesSynthetic",
")",
"{",
"if",
"(",
"hasNonSyntheticMethodChanges",
"(",
"this",
".",
"methods",
",",
"otherMethodInfos",
")",
")",
"return",
"true",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"methodsCount",
";",
"i",
"++",
")",
"if",
"(",
"hasStructuralMethodChanges",
"(",
"this",
".",
"methods",
"[",
"i",
"]",
",",
"otherMethodInfos",
"[",
"i",
"]",
")",
")",
"return",
"true",
";",
"}",
"}",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"missingTypes",
"=",
"getMissingTypeNames",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"newMissingTypes",
"=",
"newClassFile",
".",
"getMissingTypeNames",
"(",
")",
";",
"if",
"(",
"missingTypes",
"!=",
"null",
")",
"{",
"if",
"(",
"newMissingTypes",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"int",
"length",
"=",
"missingTypes",
".",
"length",
";",
"if",
"(",
"length",
"!=",
"newMissingTypes",
".",
"length",
")",
"{",
"return",
"true",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"missingTypes",
"[",
"i",
"]",
",",
"newMissingTypes",
"[",
"i",
"]",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"newMissingTypes",
"!=",
"null",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"catch",
"(",
"ClassFormatException",
"e",
")",
"{",
"return",
"true",
";",
"}",
"}",
"private",
"boolean",
"hasStructuralAnnotationChanges",
"(",
"IBinaryAnnotation",
"[",
"]",
"currentAnnotations",
",",
"IBinaryAnnotation",
"[",
"]",
"otherAnnotations",
")",
"{",
"if",
"(",
"currentAnnotations",
"==",
"otherAnnotations",
")",
"return",
"false",
";",
"int",
"currentAnnotationsLength",
"=",
"currentAnnotations",
"==",
"null",
"?",
"0",
":",
"currentAnnotations",
".",
"length",
";",
"int",
"otherAnnotationsLength",
"=",
"otherAnnotations",
"==",
"null",
"?",
"0",
":",
"otherAnnotations",
".",
"length",
";",
"if",
"(",
"currentAnnotationsLength",
"!=",
"otherAnnotationsLength",
")",
"return",
"true",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"currentAnnotationsLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"currentAnnotations",
"[",
"i",
"]",
".",
"getTypeName",
"(",
")",
",",
"otherAnnotations",
"[",
"i",
"]",
".",
"getTypeName",
"(",
")",
")",
")",
"return",
"true",
";",
"IBinaryElementValuePair",
"[",
"]",
"currentPairs",
"=",
"currentAnnotations",
"[",
"i",
"]",
".",
"getElementValuePairs",
"(",
")",
";",
"IBinaryElementValuePair",
"[",
"]",
"otherPairs",
"=",
"otherAnnotations",
"[",
"i",
"]",
".",
"getElementValuePairs",
"(",
")",
";",
"int",
"currentPairsLength",
"=",
"currentPairs",
"==",
"null",
"?",
"0",
":",
"currentPairs",
".",
"length",
";",
"int",
"otherPairsLength",
"=",
"otherPairs",
"==",
"null",
"?",
"0",
":",
"otherPairs",
".",
"length",
";",
"if",
"(",
"currentPairsLength",
"!=",
"otherPairsLength",
")",
"return",
"true",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"currentPairsLength",
";",
"j",
"++",
")",
"{",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"currentPairs",
"[",
"j",
"]",
".",
"getName",
"(",
")",
",",
"otherPairs",
"[",
"j",
"]",
".",
"getName",
"(",
")",
")",
")",
"return",
"true",
";",
"final",
"Object",
"value",
"=",
"currentPairs",
"[",
"j",
"]",
".",
"getValue",
"(",
")",
";",
"final",
"Object",
"value2",
"=",
"otherPairs",
"[",
"j",
"]",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"value",
"instanceof",
"Object",
"[",
"]",
")",
"{",
"Object",
"[",
"]",
"currentValues",
"=",
"(",
"Object",
"[",
"]",
")",
"value",
";",
"if",
"(",
"value2",
"instanceof",
"Object",
"[",
"]",
")",
"{",
"Object",
"[",
"]",
"currentValues2",
"=",
"(",
"Object",
"[",
"]",
")",
"value2",
";",
"final",
"int",
"length",
"=",
"currentValues",
".",
"length",
";",
"if",
"(",
"length",
"!=",
"currentValues2",
".",
"length",
")",
"{",
"return",
"true",
";",
"}",
"for",
"(",
"int",
"n",
"=",
"0",
";",
"n",
"<",
"length",
";",
"n",
"++",
")",
"{",
"if",
"(",
"!",
"currentValues",
"[",
"n",
"]",
".",
"equals",
"(",
"currentValues2",
"[",
"n",
"]",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"else",
"if",
"(",
"!",
"value",
".",
"equals",
"(",
"value2",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"boolean",
"hasStructuralFieldChanges",
"(",
"FieldInfo",
"currentFieldInfo",
",",
"FieldInfo",
"otherFieldInfo",
")",
"{",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"currentFieldInfo",
".",
"getGenericSignature",
"(",
")",
",",
"otherFieldInfo",
".",
"getGenericSignature",
"(",
")",
")",
")",
"return",
"true",
";",
"if",
"(",
"currentFieldInfo",
".",
"getModifiers",
"(",
")",
"!=",
"otherFieldInfo",
".",
"getModifiers",
"(",
")",
")",
"return",
"true",
";",
"if",
"(",
"(",
"currentFieldInfo",
".",
"getTagBits",
"(",
")",
"&",
"TagBits",
".",
"AnnotationDeprecated",
")",
"!=",
"(",
"otherFieldInfo",
".",
"getTagBits",
"(",
")",
"&",
"TagBits",
".",
"AnnotationDeprecated",
")",
")",
"return",
"true",
";",
"if",
"(",
"hasStructuralAnnotationChanges",
"(",
"currentFieldInfo",
".",
"getAnnotations",
"(",
")",
",",
"otherFieldInfo",
".",
"getAnnotations",
"(",
")",
")",
")",
"return",
"true",
";",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"currentFieldInfo",
".",
"getName",
"(",
")",
",",
"otherFieldInfo",
".",
"getName",
"(",
")",
")",
")",
"return",
"true",
";",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"currentFieldInfo",
".",
"getTypeName",
"(",
")",
",",
"otherFieldInfo",
".",
"getTypeName",
"(",
")",
")",
")",
"return",
"true",
";",
"if",
"(",
"currentFieldInfo",
".",
"hasConstant",
"(",
")",
"!=",
"otherFieldInfo",
".",
"hasConstant",
"(",
")",
")",
"return",
"true",
";",
"if",
"(",
"currentFieldInfo",
".",
"hasConstant",
"(",
")",
")",
"{",
"Constant",
"currentConstant",
"=",
"currentFieldInfo",
".",
"getConstant",
"(",
")",
";",
"Constant",
"otherConstant",
"=",
"otherFieldInfo",
".",
"getConstant",
"(",
")",
";",
"if",
"(",
"currentConstant",
".",
"typeID",
"(",
")",
"!=",
"otherConstant",
".",
"typeID",
"(",
")",
")",
"return",
"true",
";",
"if",
"(",
"!",
"currentConstant",
".",
"getClass",
"(",
")",
".",
"equals",
"(",
"otherConstant",
".",
"getClass",
"(",
")",
")",
")",
"return",
"true",
";",
"switch",
"(",
"currentConstant",
".",
"typeID",
"(",
")",
")",
"{",
"case",
"TypeIds",
".",
"T_int",
":",
"return",
"currentConstant",
".",
"intValue",
"(",
")",
"!=",
"otherConstant",
".",
"intValue",
"(",
")",
";",
"case",
"TypeIds",
".",
"T_byte",
":",
"return",
"currentConstant",
".",
"byteValue",
"(",
")",
"!=",
"otherConstant",
".",
"byteValue",
"(",
")",
";",
"case",
"TypeIds",
".",
"T_short",
":",
"return",
"currentConstant",
".",
"shortValue",
"(",
")",
"!=",
"otherConstant",
".",
"shortValue",
"(",
")",
";",
"case",
"TypeIds",
".",
"T_char",
":",
"return",
"currentConstant",
".",
"charValue",
"(",
")",
"!=",
"otherConstant",
".",
"charValue",
"(",
")",
";",
"case",
"TypeIds",
".",
"T_long",
":",
"return",
"currentConstant",
".",
"longValue",
"(",
")",
"!=",
"otherConstant",
".",
"longValue",
"(",
")",
";",
"case",
"TypeIds",
".",
"T_float",
":",
"return",
"currentConstant",
".",
"floatValue",
"(",
")",
"!=",
"otherConstant",
".",
"floatValue",
"(",
")",
";",
"case",
"TypeIds",
".",
"T_double",
":",
"return",
"currentConstant",
".",
"doubleValue",
"(",
")",
"!=",
"otherConstant",
".",
"doubleValue",
"(",
")",
";",
"case",
"TypeIds",
".",
"T_boolean",
":",
"return",
"currentConstant",
".",
"booleanValue",
"(",
")",
"!=",
"otherConstant",
".",
"booleanValue",
"(",
")",
";",
"case",
"TypeIds",
".",
"T_JavaLangString",
":",
"return",
"!",
"currentConstant",
".",
"stringValue",
"(",
")",
".",
"equals",
"(",
"otherConstant",
".",
"stringValue",
"(",
")",
")",
";",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"boolean",
"hasStructuralMethodChanges",
"(",
"MethodInfo",
"currentMethodInfo",
",",
"MethodInfo",
"otherMethodInfo",
")",
"{",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"currentMethodInfo",
".",
"getGenericSignature",
"(",
")",
",",
"otherMethodInfo",
".",
"getGenericSignature",
"(",
")",
")",
")",
"return",
"true",
";",
"if",
"(",
"currentMethodInfo",
".",
"getModifiers",
"(",
")",
"!=",
"otherMethodInfo",
".",
"getModifiers",
"(",
")",
")",
"return",
"true",
";",
"if",
"(",
"(",
"currentMethodInfo",
".",
"getTagBits",
"(",
")",
"&",
"TagBits",
".",
"AnnotationDeprecated",
")",
"!=",
"(",
"otherMethodInfo",
".",
"getTagBits",
"(",
")",
"&",
"TagBits",
".",
"AnnotationDeprecated",
")",
")",
"return",
"true",
";",
"if",
"(",
"hasStructuralAnnotationChanges",
"(",
"currentMethodInfo",
".",
"getAnnotations",
"(",
")",
",",
"otherMethodInfo",
".",
"getAnnotations",
"(",
")",
")",
")",
"return",
"true",
";",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"currentMethodInfo",
".",
"getSelector",
"(",
")",
",",
"otherMethodInfo",
".",
"getSelector",
"(",
")",
")",
")",
"return",
"true",
";",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"currentMethodInfo",
".",
"getMethodDescriptor",
"(",
")",
",",
"otherMethodInfo",
".",
"getMethodDescriptor",
"(",
")",
")",
")",
"return",
"true",
";",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"currentMethodInfo",
".",
"getGenericSignature",
"(",
")",
",",
"otherMethodInfo",
".",
"getGenericSignature",
"(",
")",
")",
")",
"return",
"true",
";",
"char",
"[",
"]",
"[",
"]",
"currentThrownExceptions",
"=",
"currentMethodInfo",
".",
"getExceptionTypeNames",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"otherThrownExceptions",
"=",
"otherMethodInfo",
".",
"getExceptionTypeNames",
"(",
")",
";",
"if",
"(",
"currentThrownExceptions",
"!=",
"otherThrownExceptions",
")",
"{",
"int",
"currentThrownExceptionsLength",
"=",
"currentThrownExceptions",
"==",
"null",
"?",
"0",
":",
"currentThrownExceptions",
".",
"length",
";",
"int",
"otherThrownExceptionsLength",
"=",
"otherThrownExceptions",
"==",
"null",
"?",
"0",
":",
"otherThrownExceptions",
".",
"length",
";",
"if",
"(",
"currentThrownExceptionsLength",
"!=",
"otherThrownExceptionsLength",
")",
"return",
"true",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"currentThrownExceptionsLength",
";",
"k",
"++",
")",
"if",
"(",
"!",
"CharOperation",
".",
"equals",
"(",
"currentThrownExceptions",
"[",
"k",
"]",
",",
"otherThrownExceptions",
"[",
"k",
"]",
")",
")",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"private",
"void",
"initialize",
"(",
")",
"throws",
"ClassFormatException",
"{",
"try",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"fieldsCount",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"this",
".",
"fields",
"[",
"i",
"]",
".",
"initialize",
"(",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"methodsCount",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"this",
".",
"methods",
"[",
"i",
"]",
".",
"initialize",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"innerInfos",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"innerInfos",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"this",
".",
"innerInfos",
"[",
"i",
"]",
".",
"initialize",
"(",
")",
";",
"}",
"}",
"if",
"(",
"this",
".",
"annotations",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"annotations",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"this",
".",
"annotations",
"[",
"i",
"]",
".",
"initialize",
"(",
")",
";",
"}",
"}",
"this",
".",
"getEnclosingMethod",
"(",
")",
";",
"reset",
"(",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"ClassFormatException",
"exception",
"=",
"new",
"ClassFormatException",
"(",
"e",
",",
"this",
".",
"classFileName",
")",
";",
"throw",
"exception",
";",
"}",
"}",
"public",
"boolean",
"isAnonymous",
"(",
")",
"{",
"if",
"(",
"this",
".",
"innerInfo",
"==",
"null",
")",
"return",
"false",
";",
"char",
"[",
"]",
"innerSourceName",
"=",
"this",
".",
"innerInfo",
".",
"getSourceName",
"(",
")",
";",
"return",
"(",
"innerSourceName",
"==",
"null",
"||",
"innerSourceName",
".",
"length",
"==",
"0",
")",
";",
"}",
"public",
"boolean",
"isBinaryType",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"isLocal",
"(",
")",
"{",
"if",
"(",
"this",
".",
"innerInfo",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"this",
".",
"innerInfo",
".",
"getEnclosingTypeName",
"(",
")",
"!=",
"null",
")",
"return",
"false",
";",
"char",
"[",
"]",
"innerSourceName",
"=",
"this",
".",
"innerInfo",
".",
"getSourceName",
"(",
")",
";",
"return",
"(",
"innerSourceName",
"!=",
"null",
"&&",
"innerSourceName",
".",
"length",
">",
"0",
")",
";",
"}",
"public",
"boolean",
"isMember",
"(",
")",
"{",
"if",
"(",
"this",
".",
"innerInfo",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"this",
".",
"innerInfo",
".",
"getEnclosingTypeName",
"(",
")",
"==",
"null",
")",
"return",
"false",
";",
"char",
"[",
"]",
"innerSourceName",
"=",
"this",
".",
"innerInfo",
".",
"getSourceName",
"(",
")",
";",
"return",
"(",
"innerSourceName",
"!=",
"null",
"&&",
"innerSourceName",
".",
"length",
">",
"0",
")",
";",
"}",
"public",
"boolean",
"isNestedType",
"(",
")",
"{",
"return",
"this",
".",
"innerInfo",
"!=",
"null",
";",
"}",
"public",
"char",
"[",
"]",
"sourceFileName",
"(",
")",
"{",
"return",
"this",
".",
"sourceFileName",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"java",
".",
"io",
".",
"ByteArrayOutputStream",
"out",
"=",
"new",
"java",
".",
"io",
".",
"ByteArrayOutputStream",
"(",
")",
";",
"java",
".",
"io",
".",
"PrintWriter",
"print",
"=",
"new",
"java",
".",
"io",
".",
"PrintWriter",
"(",
"out",
")",
";",
"print",
".",
"println",
"(",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
"+",
"\"{\"",
")",
";",
"print",
".",
"println",
"(",
"\"\"",
"+",
"new",
"String",
"(",
"getName",
"(",
")",
")",
")",
";",
"print",
".",
"println",
"(",
"\"\"",
"+",
"(",
"getSuperclassName",
"(",
")",
"==",
"null",
"?",
"\"null\"",
":",
"new",
"String",
"(",
"getSuperclassName",
"(",
")",
")",
")",
")",
";",
"print",
".",
"println",
"(",
"\"\"",
"+",
"printTypeModifiers",
"(",
"accessFlags",
"(",
")",
")",
"+",
"\"(\"",
"+",
"accessFlags",
"(",
")",
"+",
"\")\"",
")",
";",
"print",
".",
"flush",
"(",
")",
";",
"return",
"out",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,305 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
";",
"abstract",
"public",
"class",
"ClassFileStruct",
"{",
"byte",
"[",
"]",
"reference",
";",
"int",
"[",
"]",
"constantPoolOffsets",
";",
"int",
"structOffset",
";",
"public",
"ClassFileStruct",
"(",
"byte",
"[",
"]",
"classFileBytes",
",",
"int",
"[",
"]",
"offsets",
",",
"int",
"offset",
")",
"{",
"this",
".",
"reference",
"=",
"classFileBytes",
";",
"this",
".",
"constantPoolOffsets",
"=",
"offsets",
";",
"this",
".",
"structOffset",
"=",
"offset",
";",
"}",
"public",
"double",
"doubleAt",
"(",
"int",
"relativeOffset",
")",
"{",
"return",
"(",
"Double",
".",
"longBitsToDouble",
"(",
"i8At",
"(",
"relativeOffset",
")",
")",
")",
";",
"}",
"public",
"float",
"floatAt",
"(",
"int",
"relativeOffset",
")",
"{",
"return",
"(",
"Float",
".",
"intBitsToFloat",
"(",
"i4At",
"(",
"relativeOffset",
")",
")",
")",
";",
"}",
"public",
"int",
"i4At",
"(",
"int",
"relativeOffset",
")",
"{",
"int",
"position",
"=",
"relativeOffset",
"+",
"this",
".",
"structOffset",
";",
"return",
"(",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"24",
")",
"|",
"(",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"16",
")",
"|",
"(",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"8",
")",
"+",
"(",
"this",
".",
"reference",
"[",
"position",
"]",
"&",
"0xFF",
")",
";",
"}",
"public",
"long",
"i8At",
"(",
"int",
"relativeOffset",
")",
"{",
"int",
"position",
"=",
"relativeOffset",
"+",
"this",
".",
"structOffset",
";",
"return",
"(",
"(",
"(",
"long",
")",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"56",
")",
"|",
"(",
"(",
"(",
"long",
")",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"48",
")",
"|",
"(",
"(",
"(",
"long",
")",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"40",
")",
"|",
"(",
"(",
"(",
"long",
")",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"32",
")",
"|",
"(",
"(",
"(",
"long",
")",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"24",
")",
"|",
"(",
"(",
"(",
"long",
")",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"16",
")",
"|",
"(",
"(",
"(",
"long",
")",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
")",
"<<",
"8",
")",
"|",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
";",
"}",
"protected",
"void",
"reset",
"(",
")",
"{",
"this",
".",
"reference",
"=",
"null",
";",
"this",
".",
"constantPoolOffsets",
"=",
"null",
";",
"}",
"public",
"int",
"u1At",
"(",
"int",
"relativeOffset",
")",
"{",
"return",
"(",
"this",
".",
"reference",
"[",
"relativeOffset",
"+",
"this",
".",
"structOffset",
"]",
"&",
"0xFF",
")",
";",
"}",
"public",
"int",
"u2At",
"(",
"int",
"relativeOffset",
")",
"{",
"int",
"position",
"=",
"relativeOffset",
"+",
"this",
".",
"structOffset",
";",
"return",
"(",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"8",
")",
"|",
"(",
"this",
".",
"reference",
"[",
"position",
"]",
"&",
"0xFF",
")",
";",
"}",
"public",
"long",
"u4At",
"(",
"int",
"relativeOffset",
")",
"{",
"int",
"position",
"=",
"relativeOffset",
"+",
"this",
".",
"structOffset",
";",
"return",
"(",
"(",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFFL",
")",
"<<",
"24",
")",
"|",
"(",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"16",
")",
"|",
"(",
"(",
"this",
".",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"8",
")",
"|",
"(",
"this",
".",
"reference",
"[",
"position",
"]",
"&",
"0xFF",
")",
")",
";",
"}",
"public",
"char",
"[",
"]",
"utf8At",
"(",
"int",
"relativeOffset",
",",
"int",
"bytesAvailable",
")",
"{",
"int",
"length",
"=",
"bytesAvailable",
";",
"char",
"outputBuf",
"[",
"]",
"=",
"new",
"char",
"[",
"bytesAvailable",
"]",
";",
"int",
"outputPos",
"=",
"0",
";",
"int",
"readOffset",
"=",
"this",
".",
"structOffset",
"+",
"relativeOffset",
";",
"while",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"x",
"=",
"this",
".",
"reference",
"[",
"readOffset",
"++",
"]",
"&",
"0xFF",
";",
"length",
"--",
";",
"if",
"(",
"(",
"0x80",
"&",
"x",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"(",
"x",
"&",
"0x20",
")",
"!=",
"0",
")",
"{",
"length",
"-=",
"2",
";",
"x",
"=",
"(",
"(",
"x",
"&",
"0xF",
")",
"<<",
"12",
")",
"|",
"(",
"(",
"this",
".",
"reference",
"[",
"readOffset",
"++",
"]",
"&",
"0x3F",
")",
"<<",
"6",
")",
"|",
"(",
"this",
".",
"reference",
"[",
"readOffset",
"++",
"]",
"&",
"0x3F",
")",
";",
"}",
"else",
"{",
"length",
"--",
";",
"x",
"=",
"(",
"(",
"x",
"&",
"0x1F",
")",
"<<",
"6",
")",
"|",
"(",
"this",
".",
"reference",
"[",
"readOffset",
"++",
"]",
"&",
"0x3F",
")",
";",
"}",
"}",
"outputBuf",
"[",
"outputPos",
"++",
"]",
"=",
"(",
"char",
")",
"x",
";",
"}",
"if",
"(",
"outputPos",
"!=",
"bytesAvailable",
")",
"{",
"System",
".",
"arraycopy",
"(",
"outputBuf",
",",
"0",
",",
"(",
"outputBuf",
"=",
"new",
"char",
"[",
"outputPos",
"]",
")",
",",
"0",
",",
"outputPos",
")",
";",
"}",
"return",
"outputBuf",
";",
"}",
"}",
"</s>"
] |
4,306 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ASTNode",
";",
"public",
"interface",
"ClassFileConstants",
"{",
"int",
"AccDefault",
"=",
"0",
";",
"int",
"AccPublic",
"=",
"0x0001",
";",
"int",
"AccPrivate",
"=",
"0x0002",
";",
"int",
"AccProtected",
"=",
"0x0004",
";",
"int",
"AccStatic",
"=",
"0x0008",
";",
"int",
"AccFinal",
"=",
"0x0010",
";",
"int",
"AccSynchronized",
"=",
"0x0020",
";",
"int",
"AccVolatile",
"=",
"0x0040",
";",
"int",
"AccBridge",
"=",
"0x0040",
";",
"int",
"AccTransient",
"=",
"0x0080",
";",
"int",
"AccVarargs",
"=",
"0x0080",
";",
"int",
"AccNative",
"=",
"0x0100",
";",
"int",
"AccInterface",
"=",
"0x0200",
";",
"int",
"AccAbstract",
"=",
"0x0400",
";",
"int",
"AccStrictfp",
"=",
"0x0800",
";",
"int",
"AccSynthetic",
"=",
"0x1000",
";",
"int",
"AccAnnotation",
"=",
"0x2000",
";",
"int",
"AccEnum",
"=",
"0x4000",
";",
"int",
"AccSuper",
"=",
"0x0020",
";",
"int",
"AccAnnotationDefault",
"=",
"ASTNode",
".",
"Bit18",
";",
"int",
"AccDeprecated",
"=",
"ASTNode",
".",
"Bit21",
";",
"int",
"Utf8Tag",
"=",
"1",
";",
"int",
"IntegerTag",
"=",
"3",
";",
"int",
"FloatTag",
"=",
"4",
";",
"int",
"LongTag",
"=",
"5",
";",
"int",
"DoubleTag",
"=",
"6",
";",
"int",
"ClassTag",
"=",
"7",
";",
"int",
"StringTag",
"=",
"8",
";",
"int",
"FieldRefTag",
"=",
"9",
";",
"int",
"MethodRefTag",
"=",
"10",
";",
"int",
"InterfaceMethodRefTag",
"=",
"11",
";",
"int",
"NameAndTypeTag",
"=",
"12",
";",
"int",
"ConstantMethodRefFixedSize",
"=",
"5",
";",
"int",
"ConstantClassFixedSize",
"=",
"3",
";",
"int",
"ConstantDoubleFixedSize",
"=",
"9",
";",
"int",
"ConstantFieldRefFixedSize",
"=",
"5",
";",
"int",
"ConstantFloatFixedSize",
"=",
"5",
";",
"int",
"ConstantIntegerFixedSize",
"=",
"5",
";",
"int",
"ConstantInterfaceMethodRefFixedSize",
"=",
"5",
";",
"int",
"ConstantLongFixedSize",
"=",
"9",
";",
"int",
"ConstantStringFixedSize",
"=",
"3",
";",
"int",
"ConstantUtf8FixedSize",
"=",
"3",
";",
"int",
"ConstantNameAndTypeFixedSize",
"=",
"5",
";",
"int",
"MAJOR_VERSION_1_1",
"=",
"45",
";",
"int",
"MAJOR_VERSION_1_2",
"=",
"46",
";",
"int",
"MAJOR_VERSION_1_3",
"=",
"47",
";",
"int",
"MAJOR_VERSION_1_4",
"=",
"48",
";",
"int",
"MAJOR_VERSION_1_5",
"=",
"49",
";",
"int",
"MAJOR_VERSION_1_6",
"=",
"50",
";",
"int",
"MAJOR_VERSION_1_7",
"=",
"51",
";",
"int",
"MINOR_VERSION_0",
"=",
"0",
";",
"int",
"MINOR_VERSION_1",
"=",
"1",
";",
"int",
"MINOR_VERSION_2",
"=",
"2",
";",
"int",
"MINOR_VERSION_3",
"=",
"3",
";",
"int",
"MINOR_VERSION_4",
"=",
"4",
";",
"long",
"JDK1_1",
"=",
"(",
"(",
"long",
")",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_1",
"<<",
"16",
")",
"+",
"ClassFileConstants",
".",
"MINOR_VERSION_3",
";",
"long",
"JDK1_2",
"=",
"(",
"(",
"long",
")",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_2",
"<<",
"16",
")",
"+",
"ClassFileConstants",
".",
"MINOR_VERSION_0",
";",
"long",
"JDK1_3",
"=",
"(",
"(",
"long",
")",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_3",
"<<",
"16",
")",
"+",
"ClassFileConstants",
".",
"MINOR_VERSION_0",
";",
"long",
"JDK1_4",
"=",
"(",
"(",
"long",
")",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_4",
"<<",
"16",
")",
"+",
"ClassFileConstants",
".",
"MINOR_VERSION_0",
";",
"long",
"JDK1_5",
"=",
"(",
"(",
"long",
")",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_5",
"<<",
"16",
")",
"+",
"ClassFileConstants",
".",
"MINOR_VERSION_0",
";",
"long",
"JDK1_6",
"=",
"(",
"(",
"long",
")",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_6",
"<<",
"16",
")",
"+",
"ClassFileConstants",
".",
"MINOR_VERSION_0",
";",
"long",
"JDK1_7",
"=",
"(",
"(",
"long",
")",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_7",
"<<",
"16",
")",
"+",
"ClassFileConstants",
".",
"MINOR_VERSION_0",
";",
"long",
"CLDC_1_1",
"=",
"(",
"(",
"long",
")",
"ClassFileConstants",
".",
"MAJOR_VERSION_1_1",
"<<",
"16",
")",
"+",
"ClassFileConstants",
".",
"MINOR_VERSION_4",
";",
"long",
"JDK_DEFERRED",
"=",
"Long",
".",
"MAX_VALUE",
";",
"int",
"INT_ARRAY",
"=",
"10",
";",
"int",
"BYTE_ARRAY",
"=",
"8",
";",
"int",
"BOOLEAN_ARRAY",
"=",
"4",
";",
"int",
"SHORT_ARRAY",
"=",
"9",
";",
"int",
"CHAR_ARRAY",
"=",
"5",
";",
"int",
"LONG_ARRAY",
"=",
"11",
";",
"int",
"FLOAT_ARRAY",
"=",
"6",
";",
"int",
"DOUBLE_ARRAY",
"=",
"7",
";",
"int",
"ATTR_SOURCE",
"=",
"0x1",
";",
"int",
"ATTR_LINES",
"=",
"0x2",
";",
"int",
"ATTR_VARS",
"=",
"0x4",
";",
"int",
"ATTR_STACK_MAP_TABLE",
"=",
"0x8",
";",
"int",
"ATTR_STACK_MAP",
"=",
"0x10",
";",
"}",
"</s>"
] |
4,307 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryAnnotation",
";",
"public",
"class",
"MethodInfoWithAnnotations",
"extends",
"MethodInfo",
"{",
"protected",
"AnnotationInfo",
"[",
"]",
"annotations",
";",
"MethodInfoWithAnnotations",
"(",
"MethodInfo",
"methodInfo",
",",
"AnnotationInfo",
"[",
"]",
"annotations",
")",
"{",
"super",
"(",
"methodInfo",
".",
"reference",
",",
"methodInfo",
".",
"constantPoolOffsets",
",",
"methodInfo",
".",
"structOffset",
")",
";",
"this",
".",
"annotations",
"=",
"annotations",
";",
"this",
".",
"accessFlags",
"=",
"methodInfo",
".",
"accessFlags",
";",
"this",
".",
"attributeBytes",
"=",
"methodInfo",
".",
"attributeBytes",
";",
"this",
".",
"descriptor",
"=",
"methodInfo",
".",
"descriptor",
";",
"this",
".",
"exceptionNames",
"=",
"methodInfo",
".",
"exceptionNames",
";",
"this",
".",
"name",
"=",
"methodInfo",
".",
"name",
";",
"this",
".",
"signature",
"=",
"methodInfo",
".",
"signature",
";",
"this",
".",
"signatureUtf8Offset",
"=",
"methodInfo",
".",
"signatureUtf8Offset",
";",
"this",
".",
"tagBits",
"=",
"methodInfo",
".",
"tagBits",
";",
"}",
"public",
"IBinaryAnnotation",
"[",
"]",
"getAnnotations",
"(",
")",
"{",
"return",
"this",
".",
"annotations",
";",
"}",
"protected",
"void",
"initialize",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"l",
"=",
"this",
".",
"annotations",
"==",
"null",
"?",
"0",
":",
"this",
".",
"annotations",
".",
"length",
";",
"i",
"<",
"l",
";",
"i",
"++",
")",
"if",
"(",
"this",
".",
"annotations",
"[",
"i",
"]",
"!=",
"null",
")",
"this",
".",
"annotations",
"[",
"i",
"]",
".",
"initialize",
"(",
")",
";",
"super",
".",
"initialize",
"(",
")",
";",
"}",
"protected",
"void",
"reset",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"l",
"=",
"this",
".",
"annotations",
"==",
"null",
"?",
"0",
":",
"this",
".",
"annotations",
".",
"length",
";",
"i",
"<",
"l",
";",
"i",
"++",
")",
"if",
"(",
"this",
".",
"annotations",
"[",
"i",
"]",
"!=",
"null",
")",
"this",
".",
"annotations",
"[",
"i",
"]",
".",
"reset",
"(",
")",
";",
"super",
".",
"reset",
"(",
")",
";",
"}",
"protected",
"void",
"toStringContent",
"(",
"StringBuffer",
"buffer",
")",
"{",
"super",
".",
"toStringContent",
"(",
"buffer",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"l",
"=",
"this",
".",
"annotations",
"==",
"null",
"?",
"0",
":",
"this",
".",
"annotations",
".",
"length",
";",
"i",
"<",
"l",
";",
"i",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"this",
".",
"annotations",
"[",
"i",
"]",
")",
";",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"}",
"}",
"</s>"
] |
4,308 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
";",
"import",
"java",
".",
"io",
".",
"PrintStream",
";",
"import",
"java",
".",
"io",
".",
"PrintWriter",
";",
"public",
"class",
"ClassFormatException",
"extends",
"Exception",
"{",
"public",
"static",
"final",
"int",
"ErrBadMagic",
"=",
"1",
";",
"public",
"static",
"final",
"int",
"ErrBadMinorVersion",
"=",
"2",
";",
"public",
"static",
"final",
"int",
"ErrBadMajorVersion",
"=",
"3",
";",
"public",
"static",
"final",
"int",
"ErrBadConstantClass",
"=",
"4",
";",
"public",
"static",
"final",
"int",
"ErrBadConstantString",
"=",
"5",
";",
"public",
"static",
"final",
"int",
"ErrBadConstantNameAndType",
"=",
"6",
";",
"public",
"static",
"final",
"int",
"ErrBadConstantFieldRef",
"=",
"7",
";",
"public",
"static",
"final",
"int",
"ErrBadConstantMethodRef",
"=",
"8",
";",
"public",
"static",
"final",
"int",
"ErrBadConstantInterfaceMethodRef",
"=",
"9",
";",
"public",
"static",
"final",
"int",
"ErrBadConstantPoolIndex",
"=",
"10",
";",
"public",
"static",
"final",
"int",
"ErrBadSuperclassName",
"=",
"11",
";",
"public",
"static",
"final",
"int",
"ErrInterfaceCannotBeFinal",
"=",
"12",
";",
"public",
"static",
"final",
"int",
"ErrInterfaceMustBeAbstract",
"=",
"13",
";",
"public",
"static",
"final",
"int",
"ErrBadModifiers",
"=",
"14",
";",
"public",
"static",
"final",
"int",
"ErrClassCannotBeAbstractFinal",
"=",
"15",
";",
"public",
"static",
"final",
"int",
"ErrBadClassname",
"=",
"16",
";",
"public",
"static",
"final",
"int",
"ErrBadFieldInfo",
"=",
"17",
";",
"public",
"static",
"final",
"int",
"ErrBadMethodInfo",
"=",
"17",
";",
"public",
"static",
"final",
"int",
"ErrEmptyConstantPool",
"=",
"18",
";",
"public",
"static",
"final",
"int",
"ErrMalformedUtf8",
"=",
"19",
";",
"public",
"static",
"final",
"int",
"ErrUnknownConstantTag",
"=",
"20",
";",
"public",
"static",
"final",
"int",
"ErrTruncatedInput",
"=",
"21",
";",
"public",
"static",
"final",
"int",
"ErrMethodMustBeAbstract",
"=",
"22",
";",
"public",
"static",
"final",
"int",
"ErrMalformedAttribute",
"=",
"23",
";",
"public",
"static",
"final",
"int",
"ErrBadInterface",
"=",
"24",
";",
"public",
"static",
"final",
"int",
"ErrInterfaceMustSubclassObject",
"=",
"25",
";",
"public",
"static",
"final",
"int",
"ErrIncorrectInterfaceMethods",
"=",
"26",
";",
"public",
"static",
"final",
"int",
"ErrInvalidMethodName",
"=",
"27",
";",
"public",
"static",
"final",
"int",
"ErrInvalidMethodSignature",
"=",
"28",
";",
"private",
"static",
"final",
"long",
"serialVersionUID",
"=",
"6667458511042774540L",
";",
"private",
"int",
"errorCode",
";",
"private",
"int",
"bufferPosition",
";",
"private",
"RuntimeException",
"nestedException",
";",
"private",
"char",
"[",
"]",
"fileName",
";",
"public",
"ClassFormatException",
"(",
"RuntimeException",
"e",
",",
"char",
"[",
"]",
"fileName",
")",
"{",
"this",
".",
"nestedException",
"=",
"e",
";",
"this",
".",
"fileName",
"=",
"fileName",
";",
"}",
"public",
"ClassFormatException",
"(",
"int",
"code",
")",
"{",
"this",
".",
"errorCode",
"=",
"code",
";",
"}",
"public",
"ClassFormatException",
"(",
"int",
"code",
",",
"int",
"bufPos",
")",
"{",
"this",
".",
"errorCode",
"=",
"code",
";",
"this",
".",
"bufferPosition",
"=",
"bufPos",
";",
"}",
"public",
"int",
"getErrorCode",
"(",
")",
"{",
"return",
"this",
".",
"errorCode",
";",
"}",
"public",
"int",
"getBufferPosition",
"(",
")",
"{",
"return",
"this",
".",
"bufferPosition",
";",
"}",
"public",
"Throwable",
"getException",
"(",
")",
"{",
"return",
"this",
".",
"nestedException",
";",
"}",
"public",
"void",
"printStackTrace",
"(",
")",
"{",
"printStackTrace",
"(",
"System",
".",
"err",
")",
";",
"}",
"public",
"void",
"printStackTrace",
"(",
"PrintStream",
"output",
")",
"{",
"synchronized",
"(",
"output",
")",
"{",
"super",
".",
"printStackTrace",
"(",
"output",
")",
";",
"Throwable",
"throwable",
"=",
"getException",
"(",
")",
";",
"if",
"(",
"throwable",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"fileName",
"!=",
"null",
")",
"{",
"output",
".",
"print",
"(",
"\"Caused",
"in",
"\"",
")",
";",
"output",
".",
"print",
"(",
"this",
".",
"fileName",
")",
";",
"output",
".",
"print",
"(",
"\"",
"by:",
"\"",
")",
";",
"}",
"else",
"{",
"output",
".",
"print",
"(",
"\"Caused",
"by:",
"\"",
")",
";",
"}",
"throwable",
".",
"printStackTrace",
"(",
"output",
")",
";",
"}",
"}",
"}",
"public",
"void",
"printStackTrace",
"(",
"PrintWriter",
"output",
")",
"{",
"synchronized",
"(",
"output",
")",
"{",
"super",
".",
"printStackTrace",
"(",
"output",
")",
";",
"Throwable",
"throwable",
"=",
"getException",
"(",
")",
";",
"if",
"(",
"throwable",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"fileName",
"!=",
"null",
")",
"{",
"output",
".",
"print",
"(",
"\"Caused",
"in",
"\"",
")",
";",
"output",
".",
"print",
"(",
"this",
".",
"fileName",
")",
";",
"output",
".",
"print",
"(",
"\"",
"by:",
"\"",
")",
";",
"}",
"else",
"{",
"output",
".",
"print",
"(",
"\"Caused",
"by:",
"\"",
")",
";",
"}",
"throwable",
".",
"printStackTrace",
"(",
"output",
")",
";",
"}",
"}",
"}",
"}",
"</s>"
] |
4,309 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"AttributeNamesConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryField",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeIds",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"FieldInfo",
"extends",
"ClassFileStruct",
"implements",
"IBinaryField",
",",
"Comparable",
"{",
"protected",
"int",
"accessFlags",
";",
"protected",
"int",
"attributeBytes",
";",
"protected",
"Constant",
"constant",
";",
"protected",
"char",
"[",
"]",
"descriptor",
";",
"protected",
"char",
"[",
"]",
"name",
";",
"protected",
"char",
"[",
"]",
"signature",
";",
"protected",
"int",
"signatureUtf8Offset",
";",
"protected",
"long",
"tagBits",
";",
"protected",
"Object",
"wrappedConstantValue",
";",
"public",
"static",
"FieldInfo",
"createField",
"(",
"byte",
"classFileBytes",
"[",
"]",
",",
"int",
"offsets",
"[",
"]",
",",
"int",
"offset",
")",
"{",
"FieldInfo",
"fieldInfo",
"=",
"new",
"FieldInfo",
"(",
"classFileBytes",
",",
"offsets",
",",
"offset",
")",
";",
"AnnotationInfo",
"[",
"]",
"annotations",
"=",
"fieldInfo",
".",
"readAttributes",
"(",
")",
";",
"if",
"(",
"annotations",
"==",
"null",
")",
"return",
"fieldInfo",
";",
"return",
"new",
"FieldInfoWithAnnotation",
"(",
"fieldInfo",
",",
"annotations",
")",
";",
"}",
"protected",
"FieldInfo",
"(",
"byte",
"classFileBytes",
"[",
"]",
",",
"int",
"offsets",
"[",
"]",
",",
"int",
"offset",
")",
"{",
"super",
"(",
"classFileBytes",
",",
"offsets",
",",
"offset",
")",
";",
"this",
".",
"accessFlags",
"=",
"-",
"1",
";",
"this",
".",
"signatureUtf8Offset",
"=",
"-",
"1",
";",
"}",
"private",
"AnnotationInfo",
"[",
"]",
"decodeAnnotations",
"(",
"int",
"offset",
",",
"boolean",
"runtimeVisible",
")",
"{",
"int",
"numberOfAnnotations",
"=",
"u2At",
"(",
"offset",
"+",
"6",
")",
";",
"if",
"(",
"numberOfAnnotations",
">",
"0",
")",
"{",
"int",
"readOffset",
"=",
"offset",
"+",
"8",
";",
"AnnotationInfo",
"[",
"]",
"newInfos",
"=",
"null",
";",
"int",
"newInfoCount",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfAnnotations",
";",
"i",
"++",
")",
"{",
"AnnotationInfo",
"newInfo",
"=",
"new",
"AnnotationInfo",
"(",
"this",
".",
"reference",
",",
"this",
".",
"constantPoolOffsets",
",",
"readOffset",
"+",
"this",
".",
"structOffset",
",",
"runtimeVisible",
",",
"false",
")",
";",
"readOffset",
"+=",
"newInfo",
".",
"readOffset",
";",
"long",
"standardTagBits",
"=",
"newInfo",
".",
"standardAnnotationTagBits",
";",
"if",
"(",
"standardTagBits",
"!=",
"0",
")",
"{",
"this",
".",
"tagBits",
"|=",
"standardTagBits",
";",
"}",
"else",
"{",
"if",
"(",
"newInfos",
"==",
"null",
")",
"newInfos",
"=",
"new",
"AnnotationInfo",
"[",
"numberOfAnnotations",
"-",
"i",
"]",
";",
"newInfos",
"[",
"newInfoCount",
"++",
"]",
"=",
"newInfo",
";",
"}",
"}",
"if",
"(",
"newInfos",
"!=",
"null",
")",
"{",
"if",
"(",
"newInfoCount",
"!=",
"newInfos",
".",
"length",
")",
"System",
".",
"arraycopy",
"(",
"newInfos",
",",
"0",
",",
"newInfos",
"=",
"new",
"AnnotationInfo",
"[",
"newInfoCount",
"]",
",",
"0",
",",
"newInfoCount",
")",
";",
"return",
"newInfos",
";",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"int",
"compareTo",
"(",
"Object",
"o",
")",
"{",
"return",
"new",
"String",
"(",
"getName",
"(",
")",
")",
".",
"compareTo",
"(",
"new",
"String",
"(",
"(",
"(",
"FieldInfo",
")",
"o",
")",
".",
"getName",
"(",
")",
")",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"FieldInfo",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"CharOperation",
".",
"equals",
"(",
"getName",
"(",
")",
",",
"(",
"(",
"FieldInfo",
")",
"o",
")",
".",
"getName",
"(",
")",
")",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"CharOperation",
".",
"hashCode",
"(",
"getName",
"(",
")",
")",
";",
"}",
"public",
"Constant",
"getConstant",
"(",
")",
"{",
"if",
"(",
"this",
".",
"constant",
"==",
"null",
")",
"{",
"readConstantAttribute",
"(",
")",
";",
"}",
"return",
"this",
".",
"constant",
";",
"}",
"public",
"char",
"[",
"]",
"getGenericSignature",
"(",
")",
"{",
"if",
"(",
"this",
".",
"signatureUtf8Offset",
"!=",
"-",
"1",
")",
"{",
"if",
"(",
"this",
".",
"signature",
"==",
"null",
")",
"{",
"this",
".",
"signature",
"=",
"utf8At",
"(",
"this",
".",
"signatureUtf8Offset",
"+",
"3",
",",
"u2At",
"(",
"this",
".",
"signatureUtf8Offset",
"+",
"1",
")",
")",
";",
"}",
"return",
"this",
".",
"signature",
";",
"}",
"return",
"null",
";",
"}",
"public",
"int",
"getModifiers",
"(",
")",
"{",
"if",
"(",
"this",
".",
"accessFlags",
"==",
"-",
"1",
")",
"{",
"this",
".",
"accessFlags",
"=",
"u2At",
"(",
"0",
")",
";",
"readModifierRelatedAttributes",
"(",
")",
";",
"}",
"return",
"this",
".",
"accessFlags",
";",
"}",
"public",
"char",
"[",
"]",
"getName",
"(",
")",
"{",
"if",
"(",
"this",
".",
"name",
"==",
"null",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"2",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"this",
".",
"name",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"}",
"return",
"this",
".",
"name",
";",
"}",
"public",
"long",
"getTagBits",
"(",
")",
"{",
"return",
"this",
".",
"tagBits",
";",
"}",
"public",
"char",
"[",
"]",
"getTypeName",
"(",
")",
"{",
"if",
"(",
"this",
".",
"descriptor",
"==",
"null",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"4",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"this",
".",
"descriptor",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"}",
"return",
"this",
".",
"descriptor",
";",
"}",
"public",
"IBinaryAnnotation",
"[",
"]",
"getAnnotations",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"Object",
"getWrappedConstantValue",
"(",
")",
"{",
"if",
"(",
"this",
".",
"wrappedConstantValue",
"==",
"null",
")",
"{",
"if",
"(",
"hasConstant",
"(",
")",
")",
"{",
"Constant",
"fieldConstant",
"=",
"getConstant",
"(",
")",
";",
"switch",
"(",
"fieldConstant",
".",
"typeID",
"(",
")",
")",
"{",
"case",
"TypeIds",
".",
"T_int",
":",
"this",
".",
"wrappedConstantValue",
"=",
"new",
"Integer",
"(",
"fieldConstant",
".",
"intValue",
"(",
")",
")",
";",
"break",
";",
"case",
"TypeIds",
".",
"T_byte",
":",
"this",
".",
"wrappedConstantValue",
"=",
"new",
"Byte",
"(",
"fieldConstant",
".",
"byteValue",
"(",
")",
")",
";",
"break",
";",
"case",
"TypeIds",
".",
"T_short",
":",
"this",
".",
"wrappedConstantValue",
"=",
"new",
"Short",
"(",
"fieldConstant",
".",
"shortValue",
"(",
")",
")",
";",
"break",
";",
"case",
"TypeIds",
".",
"T_char",
":",
"this",
".",
"wrappedConstantValue",
"=",
"new",
"Character",
"(",
"fieldConstant",
".",
"charValue",
"(",
")",
")",
";",
"break",
";",
"case",
"TypeIds",
".",
"T_float",
":",
"this",
".",
"wrappedConstantValue",
"=",
"new",
"Float",
"(",
"fieldConstant",
".",
"floatValue",
"(",
")",
")",
";",
"break",
";",
"case",
"TypeIds",
".",
"T_double",
":",
"this",
".",
"wrappedConstantValue",
"=",
"new",
"Double",
"(",
"fieldConstant",
".",
"doubleValue",
"(",
")",
")",
";",
"break",
";",
"case",
"TypeIds",
".",
"T_boolean",
":",
"this",
".",
"wrappedConstantValue",
"=",
"Util",
".",
"toBoolean",
"(",
"fieldConstant",
".",
"booleanValue",
"(",
")",
")",
";",
"break",
";",
"case",
"TypeIds",
".",
"T_long",
":",
"this",
".",
"wrappedConstantValue",
"=",
"new",
"Long",
"(",
"fieldConstant",
".",
"longValue",
"(",
")",
")",
";",
"break",
";",
"case",
"TypeIds",
".",
"T_JavaLangString",
":",
"this",
".",
"wrappedConstantValue",
"=",
"fieldConstant",
".",
"stringValue",
"(",
")",
";",
"}",
"}",
"}",
"return",
"this",
".",
"wrappedConstantValue",
";",
"}",
"public",
"boolean",
"hasConstant",
"(",
")",
"{",
"return",
"getConstant",
"(",
")",
"!=",
"Constant",
".",
"NotAConstant",
";",
"}",
"protected",
"void",
"initialize",
"(",
")",
"{",
"getModifiers",
"(",
")",
";",
"getName",
"(",
")",
";",
"getConstant",
"(",
")",
";",
"getTypeName",
"(",
")",
";",
"getGenericSignature",
"(",
")",
";",
"reset",
"(",
")",
";",
"}",
"public",
"boolean",
"isSynthetic",
"(",
")",
"{",
"return",
"(",
"getModifiers",
"(",
")",
"&",
"ClassFileConstants",
".",
"AccSynthetic",
")",
"!=",
"0",
";",
"}",
"private",
"AnnotationInfo",
"[",
"]",
"readAttributes",
"(",
")",
"{",
"int",
"attributesCount",
"=",
"u2At",
"(",
"6",
")",
";",
"int",
"readOffset",
"=",
"8",
";",
"AnnotationInfo",
"[",
"]",
"annotations",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"attributesCount",
";",
"i",
"++",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"attributeName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"if",
"(",
"attributeName",
".",
"length",
">",
"0",
")",
"{",
"switch",
"(",
"attributeName",
"[",
"0",
"]",
")",
"{",
"case",
"'S'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"AttributeNamesConstants",
".",
"SignatureName",
",",
"attributeName",
")",
")",
"this",
".",
"signatureUtf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
"+",
"6",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"break",
";",
"case",
"'R'",
":",
"AnnotationInfo",
"[",
"]",
"decodedAnnotations",
"=",
"null",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"RuntimeVisibleAnnotationsName",
")",
")",
"{",
"decodedAnnotations",
"=",
"decodeAnnotations",
"(",
"readOffset",
",",
"true",
")",
";",
"}",
"else",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"RuntimeInvisibleAnnotationsName",
")",
")",
"{",
"decodedAnnotations",
"=",
"decodeAnnotations",
"(",
"readOffset",
",",
"false",
")",
";",
"}",
"if",
"(",
"decodedAnnotations",
"!=",
"null",
")",
"{",
"if",
"(",
"annotations",
"==",
"null",
")",
"{",
"annotations",
"=",
"decodedAnnotations",
";",
"}",
"else",
"{",
"int",
"length",
"=",
"annotations",
".",
"length",
";",
"AnnotationInfo",
"[",
"]",
"combined",
"=",
"new",
"AnnotationInfo",
"[",
"length",
"+",
"decodedAnnotations",
".",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"annotations",
",",
"0",
",",
"combined",
",",
"0",
",",
"length",
")",
";",
"System",
".",
"arraycopy",
"(",
"decodedAnnotations",
",",
"0",
",",
"combined",
",",
"length",
",",
"decodedAnnotations",
".",
"length",
")",
";",
"annotations",
"=",
"combined",
";",
"}",
"}",
"}",
"}",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"readOffset",
"+",
"2",
")",
")",
";",
"}",
"this",
".",
"attributeBytes",
"=",
"readOffset",
";",
"return",
"annotations",
";",
"}",
"private",
"void",
"readConstantAttribute",
"(",
")",
"{",
"int",
"attributesCount",
"=",
"u2At",
"(",
"6",
")",
";",
"int",
"readOffset",
"=",
"8",
";",
"boolean",
"isConstant",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"attributesCount",
";",
"i",
"++",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"attributeName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"ConstantValueName",
")",
")",
"{",
"isConstant",
"=",
"true",
";",
"int",
"relativeOffset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
"+",
"6",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"switch",
"(",
"u1At",
"(",
"relativeOffset",
")",
")",
"{",
"case",
"ClassFileConstants",
".",
"IntegerTag",
":",
"char",
"[",
"]",
"sign",
"=",
"getTypeName",
"(",
")",
";",
"if",
"(",
"sign",
".",
"length",
"==",
"1",
")",
"{",
"switch",
"(",
"sign",
"[",
"0",
"]",
")",
"{",
"case",
"'Z'",
":",
"this",
".",
"constant",
"=",
"BooleanConstant",
".",
"fromValue",
"(",
"i4At",
"(",
"relativeOffset",
"+",
"1",
")",
"==",
"1",
")",
";",
"break",
";",
"case",
"'I'",
":",
"this",
".",
"constant",
"=",
"IntConstant",
".",
"fromValue",
"(",
"i4At",
"(",
"relativeOffset",
"+",
"1",
")",
")",
";",
"break",
";",
"case",
"'C'",
":",
"this",
".",
"constant",
"=",
"CharConstant",
".",
"fromValue",
"(",
"(",
"char",
")",
"i4At",
"(",
"relativeOffset",
"+",
"1",
")",
")",
";",
"break",
";",
"case",
"'B'",
":",
"this",
".",
"constant",
"=",
"ByteConstant",
".",
"fromValue",
"(",
"(",
"byte",
")",
"i4At",
"(",
"relativeOffset",
"+",
"1",
")",
")",
";",
"break",
";",
"case",
"'S'",
":",
"this",
".",
"constant",
"=",
"ShortConstant",
".",
"fromValue",
"(",
"(",
"short",
")",
"i4At",
"(",
"relativeOffset",
"+",
"1",
")",
")",
";",
"break",
";",
"default",
":",
"this",
".",
"constant",
"=",
"Constant",
".",
"NotAConstant",
";",
"}",
"}",
"else",
"{",
"this",
".",
"constant",
"=",
"Constant",
".",
"NotAConstant",
";",
"}",
"break",
";",
"case",
"ClassFileConstants",
".",
"FloatTag",
":",
"this",
".",
"constant",
"=",
"FloatConstant",
".",
"fromValue",
"(",
"floatAt",
"(",
"relativeOffset",
"+",
"1",
")",
")",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"DoubleTag",
":",
"this",
".",
"constant",
"=",
"DoubleConstant",
".",
"fromValue",
"(",
"doubleAt",
"(",
"relativeOffset",
"+",
"1",
")",
")",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"LongTag",
":",
"this",
".",
"constant",
"=",
"LongConstant",
".",
"fromValue",
"(",
"i8At",
"(",
"relativeOffset",
"+",
"1",
")",
")",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"StringTag",
":",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"relativeOffset",
"+",
"1",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"this",
".",
"constant",
"=",
"StringConstant",
".",
"fromValue",
"(",
"String",
".",
"valueOf",
"(",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
")",
")",
";",
"break",
";",
"}",
"}",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"readOffset",
"+",
"2",
")",
")",
";",
"}",
"if",
"(",
"!",
"isConstant",
")",
"{",
"this",
".",
"constant",
"=",
"Constant",
".",
"NotAConstant",
";",
"}",
"}",
"private",
"void",
"readModifierRelatedAttributes",
"(",
")",
"{",
"int",
"attributesCount",
"=",
"u2At",
"(",
"6",
")",
";",
"int",
"readOffset",
"=",
"8",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"attributesCount",
";",
"i",
"++",
")",
"{",
"int",
"utf8Offset",
"=",
"this",
".",
"constantPoolOffsets",
"[",
"u2At",
"(",
"readOffset",
")",
"]",
"-",
"this",
".",
"structOffset",
";",
"char",
"[",
"]",
"attributeName",
"=",
"utf8At",
"(",
"utf8Offset",
"+",
"3",
",",
"u2At",
"(",
"utf8Offset",
"+",
"1",
")",
")",
";",
"if",
"(",
"attributeName",
".",
"length",
"!=",
"0",
")",
"{",
"switch",
"(",
"attributeName",
"[",
"0",
"]",
")",
"{",
"case",
"'D'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"DeprecatedName",
")",
")",
"this",
".",
"accessFlags",
"|=",
"ClassFileConstants",
".",
"AccDeprecated",
";",
"break",
";",
"case",
"'S'",
":",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"attributeName",
",",
"AttributeNamesConstants",
".",
"SyntheticName",
")",
")",
"this",
".",
"accessFlags",
"|=",
"ClassFileConstants",
".",
"AccSynthetic",
";",
"break",
";",
"}",
"}",
"readOffset",
"+=",
"(",
"6",
"+",
"u4At",
"(",
"readOffset",
"+",
"2",
")",
")",
";",
"}",
"}",
"public",
"int",
"sizeInBytes",
"(",
")",
"{",
"return",
"this",
".",
"attributeBytes",
";",
"}",
"public",
"void",
"throwFormatException",
"(",
")",
"throws",
"ClassFormatException",
"{",
"throw",
"new",
"ClassFormatException",
"(",
"ClassFormatException",
".",
"ErrBadFieldInfo",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
";",
"toStringContent",
"(",
"buffer",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"protected",
"void",
"toStringContent",
"(",
"StringBuffer",
"buffer",
")",
"{",
"int",
"modifiers",
"=",
"getModifiers",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"'{'",
")",
".",
"append",
"(",
"(",
"(",
"modifiers",
"&",
"ClassFileConstants",
".",
"AccDeprecated",
")",
"!=",
"0",
"?",
"\"deprecated",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0001",
")",
"==",
"1",
"?",
"\"public",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0002",
")",
"==",
"0x0002",
"?",
"\"private",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0004",
")",
"==",
"0x0004",
"?",
"\"protected",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0008",
")",
"==",
"0x000008",
"?",
"\"static",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0010",
")",
"==",
"0x0010",
"?",
"\"final",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0040",
")",
"==",
"0x0040",
"?",
"\"volatile",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
"+",
"(",
"(",
"modifiers",
"&",
"0x0080",
")",
"==",
"0x0080",
"?",
"\"transient",
"\"",
":",
"Util",
".",
"EMPTY_STRING",
")",
")",
".",
"append",
"(",
"getTypeName",
"(",
")",
")",
".",
"append",
"(",
"'",
"'",
")",
".",
"append",
"(",
"getName",
"(",
")",
")",
".",
"append",
"(",
"'",
"'",
")",
".",
"append",
"(",
"getConstant",
"(",
")",
")",
".",
"append",
"(",
"'}'",
")",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,310 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
";",
"public",
"interface",
"ICompilerRequestor",
"{",
"public",
"void",
"acceptResult",
"(",
"CompilationResult",
"result",
")",
";",
"}",
"</s>"
] |
4,311 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"CompilationUnitDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Messages",
";",
"public",
"class",
"ProcessTaskManager",
"implements",
"Runnable",
"{",
"Compiler",
"compiler",
";",
"private",
"int",
"unitIndex",
";",
"private",
"Thread",
"processingThread",
";",
"CompilationUnitDeclaration",
"unitToProcess",
";",
"private",
"Throwable",
"caughtException",
";",
"volatile",
"int",
"currentIndex",
",",
"availableIndex",
",",
"size",
",",
"sleepCount",
";",
"CompilationUnitDeclaration",
"[",
"]",
"units",
";",
"public",
"static",
"final",
"int",
"PROCESSED_QUEUE_SIZE",
"=",
"12",
";",
"public",
"ProcessTaskManager",
"(",
"Compiler",
"compiler",
")",
"{",
"this",
".",
"compiler",
"=",
"compiler",
";",
"this",
".",
"unitIndex",
"=",
"0",
";",
"this",
".",
"currentIndex",
"=",
"0",
";",
"this",
".",
"availableIndex",
"=",
"0",
";",
"this",
".",
"size",
"=",
"PROCESSED_QUEUE_SIZE",
";",
"this",
".",
"sleepCount",
"=",
"0",
";",
"this",
".",
"units",
"=",
"new",
"CompilationUnitDeclaration",
"[",
"this",
".",
"size",
"]",
";",
"synchronized",
"(",
"this",
")",
"{",
"this",
".",
"processingThread",
"=",
"new",
"Thread",
"(",
"this",
",",
"\"\"",
")",
";",
"this",
".",
"processingThread",
".",
"setDaemon",
"(",
"true",
")",
";",
"this",
".",
"processingThread",
".",
"start",
"(",
")",
";",
"}",
"}",
"private",
"synchronized",
"void",
"addNextUnit",
"(",
"CompilationUnitDeclaration",
"newElement",
")",
"{",
"while",
"(",
"this",
".",
"units",
"[",
"this",
".",
"availableIndex",
"]",
"!=",
"null",
")",
"{",
"this",
".",
"sleepCount",
"=",
"1",
";",
"try",
"{",
"wait",
"(",
"250",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"ignore",
")",
"{",
"}",
"this",
".",
"sleepCount",
"=",
"0",
";",
"}",
"this",
".",
"units",
"[",
"this",
".",
"availableIndex",
"++",
"]",
"=",
"newElement",
";",
"if",
"(",
"this",
".",
"availableIndex",
">=",
"this",
".",
"size",
")",
"this",
".",
"availableIndex",
"=",
"0",
";",
"if",
"(",
"this",
".",
"sleepCount",
"<=",
"-",
"1",
")",
"notify",
"(",
")",
";",
"}",
"public",
"CompilationUnitDeclaration",
"removeNextUnit",
"(",
")",
"throws",
"Error",
"{",
"CompilationUnitDeclaration",
"next",
"=",
"null",
";",
"boolean",
"yield",
"=",
"false",
";",
"synchronized",
"(",
"this",
")",
"{",
"next",
"=",
"this",
".",
"units",
"[",
"this",
".",
"currentIndex",
"]",
";",
"if",
"(",
"next",
"==",
"null",
"||",
"this",
".",
"caughtException",
"!=",
"null",
")",
"{",
"do",
"{",
"if",
"(",
"this",
".",
"processingThread",
"==",
"null",
")",
"{",
"if",
"(",
"this",
".",
"caughtException",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"caughtException",
"instanceof",
"Error",
")",
"throw",
"(",
"Error",
")",
"this",
".",
"caughtException",
";",
"throw",
"(",
"RuntimeException",
")",
"this",
".",
"caughtException",
";",
"}",
"return",
"null",
";",
"}",
"this",
".",
"sleepCount",
"=",
"-",
"1",
";",
"try",
"{",
"wait",
"(",
"100",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"ignore",
")",
"{",
"}",
"this",
".",
"sleepCount",
"=",
"0",
";",
"next",
"=",
"this",
".",
"units",
"[",
"this",
".",
"currentIndex",
"]",
";",
"}",
"while",
"(",
"next",
"==",
"null",
")",
";",
"}",
"this",
".",
"units",
"[",
"this",
".",
"currentIndex",
"++",
"]",
"=",
"null",
";",
"if",
"(",
"this",
".",
"currentIndex",
">=",
"this",
".",
"size",
")",
"this",
".",
"currentIndex",
"=",
"0",
";",
"if",
"(",
"this",
".",
"sleepCount",
">=",
"1",
"&&",
"++",
"this",
".",
"sleepCount",
">",
"4",
")",
"{",
"notify",
"(",
")",
";",
"yield",
"=",
"this",
".",
"sleepCount",
">",
"8",
";",
"}",
"}",
"if",
"(",
"yield",
")",
"Thread",
".",
"yield",
"(",
")",
";",
"return",
"next",
";",
"}",
"public",
"void",
"run",
"(",
")",
"{",
"while",
"(",
"this",
".",
"processingThread",
"!=",
"null",
")",
"{",
"this",
".",
"unitToProcess",
"=",
"null",
";",
"int",
"index",
"=",
"-",
"1",
";",
"try",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"processingThread",
"==",
"null",
")",
"return",
";",
"this",
".",
"unitToProcess",
"=",
"this",
".",
"compiler",
".",
"getUnitToProcess",
"(",
"this",
".",
"unitIndex",
")",
";",
"if",
"(",
"this",
".",
"unitToProcess",
"==",
"null",
")",
"{",
"this",
".",
"processingThread",
"=",
"null",
";",
"return",
";",
"}",
"index",
"=",
"this",
".",
"unitIndex",
"++",
";",
"}",
"try",
"{",
"this",
".",
"compiler",
".",
"reportProgress",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"compilation_processing",
",",
"new",
"String",
"(",
"this",
".",
"unitToProcess",
".",
"getFileName",
"(",
")",
")",
")",
")",
";",
"if",
"(",
"this",
".",
"compiler",
".",
"options",
".",
"verbose",
")",
"this",
".",
"compiler",
".",
"out",
".",
"println",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"compilation_process",
",",
"new",
"String",
"[",
"]",
"{",
"String",
".",
"valueOf",
"(",
"index",
"+",
"1",
")",
",",
"String",
".",
"valueOf",
"(",
"this",
".",
"compiler",
".",
"totalUnits",
")",
",",
"new",
"String",
"(",
"this",
".",
"unitToProcess",
".",
"getFileName",
"(",
")",
")",
"}",
")",
")",
";",
"this",
".",
"compiler",
".",
"process",
"(",
"this",
".",
"unitToProcess",
",",
"index",
")",
";",
"}",
"finally",
"{",
"if",
"(",
"this",
".",
"unitToProcess",
"!=",
"null",
")",
"this",
".",
"unitToProcess",
".",
"cleanUp",
"(",
")",
";",
"}",
"addNextUnit",
"(",
"this",
".",
"unitToProcess",
")",
";",
"}",
"catch",
"(",
"Error",
"e",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"this",
".",
"processingThread",
"=",
"null",
";",
"this",
".",
"caughtException",
"=",
"e",
";",
"}",
"return",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"this",
".",
"processingThread",
"=",
"null",
";",
"this",
".",
"caughtException",
"=",
"e",
";",
"}",
"return",
";",
"}",
"}",
"}",
"public",
"void",
"shutdown",
"(",
")",
"{",
"try",
"{",
"Thread",
"t",
"=",
"null",
";",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"processingThread",
"!=",
"null",
")",
"{",
"t",
"=",
"this",
".",
"processingThread",
";",
"this",
".",
"processingThread",
"=",
"null",
";",
"notifyAll",
"(",
")",
";",
"}",
"}",
"if",
"(",
"t",
"!=",
"null",
")",
"t",
".",
"join",
"(",
"250",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"ignored",
")",
"{",
"}",
"}",
"}",
"</s>"
] |
4,312 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Arrays",
";",
"import",
"java",
".",
"util",
".",
"Collections",
";",
"import",
"java",
".",
"util",
".",
"Comparator",
";",
"import",
"java",
".",
"util",
".",
"HashSet",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"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",
".",
"ast",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"AbstractMethodDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Annotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"AnnotationMethodDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Argument",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ArrayInitializer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ClassLiteralAccess",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Expression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"FieldDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"MemberValuePair",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"MethodDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"NormalAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"QualifiedNameReference",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"SingleMemberAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"SingleNameReference",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"TypeDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
".",
"ClassFileConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"AttributeNamesConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"CodeStream",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"ConstantPool",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"ExceptionLabel",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"Opcodes",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"StackMapFrame",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"StackMapFrameCodeStream",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"StackMapFrameCodeStream",
".",
"ExceptionMarker",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"StackMapFrameCodeStream",
".",
"StackDepthMarker",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"StackMapFrameCodeStream",
".",
"StackMarker",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"codegen",
".",
"VerificationTypeInfo",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"CompilerOptions",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"Constant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"StringConstant",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"Binding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"FieldBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"LocalTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"LocalVariableBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"LookupEnvironment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"MethodBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ReferenceBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"SourceTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"SyntheticArgumentBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"SyntheticMethodBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TagBits",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeIds",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeVariableBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"ProblemSeverities",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"ShouldNotImplement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Messages",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"ClassFile",
"implements",
"TypeConstants",
",",
"TypeIds",
"{",
"private",
"byte",
"[",
"]",
"bytes",
";",
"public",
"CodeStream",
"codeStream",
";",
"public",
"ConstantPool",
"constantPool",
";",
"public",
"int",
"constantPoolOffset",
";",
"public",
"byte",
"[",
"]",
"contents",
";",
"public",
"int",
"contentsOffset",
";",
"protected",
"boolean",
"creatingProblemType",
";",
"public",
"ClassFile",
"enclosingClassFile",
";",
"public",
"byte",
"[",
"]",
"header",
";",
"public",
"int",
"headerOffset",
";",
"public",
"Set",
"innerClassesBindings",
";",
"public",
"int",
"methodCount",
";",
"public",
"int",
"methodCountOffset",
";",
"boolean",
"isShared",
"=",
"false",
";",
"public",
"int",
"produceAttributes",
";",
"public",
"SourceTypeBinding",
"referenceBinding",
";",
"public",
"boolean",
"isNestedType",
";",
"public",
"long",
"targetJDK",
";",
"public",
"List",
"missingTypes",
"=",
"null",
";",
"public",
"Set",
"visitedTypes",
";",
"public",
"static",
"final",
"int",
"INITIAL_CONTENTS_SIZE",
"=",
"400",
";",
"public",
"static",
"final",
"int",
"INITIAL_HEADER_SIZE",
"=",
"1500",
";",
"public",
"static",
"final",
"int",
"INNER_CLASSES_SIZE",
"=",
"5",
";",
"public",
"static",
"void",
"createProblemType",
"(",
"TypeDeclaration",
"typeDeclaration",
",",
"CompilationResult",
"unitResult",
")",
"{",
"SourceTypeBinding",
"typeBinding",
"=",
"typeDeclaration",
".",
"binding",
";",
"ClassFile",
"classFile",
"=",
"ClassFile",
".",
"getNewInstance",
"(",
"typeBinding",
")",
";",
"classFile",
".",
"initialize",
"(",
"typeBinding",
",",
"null",
",",
"true",
")",
";",
"if",
"(",
"typeBinding",
".",
"hasMemberTypes",
"(",
")",
")",
"{",
"ReferenceBinding",
"[",
"]",
"members",
"=",
"typeBinding",
".",
"memberTypes",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"l",
"=",
"members",
".",
"length",
";",
"i",
"<",
"l",
";",
"i",
"++",
")",
"classFile",
".",
"recordInnerClasses",
"(",
"members",
"[",
"i",
"]",
")",
";",
"}",
"if",
"(",
"typeBinding",
".",
"isNestedType",
"(",
")",
")",
"{",
"classFile",
".",
"recordInnerClasses",
"(",
"typeBinding",
")",
";",
"}",
"TypeVariableBinding",
"[",
"]",
"typeVariables",
"=",
"typeBinding",
".",
"typeVariables",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"typeVariables",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"TypeVariableBinding",
"typeVariableBinding",
"=",
"typeVariables",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"typeVariableBinding",
".",
"tagBits",
"&",
"TagBits",
".",
"ContainsNestedTypeReferences",
")",
"!=",
"0",
")",
"{",
"Util",
".",
"recordNestedType",
"(",
"classFile",
",",
"typeVariableBinding",
")",
";",
"}",
"}",
"FieldBinding",
"[",
"]",
"fields",
"=",
"typeBinding",
".",
"fields",
"(",
")",
";",
"if",
"(",
"(",
"fields",
"!=",
"null",
")",
"&&",
"(",
"fields",
"!=",
"Binding",
".",
"NO_FIELDS",
")",
")",
"{",
"classFile",
".",
"addFieldInfos",
"(",
")",
";",
"}",
"else",
"{",
"classFile",
".",
"contents",
"[",
"classFile",
".",
"contentsOffset",
"++",
"]",
"=",
"0",
";",
"classFile",
".",
"contents",
"[",
"classFile",
".",
"contentsOffset",
"++",
"]",
"=",
"0",
";",
"}",
"classFile",
".",
"setForMethodInfos",
"(",
")",
";",
"int",
"problemsLength",
";",
"CategorizedProblem",
"[",
"]",
"problems",
"=",
"unitResult",
".",
"getErrors",
"(",
")",
";",
"if",
"(",
"problems",
"==",
"null",
")",
"{",
"problems",
"=",
"new",
"CategorizedProblem",
"[",
"0",
"]",
";",
"}",
"CategorizedProblem",
"[",
"]",
"problemsCopy",
"=",
"new",
"CategorizedProblem",
"[",
"problemsLength",
"=",
"problems",
".",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"problems",
",",
"0",
",",
"problemsCopy",
",",
"0",
",",
"problemsLength",
")",
";",
"AbstractMethodDeclaration",
"[",
"]",
"methodDecls",
"=",
"typeDeclaration",
".",
"methods",
";",
"if",
"(",
"methodDecls",
"!=",
"null",
")",
"{",
"if",
"(",
"typeBinding",
".",
"isInterface",
"(",
")",
")",
"{",
"classFile",
".",
"addProblemClinit",
"(",
"problemsCopy",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"methodDecls",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"AbstractMethodDeclaration",
"methodDecl",
"=",
"methodDecls",
"[",
"i",
"]",
";",
"MethodBinding",
"method",
"=",
"methodDecl",
".",
"binding",
";",
"if",
"(",
"method",
"==",
"null",
"||",
"method",
".",
"isConstructor",
"(",
")",
")",
"continue",
";",
"method",
".",
"modifiers",
"=",
"ClassFileConstants",
".",
"AccPublic",
"|",
"ClassFileConstants",
".",
"AccAbstract",
";",
"classFile",
".",
"addAbstractMethod",
"(",
"methodDecl",
",",
"method",
")",
";",
"}",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"methodDecls",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"AbstractMethodDeclaration",
"methodDecl",
"=",
"methodDecls",
"[",
"i",
"]",
";",
"MethodBinding",
"method",
"=",
"methodDecl",
".",
"binding",
";",
"if",
"(",
"method",
"==",
"null",
")",
"continue",
";",
"if",
"(",
"method",
".",
"isConstructor",
"(",
")",
")",
"{",
"classFile",
".",
"addProblemConstructor",
"(",
"methodDecl",
",",
"method",
",",
"problemsCopy",
")",
";",
"}",
"else",
"if",
"(",
"method",
".",
"isAbstract",
"(",
")",
")",
"{",
"classFile",
".",
"addAbstractMethod",
"(",
"methodDecl",
",",
"method",
")",
";",
"}",
"else",
"{",
"classFile",
".",
"addProblemMethod",
"(",
"methodDecl",
",",
"method",
",",
"problemsCopy",
")",
";",
"}",
"}",
"}",
"classFile",
".",
"addDefaultAbstractMethods",
"(",
")",
";",
"}",
"if",
"(",
"typeDeclaration",
".",
"memberTypes",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"typeDeclaration",
".",
"memberTypes",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"TypeDeclaration",
"memberType",
"=",
"typeDeclaration",
".",
"memberTypes",
"[",
"i",
"]",
";",
"if",
"(",
"memberType",
".",
"binding",
"!=",
"null",
")",
"{",
"ClassFile",
".",
"createProblemType",
"(",
"memberType",
",",
"unitResult",
")",
";",
"}",
"}",
"}",
"classFile",
".",
"addAttributes",
"(",
")",
";",
"unitResult",
".",
"record",
"(",
"typeBinding",
".",
"constantPoolName",
"(",
")",
",",
"classFile",
")",
";",
"}",
"public",
"static",
"ClassFile",
"getNewInstance",
"(",
"SourceTypeBinding",
"typeBinding",
")",
"{",
"LookupEnvironment",
"env",
"=",
"typeBinding",
".",
"scope",
".",
"environment",
"(",
")",
";",
"return",
"env",
".",
"classFilePool",
".",
"acquire",
"(",
"typeBinding",
")",
";",
"}",
"protected",
"ClassFile",
"(",
")",
"{",
"}",
"public",
"ClassFile",
"(",
"SourceTypeBinding",
"typeBinding",
")",
"{",
"this",
".",
"constantPool",
"=",
"new",
"ConstantPool",
"(",
"this",
")",
";",
"final",
"CompilerOptions",
"options",
"=",
"typeBinding",
".",
"scope",
".",
"compilerOptions",
"(",
")",
";",
"this",
".",
"targetJDK",
"=",
"options",
".",
"targetJDK",
";",
"this",
".",
"produceAttributes",
"=",
"options",
".",
"produceDebugAttributes",
";",
"this",
".",
"referenceBinding",
"=",
"typeBinding",
";",
"this",
".",
"isNestedType",
"=",
"typeBinding",
".",
"isNestedType",
"(",
")",
";",
"if",
"(",
"this",
".",
"targetJDK",
">=",
"ClassFileConstants",
".",
"JDK1_6",
")",
"{",
"this",
".",
"produceAttributes",
"|=",
"ClassFileConstants",
".",
"ATTR_STACK_MAP_TABLE",
";",
"this",
".",
"codeStream",
"=",
"new",
"StackMapFrameCodeStream",
"(",
"this",
")",
";",
"}",
"else",
"if",
"(",
"this",
".",
"targetJDK",
"==",
"ClassFileConstants",
".",
"CLDC_1_1",
")",
"{",
"this",
".",
"targetJDK",
"=",
"ClassFileConstants",
".",
"JDK1_1",
";",
"this",
".",
"produceAttributes",
"|=",
"ClassFileConstants",
".",
"ATTR_STACK_MAP",
";",
"this",
".",
"codeStream",
"=",
"new",
"StackMapFrameCodeStream",
"(",
"this",
")",
";",
"}",
"else",
"{",
"this",
".",
"codeStream",
"=",
"new",
"CodeStream",
"(",
"this",
")",
";",
"}",
"initByteArrays",
"(",
")",
";",
"}",
"public",
"void",
"addAbstractMethod",
"(",
"AbstractMethodDeclaration",
"method",
",",
"MethodBinding",
"methodBinding",
")",
"{",
"this",
".",
"generateMethodInfoHeader",
"(",
"methodBinding",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"this",
".",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"completeMethodInfo",
"(",
"methodBinding",
",",
"methodAttributeOffset",
",",
"attributeNumber",
")",
";",
"}",
"public",
"void",
"addAttributes",
"(",
")",
"{",
"this",
".",
"contents",
"[",
"this",
".",
"methodCountOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"this",
".",
"methodCount",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"methodCountOffset",
"]",
"=",
"(",
"byte",
")",
"this",
".",
"methodCount",
";",
"int",
"attributesNumber",
"=",
"0",
";",
"int",
"attributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"2",
";",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_SOURCE",
")",
"!=",
"0",
")",
"{",
"String",
"fullFileName",
"=",
"new",
"String",
"(",
"this",
".",
"referenceBinding",
".",
"scope",
".",
"referenceCompilationUnit",
"(",
")",
".",
"getFileName",
"(",
")",
")",
";",
"fullFileName",
"=",
"fullFileName",
".",
"replace",
"(",
"'\\\\'",
",",
"'/'",
")",
";",
"int",
"lastIndex",
"=",
"fullFileName",
".",
"lastIndexOf",
"(",
"'/'",
")",
";",
"if",
"(",
"lastIndex",
"!=",
"-",
"1",
")",
"{",
"fullFileName",
"=",
"fullFileName",
".",
"substring",
"(",
"lastIndex",
"+",
"1",
",",
"fullFileName",
".",
"length",
"(",
")",
")",
";",
"}",
"attributesNumber",
"+=",
"generateSourceAttribute",
"(",
"fullFileName",
")",
";",
"}",
"if",
"(",
"this",
".",
"referenceBinding",
".",
"isDeprecated",
"(",
")",
")",
"{",
"attributesNumber",
"+=",
"generateDeprecatedAttribute",
"(",
")",
";",
"}",
"char",
"[",
"]",
"genericSignature",
"=",
"this",
".",
"referenceBinding",
".",
"genericSignature",
"(",
")",
";",
"if",
"(",
"genericSignature",
"!=",
"null",
")",
"{",
"attributesNumber",
"+=",
"generateSignatureAttribute",
"(",
"genericSignature",
")",
";",
"}",
"if",
"(",
"this",
".",
"targetJDK",
">=",
"ClassFileConstants",
".",
"JDK1_5",
"&&",
"this",
".",
"referenceBinding",
".",
"isNestedType",
"(",
")",
"&&",
"!",
"this",
".",
"referenceBinding",
".",
"isMemberType",
"(",
")",
")",
"{",
"attributesNumber",
"+=",
"generateEnclosingMethodAttribute",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"targetJDK",
">=",
"ClassFileConstants",
".",
"JDK1_4",
")",
"{",
"TypeDeclaration",
"typeDeclaration",
"=",
"this",
".",
"referenceBinding",
".",
"scope",
".",
"referenceContext",
";",
"if",
"(",
"typeDeclaration",
"!=",
"null",
")",
"{",
"final",
"Annotation",
"[",
"]",
"annotations",
"=",
"typeDeclaration",
".",
"annotations",
";",
"if",
"(",
"annotations",
"!=",
"null",
")",
"{",
"attributesNumber",
"+=",
"generateRuntimeAnnotations",
"(",
"annotations",
")",
";",
"}",
"}",
"}",
"if",
"(",
"this",
".",
"referenceBinding",
".",
"isHierarchyInconsistent",
"(",
")",
")",
"{",
"ReferenceBinding",
"superclass",
"=",
"this",
".",
"referenceBinding",
".",
"superclass",
";",
"if",
"(",
"superclass",
"!=",
"null",
")",
"{",
"this",
".",
"missingTypes",
"=",
"superclass",
".",
"collectMissingTypes",
"(",
"this",
".",
"missingTypes",
")",
";",
"}",
"ReferenceBinding",
"[",
"]",
"superInterfaces",
"=",
"this",
".",
"referenceBinding",
".",
"superInterfaces",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"superInterfaces",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"this",
".",
"missingTypes",
"=",
"superInterfaces",
"[",
"i",
"]",
".",
"collectMissingTypes",
"(",
"this",
".",
"missingTypes",
")",
";",
"}",
"attributesNumber",
"+=",
"generateHierarchyInconsistentAttribute",
"(",
")",
";",
"}",
"int",
"numberOfInnerClasses",
"=",
"this",
".",
"innerClassesBindings",
"==",
"null",
"?",
"0",
":",
"this",
".",
"innerClassesBindings",
".",
"size",
"(",
")",
";",
"if",
"(",
"numberOfInnerClasses",
"!=",
"0",
")",
"{",
"ReferenceBinding",
"[",
"]",
"innerClasses",
"=",
"new",
"ReferenceBinding",
"[",
"numberOfInnerClasses",
"]",
";",
"this",
".",
"innerClassesBindings",
".",
"toArray",
"(",
"innerClasses",
")",
";",
"Arrays",
".",
"sort",
"(",
"innerClasses",
",",
"new",
"Comparator",
"(",
")",
"{",
"public",
"int",
"compare",
"(",
"Object",
"o1",
",",
"Object",
"o2",
")",
"{",
"TypeBinding",
"binding1",
"=",
"(",
"TypeBinding",
")",
"o1",
";",
"TypeBinding",
"binding2",
"=",
"(",
"TypeBinding",
")",
"o2",
";",
"return",
"CharOperation",
".",
"compareTo",
"(",
"binding1",
".",
"constantPoolName",
"(",
")",
",",
"binding2",
".",
"constantPoolName",
"(",
")",
")",
";",
"}",
"}",
")",
";",
"attributesNumber",
"+=",
"generateInnerClassAttribute",
"(",
"numberOfInnerClasses",
",",
"innerClasses",
")",
";",
"}",
"if",
"(",
"this",
".",
"missingTypes",
"!=",
"null",
")",
"{",
"generateMissingTypesAttribute",
"(",
")",
";",
"attributesNumber",
"++",
";",
"}",
"if",
"(",
"attributeOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contents",
"[",
"attributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributesNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"attributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributesNumber",
";",
"this",
".",
"header",
"=",
"this",
".",
"constantPool",
".",
"poolContent",
";",
"this",
".",
"headerOffset",
"=",
"this",
".",
"constantPool",
".",
"currentOffset",
";",
"int",
"constantPoolCount",
"=",
"this",
".",
"constantPool",
".",
"currentIndex",
";",
"this",
".",
"header",
"[",
"this",
".",
"constantPoolOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"constantPoolCount",
">>",
"8",
")",
";",
"this",
".",
"header",
"[",
"this",
".",
"constantPoolOffset",
"]",
"=",
"(",
"byte",
")",
"constantPoolCount",
";",
"}",
"public",
"void",
"addDefaultAbstractMethods",
"(",
")",
"{",
"MethodBinding",
"[",
"]",
"defaultAbstractMethods",
"=",
"this",
".",
"referenceBinding",
".",
"getDefaultAbstractMethods",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"defaultAbstractMethods",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"MethodBinding",
"methodBinding",
"=",
"defaultAbstractMethods",
"[",
"i",
"]",
";",
"generateMethodInfoHeader",
"(",
"methodBinding",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"completeMethodInfo",
"(",
"methodBinding",
",",
"methodAttributeOffset",
",",
"attributeNumber",
")",
";",
"}",
"}",
"private",
"int",
"addFieldAttributes",
"(",
"FieldBinding",
"fieldBinding",
",",
"int",
"fieldAttributeOffset",
")",
"{",
"int",
"attributesNumber",
"=",
"0",
";",
"Constant",
"fieldConstant",
"=",
"fieldBinding",
".",
"constant",
"(",
")",
";",
"if",
"(",
"fieldConstant",
"!=",
"Constant",
".",
"NotAConstant",
")",
"{",
"attributesNumber",
"+=",
"generateConstantValueAttribute",
"(",
"fieldConstant",
",",
"fieldBinding",
",",
"fieldAttributeOffset",
")",
";",
"}",
"if",
"(",
"this",
".",
"targetJDK",
"<",
"ClassFileConstants",
".",
"JDK1_5",
"&&",
"fieldBinding",
".",
"isSynthetic",
"(",
")",
")",
"{",
"attributesNumber",
"+=",
"generateSyntheticAttribute",
"(",
")",
";",
"}",
"if",
"(",
"fieldBinding",
".",
"isDeprecated",
"(",
")",
")",
"{",
"attributesNumber",
"+=",
"generateDeprecatedAttribute",
"(",
")",
";",
"}",
"char",
"[",
"]",
"genericSignature",
"=",
"fieldBinding",
".",
"genericSignature",
"(",
")",
";",
"if",
"(",
"genericSignature",
"!=",
"null",
")",
"{",
"attributesNumber",
"+=",
"generateSignatureAttribute",
"(",
"genericSignature",
")",
";",
"}",
"if",
"(",
"this",
".",
"targetJDK",
">=",
"ClassFileConstants",
".",
"JDK1_4",
")",
"{",
"FieldDeclaration",
"fieldDeclaration",
"=",
"fieldBinding",
".",
"sourceField",
"(",
")",
";",
"if",
"(",
"fieldDeclaration",
"!=",
"null",
")",
"{",
"Annotation",
"[",
"]",
"annotations",
"=",
"fieldDeclaration",
".",
"annotations",
";",
"if",
"(",
"annotations",
"!=",
"null",
")",
"{",
"attributesNumber",
"+=",
"generateRuntimeAnnotations",
"(",
"annotations",
")",
";",
"}",
"}",
"}",
"if",
"(",
"(",
"fieldBinding",
".",
"tagBits",
"&",
"TagBits",
".",
"HasMissingType",
")",
"!=",
"0",
")",
"{",
"this",
".",
"missingTypes",
"=",
"fieldBinding",
".",
"type",
".",
"collectMissingTypes",
"(",
"this",
".",
"missingTypes",
")",
";",
"}",
"return",
"attributesNumber",
";",
"}",
"private",
"void",
"addFieldInfo",
"(",
"FieldBinding",
"fieldBinding",
")",
"{",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"8",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"8",
")",
";",
"}",
"int",
"accessFlags",
"=",
"fieldBinding",
".",
"getAccessFlags",
"(",
")",
";",
"if",
"(",
"this",
".",
"targetJDK",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"accessFlags",
"&=",
"~",
"ClassFileConstants",
".",
"AccSynthetic",
";",
"}",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"accessFlags",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"accessFlags",
";",
"int",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"fieldBinding",
".",
"name",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"nameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"nameIndex",
";",
"int",
"descriptorIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"fieldBinding",
".",
"type",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"descriptorIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"descriptorIndex",
";",
"int",
"fieldAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"0",
";",
"this",
".",
"contentsOffset",
"+=",
"2",
";",
"attributeNumber",
"+=",
"addFieldAttributes",
"(",
"fieldBinding",
",",
"fieldAttributeOffset",
")",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contents",
"[",
"fieldAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"fieldAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributeNumber",
";",
"}",
"public",
"void",
"addFieldInfos",
"(",
")",
"{",
"SourceTypeBinding",
"currentBinding",
"=",
"this",
".",
"referenceBinding",
";",
"FieldBinding",
"[",
"]",
"syntheticFields",
"=",
"currentBinding",
".",
"syntheticFields",
"(",
")",
";",
"int",
"fieldCount",
"=",
"currentBinding",
".",
"fieldCount",
"(",
")",
"+",
"(",
"syntheticFields",
"==",
"null",
"?",
"0",
":",
"syntheticFields",
".",
"length",
")",
";",
"if",
"(",
"fieldCount",
">",
"0xFFFF",
")",
"{",
"this",
".",
"referenceBinding",
".",
"scope",
".",
"problemReporter",
"(",
")",
".",
"tooManyFields",
"(",
"this",
".",
"referenceBinding",
".",
"scope",
".",
"referenceType",
"(",
")",
")",
";",
"}",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"fieldCount",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"fieldCount",
";",
"FieldDeclaration",
"[",
"]",
"fieldDecls",
"=",
"currentBinding",
".",
"scope",
".",
"referenceContext",
".",
"fields",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"fieldDecls",
"==",
"null",
"?",
"0",
":",
"fieldDecls",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"FieldDeclaration",
"fieldDecl",
"=",
"fieldDecls",
"[",
"i",
"]",
";",
"if",
"(",
"fieldDecl",
".",
"binding",
"!=",
"null",
")",
"{",
"addFieldInfo",
"(",
"fieldDecl",
".",
"binding",
")",
";",
"}",
"}",
"if",
"(",
"syntheticFields",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"syntheticFields",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"addFieldInfo",
"(",
"syntheticFields",
"[",
"i",
"]",
")",
";",
"}",
"}",
"}",
"private",
"void",
"addMissingAbstractProblemMethod",
"(",
"MethodDeclaration",
"methodDeclaration",
",",
"MethodBinding",
"methodBinding",
",",
"CategorizedProblem",
"problem",
",",
"CompilationResult",
"compilationResult",
")",
"{",
"generateMethodInfoHeader",
"(",
"methodBinding",
",",
"methodBinding",
".",
"modifiers",
"&",
"~",
"(",
"ClassFileConstants",
".",
"AccStrictfp",
"|",
"ClassFileConstants",
".",
"AccNative",
"|",
"ClassFileConstants",
".",
"AccAbstract",
")",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"attributeNumber",
"++",
";",
"int",
"codeAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"generateCodeAttributeHeader",
"(",
")",
";",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"25",
")",
";",
"buffer",
".",
"append",
"(",
"\"t\"",
"+",
"problem",
".",
"getMessage",
"(",
")",
"+",
"\"n\"",
")",
";",
"buffer",
".",
"insert",
"(",
"0",
",",
"Messages",
".",
"compilation_unresolvedProblem",
")",
";",
"String",
"problemString",
"=",
"buffer",
".",
"toString",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"init",
"(",
"this",
")",
";",
"this",
".",
"codeStream",
".",
"preserveUnusedLocals",
"=",
"true",
";",
"this",
".",
"codeStream",
".",
"initializeMaxLocals",
"(",
"methodBinding",
")",
";",
"this",
".",
"codeStream",
".",
"generateCodeAttributeForProblemMethod",
"(",
"problemString",
")",
";",
"completeCodeAttributeForMissingAbstractProblemMethod",
"(",
"methodBinding",
",",
"codeAttributeOffset",
",",
"compilationResult",
".",
"getLineSeparatorPositions",
"(",
")",
",",
"problem",
".",
"getSourceLineNumber",
"(",
")",
")",
";",
"completeMethodInfo",
"(",
"methodBinding",
",",
"methodAttributeOffset",
",",
"attributeNumber",
")",
";",
"}",
"public",
"void",
"addProblemClinit",
"(",
"CategorizedProblem",
"[",
"]",
"problems",
")",
"{",
"generateMethodInfoHeaderForClinit",
"(",
")",
";",
"this",
".",
"contentsOffset",
"-=",
"2",
";",
"int",
"attributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"2",
";",
"int",
"attributeNumber",
"=",
"0",
";",
"int",
"codeAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"generateCodeAttributeHeader",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"resetForProblemClinit",
"(",
"this",
")",
";",
"String",
"problemString",
"=",
"\"\"",
";",
"int",
"problemLine",
"=",
"0",
";",
"if",
"(",
"problems",
"!=",
"null",
")",
"{",
"int",
"max",
"=",
"problems",
".",
"length",
";",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"25",
")",
";",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"CategorizedProblem",
"problem",
"=",
"problems",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"problem",
"!=",
"null",
")",
"&&",
"(",
"problem",
".",
"isError",
"(",
")",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"t\"",
"+",
"problem",
".",
"getMessage",
"(",
")",
"+",
"\"n\"",
")",
";",
"count",
"++",
";",
"if",
"(",
"problemLine",
"==",
"0",
")",
"{",
"problemLine",
"=",
"problem",
".",
"getSourceLineNumber",
"(",
")",
";",
"}",
"problems",
"[",
"i",
"]",
"=",
"null",
";",
"}",
"}",
"if",
"(",
"count",
">",
"1",
")",
"{",
"buffer",
".",
"insert",
"(",
"0",
",",
"Messages",
".",
"compilation_unresolvedProblems",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"insert",
"(",
"0",
",",
"Messages",
".",
"compilation_unresolvedProblem",
")",
";",
"}",
"problemString",
"=",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"this",
".",
"codeStream",
".",
"generateCodeAttributeForProblemMethod",
"(",
"problemString",
")",
";",
"attributeNumber",
"++",
";",
"completeCodeAttributeForClinit",
"(",
"codeAttributeOffset",
",",
"problemLine",
")",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contents",
"[",
"attributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"attributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributeNumber",
";",
"}",
"public",
"void",
"addProblemConstructor",
"(",
"AbstractMethodDeclaration",
"method",
",",
"MethodBinding",
"methodBinding",
",",
"CategorizedProblem",
"[",
"]",
"problems",
")",
"{",
"generateMethodInfoHeader",
"(",
"methodBinding",
",",
"methodBinding",
".",
"modifiers",
"&",
"~",
"(",
"ClassFileConstants",
".",
"AccStrictfp",
"|",
"ClassFileConstants",
".",
"AccNative",
"|",
"ClassFileConstants",
".",
"AccAbstract",
")",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributesNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"attributesNumber",
"++",
";",
"int",
"codeAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"generateCodeAttributeHeader",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"reset",
"(",
"method",
",",
"this",
")",
";",
"String",
"problemString",
"=",
"\"\"",
";",
"int",
"problemLine",
"=",
"0",
";",
"if",
"(",
"problems",
"!=",
"null",
")",
"{",
"int",
"max",
"=",
"problems",
".",
"length",
";",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"25",
")",
";",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"CategorizedProblem",
"problem",
"=",
"problems",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"problem",
"!=",
"null",
")",
"&&",
"(",
"problem",
".",
"isError",
"(",
")",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"t\"",
"+",
"problem",
".",
"getMessage",
"(",
")",
"+",
"\"n\"",
")",
";",
"count",
"++",
";",
"if",
"(",
"problemLine",
"==",
"0",
")",
"{",
"problemLine",
"=",
"problem",
".",
"getSourceLineNumber",
"(",
")",
";",
"}",
"}",
"}",
"if",
"(",
"count",
">",
"1",
")",
"{",
"buffer",
".",
"insert",
"(",
"0",
",",
"Messages",
".",
"compilation_unresolvedProblems",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"insert",
"(",
"0",
",",
"Messages",
".",
"compilation_unresolvedProblem",
")",
";",
"}",
"problemString",
"=",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"this",
".",
"codeStream",
".",
"generateCodeAttributeForProblemMethod",
"(",
"problemString",
")",
";",
"completeCodeAttributeForProblemMethod",
"(",
"method",
",",
"methodBinding",
",",
"codeAttributeOffset",
",",
"(",
"(",
"SourceTypeBinding",
")",
"methodBinding",
".",
"declaringClass",
")",
".",
"scope",
".",
"referenceCompilationUnit",
"(",
")",
".",
"compilationResult",
".",
"getLineSeparatorPositions",
"(",
")",
",",
"problemLine",
")",
";",
"completeMethodInfo",
"(",
"methodBinding",
",",
"methodAttributeOffset",
",",
"attributesNumber",
")",
";",
"}",
"public",
"void",
"addProblemConstructor",
"(",
"AbstractMethodDeclaration",
"method",
",",
"MethodBinding",
"methodBinding",
",",
"CategorizedProblem",
"[",
"]",
"problems",
",",
"int",
"savedOffset",
")",
"{",
"this",
".",
"contentsOffset",
"=",
"savedOffset",
";",
"this",
".",
"methodCount",
"--",
";",
"addProblemConstructor",
"(",
"method",
",",
"methodBinding",
",",
"problems",
")",
";",
"}",
"public",
"void",
"addProblemMethod",
"(",
"AbstractMethodDeclaration",
"method",
",",
"MethodBinding",
"methodBinding",
",",
"CategorizedProblem",
"[",
"]",
"problems",
")",
"{",
"if",
"(",
"methodBinding",
".",
"isAbstract",
"(",
")",
"&&",
"methodBinding",
".",
"declaringClass",
".",
"isInterface",
"(",
")",
")",
"{",
"method",
".",
"abort",
"(",
"ProblemSeverities",
".",
"AbortType",
",",
"null",
")",
";",
"}",
"generateMethodInfoHeader",
"(",
"methodBinding",
",",
"methodBinding",
".",
"modifiers",
"&",
"~",
"(",
"ClassFileConstants",
".",
"AccStrictfp",
"|",
"ClassFileConstants",
".",
"AccNative",
"|",
"ClassFileConstants",
".",
"AccAbstract",
")",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributesNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"attributesNumber",
"++",
";",
"int",
"codeAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"generateCodeAttributeHeader",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"reset",
"(",
"method",
",",
"this",
")",
";",
"String",
"problemString",
"=",
"\"\"",
";",
"int",
"problemLine",
"=",
"0",
";",
"if",
"(",
"problems",
"!=",
"null",
")",
"{",
"int",
"max",
"=",
"problems",
".",
"length",
";",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"25",
")",
";",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"CategorizedProblem",
"problem",
"=",
"problems",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"problem",
"!=",
"null",
")",
"&&",
"(",
"problem",
".",
"isError",
"(",
")",
")",
"&&",
"(",
"problem",
".",
"getSourceStart",
"(",
")",
">=",
"method",
".",
"declarationSourceStart",
")",
"&&",
"(",
"problem",
".",
"getSourceEnd",
"(",
")",
"<=",
"method",
".",
"declarationSourceEnd",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"\"t\"",
"+",
"problem",
".",
"getMessage",
"(",
")",
"+",
"\"n\"",
")",
";",
"count",
"++",
";",
"if",
"(",
"problemLine",
"==",
"0",
")",
"{",
"problemLine",
"=",
"problem",
".",
"getSourceLineNumber",
"(",
")",
";",
"}",
"problems",
"[",
"i",
"]",
"=",
"null",
";",
"}",
"}",
"if",
"(",
"count",
">",
"1",
")",
"{",
"buffer",
".",
"insert",
"(",
"0",
",",
"Messages",
".",
"compilation_unresolvedProblems",
")",
";",
"}",
"else",
"{",
"buffer",
".",
"insert",
"(",
"0",
",",
"Messages",
".",
"compilation_unresolvedProblem",
")",
";",
"}",
"problemString",
"=",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"this",
".",
"codeStream",
".",
"generateCodeAttributeForProblemMethod",
"(",
"problemString",
")",
";",
"completeCodeAttributeForProblemMethod",
"(",
"method",
",",
"methodBinding",
",",
"codeAttributeOffset",
",",
"(",
"(",
"SourceTypeBinding",
")",
"methodBinding",
".",
"declaringClass",
")",
".",
"scope",
".",
"referenceCompilationUnit",
"(",
")",
".",
"compilationResult",
".",
"getLineSeparatorPositions",
"(",
")",
",",
"problemLine",
")",
";",
"completeMethodInfo",
"(",
"methodBinding",
",",
"methodAttributeOffset",
",",
"attributesNumber",
")",
";",
"}",
"public",
"void",
"addProblemMethod",
"(",
"AbstractMethodDeclaration",
"method",
",",
"MethodBinding",
"methodBinding",
",",
"CategorizedProblem",
"[",
"]",
"problems",
",",
"int",
"savedOffset",
")",
"{",
"this",
".",
"contentsOffset",
"=",
"savedOffset",
";",
"this",
".",
"methodCount",
"--",
";",
"addProblemMethod",
"(",
"method",
",",
"methodBinding",
",",
"problems",
")",
";",
"}",
"public",
"void",
"addSpecialMethods",
"(",
")",
"{",
"generateMissingAbstractMethods",
"(",
"this",
".",
"referenceBinding",
".",
"scope",
".",
"referenceType",
"(",
")",
".",
"missingAbstractMethods",
",",
"this",
".",
"referenceBinding",
".",
"scope",
".",
"referenceCompilationUnit",
"(",
")",
".",
"compilationResult",
")",
";",
"MethodBinding",
"[",
"]",
"defaultAbstractMethods",
"=",
"this",
".",
"referenceBinding",
".",
"getDefaultAbstractMethods",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"defaultAbstractMethods",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"MethodBinding",
"methodBinding",
"=",
"defaultAbstractMethods",
"[",
"i",
"]",
";",
"generateMethodInfoHeader",
"(",
"methodBinding",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"completeMethodInfo",
"(",
"methodBinding",
",",
"methodAttributeOffset",
",",
"attributeNumber",
")",
";",
"}",
"SyntheticMethodBinding",
"[",
"]",
"syntheticMethods",
"=",
"this",
".",
"referenceBinding",
".",
"syntheticMethods",
"(",
")",
";",
"if",
"(",
"syntheticMethods",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"syntheticMethods",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"SyntheticMethodBinding",
"syntheticMethod",
"=",
"syntheticMethods",
"[",
"i",
"]",
";",
"switch",
"(",
"syntheticMethod",
".",
"purpose",
")",
"{",
"case",
"SyntheticMethodBinding",
".",
"FieldReadAccess",
":",
"case",
"SyntheticMethodBinding",
".",
"SuperFieldReadAccess",
":",
"addSyntheticFieldReadAccessMethod",
"(",
"syntheticMethod",
")",
";",
"break",
";",
"case",
"SyntheticMethodBinding",
".",
"FieldWriteAccess",
":",
"case",
"SyntheticMethodBinding",
".",
"SuperFieldWriteAccess",
":",
"addSyntheticFieldWriteAccessMethod",
"(",
"syntheticMethod",
")",
";",
"break",
";",
"case",
"SyntheticMethodBinding",
".",
"MethodAccess",
":",
"case",
"SyntheticMethodBinding",
".",
"SuperMethodAccess",
":",
"case",
"SyntheticMethodBinding",
".",
"BridgeMethod",
":",
"addSyntheticMethodAccessMethod",
"(",
"syntheticMethod",
")",
";",
"break",
";",
"case",
"SyntheticMethodBinding",
".",
"ConstructorAccess",
":",
"addSyntheticConstructorAccessMethod",
"(",
"syntheticMethod",
")",
";",
"break",
";",
"case",
"SyntheticMethodBinding",
".",
"EnumValues",
":",
"addSyntheticEnumValuesMethod",
"(",
"syntheticMethod",
")",
";",
"break",
";",
"case",
"SyntheticMethodBinding",
".",
"EnumValueOf",
":",
"addSyntheticEnumValueOfMethod",
"(",
"syntheticMethod",
")",
";",
"break",
";",
"case",
"SyntheticMethodBinding",
".",
"SwitchTable",
":",
"addSyntheticSwitchTable",
"(",
"syntheticMethod",
")",
";",
"break",
";",
"case",
"SyntheticMethodBinding",
".",
"TooManyEnumsConstants",
":",
"addSyntheticEnumInitializationMethod",
"(",
"syntheticMethod",
")",
";",
"}",
"}",
"}",
"}",
"public",
"void",
"addSyntheticConstructorAccessMethod",
"(",
"SyntheticMethodBinding",
"methodBinding",
")",
"{",
"generateMethodInfoHeader",
"(",
"methodBinding",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"int",
"codeAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"attributeNumber",
"++",
";",
"generateCodeAttributeHeader",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"init",
"(",
"this",
")",
";",
"this",
".",
"codeStream",
".",
"generateSyntheticBodyForConstructorAccess",
"(",
"methodBinding",
")",
";",
"completeCodeAttributeForSyntheticMethod",
"(",
"methodBinding",
",",
"codeAttributeOffset",
",",
"(",
"(",
"SourceTypeBinding",
")",
"methodBinding",
".",
"declaringClass",
")",
".",
"scope",
".",
"referenceCompilationUnit",
"(",
")",
".",
"compilationResult",
".",
"getLineSeparatorPositions",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributeNumber",
";",
"}",
"public",
"void",
"addSyntheticEnumValueOfMethod",
"(",
"SyntheticMethodBinding",
"methodBinding",
")",
"{",
"generateMethodInfoHeader",
"(",
"methodBinding",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"int",
"codeAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"attributeNumber",
"++",
";",
"generateCodeAttributeHeader",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"init",
"(",
"this",
")",
";",
"this",
".",
"codeStream",
".",
"generateSyntheticBodyForEnumValueOf",
"(",
"methodBinding",
")",
";",
"completeCodeAttributeForSyntheticMethod",
"(",
"methodBinding",
",",
"codeAttributeOffset",
",",
"(",
"(",
"SourceTypeBinding",
")",
"methodBinding",
".",
"declaringClass",
")",
".",
"scope",
".",
"referenceCompilationUnit",
"(",
")",
".",
"compilationResult",
".",
"getLineSeparatorPositions",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributeNumber",
";",
"}",
"public",
"void",
"addSyntheticEnumValuesMethod",
"(",
"SyntheticMethodBinding",
"methodBinding",
")",
"{",
"generateMethodInfoHeader",
"(",
"methodBinding",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"int",
"codeAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"attributeNumber",
"++",
";",
"generateCodeAttributeHeader",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"init",
"(",
"this",
")",
";",
"this",
".",
"codeStream",
".",
"generateSyntheticBodyForEnumValues",
"(",
"methodBinding",
")",
";",
"completeCodeAttributeForSyntheticMethod",
"(",
"methodBinding",
",",
"codeAttributeOffset",
",",
"(",
"(",
"SourceTypeBinding",
")",
"methodBinding",
".",
"declaringClass",
")",
".",
"scope",
".",
"referenceCompilationUnit",
"(",
")",
".",
"compilationResult",
".",
"getLineSeparatorPositions",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributeNumber",
";",
"}",
"public",
"void",
"addSyntheticEnumInitializationMethod",
"(",
"SyntheticMethodBinding",
"methodBinding",
")",
"{",
"generateMethodInfoHeader",
"(",
"methodBinding",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"int",
"codeAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"attributeNumber",
"++",
";",
"generateCodeAttributeHeader",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"init",
"(",
"this",
")",
";",
"this",
".",
"codeStream",
".",
"generateSyntheticBodyForEnumInitializationMethod",
"(",
"methodBinding",
")",
";",
"completeCodeAttributeForSyntheticMethod",
"(",
"methodBinding",
",",
"codeAttributeOffset",
",",
"(",
"(",
"SourceTypeBinding",
")",
"methodBinding",
".",
"declaringClass",
")",
".",
"scope",
".",
"referenceCompilationUnit",
"(",
")",
".",
"compilationResult",
".",
"getLineSeparatorPositions",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributeNumber",
";",
"}",
"public",
"void",
"addSyntheticFieldReadAccessMethod",
"(",
"SyntheticMethodBinding",
"methodBinding",
")",
"{",
"generateMethodInfoHeader",
"(",
"methodBinding",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"int",
"codeAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"attributeNumber",
"++",
";",
"generateCodeAttributeHeader",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"init",
"(",
"this",
")",
";",
"this",
".",
"codeStream",
".",
"generateSyntheticBodyForFieldReadAccess",
"(",
"methodBinding",
")",
";",
"completeCodeAttributeForSyntheticMethod",
"(",
"methodBinding",
",",
"codeAttributeOffset",
",",
"(",
"(",
"SourceTypeBinding",
")",
"methodBinding",
".",
"declaringClass",
")",
".",
"scope",
".",
"referenceCompilationUnit",
"(",
")",
".",
"compilationResult",
".",
"getLineSeparatorPositions",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributeNumber",
";",
"}",
"public",
"void",
"addSyntheticFieldWriteAccessMethod",
"(",
"SyntheticMethodBinding",
"methodBinding",
")",
"{",
"generateMethodInfoHeader",
"(",
"methodBinding",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"int",
"codeAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"attributeNumber",
"++",
";",
"generateCodeAttributeHeader",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"init",
"(",
"this",
")",
";",
"this",
".",
"codeStream",
".",
"generateSyntheticBodyForFieldWriteAccess",
"(",
"methodBinding",
")",
";",
"completeCodeAttributeForSyntheticMethod",
"(",
"methodBinding",
",",
"codeAttributeOffset",
",",
"(",
"(",
"SourceTypeBinding",
")",
"methodBinding",
".",
"declaringClass",
")",
".",
"scope",
".",
"referenceCompilationUnit",
"(",
")",
".",
"compilationResult",
".",
"getLineSeparatorPositions",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributeNumber",
";",
"}",
"public",
"void",
"addSyntheticMethodAccessMethod",
"(",
"SyntheticMethodBinding",
"methodBinding",
")",
"{",
"generateMethodInfoHeader",
"(",
"methodBinding",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"int",
"codeAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"attributeNumber",
"++",
";",
"generateCodeAttributeHeader",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"init",
"(",
"this",
")",
";",
"this",
".",
"codeStream",
".",
"generateSyntheticBodyForMethodAccess",
"(",
"methodBinding",
")",
";",
"completeCodeAttributeForSyntheticMethod",
"(",
"methodBinding",
",",
"codeAttributeOffset",
",",
"(",
"(",
"SourceTypeBinding",
")",
"methodBinding",
".",
"declaringClass",
")",
".",
"scope",
".",
"referenceCompilationUnit",
"(",
")",
".",
"compilationResult",
".",
"getLineSeparatorPositions",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributeNumber",
";",
"}",
"public",
"void",
"addSyntheticSwitchTable",
"(",
"SyntheticMethodBinding",
"methodBinding",
")",
"{",
"generateMethodInfoHeader",
"(",
"methodBinding",
")",
";",
"int",
"methodAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributeNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"int",
"codeAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"attributeNumber",
"++",
";",
"generateCodeAttributeHeader",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"init",
"(",
"this",
")",
";",
"this",
".",
"codeStream",
".",
"generateSyntheticBodyForSwitchTable",
"(",
"methodBinding",
")",
";",
"completeCodeAttributeForSyntheticMethod",
"(",
"true",
",",
"methodBinding",
",",
"codeAttributeOffset",
",",
"(",
"(",
"SourceTypeBinding",
")",
"methodBinding",
".",
"declaringClass",
")",
".",
"scope",
".",
"referenceCompilationUnit",
"(",
")",
".",
"compilationResult",
".",
"getLineSeparatorPositions",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributeNumber",
";",
"}",
"public",
"void",
"completeCodeAttribute",
"(",
"int",
"codeAttributeOffset",
")",
"{",
"this",
".",
"contents",
"=",
"this",
".",
"codeStream",
".",
"bCodeStream",
";",
"int",
"localContentsOffset",
"=",
"this",
".",
"codeStream",
".",
"classFileOffset",
";",
"int",
"code_length",
"=",
"this",
".",
"codeStream",
".",
"position",
";",
"if",
"(",
"code_length",
">",
"65535",
")",
"{",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"scope",
".",
"problemReporter",
"(",
")",
".",
"bytecodeExceeds64KLimit",
"(",
"this",
".",
"codeStream",
".",
"methodDeclaration",
")",
";",
"}",
"if",
"(",
"localContentsOffset",
"+",
"20",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"20",
")",
";",
"}",
"int",
"max_stack",
"=",
"this",
".",
"codeStream",
".",
"stackMax",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"6",
"]",
"=",
"(",
"byte",
")",
"(",
"max_stack",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"7",
"]",
"=",
"(",
"byte",
")",
"max_stack",
";",
"int",
"max_locals",
"=",
"this",
".",
"codeStream",
".",
"maxLocals",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"8",
"]",
"=",
"(",
"byte",
")",
"(",
"max_locals",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"9",
"]",
"=",
"(",
"byte",
")",
"max_locals",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"10",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"11",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"12",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"13",
"]",
"=",
"(",
"byte",
")",
"code_length",
";",
"boolean",
"addStackMaps",
"=",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP_TABLE",
")",
"!=",
"0",
";",
"ExceptionLabel",
"[",
"]",
"exceptionLabels",
"=",
"this",
".",
"codeStream",
".",
"exceptionLabels",
";",
"int",
"exceptionHandlersCount",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"codeStream",
".",
"exceptionLabelsCounter",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"exceptionHandlersCount",
"+=",
"this",
".",
"codeStream",
".",
"exceptionLabels",
"[",
"i",
"]",
".",
"getCount",
"(",
")",
"/",
"2",
";",
"}",
"int",
"exSize",
"=",
"exceptionHandlersCount",
"*",
"8",
"+",
"2",
";",
"if",
"(",
"exSize",
"+",
"localContentsOffset",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"exSize",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"exceptionHandlersCount",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"exceptionHandlersCount",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"codeStream",
".",
"exceptionLabelsCounter",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"ExceptionLabel",
"exceptionLabel",
"=",
"exceptionLabels",
"[",
"i",
"]",
";",
"if",
"(",
"exceptionLabel",
"!=",
"null",
")",
"{",
"int",
"iRange",
"=",
"0",
",",
"maxRange",
"=",
"exceptionLabel",
".",
"getCount",
"(",
")",
";",
"if",
"(",
"(",
"maxRange",
"&",
"1",
")",
"!=",
"0",
")",
"{",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"scope",
".",
"problemReporter",
"(",
")",
".",
"abortDueToInternalError",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"abort_invalidExceptionAttribute",
",",
"new",
"String",
"(",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"selector",
")",
")",
",",
"this",
".",
"codeStream",
".",
"methodDeclaration",
")",
";",
"}",
"while",
"(",
"iRange",
"<",
"maxRange",
")",
"{",
"int",
"start",
"=",
"exceptionLabel",
".",
"ranges",
"[",
"iRange",
"++",
"]",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"start",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"start",
";",
"int",
"end",
"=",
"exceptionLabel",
".",
"ranges",
"[",
"iRange",
"++",
"]",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"end",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"end",
";",
"int",
"handlerPC",
"=",
"exceptionLabel",
".",
"position",
";",
"if",
"(",
"addStackMaps",
")",
"{",
"StackMapFrameCodeStream",
"stackMapFrameCodeStream",
"=",
"(",
"StackMapFrameCodeStream",
")",
"this",
".",
"codeStream",
";",
"stackMapFrameCodeStream",
".",
"addFramePosition",
"(",
"handlerPC",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"handlerPC",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"handlerPC",
";",
"if",
"(",
"exceptionLabel",
".",
"exceptionType",
"==",
"null",
")",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"}",
"else",
"{",
"int",
"nameIndex",
";",
"if",
"(",
"exceptionLabel",
".",
"exceptionType",
"==",
"TypeBinding",
".",
"NULL",
")",
"{",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"ConstantPool",
".",
"JavaLangClassNotFoundExceptionConstantPoolName",
")",
";",
"}",
"else",
"{",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"exceptionLabel",
".",
"exceptionType",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"nameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"nameIndex",
";",
"}",
"}",
"}",
"}",
"int",
"codeAttributeAttributeOffset",
"=",
"localContentsOffset",
";",
"int",
"attributesNumber",
"=",
"0",
";",
"localContentsOffset",
"+=",
"2",
";",
"if",
"(",
"localContentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_LINES",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateLineNumberAttribute",
"(",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_VARS",
")",
"!=",
"0",
")",
"{",
"final",
"boolean",
"methodDeclarationIsStatic",
"=",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"isStatic",
"(",
")",
";",
"attributesNumber",
"+=",
"generateLocalVariableTableAttribute",
"(",
"code_length",
",",
"methodDeclarationIsStatic",
",",
"false",
")",
";",
"}",
"if",
"(",
"addStackMaps",
")",
"{",
"attributesNumber",
"+=",
"generateStackMapTableAttribute",
"(",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"binding",
",",
"code_length",
",",
"codeAttributeOffset",
",",
"max_locals",
",",
"false",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateStackMapAttribute",
"(",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"binding",
",",
"code_length",
",",
"codeAttributeOffset",
",",
"max_locals",
",",
"false",
")",
";",
"}",
"this",
".",
"contents",
"[",
"codeAttributeAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributesNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributesNumber",
";",
"int",
"codeAttributeLength",
"=",
"this",
".",
"contentsOffset",
"-",
"(",
"codeAttributeOffset",
"+",
"6",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"2",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"3",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"4",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"5",
"]",
"=",
"(",
"byte",
")",
"codeAttributeLength",
";",
"}",
"public",
"void",
"completeCodeAttributeForClinit",
"(",
"int",
"codeAttributeOffset",
")",
"{",
"this",
".",
"contents",
"=",
"this",
".",
"codeStream",
".",
"bCodeStream",
";",
"int",
"localContentsOffset",
"=",
"this",
".",
"codeStream",
".",
"classFileOffset",
";",
"int",
"code_length",
"=",
"this",
".",
"codeStream",
".",
"position",
";",
"if",
"(",
"code_length",
">",
"65535",
")",
"{",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"scope",
".",
"problemReporter",
"(",
")",
".",
"bytecodeExceeds64KLimit",
"(",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"scope",
".",
"referenceType",
"(",
")",
")",
";",
"}",
"if",
"(",
"localContentsOffset",
"+",
"20",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"20",
")",
";",
"}",
"int",
"max_stack",
"=",
"this",
".",
"codeStream",
".",
"stackMax",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"6",
"]",
"=",
"(",
"byte",
")",
"(",
"max_stack",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"7",
"]",
"=",
"(",
"byte",
")",
"max_stack",
";",
"int",
"max_locals",
"=",
"this",
".",
"codeStream",
".",
"maxLocals",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"8",
"]",
"=",
"(",
"byte",
")",
"(",
"max_locals",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"9",
"]",
"=",
"(",
"byte",
")",
"max_locals",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"10",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"11",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"12",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"13",
"]",
"=",
"(",
"byte",
")",
"code_length",
";",
"boolean",
"addStackMaps",
"=",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP_TABLE",
")",
"!=",
"0",
";",
"ExceptionLabel",
"[",
"]",
"exceptionLabels",
"=",
"this",
".",
"codeStream",
".",
"exceptionLabels",
";",
"int",
"exceptionHandlersCount",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"codeStream",
".",
"exceptionLabelsCounter",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"exceptionHandlersCount",
"+=",
"this",
".",
"codeStream",
".",
"exceptionLabels",
"[",
"i",
"]",
".",
"getCount",
"(",
")",
"/",
"2",
";",
"}",
"int",
"exSize",
"=",
"exceptionHandlersCount",
"*",
"8",
"+",
"2",
";",
"if",
"(",
"exSize",
"+",
"localContentsOffset",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"exSize",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"exceptionHandlersCount",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"exceptionHandlersCount",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"codeStream",
".",
"exceptionLabelsCounter",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"ExceptionLabel",
"exceptionLabel",
"=",
"exceptionLabels",
"[",
"i",
"]",
";",
"if",
"(",
"exceptionLabel",
"!=",
"null",
")",
"{",
"int",
"iRange",
"=",
"0",
",",
"maxRange",
"=",
"exceptionLabel",
".",
"getCount",
"(",
")",
";",
"if",
"(",
"(",
"maxRange",
"&",
"1",
")",
"!=",
"0",
")",
"{",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"scope",
".",
"problemReporter",
"(",
")",
".",
"abortDueToInternalError",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"abort_invalidExceptionAttribute",
",",
"new",
"String",
"(",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"selector",
")",
")",
",",
"this",
".",
"codeStream",
".",
"methodDeclaration",
")",
";",
"}",
"while",
"(",
"iRange",
"<",
"maxRange",
")",
"{",
"int",
"start",
"=",
"exceptionLabel",
".",
"ranges",
"[",
"iRange",
"++",
"]",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"start",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"start",
";",
"int",
"end",
"=",
"exceptionLabel",
".",
"ranges",
"[",
"iRange",
"++",
"]",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"end",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"end",
";",
"int",
"handlerPC",
"=",
"exceptionLabel",
".",
"position",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"handlerPC",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"handlerPC",
";",
"if",
"(",
"addStackMaps",
")",
"{",
"StackMapFrameCodeStream",
"stackMapFrameCodeStream",
"=",
"(",
"StackMapFrameCodeStream",
")",
"this",
".",
"codeStream",
";",
"stackMapFrameCodeStream",
".",
"addFramePosition",
"(",
"handlerPC",
")",
";",
"}",
"if",
"(",
"exceptionLabel",
".",
"exceptionType",
"==",
"null",
")",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"}",
"else",
"{",
"int",
"nameIndex",
";",
"if",
"(",
"exceptionLabel",
".",
"exceptionType",
"==",
"TypeBinding",
".",
"NULL",
")",
"{",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"ConstantPool",
".",
"JavaLangClassNotFoundExceptionConstantPoolName",
")",
";",
"}",
"else",
"{",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"exceptionLabel",
".",
"exceptionType",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"nameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"nameIndex",
";",
"}",
"}",
"}",
"}",
"int",
"codeAttributeAttributeOffset",
"=",
"localContentsOffset",
";",
"int",
"attributesNumber",
"=",
"0",
";",
"localContentsOffset",
"+=",
"2",
";",
"if",
"(",
"localContentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_LINES",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateLineNumberAttribute",
"(",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_VARS",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateLocalVariableTableAttribute",
"(",
"code_length",
",",
"true",
",",
"false",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP_TABLE",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateStackMapTableAttribute",
"(",
"null",
",",
"code_length",
",",
"codeAttributeOffset",
",",
"max_locals",
",",
"true",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateStackMapAttribute",
"(",
"null",
",",
"code_length",
",",
"codeAttributeOffset",
",",
"max_locals",
",",
"true",
")",
";",
"}",
"if",
"(",
"codeAttributeAttributeOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contents",
"[",
"codeAttributeAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributesNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributesNumber",
";",
"int",
"codeAttributeLength",
"=",
"this",
".",
"contentsOffset",
"-",
"(",
"codeAttributeOffset",
"+",
"6",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"2",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"3",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"4",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"5",
"]",
"=",
"(",
"byte",
")",
"codeAttributeLength",
";",
"}",
"public",
"void",
"completeCodeAttributeForClinit",
"(",
"int",
"codeAttributeOffset",
",",
"int",
"problemLine",
")",
"{",
"this",
".",
"contents",
"=",
"this",
".",
"codeStream",
".",
"bCodeStream",
";",
"int",
"localContentsOffset",
"=",
"this",
".",
"codeStream",
".",
"classFileOffset",
";",
"int",
"code_length",
"=",
"this",
".",
"codeStream",
".",
"position",
";",
"if",
"(",
"code_length",
">",
"65535",
")",
"{",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"scope",
".",
"problemReporter",
"(",
")",
".",
"bytecodeExceeds64KLimit",
"(",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"scope",
".",
"referenceType",
"(",
")",
")",
";",
"}",
"if",
"(",
"localContentsOffset",
"+",
"20",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"20",
")",
";",
"}",
"int",
"max_stack",
"=",
"this",
".",
"codeStream",
".",
"stackMax",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"6",
"]",
"=",
"(",
"byte",
")",
"(",
"max_stack",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"7",
"]",
"=",
"(",
"byte",
")",
"max_stack",
";",
"int",
"max_locals",
"=",
"this",
".",
"codeStream",
".",
"maxLocals",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"8",
"]",
"=",
"(",
"byte",
")",
"(",
"max_locals",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"9",
"]",
"=",
"(",
"byte",
")",
"max_locals",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"10",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"11",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"12",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"13",
"]",
"=",
"(",
"byte",
")",
"code_length",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"int",
"codeAttributeAttributeOffset",
"=",
"localContentsOffset",
";",
"int",
"attributesNumber",
"=",
"0",
";",
"localContentsOffset",
"+=",
"2",
";",
"if",
"(",
"localContentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_LINES",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateLineNumberAttribute",
"(",
"problemLine",
")",
";",
"}",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_VARS",
")",
"!=",
"0",
")",
"{",
"int",
"localVariableNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"LocalVariableTableName",
")",
";",
"if",
"(",
"localContentsOffset",
"+",
"8",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"8",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"localVariableNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"localVariableNameIndex",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"2",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"attributesNumber",
"++",
";",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP_TABLE",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateStackMapTableAttribute",
"(",
"null",
",",
"code_length",
",",
"codeAttributeOffset",
",",
"max_locals",
",",
"true",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateStackMapAttribute",
"(",
"null",
",",
"code_length",
",",
"codeAttributeOffset",
",",
"max_locals",
",",
"true",
")",
";",
"}",
"if",
"(",
"codeAttributeAttributeOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contents",
"[",
"codeAttributeAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributesNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributesNumber",
";",
"int",
"codeAttributeLength",
"=",
"this",
".",
"contentsOffset",
"-",
"(",
"codeAttributeOffset",
"+",
"6",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"2",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"3",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"4",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"5",
"]",
"=",
"(",
"byte",
")",
"codeAttributeLength",
";",
"}",
"public",
"void",
"completeCodeAttributeForMissingAbstractProblemMethod",
"(",
"MethodBinding",
"binding",
",",
"int",
"codeAttributeOffset",
",",
"int",
"[",
"]",
"startLineIndexes",
",",
"int",
"problemLine",
")",
"{",
"this",
".",
"contents",
"=",
"this",
".",
"codeStream",
".",
"bCodeStream",
";",
"int",
"localContentsOffset",
"=",
"this",
".",
"codeStream",
".",
"classFileOffset",
";",
"int",
"max_stack",
"=",
"this",
".",
"codeStream",
".",
"stackMax",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"6",
"]",
"=",
"(",
"byte",
")",
"(",
"max_stack",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"7",
"]",
"=",
"(",
"byte",
")",
"max_stack",
";",
"int",
"max_locals",
"=",
"this",
".",
"codeStream",
".",
"maxLocals",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"8",
"]",
"=",
"(",
"byte",
")",
"(",
"max_locals",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"9",
"]",
"=",
"(",
"byte",
")",
"max_locals",
";",
"int",
"code_length",
"=",
"this",
".",
"codeStream",
".",
"position",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"10",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"11",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"12",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"13",
"]",
"=",
"(",
"byte",
")",
"code_length",
";",
"if",
"(",
"localContentsOffset",
"+",
"50",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"50",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"int",
"codeAttributeAttributeOffset",
"=",
"localContentsOffset",
";",
"int",
"attributesNumber",
"=",
"0",
";",
"localContentsOffset",
"+=",
"2",
";",
"if",
"(",
"localContentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_LINES",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"problemLine",
"==",
"0",
")",
"{",
"problemLine",
"=",
"Util",
".",
"getLineNumber",
"(",
"binding",
".",
"sourceStart",
"(",
")",
",",
"startLineIndexes",
",",
"0",
",",
"startLineIndexes",
".",
"length",
"-",
"1",
")",
";",
"}",
"attributesNumber",
"+=",
"generateLineNumberAttribute",
"(",
"problemLine",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP_TABLE",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateStackMapTableAttribute",
"(",
"binding",
",",
"code_length",
",",
"codeAttributeOffset",
",",
"max_locals",
",",
"false",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateStackMapAttribute",
"(",
"binding",
",",
"code_length",
",",
"codeAttributeOffset",
",",
"max_locals",
",",
"false",
")",
";",
"}",
"if",
"(",
"codeAttributeAttributeOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contents",
"[",
"codeAttributeAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributesNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributesNumber",
";",
"int",
"codeAttributeLength",
"=",
"this",
".",
"contentsOffset",
"-",
"(",
"codeAttributeOffset",
"+",
"6",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"2",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"3",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"4",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"5",
"]",
"=",
"(",
"byte",
")",
"codeAttributeLength",
";",
"}",
"public",
"void",
"completeCodeAttributeForProblemMethod",
"(",
"AbstractMethodDeclaration",
"method",
",",
"MethodBinding",
"binding",
",",
"int",
"codeAttributeOffset",
",",
"int",
"[",
"]",
"startLineIndexes",
",",
"int",
"problemLine",
")",
"{",
"this",
".",
"contents",
"=",
"this",
".",
"codeStream",
".",
"bCodeStream",
";",
"int",
"localContentsOffset",
"=",
"this",
".",
"codeStream",
".",
"classFileOffset",
";",
"int",
"max_stack",
"=",
"this",
".",
"codeStream",
".",
"stackMax",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"6",
"]",
"=",
"(",
"byte",
")",
"(",
"max_stack",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"7",
"]",
"=",
"(",
"byte",
")",
"max_stack",
";",
"int",
"max_locals",
"=",
"this",
".",
"codeStream",
".",
"maxLocals",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"8",
"]",
"=",
"(",
"byte",
")",
"(",
"max_locals",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"9",
"]",
"=",
"(",
"byte",
")",
"max_locals",
";",
"int",
"code_length",
"=",
"this",
".",
"codeStream",
".",
"position",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"10",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"11",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"12",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"13",
"]",
"=",
"(",
"byte",
")",
"code_length",
";",
"if",
"(",
"localContentsOffset",
"+",
"50",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"50",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"int",
"codeAttributeAttributeOffset",
"=",
"localContentsOffset",
";",
"int",
"attributesNumber",
"=",
"0",
";",
"localContentsOffset",
"+=",
"2",
";",
"if",
"(",
"localContentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_LINES",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"problemLine",
"==",
"0",
")",
"{",
"problemLine",
"=",
"Util",
".",
"getLineNumber",
"(",
"binding",
".",
"sourceStart",
"(",
")",
",",
"startLineIndexes",
",",
"0",
",",
"startLineIndexes",
".",
"length",
"-",
"1",
")",
";",
"}",
"attributesNumber",
"+=",
"generateLineNumberAttribute",
"(",
"problemLine",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_VARS",
")",
"!=",
"0",
")",
"{",
"final",
"boolean",
"methodDeclarationIsStatic",
"=",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"isStatic",
"(",
")",
";",
"attributesNumber",
"+=",
"generateLocalVariableTableAttribute",
"(",
"code_length",
",",
"methodDeclarationIsStatic",
",",
"false",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP_TABLE",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateStackMapTableAttribute",
"(",
"binding",
",",
"code_length",
",",
"codeAttributeOffset",
",",
"max_locals",
",",
"false",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateStackMapAttribute",
"(",
"binding",
",",
"code_length",
",",
"codeAttributeOffset",
",",
"max_locals",
",",
"false",
")",
";",
"}",
"if",
"(",
"codeAttributeAttributeOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contents",
"[",
"codeAttributeAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributesNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributesNumber",
";",
"int",
"codeAttributeLength",
"=",
"this",
".",
"contentsOffset",
"-",
"(",
"codeAttributeOffset",
"+",
"6",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"2",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"3",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"4",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"5",
"]",
"=",
"(",
"byte",
")",
"codeAttributeLength",
";",
"}",
"public",
"void",
"completeCodeAttributeForSyntheticMethod",
"(",
"boolean",
"hasExceptionHandlers",
",",
"SyntheticMethodBinding",
"binding",
",",
"int",
"codeAttributeOffset",
",",
"int",
"[",
"]",
"startLineIndexes",
")",
"{",
"this",
".",
"contents",
"=",
"this",
".",
"codeStream",
".",
"bCodeStream",
";",
"int",
"localContentsOffset",
"=",
"this",
".",
"codeStream",
".",
"classFileOffset",
";",
"int",
"max_stack",
"=",
"this",
".",
"codeStream",
".",
"stackMax",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"6",
"]",
"=",
"(",
"byte",
")",
"(",
"max_stack",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"7",
"]",
"=",
"(",
"byte",
")",
"max_stack",
";",
"int",
"max_locals",
"=",
"this",
".",
"codeStream",
".",
"maxLocals",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"8",
"]",
"=",
"(",
"byte",
")",
"(",
"max_locals",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"9",
"]",
"=",
"(",
"byte",
")",
"max_locals",
";",
"int",
"code_length",
"=",
"this",
".",
"codeStream",
".",
"position",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"10",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"11",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"12",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"13",
"]",
"=",
"(",
"byte",
")",
"code_length",
";",
"if",
"(",
"(",
"localContentsOffset",
"+",
"40",
")",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"40",
")",
";",
"}",
"boolean",
"addStackMaps",
"=",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP_TABLE",
")",
"!=",
"0",
";",
"if",
"(",
"hasExceptionHandlers",
")",
"{",
"ExceptionLabel",
"[",
"]",
"exceptionLabels",
"=",
"this",
".",
"codeStream",
".",
"exceptionLabels",
";",
"int",
"exceptionHandlersCount",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"codeStream",
".",
"exceptionLabelsCounter",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"exceptionHandlersCount",
"+=",
"this",
".",
"codeStream",
".",
"exceptionLabels",
"[",
"i",
"]",
".",
"getCount",
"(",
")",
"/",
"2",
";",
"}",
"int",
"exSize",
"=",
"exceptionHandlersCount",
"*",
"8",
"+",
"2",
";",
"if",
"(",
"exSize",
"+",
"localContentsOffset",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"exSize",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"exceptionHandlersCount",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"exceptionHandlersCount",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"codeStream",
".",
"exceptionLabelsCounter",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"ExceptionLabel",
"exceptionLabel",
"=",
"exceptionLabels",
"[",
"i",
"]",
";",
"if",
"(",
"exceptionLabel",
"!=",
"null",
")",
"{",
"int",
"iRange",
"=",
"0",
",",
"maxRange",
"=",
"exceptionLabel",
".",
"getCount",
"(",
")",
";",
"if",
"(",
"(",
"maxRange",
"&",
"1",
")",
"!=",
"0",
")",
"{",
"this",
".",
"referenceBinding",
".",
"scope",
".",
"problemReporter",
"(",
")",
".",
"abortDueToInternalError",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"abort_invalidExceptionAttribute",
",",
"new",
"String",
"(",
"binding",
".",
"selector",
")",
",",
"this",
".",
"referenceBinding",
".",
"scope",
".",
"problemReporter",
"(",
")",
".",
"referenceContext",
")",
")",
";",
"}",
"while",
"(",
"iRange",
"<",
"maxRange",
")",
"{",
"int",
"start",
"=",
"exceptionLabel",
".",
"ranges",
"[",
"iRange",
"++",
"]",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"start",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"start",
";",
"int",
"end",
"=",
"exceptionLabel",
".",
"ranges",
"[",
"iRange",
"++",
"]",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"end",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"end",
";",
"int",
"handlerPC",
"=",
"exceptionLabel",
".",
"position",
";",
"if",
"(",
"addStackMaps",
")",
"{",
"StackMapFrameCodeStream",
"stackMapFrameCodeStream",
"=",
"(",
"StackMapFrameCodeStream",
")",
"this",
".",
"codeStream",
";",
"stackMapFrameCodeStream",
".",
"addFramePosition",
"(",
"handlerPC",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"handlerPC",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"handlerPC",
";",
"if",
"(",
"exceptionLabel",
".",
"exceptionType",
"==",
"null",
")",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"}",
"else",
"{",
"int",
"nameIndex",
";",
"switch",
"(",
"exceptionLabel",
".",
"exceptionType",
".",
"id",
")",
"{",
"case",
"T_null",
":",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"ConstantPool",
".",
"JavaLangClassNotFoundExceptionConstantPoolName",
")",
";",
"break",
";",
"case",
"T_long",
":",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"ConstantPool",
".",
"JavaLangNoSuchFieldErrorConstantPoolName",
")",
";",
"break",
";",
"default",
":",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"exceptionLabel",
".",
"exceptionType",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"nameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"nameIndex",
";",
"}",
"}",
"}",
"}",
"}",
"else",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"}",
"int",
"codeAttributeAttributeOffset",
"=",
"localContentsOffset",
";",
"int",
"attributesNumber",
"=",
"0",
";",
"localContentsOffset",
"+=",
"2",
";",
"if",
"(",
"localContentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_LINES",
")",
"!=",
"0",
")",
"{",
"int",
"lineNumber",
"=",
"Util",
".",
"getLineNumber",
"(",
"binding",
".",
"sourceStart",
",",
"startLineIndexes",
",",
"0",
",",
"startLineIndexes",
".",
"length",
"-",
"1",
")",
";",
"attributesNumber",
"+=",
"generateLineNumberAttribute",
"(",
"lineNumber",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_VARS",
")",
"!=",
"0",
")",
"{",
"final",
"boolean",
"methodDeclarationIsStatic",
"=",
"binding",
".",
"isStatic",
"(",
")",
";",
"attributesNumber",
"+=",
"generateLocalVariableTableAttribute",
"(",
"code_length",
",",
"methodDeclarationIsStatic",
",",
"true",
")",
";",
"}",
"if",
"(",
"addStackMaps",
")",
"{",
"attributesNumber",
"+=",
"generateStackMapTableAttribute",
"(",
"binding",
",",
"code_length",
",",
"codeAttributeOffset",
",",
"max_locals",
",",
"false",
")",
";",
"}",
"if",
"(",
"(",
"this",
".",
"produceAttributes",
"&",
"ClassFileConstants",
".",
"ATTR_STACK_MAP",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateStackMapAttribute",
"(",
"binding",
",",
"code_length",
",",
"codeAttributeOffset",
",",
"max_locals",
",",
"false",
")",
";",
"}",
"if",
"(",
"codeAttributeAttributeOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"this",
".",
"contents",
"[",
"codeAttributeAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributesNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributesNumber",
";",
"int",
"codeAttributeLength",
"=",
"this",
".",
"contentsOffset",
"-",
"(",
"codeAttributeOffset",
"+",
"6",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"2",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"3",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"4",
"]",
"=",
"(",
"byte",
")",
"(",
"codeAttributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"codeAttributeOffset",
"+",
"5",
"]",
"=",
"(",
"byte",
")",
"codeAttributeLength",
";",
"}",
"public",
"void",
"completeCodeAttributeForSyntheticMethod",
"(",
"SyntheticMethodBinding",
"binding",
",",
"int",
"codeAttributeOffset",
",",
"int",
"[",
"]",
"startLineIndexes",
")",
"{",
"this",
".",
"completeCodeAttributeForSyntheticMethod",
"(",
"false",
",",
"binding",
",",
"codeAttributeOffset",
",",
"startLineIndexes",
")",
";",
"}",
"public",
"void",
"completeMethodInfo",
"(",
"MethodBinding",
"binding",
",",
"int",
"methodAttributeOffset",
",",
"int",
"attributesNumber",
")",
"{",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributesNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"methodAttributeOffset",
"]",
"=",
"(",
"byte",
")",
"attributesNumber",
";",
"}",
"public",
"char",
"[",
"]",
"fileName",
"(",
")",
"{",
"return",
"this",
".",
"constantPool",
".",
"UTF8Cache",
".",
"returnKeyFor",
"(",
"2",
")",
";",
"}",
"private",
"void",
"generateAnnotation",
"(",
"Annotation",
"annotation",
",",
"int",
"currentOffset",
")",
"{",
"int",
"startingContentsOffset",
"=",
"currentOffset",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"4",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"4",
")",
";",
"}",
"TypeBinding",
"annotationTypeBinding",
"=",
"annotation",
".",
"resolvedType",
";",
"if",
"(",
"annotationTypeBinding",
"==",
"null",
")",
"{",
"this",
".",
"contentsOffset",
"=",
"startingContentsOffset",
";",
"return",
";",
"}",
"final",
"int",
"typeIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"annotationTypeBinding",
".",
"signature",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"typeIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"typeIndex",
";",
"if",
"(",
"annotation",
"instanceof",
"NormalAnnotation",
")",
"{",
"NormalAnnotation",
"normalAnnotation",
"=",
"(",
"NormalAnnotation",
")",
"annotation",
";",
"MemberValuePair",
"[",
"]",
"memberValuePairs",
"=",
"normalAnnotation",
".",
"memberValuePairs",
";",
"if",
"(",
"memberValuePairs",
"!=",
"null",
")",
"{",
"final",
"int",
"memberValuePairsLength",
"=",
"memberValuePairs",
".",
"length",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"memberValuePairsLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"memberValuePairsLength",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"memberValuePairsLength",
";",
"i",
"++",
")",
"{",
"MemberValuePair",
"memberValuePair",
"=",
"memberValuePairs",
"[",
"i",
"]",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"final",
"int",
"elementNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"memberValuePair",
".",
"name",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"elementNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"elementNameIndex",
";",
"MethodBinding",
"methodBinding",
"=",
"memberValuePair",
".",
"binding",
";",
"if",
"(",
"methodBinding",
"==",
"null",
")",
"{",
"this",
".",
"contentsOffset",
"=",
"startingContentsOffset",
";",
"}",
"else",
"{",
"try",
"{",
"generateElementValue",
"(",
"memberValuePair",
".",
"value",
",",
"methodBinding",
".",
"returnType",
",",
"startingContentsOffset",
")",
";",
"}",
"catch",
"(",
"ClassCastException",
"e",
")",
"{",
"this",
".",
"contentsOffset",
"=",
"startingContentsOffset",
";",
"}",
"catch",
"(",
"ShouldNotImplement",
"e",
")",
"{",
"this",
".",
"contentsOffset",
"=",
"startingContentsOffset",
";",
"}",
"}",
"}",
"}",
"else",
"{",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"0",
";",
"}",
"}",
"else",
"if",
"(",
"annotation",
"instanceof",
"SingleMemberAnnotation",
")",
"{",
"SingleMemberAnnotation",
"singleMemberAnnotation",
"=",
"(",
"SingleMemberAnnotation",
")",
"annotation",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"1",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"final",
"int",
"elementNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"VALUE",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"elementNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"elementNameIndex",
";",
"MethodBinding",
"methodBinding",
"=",
"singleMemberAnnotation",
".",
"memberValuePairs",
"(",
")",
"[",
"0",
"]",
".",
"binding",
";",
"if",
"(",
"methodBinding",
"==",
"null",
")",
"{",
"this",
".",
"contentsOffset",
"=",
"startingContentsOffset",
";",
"}",
"else",
"{",
"try",
"{",
"generateElementValue",
"(",
"singleMemberAnnotation",
".",
"memberValue",
",",
"methodBinding",
".",
"returnType",
",",
"startingContentsOffset",
")",
";",
"}",
"catch",
"(",
"ClassCastException",
"e",
")",
"{",
"this",
".",
"contentsOffset",
"=",
"startingContentsOffset",
";",
"}",
"catch",
"(",
"ShouldNotImplement",
"e",
")",
"{",
"this",
".",
"contentsOffset",
"=",
"startingContentsOffset",
";",
"}",
"}",
"}",
"else",
"{",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"0",
";",
"}",
"}",
"private",
"int",
"generateAnnotationDefaultAttribute",
"(",
"AnnotationMethodDeclaration",
"declaration",
",",
"int",
"attributeOffset",
")",
"{",
"int",
"attributesNumber",
"=",
"0",
";",
"int",
"annotationDefaultNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"AnnotationDefaultName",
")",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"6",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"6",
")",
";",
"}",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"annotationDefaultNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"annotationDefaultNameIndex",
";",
"int",
"attributeLengthOffset",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"4",
";",
"generateElementValue",
"(",
"declaration",
".",
"defaultValue",
",",
"declaration",
".",
"binding",
".",
"returnType",
",",
"attributeOffset",
")",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"!=",
"attributeOffset",
")",
"{",
"int",
"attributeLength",
"=",
"this",
".",
"contentsOffset",
"-",
"attributeLengthOffset",
"-",
"4",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"attributeLength",
";",
"attributesNumber",
"++",
";",
"}",
"return",
"attributesNumber",
";",
"}",
"public",
"void",
"generateCodeAttributeHeader",
"(",
")",
"{",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"20",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"20",
")",
";",
"}",
"int",
"constantValueNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"CodeName",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"constantValueNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"constantValueNameIndex",
";",
"this",
".",
"contentsOffset",
"+=",
"12",
";",
"}",
"private",
"int",
"generateConstantValueAttribute",
"(",
"Constant",
"fieldConstant",
",",
"FieldBinding",
"fieldBinding",
",",
"int",
"fieldAttributeOffset",
")",
"{",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributesNumber",
"=",
"1",
";",
"if",
"(",
"localContentsOffset",
"+",
"8",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"8",
")",
";",
"}",
"int",
"constantValueNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"ConstantValueName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"constantValueNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"constantValueNameIndex",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"2",
";",
"switch",
"(",
"fieldConstant",
".",
"typeID",
"(",
")",
")",
"{",
"case",
"T_boolean",
":",
"int",
"booleanValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"fieldConstant",
".",
"booleanValue",
"(",
")",
"?",
"1",
":",
"0",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"booleanValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"booleanValueIndex",
";",
"break",
";",
"case",
"T_byte",
":",
"case",
"T_char",
":",
"case",
"T_int",
":",
"case",
"T_short",
":",
"int",
"integerValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"fieldConstant",
".",
"intValue",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"integerValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"integerValueIndex",
";",
"break",
";",
"case",
"T_float",
":",
"int",
"floatValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"fieldConstant",
".",
"floatValue",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"floatValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"floatValueIndex",
";",
"break",
";",
"case",
"T_double",
":",
"int",
"doubleValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"fieldConstant",
".",
"doubleValue",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"doubleValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"doubleValueIndex",
";",
"break",
";",
"case",
"T_long",
":",
"int",
"longValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"fieldConstant",
".",
"longValue",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"longValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"longValueIndex",
";",
"break",
";",
"case",
"T_JavaLangString",
":",
"int",
"stringValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"(",
"(",
"StringConstant",
")",
"fieldConstant",
")",
".",
"stringValue",
"(",
")",
")",
";",
"if",
"(",
"stringValueIndex",
"==",
"-",
"1",
")",
"{",
"if",
"(",
"!",
"this",
".",
"creatingProblemType",
")",
"{",
"TypeDeclaration",
"typeDeclaration",
"=",
"this",
".",
"referenceBinding",
".",
"scope",
".",
"referenceContext",
";",
"FieldDeclaration",
"[",
"]",
"fieldDecls",
"=",
"typeDeclaration",
".",
"fields",
";",
"int",
"max",
"=",
"fieldDecls",
"==",
"null",
"?",
"0",
":",
"fieldDecls",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"fieldDecls",
"[",
"i",
"]",
".",
"binding",
"==",
"fieldBinding",
")",
"{",
"typeDeclaration",
".",
"scope",
".",
"problemReporter",
"(",
")",
".",
"stringConstantIsExceedingUtf8Limit",
"(",
"fieldDecls",
"[",
"i",
"]",
")",
";",
"}",
"}",
"}",
"else",
"{",
"this",
".",
"contentsOffset",
"=",
"fieldAttributeOffset",
";",
"attributesNumber",
"=",
"0",
";",
"}",
"}",
"else",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"stringValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"stringValueIndex",
";",
"}",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"attributesNumber",
";",
"}",
"private",
"int",
"generateDeprecatedAttribute",
"(",
")",
"{",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"if",
"(",
"localContentsOffset",
"+",
"6",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"6",
")",
";",
"}",
"int",
"deprecatedAttributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"DeprecatedName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"deprecatedAttributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"deprecatedAttributeNameIndex",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"1",
";",
"}",
"private",
"void",
"generateElementValue",
"(",
"Expression",
"defaultValue",
",",
"TypeBinding",
"memberValuePairReturnType",
",",
"int",
"attributeOffset",
")",
"{",
"Constant",
"constant",
"=",
"defaultValue",
".",
"constant",
";",
"TypeBinding",
"defaultValueBinding",
"=",
"defaultValue",
".",
"resolvedType",
";",
"if",
"(",
"defaultValueBinding",
"==",
"null",
")",
"{",
"this",
".",
"contentsOffset",
"=",
"attributeOffset",
";",
"}",
"else",
"{",
"if",
"(",
"memberValuePairReturnType",
".",
"isArrayType",
"(",
")",
"&&",
"!",
"defaultValueBinding",
".",
"isArrayType",
"(",
")",
")",
"{",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"3",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"3",
")",
";",
"}",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'['",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"0",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"1",
";",
"}",
"if",
"(",
"constant",
"!=",
"null",
"&&",
"constant",
"!=",
"Constant",
".",
"NotAConstant",
")",
"{",
"generateElementValue",
"(",
"attributeOffset",
",",
"defaultValue",
",",
"constant",
",",
"memberValuePairReturnType",
".",
"leafComponentType",
"(",
")",
")",
";",
"}",
"else",
"{",
"generateElementValueForNonConstantExpression",
"(",
"defaultValue",
",",
"attributeOffset",
",",
"defaultValueBinding",
")",
";",
"}",
"}",
"}",
"private",
"void",
"generateElementValue",
"(",
"int",
"attributeOffset",
",",
"Expression",
"defaultValue",
",",
"Constant",
"constant",
",",
"TypeBinding",
"binding",
")",
"{",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"3",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"3",
")",
";",
"}",
"switch",
"(",
"binding",
".",
"id",
")",
"{",
"case",
"T_boolean",
":",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'Z'",
";",
"int",
"booleanValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"constant",
".",
"booleanValue",
"(",
")",
"?",
"1",
":",
"0",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"booleanValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"booleanValueIndex",
";",
"break",
";",
"case",
"T_byte",
":",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'B'",
";",
"int",
"integerValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"constant",
".",
"intValue",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"integerValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"integerValueIndex",
";",
"break",
";",
"case",
"T_char",
":",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'C'",
";",
"integerValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"constant",
".",
"intValue",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"integerValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"integerValueIndex",
";",
"break",
";",
"case",
"T_int",
":",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'I'",
";",
"integerValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"constant",
".",
"intValue",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"integerValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"integerValueIndex",
";",
"break",
";",
"case",
"T_short",
":",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'S'",
";",
"integerValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"constant",
".",
"intValue",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"integerValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"integerValueIndex",
";",
"break",
";",
"case",
"T_float",
":",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'F'",
";",
"int",
"floatValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"constant",
".",
"floatValue",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"floatValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"floatValueIndex",
";",
"break",
";",
"case",
"T_double",
":",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'D'",
";",
"int",
"doubleValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"constant",
".",
"doubleValue",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"doubleValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"doubleValueIndex",
";",
"break",
";",
"case",
"T_long",
":",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'J'",
";",
"int",
"longValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"constant",
".",
"longValue",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"longValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"longValueIndex",
";",
"break",
";",
"case",
"T_JavaLangString",
":",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'s'",
";",
"int",
"stringValueIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"(",
"(",
"StringConstant",
")",
"constant",
")",
".",
"stringValue",
"(",
")",
".",
"toCharArray",
"(",
")",
")",
";",
"if",
"(",
"stringValueIndex",
"==",
"-",
"1",
")",
"{",
"if",
"(",
"!",
"this",
".",
"creatingProblemType",
")",
"{",
"TypeDeclaration",
"typeDeclaration",
"=",
"this",
".",
"referenceBinding",
".",
"scope",
".",
"referenceContext",
";",
"typeDeclaration",
".",
"scope",
".",
"problemReporter",
"(",
")",
".",
"stringConstantIsExceedingUtf8Limit",
"(",
"defaultValue",
")",
";",
"}",
"else",
"{",
"this",
".",
"contentsOffset",
"=",
"attributeOffset",
";",
"}",
"}",
"else",
"{",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"stringValueIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"stringValueIndex",
";",
"}",
"}",
"}",
"private",
"void",
"generateElementValueForNonConstantExpression",
"(",
"Expression",
"defaultValue",
",",
"int",
"attributeOffset",
",",
"TypeBinding",
"defaultValueBinding",
")",
"{",
"if",
"(",
"defaultValueBinding",
"!=",
"null",
")",
"{",
"if",
"(",
"defaultValueBinding",
".",
"isEnum",
"(",
")",
")",
"{",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"5",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"5",
")",
";",
"}",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'e'",
";",
"FieldBinding",
"fieldBinding",
"=",
"null",
";",
"if",
"(",
"defaultValue",
"instanceof",
"QualifiedNameReference",
")",
"{",
"QualifiedNameReference",
"nameReference",
"=",
"(",
"QualifiedNameReference",
")",
"defaultValue",
";",
"fieldBinding",
"=",
"(",
"FieldBinding",
")",
"nameReference",
".",
"binding",
";",
"}",
"else",
"if",
"(",
"defaultValue",
"instanceof",
"SingleNameReference",
")",
"{",
"SingleNameReference",
"nameReference",
"=",
"(",
"SingleNameReference",
")",
"defaultValue",
";",
"fieldBinding",
"=",
"(",
"FieldBinding",
")",
"nameReference",
".",
"binding",
";",
"}",
"else",
"{",
"this",
".",
"contentsOffset",
"=",
"attributeOffset",
";",
"}",
"if",
"(",
"fieldBinding",
"!=",
"null",
")",
"{",
"final",
"int",
"enumConstantTypeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"fieldBinding",
".",
"type",
".",
"signature",
"(",
")",
")",
";",
"final",
"int",
"enumConstantNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"fieldBinding",
".",
"name",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"enumConstantTypeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"enumConstantTypeNameIndex",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"enumConstantNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"enumConstantNameIndex",
";",
"}",
"}",
"else",
"if",
"(",
"defaultValueBinding",
".",
"isAnnotationType",
"(",
")",
")",
"{",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"1",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"1",
")",
";",
"}",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'@'",
";",
"generateAnnotation",
"(",
"(",
"Annotation",
")",
"defaultValue",
",",
"attributeOffset",
")",
";",
"}",
"else",
"if",
"(",
"defaultValueBinding",
".",
"isArrayType",
"(",
")",
")",
"{",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"3",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"3",
")",
";",
"}",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'['",
";",
"if",
"(",
"defaultValue",
"instanceof",
"ArrayInitializer",
")",
"{",
"ArrayInitializer",
"arrayInitializer",
"=",
"(",
"ArrayInitializer",
")",
"defaultValue",
";",
"int",
"arrayLength",
"=",
"arrayInitializer",
".",
"expressions",
"!=",
"null",
"?",
"arrayInitializer",
".",
"expressions",
".",
"length",
":",
"0",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"arrayLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"arrayLength",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"arrayLength",
";",
"i",
"++",
")",
"{",
"generateElementValue",
"(",
"arrayInitializer",
".",
"expressions",
"[",
"i",
"]",
",",
"defaultValueBinding",
".",
"leafComponentType",
"(",
")",
",",
"attributeOffset",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"contentsOffset",
"=",
"attributeOffset",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"3",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"3",
")",
";",
"}",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"'c'",
";",
"if",
"(",
"defaultValue",
"instanceof",
"ClassLiteralAccess",
")",
"{",
"ClassLiteralAccess",
"classLiteralAccess",
"=",
"(",
"ClassLiteralAccess",
")",
"defaultValue",
";",
"final",
"int",
"classInfoIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"classLiteralAccess",
".",
"targetType",
".",
"signature",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"classInfoIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"classInfoIndex",
";",
"}",
"else",
"{",
"this",
".",
"contentsOffset",
"=",
"attributeOffset",
";",
"}",
"}",
"}",
"else",
"{",
"this",
".",
"contentsOffset",
"=",
"attributeOffset",
";",
"}",
"}",
"private",
"int",
"generateEnclosingMethodAttribute",
"(",
")",
"{",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"if",
"(",
"localContentsOffset",
"+",
"10",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"10",
")",
";",
"}",
"int",
"enclosingMethodAttributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"EnclosingMethodName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"enclosingMethodAttributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"enclosingMethodAttributeNameIndex",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"4",
";",
"int",
"enclosingTypeIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"this",
".",
"referenceBinding",
".",
"enclosingType",
"(",
")",
".",
"constantPoolName",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"enclosingTypeIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"enclosingTypeIndex",
";",
"byte",
"methodIndexByte1",
"=",
"0",
";",
"byte",
"methodIndexByte2",
"=",
"0",
";",
"if",
"(",
"this",
".",
"referenceBinding",
"instanceof",
"LocalTypeBinding",
")",
"{",
"MethodBinding",
"methodBinding",
"=",
"(",
"(",
"LocalTypeBinding",
")",
"this",
".",
"referenceBinding",
")",
".",
"enclosingMethod",
";",
"if",
"(",
"methodBinding",
"!=",
"null",
")",
"{",
"int",
"enclosingMethodIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForNameAndType",
"(",
"methodBinding",
".",
"selector",
",",
"methodBinding",
".",
"signature",
"(",
"this",
")",
")",
";",
"methodIndexByte1",
"=",
"(",
"byte",
")",
"(",
"enclosingMethodIndex",
">>",
"8",
")",
";",
"methodIndexByte2",
"=",
"(",
"byte",
")",
"enclosingMethodIndex",
";",
"}",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"methodIndexByte1",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"methodIndexByte2",
";",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"1",
";",
"}",
"private",
"int",
"generateExceptionsAttribute",
"(",
"ReferenceBinding",
"[",
"]",
"thrownsExceptions",
")",
"{",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"length",
"=",
"thrownsExceptions",
".",
"length",
";",
"int",
"exSize",
"=",
"8",
"+",
"length",
"*",
"2",
";",
"if",
"(",
"exSize",
"+",
"this",
".",
"contentsOffset",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"exSize",
")",
";",
"}",
"int",
"exceptionNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"ExceptionsName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"exceptionNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"exceptionNameIndex",
";",
"int",
"attributeLength",
"=",
"length",
"*",
"2",
"+",
"2",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"attributeLength",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"length",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"int",
"exceptionIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"thrownsExceptions",
"[",
"i",
"]",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"exceptionIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"exceptionIndex",
";",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"1",
";",
"}",
"private",
"int",
"generateHierarchyInconsistentAttribute",
"(",
")",
"{",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"if",
"(",
"localContentsOffset",
"+",
"6",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"6",
")",
";",
"}",
"int",
"inconsistentHierarchyNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"InconsistentHierarchy",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"inconsistentHierarchyNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"inconsistentHierarchyNameIndex",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"1",
";",
"}",
"private",
"int",
"generateInnerClassAttribute",
"(",
"int",
"numberOfInnerClasses",
",",
"ReferenceBinding",
"[",
"]",
"innerClasses",
")",
"{",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"exSize",
"=",
"8",
"*",
"numberOfInnerClasses",
"+",
"8",
";",
"if",
"(",
"exSize",
"+",
"localContentsOffset",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"exSize",
")",
";",
"}",
"int",
"attributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"InnerClassName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"attributeNameIndex",
";",
"int",
"value",
"=",
"(",
"numberOfInnerClasses",
"<<",
"3",
")",
"+",
"2",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"value",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"value",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"value",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"value",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"numberOfInnerClasses",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"numberOfInnerClasses",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfInnerClasses",
";",
"i",
"++",
")",
"{",
"ReferenceBinding",
"innerClass",
"=",
"innerClasses",
"[",
"i",
"]",
";",
"int",
"accessFlags",
"=",
"innerClass",
".",
"getAccessFlags",
"(",
")",
";",
"int",
"innerClassIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"innerClass",
".",
"constantPoolName",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"innerClassIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"innerClassIndex",
";",
"if",
"(",
"innerClass",
".",
"isMemberType",
"(",
")",
")",
"{",
"int",
"outerClassIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"innerClass",
".",
"enclosingType",
"(",
")",
".",
"constantPoolName",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"outerClassIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"outerClassIndex",
";",
"}",
"else",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"}",
"if",
"(",
"!",
"innerClass",
".",
"isAnonymousType",
"(",
")",
")",
"{",
"int",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"innerClass",
".",
"sourceName",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"nameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"nameIndex",
";",
"}",
"else",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"}",
"if",
"(",
"innerClass",
".",
"isAnonymousType",
"(",
")",
")",
"{",
"accessFlags",
"&=",
"~",
"ClassFileConstants",
".",
"AccFinal",
";",
"}",
"else",
"if",
"(",
"innerClass",
".",
"isMemberType",
"(",
")",
"&&",
"innerClass",
".",
"isInterface",
"(",
")",
")",
"{",
"accessFlags",
"|=",
"ClassFileConstants",
".",
"AccStatic",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"accessFlags",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"accessFlags",
";",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"1",
";",
"}",
"private",
"int",
"generateLineNumberAttribute",
"(",
")",
"{",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"attributesNumber",
"=",
"0",
";",
"int",
"[",
"]",
"pcToSourceMapTable",
";",
"if",
"(",
"(",
"(",
"pcToSourceMapTable",
"=",
"this",
".",
"codeStream",
".",
"pcToSourceMap",
")",
"!=",
"null",
")",
"&&",
"(",
"this",
".",
"codeStream",
".",
"pcToSourceMapSize",
"!=",
"0",
")",
")",
"{",
"int",
"lineNumberNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"LineNumberTableName",
")",
";",
"if",
"(",
"localContentsOffset",
"+",
"8",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"8",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"lineNumberNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"lineNumberNameIndex",
";",
"int",
"lineNumberTableOffset",
"=",
"localContentsOffset",
";",
"localContentsOffset",
"+=",
"6",
";",
"int",
"numberOfEntries",
"=",
"0",
";",
"int",
"length",
"=",
"this",
".",
"codeStream",
".",
"pcToSourceMapSize",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
")",
"{",
"if",
"(",
"localContentsOffset",
"+",
"4",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"4",
")",
";",
"}",
"int",
"pc",
"=",
"pcToSourceMapTable",
"[",
"i",
"++",
"]",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"pc",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"pc",
";",
"int",
"lineNumber",
"=",
"pcToSourceMapTable",
"[",
"i",
"++",
"]",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"lineNumber",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"lineNumber",
";",
"numberOfEntries",
"++",
";",
"}",
"int",
"lineNumberAttr_length",
"=",
"numberOfEntries",
"*",
"4",
"+",
"2",
";",
"this",
".",
"contents",
"[",
"lineNumberTableOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"lineNumberAttr_length",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"lineNumberTableOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"lineNumberAttr_length",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"lineNumberTableOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"lineNumberAttr_length",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"lineNumberTableOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"lineNumberAttr_length",
";",
"this",
".",
"contents",
"[",
"lineNumberTableOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"numberOfEntries",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"lineNumberTableOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"numberOfEntries",
";",
"attributesNumber",
"=",
"1",
";",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"attributesNumber",
";",
"}",
"private",
"int",
"generateLineNumberAttribute",
"(",
"int",
"problemLine",
")",
"{",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"if",
"(",
"localContentsOffset",
"+",
"12",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"12",
")",
";",
"}",
"int",
"lineNumberNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"LineNumberTableName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"lineNumberNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"lineNumberNameIndex",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"6",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"1",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"problemLine",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"problemLine",
";",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"1",
";",
"}",
"private",
"int",
"generateLocalVariableTableAttribute",
"(",
"int",
"code_length",
",",
"boolean",
"methodDeclarationIsStatic",
",",
"boolean",
"isSynthetic",
")",
"{",
"int",
"attributesNumber",
"=",
"0",
";",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"numberOfEntries",
"=",
"0",
";",
"int",
"localVariableNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"LocalVariableTableName",
")",
";",
"int",
"maxOfEntries",
"=",
"8",
"+",
"10",
"*",
"(",
"methodDeclarationIsStatic",
"?",
"0",
":",
"1",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"codeStream",
".",
"allLocalsCounter",
";",
"i",
"++",
")",
"{",
"LocalVariableBinding",
"localVariableBinding",
"=",
"this",
".",
"codeStream",
".",
"locals",
"[",
"i",
"]",
";",
"maxOfEntries",
"+=",
"10",
"*",
"localVariableBinding",
".",
"initializationCount",
";",
"}",
"if",
"(",
"localContentsOffset",
"+",
"maxOfEntries",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"maxOfEntries",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"localVariableNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"localVariableNameIndex",
";",
"int",
"localVariableTableOffset",
"=",
"localContentsOffset",
";",
"localContentsOffset",
"+=",
"6",
";",
"int",
"nameIndex",
";",
"int",
"descriptorIndex",
";",
"SourceTypeBinding",
"declaringClassBinding",
"=",
"null",
";",
"if",
"(",
"!",
"methodDeclarationIsStatic",
"&&",
"!",
"isSynthetic",
")",
"{",
"numberOfEntries",
"++",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"code_length",
";",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"ConstantPool",
".",
"This",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"nameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"nameIndex",
";",
"declaringClassBinding",
"=",
"(",
"SourceTypeBinding",
")",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"binding",
".",
"declaringClass",
";",
"descriptorIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"declaringClassBinding",
".",
"signature",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"descriptorIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"descriptorIndex",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"}",
"int",
"genericLocalVariablesCounter",
"=",
"0",
";",
"LocalVariableBinding",
"[",
"]",
"genericLocalVariables",
"=",
"null",
";",
"int",
"numberOfGenericEntries",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"codeStream",
".",
"allLocalsCounter",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"LocalVariableBinding",
"localVariable",
"=",
"this",
".",
"codeStream",
".",
"locals",
"[",
"i",
"]",
";",
"int",
"initializationCount",
"=",
"localVariable",
".",
"initializationCount",
";",
"if",
"(",
"initializationCount",
"==",
"0",
")",
"continue",
";",
"if",
"(",
"localVariable",
".",
"declaration",
"==",
"null",
")",
"continue",
";",
"final",
"TypeBinding",
"localVariableTypeBinding",
"=",
"localVariable",
".",
"type",
";",
"boolean",
"isParameterizedType",
"=",
"localVariableTypeBinding",
".",
"isParameterizedType",
"(",
")",
"||",
"localVariableTypeBinding",
".",
"isTypeVariable",
"(",
")",
";",
"if",
"(",
"isParameterizedType",
")",
"{",
"if",
"(",
"genericLocalVariables",
"==",
"null",
")",
"{",
"genericLocalVariables",
"=",
"new",
"LocalVariableBinding",
"[",
"max",
"]",
";",
"}",
"genericLocalVariables",
"[",
"genericLocalVariablesCounter",
"++",
"]",
"=",
"localVariable",
";",
"}",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"initializationCount",
";",
"j",
"++",
")",
"{",
"int",
"startPC",
"=",
"localVariable",
".",
"initializationPCs",
"[",
"j",
"<<",
"1",
"]",
";",
"int",
"endPC",
"=",
"localVariable",
".",
"initializationPCs",
"[",
"(",
"j",
"<<",
"1",
")",
"+",
"1",
"]",
";",
"if",
"(",
"startPC",
"!=",
"endPC",
")",
"{",
"if",
"(",
"endPC",
"==",
"-",
"1",
")",
"{",
"localVariable",
".",
"declaringScope",
".",
"problemReporter",
"(",
")",
".",
"abortDueToInternalError",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"abort_invalidAttribute",
",",
"new",
"String",
"(",
"localVariable",
".",
"name",
")",
")",
",",
"(",
"ASTNode",
")",
"localVariable",
".",
"declaringScope",
".",
"methodScope",
"(",
")",
".",
"referenceContext",
")",
";",
"}",
"if",
"(",
"isParameterizedType",
")",
"{",
"numberOfGenericEntries",
"++",
";",
"}",
"numberOfEntries",
"++",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"startPC",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"startPC",
";",
"int",
"length",
"=",
"endPC",
"-",
"startPC",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"length",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"length",
";",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"localVariable",
".",
"name",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"nameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"nameIndex",
";",
"descriptorIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"localVariableTypeBinding",
".",
"signature",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"descriptorIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"descriptorIndex",
";",
"int",
"resolvedPosition",
"=",
"localVariable",
".",
"resolvedPosition",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"resolvedPosition",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"resolvedPosition",
";",
"}",
"}",
"}",
"int",
"value",
"=",
"numberOfEntries",
"*",
"10",
"+",
"2",
";",
"this",
".",
"contents",
"[",
"localVariableTableOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"value",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"localVariableTableOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"value",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"localVariableTableOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"value",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localVariableTableOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"value",
";",
"this",
".",
"contents",
"[",
"localVariableTableOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"numberOfEntries",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localVariableTableOffset",
"]",
"=",
"(",
"byte",
")",
"numberOfEntries",
";",
"attributesNumber",
"++",
";",
"final",
"boolean",
"currentInstanceIsGeneric",
"=",
"!",
"methodDeclarationIsStatic",
"&&",
"declaringClassBinding",
"!=",
"null",
"&&",
"declaringClassBinding",
".",
"typeVariables",
"!=",
"Binding",
".",
"NO_TYPE_VARIABLES",
";",
"if",
"(",
"genericLocalVariablesCounter",
"!=",
"0",
"||",
"currentInstanceIsGeneric",
")",
"{",
"numberOfGenericEntries",
"+=",
"(",
"currentInstanceIsGeneric",
"?",
"1",
":",
"0",
")",
";",
"maxOfEntries",
"=",
"8",
"+",
"numberOfGenericEntries",
"*",
"10",
";",
"if",
"(",
"localContentsOffset",
"+",
"maxOfEntries",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"maxOfEntries",
")",
";",
"}",
"int",
"localVariableTypeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"LocalVariableTypeTableName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"localVariableTypeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"localVariableTypeNameIndex",
";",
"value",
"=",
"numberOfGenericEntries",
"*",
"10",
"+",
"2",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"value",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"value",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"value",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"value",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"numberOfGenericEntries",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"numberOfGenericEntries",
";",
"if",
"(",
"currentInstanceIsGeneric",
")",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"code_length",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"code_length",
";",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"ConstantPool",
".",
"This",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"nameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"nameIndex",
";",
"descriptorIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"declaringClassBinding",
".",
"genericTypeSignature",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"descriptorIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"descriptorIndex",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"genericLocalVariablesCounter",
";",
"i",
"++",
")",
"{",
"LocalVariableBinding",
"localVariable",
"=",
"genericLocalVariables",
"[",
"i",
"]",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"localVariable",
".",
"initializationCount",
";",
"j",
"++",
")",
"{",
"int",
"startPC",
"=",
"localVariable",
".",
"initializationPCs",
"[",
"j",
"<<",
"1",
"]",
";",
"int",
"endPC",
"=",
"localVariable",
".",
"initializationPCs",
"[",
"(",
"j",
"<<",
"1",
")",
"+",
"1",
"]",
";",
"if",
"(",
"startPC",
"!=",
"endPC",
")",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"startPC",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"startPC",
";",
"int",
"length",
"=",
"endPC",
"-",
"startPC",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"length",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"length",
";",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"localVariable",
".",
"name",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"nameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"nameIndex",
";",
"descriptorIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"localVariable",
".",
"type",
".",
"genericTypeSignature",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"descriptorIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"descriptorIndex",
";",
"int",
"resolvedPosition",
"=",
"localVariable",
".",
"resolvedPosition",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"resolvedPosition",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"resolvedPosition",
";",
"}",
"}",
"}",
"attributesNumber",
"++",
";",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"attributesNumber",
";",
"}",
"public",
"int",
"generateMethodInfoAttributes",
"(",
"MethodBinding",
"methodBinding",
")",
"{",
"this",
".",
"contentsOffset",
"+=",
"2",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"ReferenceBinding",
"[",
"]",
"thrownsExceptions",
";",
"int",
"attributesNumber",
"=",
"0",
";",
"if",
"(",
"(",
"thrownsExceptions",
"=",
"methodBinding",
".",
"thrownExceptions",
")",
"!=",
"Binding",
".",
"NO_EXCEPTIONS",
")",
"{",
"attributesNumber",
"+=",
"generateExceptionsAttribute",
"(",
"thrownsExceptions",
")",
";",
"}",
"if",
"(",
"methodBinding",
".",
"isDeprecated",
"(",
")",
")",
"{",
"attributesNumber",
"+=",
"generateDeprecatedAttribute",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"targetJDK",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"if",
"(",
"methodBinding",
".",
"isSynthetic",
"(",
")",
")",
"{",
"attributesNumber",
"+=",
"generateSyntheticAttribute",
"(",
")",
";",
"}",
"if",
"(",
"methodBinding",
".",
"isVarargs",
"(",
")",
")",
"{",
"attributesNumber",
"+=",
"generateVarargsAttribute",
"(",
")",
";",
"}",
"}",
"char",
"[",
"]",
"genericSignature",
"=",
"methodBinding",
".",
"genericSignature",
"(",
")",
";",
"if",
"(",
"genericSignature",
"!=",
"null",
")",
"{",
"attributesNumber",
"+=",
"generateSignatureAttribute",
"(",
"genericSignature",
")",
";",
"}",
"if",
"(",
"this",
".",
"targetJDK",
">=",
"ClassFileConstants",
".",
"JDK1_4",
")",
"{",
"AbstractMethodDeclaration",
"methodDeclaration",
"=",
"methodBinding",
".",
"sourceMethod",
"(",
")",
";",
"if",
"(",
"methodDeclaration",
"!=",
"null",
")",
"{",
"Annotation",
"[",
"]",
"annotations",
"=",
"methodDeclaration",
".",
"annotations",
";",
"if",
"(",
"annotations",
"!=",
"null",
")",
"{",
"attributesNumber",
"+=",
"generateRuntimeAnnotations",
"(",
"annotations",
")",
";",
"}",
"if",
"(",
"(",
"methodBinding",
".",
"tagBits",
"&",
"TagBits",
".",
"HasParameterAnnotations",
")",
"!=",
"0",
")",
"{",
"Argument",
"[",
"]",
"arguments",
"=",
"methodDeclaration",
".",
"arguments",
";",
"if",
"(",
"arguments",
"!=",
"null",
")",
"{",
"attributesNumber",
"+=",
"generateRuntimeAnnotationsForParameters",
"(",
"arguments",
")",
";",
"}",
"}",
"}",
"}",
"if",
"(",
"(",
"methodBinding",
".",
"tagBits",
"&",
"TagBits",
".",
"HasMissingType",
")",
"!=",
"0",
")",
"{",
"this",
".",
"missingTypes",
"=",
"methodBinding",
".",
"collectMissingTypes",
"(",
"this",
".",
"missingTypes",
")",
";",
"}",
"return",
"attributesNumber",
";",
"}",
"public",
"int",
"generateMethodInfoAttributes",
"(",
"MethodBinding",
"methodBinding",
",",
"AnnotationMethodDeclaration",
"declaration",
")",
"{",
"int",
"attributesNumber",
"=",
"generateMethodInfoAttributes",
"(",
"methodBinding",
")",
";",
"int",
"attributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"if",
"(",
"(",
"declaration",
".",
"modifiers",
"&",
"ClassFileConstants",
".",
"AccAnnotationDefault",
")",
"!=",
"0",
")",
"{",
"attributesNumber",
"+=",
"generateAnnotationDefaultAttribute",
"(",
"declaration",
",",
"attributeOffset",
")",
";",
"}",
"return",
"attributesNumber",
";",
"}",
"public",
"void",
"generateMethodInfoHeader",
"(",
"MethodBinding",
"methodBinding",
")",
"{",
"generateMethodInfoHeader",
"(",
"methodBinding",
",",
"methodBinding",
".",
"modifiers",
")",
";",
"}",
"public",
"void",
"generateMethodInfoHeader",
"(",
"MethodBinding",
"methodBinding",
",",
"int",
"accessFlags",
")",
"{",
"this",
".",
"methodCount",
"++",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"10",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"10",
")",
";",
"}",
"if",
"(",
"this",
".",
"targetJDK",
"<",
"ClassFileConstants",
".",
"JDK1_5",
")",
"{",
"accessFlags",
"&=",
"~",
"(",
"ClassFileConstants",
".",
"AccSynthetic",
"|",
"ClassFileConstants",
".",
"AccVarargs",
")",
";",
"}",
"if",
"(",
"(",
"methodBinding",
".",
"tagBits",
"&",
"TagBits",
".",
"ClearPrivateModifier",
")",
"!=",
"0",
")",
"{",
"accessFlags",
"&=",
"~",
"ClassFileConstants",
".",
"AccPrivate",
";",
"}",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"accessFlags",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"accessFlags",
";",
"int",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"methodBinding",
".",
"selector",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"nameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"nameIndex",
";",
"int",
"descriptorIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"methodBinding",
".",
"signature",
"(",
"this",
")",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"descriptorIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"descriptorIndex",
";",
"}",
"public",
"void",
"generateMethodInfoHeaderForClinit",
"(",
")",
"{",
"this",
".",
"methodCount",
"++",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"10",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"10",
")",
";",
"}",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"(",
"ClassFileConstants",
".",
"AccDefault",
"|",
"ClassFileConstants",
".",
"AccStatic",
")",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"ClassFileConstants",
".",
"AccDefault",
"|",
"ClassFileConstants",
".",
"AccStatic",
")",
";",
"int",
"nameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"ConstantPool",
".",
"Clinit",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"nameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"nameIndex",
";",
"int",
"descriptorIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"ConstantPool",
".",
"ClinitSignature",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"descriptorIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"descriptorIndex",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"1",
";",
"}",
"public",
"void",
"generateMissingAbstractMethods",
"(",
"MethodDeclaration",
"[",
"]",
"methodDeclarations",
",",
"CompilationResult",
"compilationResult",
")",
"{",
"if",
"(",
"methodDeclarations",
"!=",
"null",
")",
"{",
"TypeDeclaration",
"currentDeclaration",
"=",
"this",
".",
"referenceBinding",
".",
"scope",
".",
"referenceContext",
";",
"int",
"typeDeclarationSourceStart",
"=",
"currentDeclaration",
".",
"sourceStart",
"(",
")",
";",
"int",
"typeDeclarationSourceEnd",
"=",
"currentDeclaration",
".",
"sourceEnd",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"methodDeclarations",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"MethodDeclaration",
"methodDeclaration",
"=",
"methodDeclarations",
"[",
"i",
"]",
";",
"MethodBinding",
"methodBinding",
"=",
"methodDeclaration",
".",
"binding",
";",
"String",
"readableName",
"=",
"new",
"String",
"(",
"methodBinding",
".",
"readableName",
"(",
")",
")",
";",
"CategorizedProblem",
"[",
"]",
"problems",
"=",
"compilationResult",
".",
"problems",
";",
"int",
"problemsCount",
"=",
"compilationResult",
".",
"problemCount",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"problemsCount",
";",
"j",
"++",
")",
"{",
"CategorizedProblem",
"problem",
"=",
"problems",
"[",
"j",
"]",
";",
"if",
"(",
"problem",
"!=",
"null",
"&&",
"problem",
".",
"getID",
"(",
")",
"==",
"IProblem",
".",
"AbstractMethodMustBeImplemented",
"&&",
"problem",
".",
"getMessage",
"(",
")",
".",
"indexOf",
"(",
"readableName",
")",
"!=",
"-",
"1",
"&&",
"problem",
".",
"getSourceStart",
"(",
")",
">=",
"typeDeclarationSourceStart",
"&&",
"problem",
".",
"getSourceEnd",
"(",
")",
"<=",
"typeDeclarationSourceEnd",
")",
"{",
"addMissingAbstractProblemMethod",
"(",
"methodDeclaration",
",",
"methodBinding",
",",
"problem",
",",
"compilationResult",
")",
";",
"}",
"}",
"}",
"}",
"}",
"private",
"void",
"generateMissingTypesAttribute",
"(",
")",
"{",
"int",
"initialSize",
"=",
"this",
".",
"missingTypes",
".",
"size",
"(",
")",
";",
"int",
"[",
"]",
"missingTypesIndexes",
"=",
"new",
"int",
"[",
"initialSize",
"]",
";",
"int",
"numberOfMissingTypes",
"=",
"0",
";",
"if",
"(",
"initialSize",
">",
"1",
")",
"{",
"Collections",
".",
"sort",
"(",
"this",
".",
"missingTypes",
",",
"new",
"Comparator",
"(",
")",
"{",
"public",
"int",
"compare",
"(",
"Object",
"o1",
",",
"Object",
"o2",
")",
"{",
"TypeBinding",
"typeBinding1",
"=",
"(",
"TypeBinding",
")",
"o1",
";",
"TypeBinding",
"typeBinding2",
"=",
"(",
"TypeBinding",
")",
"o2",
";",
"return",
"CharOperation",
".",
"compareTo",
"(",
"typeBinding1",
".",
"constantPoolName",
"(",
")",
",",
"typeBinding2",
".",
"constantPoolName",
"(",
")",
")",
";",
"}",
"}",
")",
";",
"}",
"int",
"previousIndex",
"=",
"0",
";",
"next",
":",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"initialSize",
";",
"i",
"++",
")",
"{",
"int",
"missingTypeIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"(",
"TypeBinding",
")",
"this",
".",
"missingTypes",
".",
"get",
"(",
"i",
")",
")",
";",
"if",
"(",
"previousIndex",
"==",
"missingTypeIndex",
")",
"{",
"continue",
"next",
";",
"}",
"previousIndex",
"=",
"missingTypeIndex",
";",
"missingTypesIndexes",
"[",
"numberOfMissingTypes",
"++",
"]",
"=",
"missingTypeIndex",
";",
"}",
"int",
"attributeLength",
"=",
"numberOfMissingTypes",
"*",
"2",
"+",
"2",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"attributeLength",
"+",
"6",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"attributeLength",
"+",
"6",
")",
";",
"}",
"int",
"missingTypesNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"MissingTypesName",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"missingTypesNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"missingTypesNameIndex",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"attributeLength",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"numberOfMissingTypes",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"numberOfMissingTypes",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfMissingTypes",
";",
"i",
"++",
")",
"{",
"int",
"missingTypeIndex",
"=",
"missingTypesIndexes",
"[",
"i",
"]",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"missingTypeIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"missingTypeIndex",
";",
"}",
"}",
"private",
"int",
"generateRuntimeAnnotations",
"(",
"final",
"Annotation",
"[",
"]",
"annotations",
")",
"{",
"int",
"attributesNumber",
"=",
"0",
";",
"final",
"int",
"length",
"=",
"annotations",
".",
"length",
";",
"int",
"visibleAnnotationsCounter",
"=",
"0",
";",
"int",
"invisibleAnnotationsCounter",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"Annotation",
"annotation",
"=",
"annotations",
"[",
"i",
"]",
";",
"if",
"(",
"annotation",
".",
"isRuntimeInvisible",
"(",
")",
")",
"{",
"invisibleAnnotationsCounter",
"++",
";",
"}",
"else",
"if",
"(",
"annotation",
".",
"isRuntimeVisible",
"(",
")",
")",
"{",
"visibleAnnotationsCounter",
"++",
";",
"}",
"}",
"int",
"annotationAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"int",
"constantPOffset",
"=",
"this",
".",
"constantPool",
".",
"currentOffset",
";",
"int",
"constantPoolIndex",
"=",
"this",
".",
"constantPool",
".",
"currentIndex",
";",
"if",
"(",
"invisibleAnnotationsCounter",
"!=",
"0",
")",
"{",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"10",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"10",
")",
";",
"}",
"int",
"runtimeInvisibleAnnotationsAttributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"RuntimeInvisibleAnnotationsName",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"runtimeInvisibleAnnotationsAttributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"runtimeInvisibleAnnotationsAttributeNameIndex",
";",
"int",
"attributeLengthOffset",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"4",
";",
"int",
"annotationsLengthOffset",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"2",
";",
"int",
"counter",
"=",
"0",
";",
"loop",
":",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"invisibleAnnotationsCounter",
"==",
"0",
")",
"break",
"loop",
";",
"Annotation",
"annotation",
"=",
"annotations",
"[",
"i",
"]",
";",
"if",
"(",
"annotation",
".",
"isRuntimeInvisible",
"(",
")",
")",
"{",
"int",
"currentAnnotationOffset",
"=",
"this",
".",
"contentsOffset",
";",
"generateAnnotation",
"(",
"annotation",
",",
"currentAnnotationOffset",
")",
";",
"invisibleAnnotationsCounter",
"--",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"!=",
"currentAnnotationOffset",
")",
"{",
"counter",
"++",
";",
"}",
"}",
"}",
"if",
"(",
"counter",
"!=",
"0",
")",
"{",
"this",
".",
"contents",
"[",
"annotationsLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"counter",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"annotationsLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"counter",
";",
"int",
"attributeLength",
"=",
"this",
".",
"contentsOffset",
"-",
"attributeLengthOffset",
"-",
"4",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"attributeLength",
";",
"attributesNumber",
"++",
";",
"}",
"else",
"{",
"this",
".",
"contentsOffset",
"=",
"annotationAttributeOffset",
";",
"this",
".",
"constantPool",
".",
"resetForAttributeName",
"(",
"AttributeNamesConstants",
".",
"RuntimeInvisibleAnnotationsName",
",",
"constantPoolIndex",
",",
"constantPOffset",
")",
";",
"}",
"}",
"annotationAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"constantPOffset",
"=",
"this",
".",
"constantPool",
".",
"currentOffset",
";",
"constantPoolIndex",
"=",
"this",
".",
"constantPool",
".",
"currentIndex",
";",
"if",
"(",
"visibleAnnotationsCounter",
"!=",
"0",
")",
"{",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"10",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"10",
")",
";",
"}",
"int",
"runtimeVisibleAnnotationsAttributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"RuntimeVisibleAnnotationsName",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"runtimeVisibleAnnotationsAttributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"runtimeVisibleAnnotationsAttributeNameIndex",
";",
"int",
"attributeLengthOffset",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"4",
";",
"int",
"annotationsLengthOffset",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"2",
";",
"int",
"counter",
"=",
"0",
";",
"loop",
":",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"visibleAnnotationsCounter",
"==",
"0",
")",
"break",
"loop",
";",
"Annotation",
"annotation",
"=",
"annotations",
"[",
"i",
"]",
";",
"if",
"(",
"annotation",
".",
"isRuntimeVisible",
"(",
")",
")",
"{",
"visibleAnnotationsCounter",
"--",
";",
"int",
"currentAnnotationOffset",
"=",
"this",
".",
"contentsOffset",
";",
"generateAnnotation",
"(",
"annotation",
",",
"currentAnnotationOffset",
")",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"!=",
"currentAnnotationOffset",
")",
"{",
"counter",
"++",
";",
"}",
"}",
"}",
"if",
"(",
"counter",
"!=",
"0",
")",
"{",
"this",
".",
"contents",
"[",
"annotationsLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"counter",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"annotationsLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"counter",
";",
"int",
"attributeLength",
"=",
"this",
".",
"contentsOffset",
"-",
"attributeLengthOffset",
"-",
"4",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"attributeLength",
";",
"attributesNumber",
"++",
";",
"}",
"else",
"{",
"this",
".",
"contentsOffset",
"=",
"annotationAttributeOffset",
";",
"this",
".",
"constantPool",
".",
"resetForAttributeName",
"(",
"AttributeNamesConstants",
".",
"RuntimeVisibleAnnotationsName",
",",
"constantPoolIndex",
",",
"constantPOffset",
")",
";",
"}",
"}",
"return",
"attributesNumber",
";",
"}",
"private",
"int",
"generateRuntimeAnnotationsForParameters",
"(",
"Argument",
"[",
"]",
"arguments",
")",
"{",
"final",
"int",
"argumentsLength",
"=",
"arguments",
".",
"length",
";",
"final",
"int",
"VISIBLE_INDEX",
"=",
"0",
";",
"final",
"int",
"INVISIBLE_INDEX",
"=",
"1",
";",
"int",
"invisibleParametersAnnotationsCounter",
"=",
"0",
";",
"int",
"visibleParametersAnnotationsCounter",
"=",
"0",
";",
"int",
"[",
"]",
"[",
"]",
"annotationsCounters",
"=",
"new",
"int",
"[",
"argumentsLength",
"]",
"[",
"2",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"argumentsLength",
";",
"i",
"++",
")",
"{",
"Argument",
"argument",
"=",
"arguments",
"[",
"i",
"]",
";",
"Annotation",
"[",
"]",
"annotations",
"=",
"argument",
".",
"annotations",
";",
"if",
"(",
"annotations",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"max2",
"=",
"annotations",
".",
"length",
";",
"j",
"<",
"max2",
";",
"j",
"++",
")",
"{",
"Annotation",
"annotation",
"=",
"annotations",
"[",
"j",
"]",
";",
"if",
"(",
"annotation",
".",
"isRuntimeInvisible",
"(",
")",
")",
"{",
"annotationsCounters",
"[",
"i",
"]",
"[",
"INVISIBLE_INDEX",
"]",
"++",
";",
"invisibleParametersAnnotationsCounter",
"++",
";",
"}",
"else",
"if",
"(",
"annotation",
".",
"isRuntimeVisible",
"(",
")",
")",
"{",
"annotationsCounters",
"[",
"i",
"]",
"[",
"VISIBLE_INDEX",
"]",
"++",
";",
"visibleParametersAnnotationsCounter",
"++",
";",
"}",
"}",
"}",
"}",
"int",
"attributesNumber",
"=",
"0",
";",
"int",
"annotationAttributeOffset",
"=",
"this",
".",
"contentsOffset",
";",
"if",
"(",
"invisibleParametersAnnotationsCounter",
"!=",
"0",
")",
"{",
"int",
"globalCounter",
"=",
"0",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"7",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"7",
")",
";",
"}",
"int",
"attributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"RuntimeInvisibleParameterAnnotationsName",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"attributeNameIndex",
";",
"int",
"attributeLengthOffset",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"4",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"argumentsLength",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"argumentsLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"if",
"(",
"invisibleParametersAnnotationsCounter",
"==",
"0",
")",
"{",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"0",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"0",
";",
"}",
"else",
"{",
"final",
"int",
"numberOfInvisibleAnnotations",
"=",
"annotationsCounters",
"[",
"i",
"]",
"[",
"INVISIBLE_INDEX",
"]",
";",
"int",
"invisibleAnnotationsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"2",
";",
"int",
"counter",
"=",
"0",
";",
"if",
"(",
"numberOfInvisibleAnnotations",
"!=",
"0",
")",
"{",
"Argument",
"argument",
"=",
"arguments",
"[",
"i",
"]",
";",
"Annotation",
"[",
"]",
"annotations",
"=",
"argument",
".",
"annotations",
";",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"max",
"=",
"annotations",
".",
"length",
";",
"j",
"<",
"max",
";",
"j",
"++",
")",
"{",
"Annotation",
"annotation",
"=",
"annotations",
"[",
"j",
"]",
";",
"if",
"(",
"annotation",
".",
"isRuntimeInvisible",
"(",
")",
")",
"{",
"int",
"currentAnnotationOffset",
"=",
"this",
".",
"contentsOffset",
";",
"generateAnnotation",
"(",
"annotation",
",",
"currentAnnotationOffset",
")",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"!=",
"currentAnnotationOffset",
")",
"{",
"counter",
"++",
";",
"globalCounter",
"++",
";",
"}",
"invisibleParametersAnnotationsCounter",
"--",
";",
"}",
"}",
"}",
"this",
".",
"contents",
"[",
"invisibleAnnotationsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"counter",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"invisibleAnnotationsOffset",
"]",
"=",
"(",
"byte",
")",
"counter",
";",
"}",
"}",
"if",
"(",
"globalCounter",
"!=",
"0",
")",
"{",
"int",
"attributeLength",
"=",
"this",
".",
"contentsOffset",
"-",
"attributeLengthOffset",
"-",
"4",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"attributeLength",
";",
"attributesNumber",
"++",
";",
"}",
"else",
"{",
"this",
".",
"contentsOffset",
"=",
"annotationAttributeOffset",
";",
"}",
"}",
"if",
"(",
"visibleParametersAnnotationsCounter",
"!=",
"0",
")",
"{",
"int",
"globalCounter",
"=",
"0",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"7",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"7",
")",
";",
"}",
"int",
"attributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"RuntimeVisibleParameterAnnotationsName",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"attributeNameIndex",
";",
"int",
"attributeLengthOffset",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"4",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"argumentsLength",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"argumentsLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"contentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"if",
"(",
"visibleParametersAnnotationsCounter",
"==",
"0",
")",
"{",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"0",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"0",
";",
"}",
"else",
"{",
"final",
"int",
"numberOfVisibleAnnotations",
"=",
"annotationsCounters",
"[",
"i",
"]",
"[",
"VISIBLE_INDEX",
"]",
";",
"int",
"visibleAnnotationsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"2",
";",
"int",
"counter",
"=",
"0",
";",
"if",
"(",
"numberOfVisibleAnnotations",
"!=",
"0",
")",
"{",
"Argument",
"argument",
"=",
"arguments",
"[",
"i",
"]",
";",
"Annotation",
"[",
"]",
"annotations",
"=",
"argument",
".",
"annotations",
";",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"max",
"=",
"annotations",
".",
"length",
";",
"j",
"<",
"max",
";",
"j",
"++",
")",
"{",
"Annotation",
"annotation",
"=",
"annotations",
"[",
"j",
"]",
";",
"if",
"(",
"annotation",
".",
"isRuntimeVisible",
"(",
")",
")",
"{",
"int",
"currentAnnotationOffset",
"=",
"this",
".",
"contentsOffset",
";",
"generateAnnotation",
"(",
"annotation",
",",
"currentAnnotationOffset",
")",
";",
"if",
"(",
"this",
".",
"contentsOffset",
"!=",
"currentAnnotationOffset",
")",
"{",
"counter",
"++",
";",
"globalCounter",
"++",
";",
"}",
"visibleParametersAnnotationsCounter",
"--",
";",
"}",
"}",
"}",
"this",
".",
"contents",
"[",
"visibleAnnotationsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"counter",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"visibleAnnotationsOffset",
"]",
"=",
"(",
"byte",
")",
"counter",
";",
"}",
"}",
"if",
"(",
"globalCounter",
"!=",
"0",
")",
"{",
"int",
"attributeLength",
"=",
"this",
".",
"contentsOffset",
"-",
"attributeLengthOffset",
"-",
"4",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"attributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"attributeLength",
";",
"attributesNumber",
"++",
";",
"}",
"else",
"{",
"this",
".",
"contentsOffset",
"=",
"annotationAttributeOffset",
";",
"}",
"}",
"return",
"attributesNumber",
";",
"}",
"private",
"int",
"generateSignatureAttribute",
"(",
"char",
"[",
"]",
"genericSignature",
")",
"{",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"if",
"(",
"localContentsOffset",
"+",
"8",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"8",
")",
";",
"}",
"int",
"signatureAttributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"SignatureName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"signatureAttributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"signatureAttributeNameIndex",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"2",
";",
"int",
"signatureIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"genericSignature",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"signatureIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"signatureIndex",
";",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"1",
";",
"}",
"private",
"int",
"generateSourceAttribute",
"(",
"String",
"fullFileName",
")",
"{",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"if",
"(",
"localContentsOffset",
"+",
"8",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"8",
")",
";",
"}",
"int",
"sourceAttributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"SourceName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"sourceAttributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"sourceAttributeNameIndex",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"2",
";",
"int",
"fileNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"fullFileName",
".",
"toCharArray",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"fileNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"fileNameIndex",
";",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"1",
";",
"}",
"private",
"int",
"generateStackMapAttribute",
"(",
"MethodBinding",
"methodBinding",
",",
"int",
"code_length",
",",
"int",
"codeAttributeOffset",
",",
"int",
"max_locals",
",",
"boolean",
"isClinit",
")",
"{",
"int",
"attributesNumber",
"=",
"0",
";",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"StackMapFrameCodeStream",
"stackMapFrameCodeStream",
"=",
"(",
"StackMapFrameCodeStream",
")",
"this",
".",
"codeStream",
";",
"stackMapFrameCodeStream",
".",
"removeFramePosition",
"(",
"code_length",
")",
";",
"if",
"(",
"stackMapFrameCodeStream",
".",
"hasFramePositions",
"(",
")",
")",
"{",
"ArrayList",
"frames",
"=",
"new",
"ArrayList",
"(",
")",
";",
"traverse",
"(",
"isClinit",
"?",
"null",
":",
"methodBinding",
",",
"max_locals",
",",
"this",
".",
"contents",
",",
"codeAttributeOffset",
"+",
"14",
",",
"code_length",
",",
"frames",
",",
"isClinit",
")",
";",
"int",
"numberOfFrames",
"=",
"frames",
".",
"size",
"(",
")",
";",
"if",
"(",
"numberOfFrames",
">",
"1",
")",
"{",
"int",
"stackMapTableAttributeOffset",
"=",
"localContentsOffset",
";",
"if",
"(",
"localContentsOffset",
"+",
"8",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"8",
")",
";",
"}",
"int",
"stackMapAttributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"StackMapName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"stackMapAttributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"stackMapAttributeNameIndex",
";",
"int",
"stackMapAttributeLengthOffset",
"=",
"localContentsOffset",
";",
"localContentsOffset",
"+=",
"4",
";",
"if",
"(",
"localContentsOffset",
"+",
"4",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"4",
")",
";",
"}",
"int",
"numberOfFramesOffset",
"=",
"localContentsOffset",
";",
"localContentsOffset",
"+=",
"2",
";",
"if",
"(",
"localContentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"StackMapFrame",
"currentFrame",
"=",
"(",
"StackMapFrame",
")",
"frames",
".",
"get",
"(",
"0",
")",
";",
"for",
"(",
"int",
"j",
"=",
"1",
";",
"j",
"<",
"numberOfFrames",
";",
"j",
"++",
")",
"{",
"currentFrame",
"=",
"(",
"StackMapFrame",
")",
"frames",
".",
"get",
"(",
"j",
")",
";",
"int",
"frameOffset",
"=",
"currentFrame",
".",
"pc",
";",
"if",
"(",
"localContentsOffset",
"+",
"5",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"5",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"frameOffset",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"frameOffset",
";",
"int",
"numberOfLocalOffset",
"=",
"localContentsOffset",
";",
"localContentsOffset",
"+=",
"2",
";",
"int",
"numberOfLocalEntries",
"=",
"0",
";",
"int",
"numberOfLocals",
"=",
"currentFrame",
".",
"getNumberOfLocals",
"(",
")",
";",
"int",
"numberOfEntries",
"=",
"0",
";",
"int",
"localsLength",
"=",
"currentFrame",
".",
"locals",
"==",
"null",
"?",
"0",
":",
"currentFrame",
".",
"locals",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"localsLength",
"&&",
"numberOfLocalEntries",
"<",
"numberOfLocals",
";",
"i",
"++",
")",
"{",
"if",
"(",
"localContentsOffset",
"+",
"3",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"3",
")",
";",
"}",
"VerificationTypeInfo",
"info",
"=",
"currentFrame",
".",
"locals",
"[",
"i",
"]",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_TOP",
";",
"}",
"else",
"{",
"switch",
"(",
"info",
".",
"id",
"(",
")",
")",
"{",
"case",
"T_boolean",
":",
"case",
"T_byte",
":",
"case",
"T_char",
":",
"case",
"T_int",
":",
"case",
"T_short",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_INTEGER",
";",
"break",
";",
"case",
"T_float",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_FLOAT",
";",
"break",
";",
"case",
"T_long",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_LONG",
";",
"i",
"++",
";",
"break",
";",
"case",
"T_double",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_DOUBLE",
";",
"i",
"++",
";",
"break",
";",
"case",
"T_null",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_NULL",
";",
"break",
";",
"default",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"info",
".",
"tag",
";",
"switch",
"(",
"info",
".",
"tag",
")",
"{",
"case",
"VerificationTypeInfo",
".",
"ITEM_UNINITIALIZED",
":",
"int",
"offset",
"=",
"info",
".",
"offset",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offset",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offset",
";",
"break",
";",
"case",
"VerificationTypeInfo",
".",
"ITEM_OBJECT",
":",
"int",
"indexForType",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"info",
".",
"constantPoolName",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"indexForType",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"indexForType",
";",
"}",
"}",
"numberOfLocalEntries",
"++",
";",
"}",
"numberOfEntries",
"++",
";",
"}",
"if",
"(",
"localContentsOffset",
"+",
"4",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"4",
")",
";",
"}",
"this",
".",
"contents",
"[",
"numberOfLocalOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"numberOfEntries",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"numberOfLocalOffset",
"]",
"=",
"(",
"byte",
")",
"numberOfEntries",
";",
"int",
"numberOfStackItems",
"=",
"currentFrame",
".",
"numberOfStackItems",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"numberOfStackItems",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"numberOfStackItems",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfStackItems",
";",
"i",
"++",
")",
"{",
"if",
"(",
"localContentsOffset",
"+",
"3",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"3",
")",
";",
"}",
"VerificationTypeInfo",
"info",
"=",
"currentFrame",
".",
"stackItems",
"[",
"i",
"]",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_TOP",
";",
"}",
"else",
"{",
"switch",
"(",
"info",
".",
"id",
"(",
")",
")",
"{",
"case",
"T_boolean",
":",
"case",
"T_byte",
":",
"case",
"T_char",
":",
"case",
"T_int",
":",
"case",
"T_short",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_INTEGER",
";",
"break",
";",
"case",
"T_float",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_FLOAT",
";",
"break",
";",
"case",
"T_long",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_LONG",
";",
"break",
";",
"case",
"T_double",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_DOUBLE",
";",
"break",
";",
"case",
"T_null",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_NULL",
";",
"break",
";",
"default",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"info",
".",
"tag",
";",
"switch",
"(",
"info",
".",
"tag",
")",
"{",
"case",
"VerificationTypeInfo",
".",
"ITEM_UNINITIALIZED",
":",
"int",
"offset",
"=",
"info",
".",
"offset",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offset",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offset",
";",
"break",
";",
"case",
"VerificationTypeInfo",
".",
"ITEM_OBJECT",
":",
"int",
"indexForType",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"info",
".",
"constantPoolName",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"indexForType",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"indexForType",
";",
"}",
"}",
"}",
"}",
"}",
"numberOfFrames",
"--",
";",
"if",
"(",
"numberOfFrames",
"!=",
"0",
")",
"{",
"this",
".",
"contents",
"[",
"numberOfFramesOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"numberOfFrames",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"numberOfFramesOffset",
"]",
"=",
"(",
"byte",
")",
"numberOfFrames",
";",
"int",
"attributeLength",
"=",
"localContentsOffset",
"-",
"stackMapAttributeLengthOffset",
"-",
"4",
";",
"this",
".",
"contents",
"[",
"stackMapAttributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"stackMapAttributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"stackMapAttributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"stackMapAttributeLengthOffset",
"]",
"=",
"(",
"byte",
")",
"attributeLength",
";",
"attributesNumber",
"++",
";",
"}",
"else",
"{",
"localContentsOffset",
"=",
"stackMapTableAttributeOffset",
";",
"}",
"}",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"attributesNumber",
";",
"}",
"private",
"int",
"generateStackMapTableAttribute",
"(",
"MethodBinding",
"methodBinding",
",",
"int",
"code_length",
",",
"int",
"codeAttributeOffset",
",",
"int",
"max_locals",
",",
"boolean",
"isClinit",
")",
"{",
"int",
"attributesNumber",
"=",
"0",
";",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"StackMapFrameCodeStream",
"stackMapFrameCodeStream",
"=",
"(",
"StackMapFrameCodeStream",
")",
"this",
".",
"codeStream",
";",
"stackMapFrameCodeStream",
".",
"removeFramePosition",
"(",
"code_length",
")",
";",
"if",
"(",
"stackMapFrameCodeStream",
".",
"hasFramePositions",
"(",
")",
")",
"{",
"ArrayList",
"frames",
"=",
"new",
"ArrayList",
"(",
")",
";",
"traverse",
"(",
"isClinit",
"?",
"null",
":",
"methodBinding",
",",
"max_locals",
",",
"this",
".",
"contents",
",",
"codeAttributeOffset",
"+",
"14",
",",
"code_length",
",",
"frames",
",",
"isClinit",
")",
";",
"int",
"numberOfFrames",
"=",
"frames",
".",
"size",
"(",
")",
";",
"if",
"(",
"numberOfFrames",
">",
"1",
")",
"{",
"int",
"stackMapTableAttributeOffset",
"=",
"localContentsOffset",
";",
"if",
"(",
"localContentsOffset",
"+",
"8",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"8",
")",
";",
"}",
"int",
"stackMapTableAttributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"StackMapTableName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"stackMapTableAttributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"stackMapTableAttributeNameIndex",
";",
"int",
"stackMapTableAttributeLengthOffset",
"=",
"localContentsOffset",
";",
"localContentsOffset",
"+=",
"4",
";",
"if",
"(",
"localContentsOffset",
"+",
"4",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"4",
")",
";",
"}",
"int",
"numberOfFramesOffset",
"=",
"localContentsOffset",
";",
"localContentsOffset",
"+=",
"2",
";",
"if",
"(",
"localContentsOffset",
"+",
"2",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"2",
")",
";",
"}",
"StackMapFrame",
"currentFrame",
"=",
"(",
"StackMapFrame",
")",
"frames",
".",
"get",
"(",
"0",
")",
";",
"StackMapFrame",
"prevFrame",
"=",
"null",
";",
"for",
"(",
"int",
"j",
"=",
"1",
";",
"j",
"<",
"numberOfFrames",
";",
"j",
"++",
")",
"{",
"prevFrame",
"=",
"currentFrame",
";",
"currentFrame",
"=",
"(",
"StackMapFrame",
")",
"frames",
".",
"get",
"(",
"j",
")",
";",
"int",
"offsetDelta",
"=",
"currentFrame",
".",
"getOffsetDelta",
"(",
"prevFrame",
")",
";",
"switch",
"(",
"currentFrame",
".",
"getFrameType",
"(",
"prevFrame",
")",
")",
"{",
"case",
"StackMapFrame",
".",
"APPEND_FRAME",
":",
"if",
"(",
"localContentsOffset",
"+",
"3",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"3",
")",
";",
"}",
"int",
"numberOfDifferentLocals",
"=",
"currentFrame",
".",
"numberOfDifferentLocals",
"(",
"prevFrame",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"251",
"+",
"numberOfDifferentLocals",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offsetDelta",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offsetDelta",
";",
"int",
"index",
"=",
"currentFrame",
".",
"getIndexOfDifferentLocals",
"(",
"numberOfDifferentLocals",
")",
";",
"int",
"numberOfLocals",
"=",
"currentFrame",
".",
"getNumberOfLocals",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"index",
";",
"i",
"<",
"currentFrame",
".",
"locals",
".",
"length",
"&&",
"numberOfDifferentLocals",
">",
"0",
";",
"i",
"++",
")",
"{",
"if",
"(",
"localContentsOffset",
"+",
"6",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"6",
")",
";",
"}",
"VerificationTypeInfo",
"info",
"=",
"currentFrame",
".",
"locals",
"[",
"i",
"]",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_TOP",
";",
"}",
"else",
"{",
"switch",
"(",
"info",
".",
"id",
"(",
")",
")",
"{",
"case",
"T_boolean",
":",
"case",
"T_byte",
":",
"case",
"T_char",
":",
"case",
"T_int",
":",
"case",
"T_short",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_INTEGER",
";",
"break",
";",
"case",
"T_float",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_FLOAT",
";",
"break",
";",
"case",
"T_long",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_LONG",
";",
"i",
"++",
";",
"break",
";",
"case",
"T_double",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_DOUBLE",
";",
"i",
"++",
";",
"break",
";",
"case",
"T_null",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_NULL",
";",
"break",
";",
"default",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"info",
".",
"tag",
";",
"switch",
"(",
"info",
".",
"tag",
")",
"{",
"case",
"VerificationTypeInfo",
".",
"ITEM_UNINITIALIZED",
":",
"int",
"offset",
"=",
"info",
".",
"offset",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offset",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offset",
";",
"break",
";",
"case",
"VerificationTypeInfo",
".",
"ITEM_OBJECT",
":",
"int",
"indexForType",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"info",
".",
"constantPoolName",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"indexForType",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"indexForType",
";",
"}",
"}",
"numberOfDifferentLocals",
"--",
";",
"}",
"}",
"break",
";",
"case",
"StackMapFrame",
".",
"SAME_FRAME",
":",
"if",
"(",
"localContentsOffset",
"+",
"1",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"1",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offsetDelta",
";",
"break",
";",
"case",
"StackMapFrame",
".",
"SAME_FRAME_EXTENDED",
":",
"if",
"(",
"localContentsOffset",
"+",
"3",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"3",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"251",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offsetDelta",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offsetDelta",
";",
"break",
";",
"case",
"StackMapFrame",
".",
"CHOP_FRAME",
":",
"if",
"(",
"localContentsOffset",
"+",
"3",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"3",
")",
";",
"}",
"numberOfDifferentLocals",
"=",
"-",
"currentFrame",
".",
"numberOfDifferentLocals",
"(",
"prevFrame",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"251",
"-",
"numberOfDifferentLocals",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offsetDelta",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offsetDelta",
";",
"break",
";",
"case",
"StackMapFrame",
".",
"SAME_LOCALS_1_STACK_ITEMS",
":",
"if",
"(",
"localContentsOffset",
"+",
"4",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"4",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offsetDelta",
"+",
"64",
")",
";",
"if",
"(",
"currentFrame",
".",
"stackItems",
"[",
"0",
"]",
"==",
"null",
")",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_TOP",
";",
"}",
"else",
"{",
"switch",
"(",
"currentFrame",
".",
"stackItems",
"[",
"0",
"]",
".",
"id",
"(",
")",
")",
"{",
"case",
"T_boolean",
":",
"case",
"T_byte",
":",
"case",
"T_char",
":",
"case",
"T_int",
":",
"case",
"T_short",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_INTEGER",
";",
"break",
";",
"case",
"T_float",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_FLOAT",
";",
"break",
";",
"case",
"T_long",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_LONG",
";",
"break",
";",
"case",
"T_double",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_DOUBLE",
";",
"break",
";",
"case",
"T_null",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_NULL",
";",
"break",
";",
"default",
":",
"VerificationTypeInfo",
"info",
"=",
"currentFrame",
".",
"stackItems",
"[",
"0",
"]",
";",
"byte",
"tag",
"=",
"(",
"byte",
")",
"info",
".",
"tag",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"tag",
";",
"switch",
"(",
"tag",
")",
"{",
"case",
"VerificationTypeInfo",
".",
"ITEM_UNINITIALIZED",
":",
"int",
"offset",
"=",
"info",
".",
"offset",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offset",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offset",
";",
"break",
";",
"case",
"VerificationTypeInfo",
".",
"ITEM_OBJECT",
":",
"int",
"indexForType",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"info",
".",
"constantPoolName",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"indexForType",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"indexForType",
";",
"}",
"}",
"}",
"break",
";",
"case",
"StackMapFrame",
".",
"SAME_LOCALS_1_STACK_ITEMS_EXTENDED",
":",
"if",
"(",
"localContentsOffset",
"+",
"6",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"6",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"247",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offsetDelta",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offsetDelta",
";",
"if",
"(",
"currentFrame",
".",
"stackItems",
"[",
"0",
"]",
"==",
"null",
")",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_TOP",
";",
"}",
"else",
"{",
"switch",
"(",
"currentFrame",
".",
"stackItems",
"[",
"0",
"]",
".",
"id",
"(",
")",
")",
"{",
"case",
"T_boolean",
":",
"case",
"T_byte",
":",
"case",
"T_char",
":",
"case",
"T_int",
":",
"case",
"T_short",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_INTEGER",
";",
"break",
";",
"case",
"T_float",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_FLOAT",
";",
"break",
";",
"case",
"T_long",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_LONG",
";",
"break",
";",
"case",
"T_double",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_DOUBLE",
";",
"break",
";",
"case",
"T_null",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_NULL",
";",
"break",
";",
"default",
":",
"VerificationTypeInfo",
"info",
"=",
"currentFrame",
".",
"stackItems",
"[",
"0",
"]",
";",
"byte",
"tag",
"=",
"(",
"byte",
")",
"info",
".",
"tag",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"tag",
";",
"switch",
"(",
"tag",
")",
"{",
"case",
"VerificationTypeInfo",
".",
"ITEM_UNINITIALIZED",
":",
"int",
"offset",
"=",
"info",
".",
"offset",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offset",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offset",
";",
"break",
";",
"case",
"VerificationTypeInfo",
".",
"ITEM_OBJECT",
":",
"int",
"indexForType",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"info",
".",
"constantPoolName",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"indexForType",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"indexForType",
";",
"}",
"}",
"}",
"break",
";",
"default",
":",
"if",
"(",
"localContentsOffset",
"+",
"5",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"5",
")",
";",
"}",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"255",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offsetDelta",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offsetDelta",
";",
"int",
"numberOfLocalOffset",
"=",
"localContentsOffset",
";",
"localContentsOffset",
"+=",
"2",
";",
"int",
"numberOfLocalEntries",
"=",
"0",
";",
"numberOfLocals",
"=",
"currentFrame",
".",
"getNumberOfLocals",
"(",
")",
";",
"int",
"numberOfEntries",
"=",
"0",
";",
"int",
"localsLength",
"=",
"currentFrame",
".",
"locals",
"==",
"null",
"?",
"0",
":",
"currentFrame",
".",
"locals",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"localsLength",
"&&",
"numberOfLocalEntries",
"<",
"numberOfLocals",
";",
"i",
"++",
")",
"{",
"if",
"(",
"localContentsOffset",
"+",
"3",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"3",
")",
";",
"}",
"VerificationTypeInfo",
"info",
"=",
"currentFrame",
".",
"locals",
"[",
"i",
"]",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_TOP",
";",
"}",
"else",
"{",
"switch",
"(",
"info",
".",
"id",
"(",
")",
")",
"{",
"case",
"T_boolean",
":",
"case",
"T_byte",
":",
"case",
"T_char",
":",
"case",
"T_int",
":",
"case",
"T_short",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_INTEGER",
";",
"break",
";",
"case",
"T_float",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_FLOAT",
";",
"break",
";",
"case",
"T_long",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_LONG",
";",
"i",
"++",
";",
"break",
";",
"case",
"T_double",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_DOUBLE",
";",
"i",
"++",
";",
"break",
";",
"case",
"T_null",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_NULL",
";",
"break",
";",
"default",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"info",
".",
"tag",
";",
"switch",
"(",
"info",
".",
"tag",
")",
"{",
"case",
"VerificationTypeInfo",
".",
"ITEM_UNINITIALIZED",
":",
"int",
"offset",
"=",
"info",
".",
"offset",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offset",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offset",
";",
"break",
";",
"case",
"VerificationTypeInfo",
".",
"ITEM_OBJECT",
":",
"int",
"indexForType",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"info",
".",
"constantPoolName",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"indexForType",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"indexForType",
";",
"}",
"}",
"numberOfLocalEntries",
"++",
";",
"}",
"numberOfEntries",
"++",
";",
"}",
"if",
"(",
"localContentsOffset",
"+",
"4",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"4",
")",
";",
"}",
"this",
".",
"contents",
"[",
"numberOfLocalOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"numberOfEntries",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"numberOfLocalOffset",
"]",
"=",
"(",
"byte",
")",
"numberOfEntries",
";",
"int",
"numberOfStackItems",
"=",
"currentFrame",
".",
"numberOfStackItems",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"numberOfStackItems",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"numberOfStackItems",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfStackItems",
";",
"i",
"++",
")",
"{",
"if",
"(",
"localContentsOffset",
"+",
"3",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"3",
")",
";",
"}",
"VerificationTypeInfo",
"info",
"=",
"currentFrame",
".",
"stackItems",
"[",
"i",
"]",
";",
"if",
"(",
"info",
"==",
"null",
")",
"{",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_TOP",
";",
"}",
"else",
"{",
"switch",
"(",
"info",
".",
"id",
"(",
")",
")",
"{",
"case",
"T_boolean",
":",
"case",
"T_byte",
":",
"case",
"T_char",
":",
"case",
"T_int",
":",
"case",
"T_short",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_INTEGER",
";",
"break",
";",
"case",
"T_float",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_FLOAT",
";",
"break",
";",
"case",
"T_long",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_LONG",
";",
"break",
";",
"case",
"T_double",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_DOUBLE",
";",
"break",
";",
"case",
"T_null",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"VerificationTypeInfo",
".",
"ITEM_NULL",
";",
"break",
";",
"default",
":",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"info",
".",
"tag",
";",
"switch",
"(",
"info",
".",
"tag",
")",
"{",
"case",
"VerificationTypeInfo",
".",
"ITEM_UNINITIALIZED",
":",
"int",
"offset",
"=",
"info",
".",
"offset",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"offset",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"offset",
";",
"break",
";",
"case",
"VerificationTypeInfo",
".",
"ITEM_OBJECT",
":",
"int",
"indexForType",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"info",
".",
"constantPoolName",
"(",
")",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"indexForType",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"indexForType",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"numberOfFrames",
"--",
";",
"if",
"(",
"numberOfFrames",
"!=",
"0",
")",
"{",
"this",
".",
"contents",
"[",
"numberOfFramesOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"numberOfFrames",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"numberOfFramesOffset",
"]",
"=",
"(",
"byte",
")",
"numberOfFrames",
";",
"int",
"attributeLength",
"=",
"localContentsOffset",
"-",
"stackMapTableAttributeLengthOffset",
"-",
"4",
";",
"this",
".",
"contents",
"[",
"stackMapTableAttributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"24",
")",
";",
"this",
".",
"contents",
"[",
"stackMapTableAttributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"16",
")",
";",
"this",
".",
"contents",
"[",
"stackMapTableAttributeLengthOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"attributeLength",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"stackMapTableAttributeLengthOffset",
"]",
"=",
"(",
"byte",
")",
"attributeLength",
";",
"attributesNumber",
"++",
";",
"}",
"else",
"{",
"localContentsOffset",
"=",
"stackMapTableAttributeOffset",
";",
"}",
"}",
"}",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"attributesNumber",
";",
"}",
"private",
"int",
"generateSyntheticAttribute",
"(",
")",
"{",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"if",
"(",
"localContentsOffset",
"+",
"6",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"6",
")",
";",
"}",
"int",
"syntheticAttributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"SyntheticName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"syntheticAttributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"syntheticAttributeNameIndex",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"1",
";",
"}",
"private",
"int",
"generateVarargsAttribute",
"(",
")",
"{",
"int",
"localContentsOffset",
"=",
"this",
".",
"contentsOffset",
";",
"if",
"(",
"localContentsOffset",
"+",
"6",
">=",
"this",
".",
"contents",
".",
"length",
")",
"{",
"resizeContents",
"(",
"6",
")",
";",
"}",
"int",
"varargsAttributeNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndex",
"(",
"AttributeNamesConstants",
".",
"VarargsName",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"varargsAttributeNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"varargsAttributeNameIndex",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contents",
"[",
"localContentsOffset",
"++",
"]",
"=",
"0",
";",
"this",
".",
"contentsOffset",
"=",
"localContentsOffset",
";",
"return",
"1",
";",
"}",
"public",
"byte",
"[",
"]",
"getBytes",
"(",
")",
"{",
"if",
"(",
"this",
".",
"bytes",
"==",
"null",
")",
"{",
"this",
".",
"bytes",
"=",
"new",
"byte",
"[",
"this",
".",
"headerOffset",
"+",
"this",
".",
"contentsOffset",
"]",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"header",
",",
"0",
",",
"this",
".",
"bytes",
",",
"0",
",",
"this",
".",
"headerOffset",
")",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"contents",
",",
"0",
",",
"this",
".",
"bytes",
",",
"this",
".",
"headerOffset",
",",
"this",
".",
"contentsOffset",
")",
";",
"}",
"return",
"this",
".",
"bytes",
";",
"}",
"public",
"char",
"[",
"]",
"[",
"]",
"getCompoundName",
"(",
")",
"{",
"return",
"CharOperation",
".",
"splitOn",
"(",
"'/'",
",",
"fileName",
"(",
")",
")",
";",
"}",
"private",
"int",
"getParametersCount",
"(",
"char",
"[",
"]",
"methodSignature",
")",
"{",
"int",
"i",
"=",
"CharOperation",
".",
"indexOf",
"(",
"'('",
",",
"methodSignature",
")",
";",
"i",
"++",
";",
"char",
"currentCharacter",
"=",
"methodSignature",
"[",
"i",
"]",
";",
"if",
"(",
"currentCharacter",
"==",
"')'",
")",
"{",
"return",
"0",
";",
"}",
"int",
"result",
"=",
"0",
";",
"while",
"(",
"true",
")",
"{",
"currentCharacter",
"=",
"methodSignature",
"[",
"i",
"]",
";",
"if",
"(",
"currentCharacter",
"==",
"')'",
")",
"{",
"return",
"result",
";",
"}",
"switch",
"(",
"currentCharacter",
")",
"{",
"case",
"'['",
":",
"int",
"scanType",
"=",
"scanType",
"(",
"methodSignature",
",",
"i",
"+",
"1",
")",
";",
"result",
"++",
";",
"i",
"=",
"scanType",
"+",
"1",
";",
"break",
";",
"case",
"'L'",
":",
"scanType",
"=",
"CharOperation",
".",
"indexOf",
"(",
"';'",
",",
"methodSignature",
",",
"i",
"+",
"1",
")",
";",
"result",
"++",
";",
"i",
"=",
"scanType",
"+",
"1",
";",
"break",
";",
"case",
"'Z'",
":",
"case",
"'B'",
":",
"case",
"'C'",
":",
"case",
"'D'",
":",
"case",
"'F'",
":",
"case",
"'I'",
":",
"case",
"'J'",
":",
"case",
"'S'",
":",
"result",
"++",
";",
"i",
"++",
";",
"break",
";",
"default",
":",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"currentCharacter",
")",
";",
"}",
"}",
"}",
"private",
"char",
"[",
"]",
"getReturnType",
"(",
"char",
"[",
"]",
"methodSignature",
")",
"{",
"int",
"paren",
"=",
"CharOperation",
".",
"lastIndexOf",
"(",
"')'",
",",
"methodSignature",
")",
";",
"return",
"CharOperation",
".",
"subarray",
"(",
"methodSignature",
",",
"paren",
"+",
"1",
",",
"methodSignature",
".",
"length",
")",
";",
"}",
"private",
"final",
"int",
"i4At",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"relativeOffset",
",",
"int",
"structOffset",
")",
"{",
"int",
"position",
"=",
"relativeOffset",
"+",
"structOffset",
";",
"return",
"(",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"24",
")",
"+",
"(",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"16",
")",
"+",
"(",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"8",
")",
"+",
"(",
"reference",
"[",
"position",
"]",
"&",
"0xFF",
")",
";",
"}",
"protected",
"void",
"initByteArrays",
"(",
")",
"{",
"int",
"members",
"=",
"this",
".",
"referenceBinding",
".",
"methods",
"(",
")",
".",
"length",
"+",
"this",
".",
"referenceBinding",
".",
"fields",
"(",
")",
".",
"length",
";",
"this",
".",
"header",
"=",
"new",
"byte",
"[",
"INITIAL_HEADER_SIZE",
"]",
";",
"this",
".",
"contents",
"=",
"new",
"byte",
"[",
"members",
"<",
"15",
"?",
"INITIAL_CONTENTS_SIZE",
":",
"INITIAL_HEADER_SIZE",
"]",
";",
"}",
"public",
"void",
"initialize",
"(",
"SourceTypeBinding",
"aType",
",",
"ClassFile",
"parentClassFile",
",",
"boolean",
"createProblemType",
")",
"{",
"this",
".",
"header",
"[",
"this",
".",
"headerOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"0xCAFEBABEL",
">>",
"24",
")",
";",
"this",
".",
"header",
"[",
"this",
".",
"headerOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"0xCAFEBABEL",
">>",
"16",
")",
";",
"this",
".",
"header",
"[",
"this",
".",
"headerOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"0xCAFEBABEL",
">>",
"8",
")",
";",
"this",
".",
"header",
"[",
"this",
".",
"headerOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"0xCAFEBABEL",
">>",
"0",
")",
";",
"long",
"targetVersion",
"=",
"this",
".",
"targetJDK",
";",
"this",
".",
"header",
"[",
"this",
".",
"headerOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"targetVersion",
">>",
"8",
")",
";",
"this",
".",
"header",
"[",
"this",
".",
"headerOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"targetVersion",
">>",
"0",
")",
";",
"this",
".",
"header",
"[",
"this",
".",
"headerOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"targetVersion",
">>",
"24",
")",
";",
"this",
".",
"header",
"[",
"this",
".",
"headerOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"targetVersion",
">>",
"16",
")",
";",
"this",
".",
"constantPoolOffset",
"=",
"this",
".",
"headerOffset",
";",
"this",
".",
"headerOffset",
"+=",
"2",
";",
"this",
".",
"constantPool",
".",
"initialize",
"(",
"this",
")",
";",
"int",
"accessFlags",
"=",
"aType",
".",
"getAccessFlags",
"(",
")",
";",
"if",
"(",
"aType",
".",
"isPrivate",
"(",
")",
")",
"{",
"accessFlags",
"&=",
"~",
"ClassFileConstants",
".",
"AccPublic",
";",
"}",
"if",
"(",
"aType",
".",
"isProtected",
"(",
")",
")",
"{",
"accessFlags",
"|=",
"ClassFileConstants",
".",
"AccPublic",
";",
"}",
"accessFlags",
"&=",
"~",
"(",
"ClassFileConstants",
".",
"AccStrictfp",
"|",
"ClassFileConstants",
".",
"AccProtected",
"|",
"ClassFileConstants",
".",
"AccPrivate",
"|",
"ClassFileConstants",
".",
"AccStatic",
"|",
"ClassFileConstants",
".",
"AccSynchronized",
"|",
"ClassFileConstants",
".",
"AccNative",
")",
";",
"if",
"(",
"!",
"aType",
".",
"isInterface",
"(",
")",
")",
"{",
"accessFlags",
"|=",
"ClassFileConstants",
".",
"AccSuper",
";",
"}",
"if",
"(",
"aType",
".",
"isAnonymousType",
"(",
")",
")",
"{",
"accessFlags",
"&=",
"~",
"ClassFileConstants",
".",
"AccFinal",
";",
"}",
"int",
"finalAbstract",
"=",
"ClassFileConstants",
".",
"AccFinal",
"|",
"ClassFileConstants",
".",
"AccAbstract",
";",
"if",
"(",
"(",
"accessFlags",
"&",
"finalAbstract",
")",
"==",
"finalAbstract",
")",
"{",
"accessFlags",
"&=",
"~",
"finalAbstract",
";",
"}",
"this",
".",
"enclosingClassFile",
"=",
"parentClassFile",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"accessFlags",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"accessFlags",
";",
"int",
"classNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"aType",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"classNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"classNameIndex",
";",
"int",
"superclassNameIndex",
";",
"if",
"(",
"aType",
".",
"isInterface",
"(",
")",
")",
"{",
"superclassNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"ConstantPool",
".",
"JavaLangObjectConstantPoolName",
")",
";",
"}",
"else",
"{",
"if",
"(",
"aType",
".",
"superclass",
"!=",
"null",
")",
"{",
"if",
"(",
"(",
"aType",
".",
"superclass",
".",
"tagBits",
"&",
"TagBits",
".",
"HasMissingType",
")",
"!=",
"0",
")",
"{",
"superclassNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"ConstantPool",
".",
"JavaLangObjectConstantPoolName",
")",
";",
"}",
"else",
"{",
"superclassNameIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"aType",
".",
"superclass",
")",
";",
"}",
"}",
"else",
"{",
"superclassNameIndex",
"=",
"0",
";",
"}",
"}",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"superclassNameIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"superclassNameIndex",
";",
"ReferenceBinding",
"[",
"]",
"superInterfacesBinding",
"=",
"aType",
".",
"superInterfaces",
"(",
")",
";",
"int",
"interfacesCount",
"=",
"superInterfacesBinding",
".",
"length",
";",
"int",
"interfacesCountPosition",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"2",
";",
"int",
"interfaceCounter",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"interfacesCount",
";",
"i",
"++",
")",
"{",
"ReferenceBinding",
"binding",
"=",
"superInterfacesBinding",
"[",
"i",
"]",
";",
"if",
"(",
"(",
"binding",
".",
"tagBits",
"&",
"TagBits",
".",
"HasMissingType",
")",
"!=",
"0",
")",
"{",
"continue",
";",
"}",
"interfaceCounter",
"++",
";",
"int",
"interfaceIndex",
"=",
"this",
".",
"constantPool",
".",
"literalIndexForType",
"(",
"binding",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"interfaceIndex",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"this",
".",
"contentsOffset",
"++",
"]",
"=",
"(",
"byte",
")",
"interfaceIndex",
";",
"}",
"this",
".",
"contents",
"[",
"interfacesCountPosition",
"++",
"]",
"=",
"(",
"byte",
")",
"(",
"interfaceCounter",
">>",
"8",
")",
";",
"this",
".",
"contents",
"[",
"interfacesCountPosition",
"]",
"=",
"(",
"byte",
")",
"interfaceCounter",
";",
"this",
".",
"creatingProblemType",
"=",
"createProblemType",
";",
"this",
".",
"codeStream",
".",
"maxFieldCount",
"=",
"aType",
".",
"scope",
".",
"outerMostClassScope",
"(",
")",
".",
"referenceType",
"(",
")",
".",
"maxFieldCount",
";",
"}",
"private",
"void",
"initializeDefaultLocals",
"(",
"StackMapFrame",
"frame",
",",
"MethodBinding",
"methodBinding",
",",
"int",
"maxLocals",
",",
"int",
"codeLength",
")",
"{",
"if",
"(",
"maxLocals",
"!=",
"0",
")",
"{",
"int",
"resolvedPosition",
"=",
"0",
";",
"final",
"boolean",
"isConstructor",
"=",
"methodBinding",
".",
"isConstructor",
"(",
")",
";",
"if",
"(",
"isConstructor",
"||",
"!",
"methodBinding",
".",
"isStatic",
"(",
")",
")",
"{",
"LocalVariableBinding",
"localVariableBinding",
"=",
"new",
"LocalVariableBinding",
"(",
"ConstantPool",
".",
"This",
",",
"methodBinding",
".",
"declaringClass",
",",
"0",
",",
"false",
")",
";",
"localVariableBinding",
".",
"resolvedPosition",
"=",
"0",
";",
"this",
".",
"codeStream",
".",
"record",
"(",
"localVariableBinding",
")",
";",
"localVariableBinding",
".",
"recordInitializationStartPC",
"(",
"0",
")",
";",
"localVariableBinding",
".",
"recordInitializationEndPC",
"(",
"codeLength",
")",
";",
"frame",
".",
"putLocal",
"(",
"resolvedPosition",
",",
"new",
"VerificationTypeInfo",
"(",
"isConstructor",
"?",
"VerificationTypeInfo",
".",
"ITEM_UNINITIALIZED_THIS",
":",
"VerificationTypeInfo",
".",
"ITEM_OBJECT",
",",
"methodBinding",
".",
"declaringClass",
")",
")",
";",
"resolvedPosition",
"++",
";",
"}",
"if",
"(",
"isConstructor",
")",
"{",
"if",
"(",
"methodBinding",
".",
"declaringClass",
".",
"isEnum",
"(",
")",
")",
"{",
"LocalVariableBinding",
"localVariableBinding",
"=",
"new",
"LocalVariableBinding",
"(",
"\"",
"name\"",
".",
"toCharArray",
"(",
")",
",",
"this",
".",
"referenceBinding",
".",
"scope",
".",
"getJavaLangString",
"(",
")",
",",
"0",
",",
"false",
")",
";",
"localVariableBinding",
".",
"resolvedPosition",
"=",
"resolvedPosition",
";",
"this",
".",
"codeStream",
".",
"record",
"(",
"localVariableBinding",
")",
";",
"localVariableBinding",
".",
"recordInitializationStartPC",
"(",
"0",
")",
";",
"localVariableBinding",
".",
"recordInitializationEndPC",
"(",
"codeLength",
")",
";",
"frame",
".",
"putLocal",
"(",
"resolvedPosition",
",",
"new",
"VerificationTypeInfo",
"(",
"TypeIds",
".",
"T_JavaLangString",
",",
"ConstantPool",
".",
"JavaLangStringConstantPoolName",
")",
")",
";",
"resolvedPosition",
"++",
";",
"localVariableBinding",
"=",
"new",
"LocalVariableBinding",
"(",
"\"",
"ordinal\"",
".",
"toCharArray",
"(",
")",
",",
"TypeBinding",
".",
"INT",
",",
"0",
",",
"false",
")",
";",
"localVariableBinding",
".",
"resolvedPosition",
"=",
"resolvedPosition",
";",
"this",
".",
"codeStream",
".",
"record",
"(",
"localVariableBinding",
")",
";",
"localVariableBinding",
".",
"recordInitializationStartPC",
"(",
"0",
")",
";",
"localVariableBinding",
".",
"recordInitializationEndPC",
"(",
"codeLength",
")",
";",
"frame",
".",
"putLocal",
"(",
"resolvedPosition",
",",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"INT",
")",
")",
";",
"resolvedPosition",
"++",
";",
"}",
"if",
"(",
"methodBinding",
".",
"declaringClass",
".",
"isNestedType",
"(",
")",
")",
"{",
"ReferenceBinding",
"enclosingInstanceTypes",
"[",
"]",
";",
"if",
"(",
"(",
"enclosingInstanceTypes",
"=",
"methodBinding",
".",
"declaringClass",
".",
"syntheticEnclosingInstanceTypes",
"(",
")",
")",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"enclosingInstanceTypes",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"LocalVariableBinding",
"localVariableBinding",
"=",
"new",
"LocalVariableBinding",
"(",
"(",
"\"\"",
"+",
"i",
")",
".",
"toCharArray",
"(",
")",
",",
"enclosingInstanceTypes",
"[",
"i",
"]",
",",
"0",
",",
"false",
")",
";",
"localVariableBinding",
".",
"resolvedPosition",
"=",
"resolvedPosition",
";",
"this",
".",
"codeStream",
".",
"record",
"(",
"localVariableBinding",
")",
";",
"localVariableBinding",
".",
"recordInitializationStartPC",
"(",
"0",
")",
";",
"localVariableBinding",
".",
"recordInitializationEndPC",
"(",
"codeLength",
")",
";",
"frame",
".",
"putLocal",
"(",
"resolvedPosition",
",",
"new",
"VerificationTypeInfo",
"(",
"enclosingInstanceTypes",
"[",
"i",
"]",
")",
")",
";",
"resolvedPosition",
"++",
";",
"}",
"}",
"TypeBinding",
"[",
"]",
"arguments",
";",
"if",
"(",
"(",
"arguments",
"=",
"methodBinding",
".",
"parameters",
")",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"arguments",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"final",
"TypeBinding",
"typeBinding",
"=",
"arguments",
"[",
"i",
"]",
";",
"frame",
".",
"putLocal",
"(",
"resolvedPosition",
",",
"new",
"VerificationTypeInfo",
"(",
"typeBinding",
")",
")",
";",
"switch",
"(",
"typeBinding",
".",
"id",
")",
"{",
"case",
"TypeIds",
".",
"T_double",
":",
"case",
"TypeIds",
".",
"T_long",
":",
"resolvedPosition",
"+=",
"2",
";",
"break",
";",
"default",
":",
"resolvedPosition",
"++",
";",
"}",
"}",
"}",
"SyntheticArgumentBinding",
"syntheticArguments",
"[",
"]",
";",
"if",
"(",
"(",
"syntheticArguments",
"=",
"methodBinding",
".",
"declaringClass",
".",
"syntheticOuterLocalVariables",
"(",
")",
")",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"syntheticArguments",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"final",
"TypeBinding",
"typeBinding",
"=",
"syntheticArguments",
"[",
"i",
"]",
".",
"type",
";",
"LocalVariableBinding",
"localVariableBinding",
"=",
"new",
"LocalVariableBinding",
"(",
"(",
"\"",
"synthetic\"",
"+",
"i",
")",
".",
"toCharArray",
"(",
")",
",",
"typeBinding",
",",
"0",
",",
"false",
")",
";",
"localVariableBinding",
".",
"resolvedPosition",
"=",
"resolvedPosition",
";",
"this",
".",
"codeStream",
".",
"record",
"(",
"localVariableBinding",
")",
";",
"localVariableBinding",
".",
"recordInitializationStartPC",
"(",
"0",
")",
";",
"localVariableBinding",
".",
"recordInitializationEndPC",
"(",
"codeLength",
")",
";",
"frame",
".",
"putLocal",
"(",
"resolvedPosition",
",",
"new",
"VerificationTypeInfo",
"(",
"typeBinding",
")",
")",
";",
"switch",
"(",
"typeBinding",
".",
"id",
")",
"{",
"case",
"TypeIds",
".",
"T_double",
":",
"case",
"TypeIds",
".",
"T_long",
":",
"resolvedPosition",
"+=",
"2",
";",
"break",
";",
"default",
":",
"resolvedPosition",
"++",
";",
"}",
"}",
"}",
"}",
"else",
"{",
"TypeBinding",
"[",
"]",
"arguments",
";",
"if",
"(",
"(",
"arguments",
"=",
"methodBinding",
".",
"parameters",
")",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"arguments",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"final",
"TypeBinding",
"typeBinding",
"=",
"arguments",
"[",
"i",
"]",
";",
"frame",
".",
"putLocal",
"(",
"resolvedPosition",
",",
"new",
"VerificationTypeInfo",
"(",
"typeBinding",
")",
")",
";",
"switch",
"(",
"typeBinding",
".",
"id",
")",
"{",
"case",
"TypeIds",
".",
"T_double",
":",
"case",
"TypeIds",
".",
"T_long",
":",
"resolvedPosition",
"+=",
"2",
";",
"break",
";",
"default",
":",
"resolvedPosition",
"++",
";",
"}",
"}",
"}",
"}",
"}",
"else",
"{",
"TypeBinding",
"[",
"]",
"arguments",
";",
"if",
"(",
"(",
"arguments",
"=",
"methodBinding",
".",
"parameters",
")",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"arguments",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"final",
"TypeBinding",
"typeBinding",
"=",
"arguments",
"[",
"i",
"]",
";",
"frame",
".",
"putLocal",
"(",
"resolvedPosition",
",",
"new",
"VerificationTypeInfo",
"(",
"typeBinding",
")",
")",
";",
"switch",
"(",
"typeBinding",
".",
"id",
")",
"{",
"case",
"TypeIds",
".",
"T_double",
":",
"case",
"TypeIds",
".",
"T_long",
":",
"resolvedPosition",
"+=",
"2",
";",
"break",
";",
"default",
":",
"resolvedPosition",
"++",
";",
"}",
"}",
"}",
"}",
"}",
"}",
"private",
"void",
"initializeLocals",
"(",
"boolean",
"isStatic",
",",
"int",
"currentPC",
",",
"StackMapFrame",
"currentFrame",
")",
"{",
"VerificationTypeInfo",
"[",
"]",
"locals",
"=",
"currentFrame",
".",
"locals",
";",
"int",
"localsLength",
"=",
"locals",
".",
"length",
";",
"int",
"i",
"=",
"0",
";",
"if",
"(",
"!",
"isStatic",
")",
"{",
"i",
"=",
"1",
";",
"}",
"for",
"(",
";",
"i",
"<",
"localsLength",
";",
"i",
"++",
")",
"{",
"locals",
"[",
"i",
"]",
"=",
"null",
";",
"}",
"i",
"=",
"0",
";",
"locals",
":",
"for",
"(",
"int",
"max",
"=",
"this",
".",
"codeStream",
".",
"allLocalsCounter",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"LocalVariableBinding",
"localVariable",
"=",
"this",
".",
"codeStream",
".",
"locals",
"[",
"i",
"]",
";",
"if",
"(",
"localVariable",
"==",
"null",
")",
"continue",
";",
"int",
"resolvedPosition",
"=",
"localVariable",
".",
"resolvedPosition",
";",
"final",
"TypeBinding",
"localVariableTypeBinding",
"=",
"localVariable",
".",
"type",
";",
"inits",
":",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"localVariable",
".",
"initializationCount",
";",
"j",
"++",
")",
"{",
"int",
"startPC",
"=",
"localVariable",
".",
"initializationPCs",
"[",
"j",
"<<",
"1",
"]",
";",
"int",
"endPC",
"=",
"localVariable",
".",
"initializationPCs",
"[",
"(",
"j",
"<<",
"1",
")",
"+",
"1",
"]",
";",
"if",
"(",
"currentPC",
"<",
"startPC",
")",
"{",
"continue",
"inits",
";",
"}",
"else",
"if",
"(",
"currentPC",
"<",
"endPC",
")",
"{",
"if",
"(",
"currentFrame",
".",
"locals",
"[",
"resolvedPosition",
"]",
"==",
"null",
")",
"{",
"currentFrame",
".",
"locals",
"[",
"resolvedPosition",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"localVariableTypeBinding",
")",
";",
"}",
"continue",
"locals",
";",
"}",
"}",
"}",
"}",
"public",
"ClassFile",
"outerMostEnclosingClassFile",
"(",
")",
"{",
"ClassFile",
"current",
"=",
"this",
";",
"while",
"(",
"current",
".",
"enclosingClassFile",
"!=",
"null",
")",
"current",
"=",
"current",
".",
"enclosingClassFile",
";",
"return",
"current",
";",
"}",
"public",
"void",
"recordInnerClasses",
"(",
"TypeBinding",
"binding",
")",
"{",
"if",
"(",
"this",
".",
"innerClassesBindings",
"==",
"null",
")",
"{",
"this",
".",
"innerClassesBindings",
"=",
"new",
"HashSet",
"(",
"INNER_CLASSES_SIZE",
")",
";",
"}",
"ReferenceBinding",
"innerClass",
"=",
"(",
"ReferenceBinding",
")",
"binding",
";",
"this",
".",
"innerClassesBindings",
".",
"add",
"(",
"innerClass",
".",
"erasure",
"(",
")",
")",
";",
"ReferenceBinding",
"enclosingType",
"=",
"innerClass",
".",
"enclosingType",
"(",
")",
";",
"while",
"(",
"enclosingType",
"!=",
"null",
"&&",
"enclosingType",
".",
"isNestedType",
"(",
")",
")",
"{",
"this",
".",
"innerClassesBindings",
".",
"add",
"(",
"enclosingType",
".",
"erasure",
"(",
")",
")",
";",
"enclosingType",
"=",
"enclosingType",
".",
"enclosingType",
"(",
")",
";",
"}",
"}",
"public",
"void",
"reset",
"(",
"SourceTypeBinding",
"typeBinding",
")",
"{",
"final",
"CompilerOptions",
"options",
"=",
"typeBinding",
".",
"scope",
".",
"compilerOptions",
"(",
")",
";",
"this",
".",
"referenceBinding",
"=",
"typeBinding",
";",
"this",
".",
"isNestedType",
"=",
"typeBinding",
".",
"isNestedType",
"(",
")",
";",
"this",
".",
"targetJDK",
"=",
"options",
".",
"targetJDK",
";",
"this",
".",
"produceAttributes",
"=",
"options",
".",
"produceDebugAttributes",
";",
"if",
"(",
"this",
".",
"targetJDK",
">=",
"ClassFileConstants",
".",
"JDK1_6",
")",
"{",
"this",
".",
"produceAttributes",
"|=",
"ClassFileConstants",
".",
"ATTR_STACK_MAP_TABLE",
";",
"}",
"else",
"if",
"(",
"this",
".",
"targetJDK",
"==",
"ClassFileConstants",
".",
"CLDC_1_1",
")",
"{",
"this",
".",
"targetJDK",
"=",
"ClassFileConstants",
".",
"JDK1_1",
";",
"this",
".",
"produceAttributes",
"|=",
"ClassFileConstants",
".",
"ATTR_STACK_MAP",
";",
"}",
"this",
".",
"bytes",
"=",
"null",
";",
"this",
".",
"constantPool",
".",
"reset",
"(",
")",
";",
"this",
".",
"codeStream",
".",
"reset",
"(",
"this",
")",
";",
"this",
".",
"constantPoolOffset",
"=",
"0",
";",
"this",
".",
"contentsOffset",
"=",
"0",
";",
"this",
".",
"creatingProblemType",
"=",
"false",
";",
"this",
".",
"enclosingClassFile",
"=",
"null",
";",
"this",
".",
"headerOffset",
"=",
"0",
";",
"this",
".",
"methodCount",
"=",
"0",
";",
"this",
".",
"methodCountOffset",
"=",
"0",
";",
"if",
"(",
"this",
".",
"innerClassesBindings",
"!=",
"null",
")",
"{",
"this",
".",
"innerClassesBindings",
".",
"clear",
"(",
")",
";",
"}",
"this",
".",
"missingTypes",
"=",
"null",
";",
"this",
".",
"visitedTypes",
"=",
"null",
";",
"}",
"private",
"final",
"void",
"resizeContents",
"(",
"int",
"minimalSize",
")",
"{",
"int",
"length",
"=",
"this",
".",
"contents",
".",
"length",
";",
"int",
"toAdd",
"=",
"length",
";",
"if",
"(",
"toAdd",
"<",
"minimalSize",
")",
"toAdd",
"=",
"minimalSize",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"contents",
",",
"0",
",",
"this",
".",
"contents",
"=",
"new",
"byte",
"[",
"length",
"+",
"toAdd",
"]",
",",
"0",
",",
"length",
")",
";",
"}",
"private",
"VerificationTypeInfo",
"retrieveLocal",
"(",
"int",
"currentPC",
",",
"int",
"resolvedPosition",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"this",
".",
"codeStream",
".",
"allLocalsCounter",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"LocalVariableBinding",
"localVariable",
"=",
"this",
".",
"codeStream",
".",
"locals",
"[",
"i",
"]",
";",
"if",
"(",
"localVariable",
"==",
"null",
")",
"continue",
";",
"if",
"(",
"resolvedPosition",
"==",
"localVariable",
".",
"resolvedPosition",
")",
"{",
"inits",
":",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"localVariable",
".",
"initializationCount",
";",
"j",
"++",
")",
"{",
"int",
"startPC",
"=",
"localVariable",
".",
"initializationPCs",
"[",
"j",
"<<",
"1",
"]",
";",
"int",
"endPC",
"=",
"localVariable",
".",
"initializationPCs",
"[",
"(",
"j",
"<<",
"1",
")",
"+",
"1",
"]",
";",
"if",
"(",
"currentPC",
"<",
"startPC",
")",
"{",
"continue",
"inits",
";",
"}",
"else",
"if",
"(",
"currentPC",
"<",
"endPC",
")",
"{",
"return",
"new",
"VerificationTypeInfo",
"(",
"localVariable",
".",
"type",
")",
";",
"}",
"}",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"int",
"scanType",
"(",
"char",
"[",
"]",
"methodSignature",
",",
"int",
"index",
")",
"{",
"switch",
"(",
"methodSignature",
"[",
"index",
"]",
")",
"{",
"case",
"'['",
":",
"return",
"scanType",
"(",
"methodSignature",
",",
"index",
"+",
"1",
")",
";",
"case",
"'L'",
":",
"return",
"CharOperation",
".",
"indexOf",
"(",
"';'",
",",
"methodSignature",
",",
"index",
"+",
"1",
")",
";",
"case",
"'Z'",
":",
"case",
"'B'",
":",
"case",
"'C'",
":",
"case",
"'D'",
":",
"case",
"'F'",
":",
"case",
"'I'",
":",
"case",
"'J'",
":",
"case",
"'S'",
":",
"return",
"index",
";",
"default",
":",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"}",
"public",
"void",
"setForMethodInfos",
"(",
")",
"{",
"this",
".",
"methodCountOffset",
"=",
"this",
".",
"contentsOffset",
";",
"this",
".",
"contentsOffset",
"+=",
"2",
";",
"}",
"public",
"void",
"traverse",
"(",
"MethodBinding",
"methodBinding",
",",
"int",
"maxLocals",
",",
"byte",
"[",
"]",
"bytecodes",
",",
"int",
"codeOffset",
",",
"int",
"codeLength",
",",
"ArrayList",
"frames",
",",
"boolean",
"isClinit",
")",
"{",
"StackMapFrameCodeStream",
"stackMapFrameCodeStream",
"=",
"(",
"StackMapFrameCodeStream",
")",
"this",
".",
"codeStream",
";",
"int",
"[",
"]",
"framePositions",
"=",
"stackMapFrameCodeStream",
".",
"getFramePositions",
"(",
")",
";",
"int",
"pc",
"=",
"codeOffset",
";",
"int",
"index",
";",
"int",
"[",
"]",
"constantPoolOffsets",
"=",
"this",
".",
"constantPool",
".",
"offsets",
";",
"byte",
"[",
"]",
"poolContents",
"=",
"this",
".",
"constantPool",
".",
"poolContent",
";",
"int",
"indexInFramePositions",
"=",
"0",
";",
"int",
"framePositionsLength",
"=",
"framePositions",
".",
"length",
";",
"int",
"currentFramePosition",
"=",
"framePositions",
"[",
"0",
"]",
";",
"int",
"indexInStackDepthMarkers",
"=",
"0",
";",
"StackDepthMarker",
"[",
"]",
"stackDepthMarkers",
"=",
"stackMapFrameCodeStream",
".",
"getStackDepthMarkers",
"(",
")",
";",
"int",
"stackDepthMarkersLength",
"=",
"stackDepthMarkers",
"==",
"null",
"?",
"0",
":",
"stackDepthMarkers",
".",
"length",
";",
"boolean",
"hasStackDepthMarkers",
"=",
"stackDepthMarkersLength",
"!=",
"0",
";",
"StackDepthMarker",
"stackDepthMarker",
"=",
"null",
";",
"if",
"(",
"hasStackDepthMarkers",
")",
"{",
"stackDepthMarker",
"=",
"stackDepthMarkers",
"[",
"0",
"]",
";",
"}",
"int",
"indexInStackMarkers",
"=",
"0",
";",
"StackMarker",
"[",
"]",
"stackMarkers",
"=",
"stackMapFrameCodeStream",
".",
"getStackMarkers",
"(",
")",
";",
"int",
"stackMarkersLength",
"=",
"stackMarkers",
"==",
"null",
"?",
"0",
":",
"stackMarkers",
".",
"length",
";",
"boolean",
"hasStackMarkers",
"=",
"stackMarkersLength",
"!=",
"0",
";",
"StackMarker",
"stackMarker",
"=",
"null",
";",
"if",
"(",
"hasStackMarkers",
")",
"{",
"stackMarker",
"=",
"stackMarkers",
"[",
"0",
"]",
";",
"}",
"int",
"indexInExceptionMarkers",
"=",
"0",
";",
"ExceptionMarker",
"[",
"]",
"exceptionMarkers",
"=",
"stackMapFrameCodeStream",
".",
"getExceptionMarkers",
"(",
")",
";",
"int",
"exceptionsMarkersLength",
"=",
"exceptionMarkers",
"==",
"null",
"?",
"0",
":",
"exceptionMarkers",
".",
"length",
";",
"boolean",
"hasExceptionMarkers",
"=",
"exceptionsMarkersLength",
"!=",
"0",
";",
"ExceptionMarker",
"exceptionMarker",
"=",
"null",
";",
"if",
"(",
"hasExceptionMarkers",
")",
"{",
"exceptionMarker",
"=",
"exceptionMarkers",
"[",
"0",
"]",
";",
"}",
"StackMapFrame",
"frame",
"=",
"new",
"StackMapFrame",
"(",
"maxLocals",
")",
";",
"if",
"(",
"!",
"isClinit",
")",
"{",
"initializeDefaultLocals",
"(",
"frame",
",",
"methodBinding",
",",
"maxLocals",
",",
"codeLength",
")",
";",
"}",
"frame",
".",
"pc",
"=",
"-",
"1",
";",
"frames",
".",
"add",
"(",
"frame",
".",
"duplicate",
"(",
")",
")",
";",
"while",
"(",
"true",
")",
"{",
"int",
"currentPC",
"=",
"pc",
"-",
"codeOffset",
";",
"if",
"(",
"hasStackMarkers",
"&&",
"stackMarker",
".",
"pc",
"==",
"currentPC",
")",
"{",
"VerificationTypeInfo",
"[",
"]",
"infos",
"=",
"frame",
".",
"stackItems",
";",
"VerificationTypeInfo",
"[",
"]",
"tempInfos",
"=",
"new",
"VerificationTypeInfo",
"[",
"frame",
".",
"numberOfStackItems",
"]",
";",
"System",
".",
"arraycopy",
"(",
"infos",
",",
"0",
",",
"tempInfos",
",",
"0",
",",
"frame",
".",
"numberOfStackItems",
")",
";",
"stackMarker",
".",
"setInfos",
"(",
"tempInfos",
")",
";",
"}",
"else",
"if",
"(",
"hasStackMarkers",
"&&",
"stackMarker",
".",
"destinationPC",
"==",
"currentPC",
")",
"{",
"VerificationTypeInfo",
"[",
"]",
"infos",
"=",
"stackMarker",
".",
"infos",
";",
"frame",
".",
"stackItems",
"=",
"infos",
";",
"frame",
".",
"numberOfStackItems",
"=",
"infos",
".",
"length",
";",
"indexInStackMarkers",
"++",
";",
"if",
"(",
"indexInStackMarkers",
"<",
"stackMarkersLength",
")",
"{",
"stackMarker",
"=",
"stackMarkers",
"[",
"indexInStackMarkers",
"]",
";",
"}",
"else",
"{",
"hasStackMarkers",
"=",
"false",
";",
"}",
"}",
"if",
"(",
"hasStackDepthMarkers",
"&&",
"stackDepthMarker",
".",
"pc",
"==",
"currentPC",
")",
"{",
"TypeBinding",
"typeBinding",
"=",
"stackDepthMarker",
".",
"typeBinding",
";",
"if",
"(",
"typeBinding",
"!=",
"null",
")",
"{",
"if",
"(",
"stackDepthMarker",
".",
"delta",
">",
"0",
")",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"typeBinding",
")",
")",
";",
"}",
"else",
"{",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"typeBinding",
")",
";",
"}",
"}",
"else",
"{",
"frame",
".",
"numberOfStackItems",
"--",
";",
"}",
"indexInStackDepthMarkers",
"++",
";",
"if",
"(",
"indexInStackDepthMarkers",
"<",
"stackDepthMarkersLength",
")",
"{",
"stackDepthMarker",
"=",
"stackDepthMarkers",
"[",
"indexInStackDepthMarkers",
"]",
";",
"}",
"else",
"{",
"hasStackDepthMarkers",
"=",
"false",
";",
"}",
"}",
"if",
"(",
"hasExceptionMarkers",
"&&",
"exceptionMarker",
".",
"pc",
"==",
"currentPC",
")",
"{",
"frame",
".",
"numberOfStackItems",
"=",
"0",
";",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"VerificationTypeInfo",
".",
"ITEM_OBJECT",
",",
"exceptionMarker",
".",
"constantPoolName",
")",
")",
";",
"indexInExceptionMarkers",
"++",
";",
"if",
"(",
"indexInExceptionMarkers",
"<",
"exceptionsMarkersLength",
")",
"{",
"exceptionMarker",
"=",
"exceptionMarkers",
"[",
"indexInExceptionMarkers",
"]",
";",
"}",
"else",
"{",
"hasExceptionMarkers",
"=",
"false",
";",
"}",
"}",
"if",
"(",
"currentFramePosition",
"<",
"currentPC",
")",
"{",
"do",
"{",
"indexInFramePositions",
"++",
";",
"if",
"(",
"indexInFramePositions",
"<",
"framePositionsLength",
")",
"{",
"currentFramePosition",
"=",
"framePositions",
"[",
"indexInFramePositions",
"]",
";",
"}",
"else",
"{",
"return",
";",
"}",
"}",
"while",
"(",
"currentFramePosition",
"<",
"currentPC",
")",
";",
"}",
"if",
"(",
"currentFramePosition",
"==",
"currentPC",
")",
"{",
"StackMapFrame",
"currentFrame",
"=",
"frame",
".",
"duplicate",
"(",
")",
";",
"currentFrame",
".",
"pc",
"=",
"currentPC",
";",
"initializeLocals",
"(",
"isClinit",
"?",
"true",
":",
"methodBinding",
".",
"isStatic",
"(",
")",
",",
"currentPC",
",",
"currentFrame",
")",
";",
"frames",
".",
"add",
"(",
"currentFrame",
")",
";",
"indexInFramePositions",
"++",
";",
"if",
"(",
"indexInFramePositions",
"<",
"framePositionsLength",
")",
"{",
"currentFramePosition",
"=",
"framePositions",
"[",
"indexInFramePositions",
"]",
";",
"}",
"else",
"{",
"return",
";",
"}",
"}",
"byte",
"opcode",
"=",
"(",
"byte",
")",
"u1At",
"(",
"bytecodes",
",",
"0",
",",
"pc",
")",
";",
"switch",
"(",
"opcode",
")",
"{",
"case",
"Opcodes",
".",
"OPC_nop",
":",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_aconst_null",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"NULL",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_iconst_m1",
":",
"case",
"Opcodes",
".",
"OPC_iconst_0",
":",
"case",
"Opcodes",
".",
"OPC_iconst_1",
":",
"case",
"Opcodes",
".",
"OPC_iconst_2",
":",
"case",
"Opcodes",
".",
"OPC_iconst_3",
":",
"case",
"Opcodes",
".",
"OPC_iconst_4",
":",
"case",
"Opcodes",
".",
"OPC_iconst_5",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_lconst_0",
":",
"case",
"Opcodes",
".",
"OPC_lconst_1",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_fconst_0",
":",
"case",
"Opcodes",
".",
"OPC_fconst_1",
":",
"case",
"Opcodes",
".",
"OPC_fconst_2",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_dconst_0",
":",
"case",
"Opcodes",
".",
"OPC_dconst_1",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_bipush",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BYTE",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_sipush",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"SHORT",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_ldc",
":",
"index",
"=",
"u1At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"switch",
"(",
"u1At",
"(",
"poolContents",
",",
"0",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
")",
"{",
"case",
"ClassFileConstants",
".",
"StringTag",
":",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"TypeIds",
".",
"T_JavaLangString",
",",
"ConstantPool",
".",
"JavaLangStringConstantPoolName",
")",
")",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"IntegerTag",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"FloatTag",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"ClassTag",
":",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"TypeIds",
".",
"T_JavaLangClass",
",",
"ConstantPool",
".",
"JavaLangClassConstantPoolName",
")",
")",
";",
"}",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_ldc_w",
":",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"switch",
"(",
"u1At",
"(",
"poolContents",
",",
"0",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
")",
"{",
"case",
"ClassFileConstants",
".",
"StringTag",
":",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"TypeIds",
".",
"T_JavaLangString",
",",
"ConstantPool",
".",
"JavaLangStringConstantPoolName",
")",
")",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"IntegerTag",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"FloatTag",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"ClassTag",
":",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"TypeIds",
".",
"T_JavaLangClass",
",",
"ConstantPool",
".",
"JavaLangClassConstantPoolName",
")",
")",
";",
"}",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_ldc2_w",
":",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"switch",
"(",
"u1At",
"(",
"poolContents",
",",
"0",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
")",
"{",
"case",
"ClassFileConstants",
".",
"DoubleTag",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"LongTag",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"break",
";",
"}",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_iload",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_lload",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_fload",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_dload",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_aload",
":",
"index",
"=",
"u1At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"VerificationTypeInfo",
"localsN",
"=",
"retrieveLocal",
"(",
"currentPC",
",",
"index",
")",
";",
"frame",
".",
"addStackItem",
"(",
"localsN",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_iload_0",
":",
"case",
"Opcodes",
".",
"OPC_iload_1",
":",
"case",
"Opcodes",
".",
"OPC_iload_2",
":",
"case",
"Opcodes",
".",
"OPC_iload_3",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_lload_0",
":",
"case",
"Opcodes",
".",
"OPC_lload_1",
":",
"case",
"Opcodes",
".",
"OPC_lload_2",
":",
"case",
"Opcodes",
".",
"OPC_lload_3",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_fload_0",
":",
"case",
"Opcodes",
".",
"OPC_fload_1",
":",
"case",
"Opcodes",
".",
"OPC_fload_2",
":",
"case",
"Opcodes",
".",
"OPC_fload_3",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_dload_0",
":",
"case",
"Opcodes",
".",
"OPC_dload_1",
":",
"case",
"Opcodes",
".",
"OPC_dload_2",
":",
"case",
"Opcodes",
".",
"OPC_dload_3",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_aload_0",
":",
"VerificationTypeInfo",
"locals0",
"=",
"frame",
".",
"locals",
"[",
"0",
"]",
";",
"if",
"(",
"locals0",
"==",
"null",
"||",
"locals0",
".",
"tag",
"!=",
"VerificationTypeInfo",
".",
"ITEM_UNINITIALIZED_THIS",
")",
"{",
"locals0",
"=",
"retrieveLocal",
"(",
"currentPC",
",",
"0",
")",
";",
"}",
"frame",
".",
"addStackItem",
"(",
"locals0",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_aload_1",
":",
"VerificationTypeInfo",
"locals1",
"=",
"retrieveLocal",
"(",
"currentPC",
",",
"1",
")",
";",
"frame",
".",
"addStackItem",
"(",
"locals1",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_aload_2",
":",
"VerificationTypeInfo",
"locals2",
"=",
"retrieveLocal",
"(",
"currentPC",
",",
"2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"locals2",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_aload_3",
":",
"VerificationTypeInfo",
"locals3",
"=",
"retrieveLocal",
"(",
"currentPC",
",",
"3",
")",
";",
"frame",
".",
"addStackItem",
"(",
"locals3",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_iaload",
":",
"frame",
".",
"numberOfStackItems",
"-=",
"2",
";",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_laload",
":",
"frame",
".",
"numberOfStackItems",
"-=",
"2",
";",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_faload",
":",
"frame",
".",
"numberOfStackItems",
"-=",
"2",
";",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_daload",
":",
"frame",
".",
"numberOfStackItems",
"-=",
"2",
";",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_aaload",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"frame",
".",
"replaceWithElementType",
"(",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_baload",
":",
"frame",
".",
"numberOfStackItems",
"-=",
"2",
";",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BYTE",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_caload",
":",
"frame",
".",
"numberOfStackItems",
"-=",
"2",
";",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"CHAR",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_saload",
":",
"frame",
".",
"numberOfStackItems",
"-=",
"2",
";",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"SHORT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_istore",
":",
"case",
"Opcodes",
".",
"OPC_lstore",
":",
"case",
"Opcodes",
".",
"OPC_fstore",
":",
"case",
"Opcodes",
".",
"OPC_dstore",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_astore",
":",
"index",
"=",
"u1At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_astore_0",
":",
"frame",
".",
"locals",
"[",
"0",
"]",
"=",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_astore_1",
":",
"case",
"Opcodes",
".",
"OPC_astore_2",
":",
"case",
"Opcodes",
".",
"OPC_astore_3",
":",
"case",
"Opcodes",
".",
"OPC_istore_0",
":",
"case",
"Opcodes",
".",
"OPC_istore_1",
":",
"case",
"Opcodes",
".",
"OPC_istore_2",
":",
"case",
"Opcodes",
".",
"OPC_istore_3",
":",
"case",
"Opcodes",
".",
"OPC_lstore_0",
":",
"case",
"Opcodes",
".",
"OPC_lstore_1",
":",
"case",
"Opcodes",
".",
"OPC_lstore_2",
":",
"case",
"Opcodes",
".",
"OPC_lstore_3",
":",
"case",
"Opcodes",
".",
"OPC_fstore_0",
":",
"case",
"Opcodes",
".",
"OPC_fstore_1",
":",
"case",
"Opcodes",
".",
"OPC_fstore_2",
":",
"case",
"Opcodes",
".",
"OPC_fstore_3",
":",
"case",
"Opcodes",
".",
"OPC_dstore_0",
":",
"case",
"Opcodes",
".",
"OPC_dstore_1",
":",
"case",
"Opcodes",
".",
"OPC_dstore_2",
":",
"case",
"Opcodes",
".",
"OPC_dstore_3",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_iastore",
":",
"case",
"Opcodes",
".",
"OPC_lastore",
":",
"case",
"Opcodes",
".",
"OPC_fastore",
":",
"case",
"Opcodes",
".",
"OPC_dastore",
":",
"case",
"Opcodes",
".",
"OPC_aastore",
":",
"case",
"Opcodes",
".",
"OPC_bastore",
":",
"case",
"Opcodes",
".",
"OPC_castore",
":",
"case",
"Opcodes",
".",
"OPC_sastore",
":",
"frame",
".",
"numberOfStackItems",
"-=",
"3",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_pop",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_pop2",
":",
"int",
"numberOfStackItems",
"=",
"frame",
".",
"numberOfStackItems",
";",
"switch",
"(",
"frame",
".",
"stackItems",
"[",
"numberOfStackItems",
"-",
"1",
"]",
".",
"id",
"(",
")",
")",
"{",
"case",
"TypeIds",
".",
"T_long",
":",
"case",
"TypeIds",
".",
"T_double",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"break",
";",
"default",
":",
"frame",
".",
"numberOfStackItems",
"-=",
"2",
";",
"}",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_dup",
":",
"frame",
".",
"addStackItem",
"(",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_dup_x1",
":",
"VerificationTypeInfo",
"info",
"=",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"VerificationTypeInfo",
"info2",
"=",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_dup_x2",
":",
"info",
"=",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"info2",
"=",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"switch",
"(",
"info2",
".",
"id",
"(",
")",
")",
"{",
"case",
"TypeIds",
".",
"T_long",
":",
"case",
"TypeIds",
".",
"T_double",
":",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"break",
";",
"default",
":",
"numberOfStackItems",
"=",
"frame",
".",
"numberOfStackItems",
";",
"VerificationTypeInfo",
"info3",
"=",
"frame",
".",
"stackItems",
"[",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info3",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"}",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_dup2",
":",
"info",
"=",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"switch",
"(",
"info",
".",
"id",
"(",
")",
")",
"{",
"case",
"TypeIds",
".",
"T_double",
":",
"case",
"TypeIds",
".",
"T_long",
":",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"break",
";",
"default",
":",
"info2",
"=",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"}",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_dup2_x1",
":",
"info",
"=",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"info2",
"=",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"switch",
"(",
"info",
".",
"id",
"(",
")",
")",
"{",
"case",
"TypeIds",
".",
"T_double",
":",
"case",
"TypeIds",
".",
"T_long",
":",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"break",
";",
"default",
":",
"VerificationTypeInfo",
"info3",
"=",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info3",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"}",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_dup2_x2",
":",
"numberOfStackItems",
"=",
"frame",
".",
"numberOfStackItems",
";",
"info",
"=",
"frame",
".",
"stackItems",
"[",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"info2",
"=",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"switch",
"(",
"info",
".",
"id",
"(",
")",
")",
"{",
"case",
"TypeIds",
".",
"T_long",
":",
"case",
"TypeIds",
".",
"T_double",
":",
"switch",
"(",
"info2",
".",
"id",
"(",
")",
")",
"{",
"case",
"TypeIds",
".",
"T_long",
":",
"case",
"TypeIds",
".",
"T_double",
":",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"break",
";",
"default",
":",
"numberOfStackItems",
"=",
"frame",
".",
"numberOfStackItems",
";",
"VerificationTypeInfo",
"info3",
"=",
"frame",
".",
"stackItems",
"[",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info3",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"}",
"break",
";",
"default",
":",
"numberOfStackItems",
"=",
"frame",
".",
"numberOfStackItems",
";",
"VerificationTypeInfo",
"info3",
"=",
"frame",
".",
"stackItems",
"[",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"switch",
"(",
"info3",
".",
"id",
"(",
")",
")",
"{",
"case",
"TypeIds",
".",
"T_long",
":",
"case",
"TypeIds",
".",
"T_double",
":",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info3",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"break",
";",
"default",
":",
"numberOfStackItems",
"=",
"frame",
".",
"numberOfStackItems",
";",
"VerificationTypeInfo",
"info4",
"=",
"frame",
".",
"stackItems",
"[",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info4",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info3",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info2",
")",
";",
"frame",
".",
"addStackItem",
"(",
"info",
")",
";",
"}",
"}",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_swap",
":",
"numberOfStackItems",
"=",
"frame",
".",
"numberOfStackItems",
";",
"info",
"=",
"frame",
".",
"stackItems",
"[",
"numberOfStackItems",
"-",
"1",
"]",
";",
"info2",
"=",
"frame",
".",
"stackItems",
"[",
"numberOfStackItems",
"-",
"2",
"]",
";",
"frame",
".",
"stackItems",
"[",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"info2",
";",
"frame",
".",
"stackItems",
"[",
"numberOfStackItems",
"-",
"2",
"]",
"=",
"info",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_iadd",
":",
"case",
"Opcodes",
".",
"OPC_ladd",
":",
"case",
"Opcodes",
".",
"OPC_fadd",
":",
"case",
"Opcodes",
".",
"OPC_dadd",
":",
"case",
"Opcodes",
".",
"OPC_isub",
":",
"case",
"Opcodes",
".",
"OPC_lsub",
":",
"case",
"Opcodes",
".",
"OPC_fsub",
":",
"case",
"Opcodes",
".",
"OPC_dsub",
":",
"case",
"Opcodes",
".",
"OPC_imul",
":",
"case",
"Opcodes",
".",
"OPC_lmul",
":",
"case",
"Opcodes",
".",
"OPC_fmul",
":",
"case",
"Opcodes",
".",
"OPC_dmul",
":",
"case",
"Opcodes",
".",
"OPC_idiv",
":",
"case",
"Opcodes",
".",
"OPC_ldiv",
":",
"case",
"Opcodes",
".",
"OPC_fdiv",
":",
"case",
"Opcodes",
".",
"OPC_ddiv",
":",
"case",
"Opcodes",
".",
"OPC_irem",
":",
"case",
"Opcodes",
".",
"OPC_lrem",
":",
"case",
"Opcodes",
".",
"OPC_frem",
":",
"case",
"Opcodes",
".",
"OPC_drem",
":",
"case",
"Opcodes",
".",
"OPC_ishl",
":",
"case",
"Opcodes",
".",
"OPC_lshl",
":",
"case",
"Opcodes",
".",
"OPC_ishr",
":",
"case",
"Opcodes",
".",
"OPC_lshr",
":",
"case",
"Opcodes",
".",
"OPC_iushr",
":",
"case",
"Opcodes",
".",
"OPC_lushr",
":",
"case",
"Opcodes",
".",
"OPC_iand",
":",
"case",
"Opcodes",
".",
"OPC_land",
":",
"case",
"Opcodes",
".",
"OPC_ior",
":",
"case",
"Opcodes",
".",
"OPC_lor",
":",
"case",
"Opcodes",
".",
"OPC_ixor",
":",
"case",
"Opcodes",
".",
"OPC_lxor",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_ineg",
":",
"case",
"Opcodes",
".",
"OPC_lneg",
":",
"case",
"Opcodes",
".",
"OPC_fneg",
":",
"case",
"Opcodes",
".",
"OPC_dneg",
":",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_iinc",
":",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_i2l",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_i2f",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_i2d",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_l2i",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_l2f",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_l2d",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_f2i",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_f2l",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_f2d",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_d2i",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_d2l",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_d2f",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_i2b",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"BYTE",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_i2c",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"CHAR",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_i2s",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"SHORT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_lcmp",
":",
"case",
"Opcodes",
".",
"OPC_fcmpl",
":",
"case",
"Opcodes",
".",
"OPC_fcmpg",
":",
"case",
"Opcodes",
".",
"OPC_dcmpl",
":",
"case",
"Opcodes",
".",
"OPC_dcmpg",
":",
"frame",
".",
"numberOfStackItems",
"-=",
"2",
";",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_ifeq",
":",
"case",
"Opcodes",
".",
"OPC_ifne",
":",
"case",
"Opcodes",
".",
"OPC_iflt",
":",
"case",
"Opcodes",
".",
"OPC_ifge",
":",
"case",
"Opcodes",
".",
"OPC_ifgt",
":",
"case",
"Opcodes",
".",
"OPC_ifle",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_if_icmpeq",
":",
"case",
"Opcodes",
".",
"OPC_if_icmpne",
":",
"case",
"Opcodes",
".",
"OPC_if_icmplt",
":",
"case",
"Opcodes",
".",
"OPC_if_icmpge",
":",
"case",
"Opcodes",
".",
"OPC_if_icmpgt",
":",
"case",
"Opcodes",
".",
"OPC_if_icmple",
":",
"case",
"Opcodes",
".",
"OPC_if_acmpeq",
":",
"case",
"Opcodes",
".",
"OPC_if_acmpne",
":",
"frame",
".",
"numberOfStackItems",
"-=",
"2",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_goto",
":",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_tableswitch",
":",
"pc",
"++",
";",
"while",
"(",
"(",
"(",
"pc",
"-",
"codeOffset",
")",
"&",
"0x03",
")",
"!=",
"0",
")",
"{",
"pc",
"++",
";",
"}",
"pc",
"+=",
"4",
";",
"int",
"low",
"=",
"i4At",
"(",
"bytecodes",
",",
"0",
",",
"pc",
")",
";",
"pc",
"+=",
"4",
";",
"int",
"high",
"=",
"i4At",
"(",
"bytecodes",
",",
"0",
",",
"pc",
")",
";",
"pc",
"+=",
"4",
";",
"int",
"length",
"=",
"high",
"-",
"low",
"+",
"1",
";",
"pc",
"+=",
"(",
"length",
"*",
"4",
")",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_lookupswitch",
":",
"pc",
"++",
";",
"while",
"(",
"(",
"(",
"pc",
"-",
"codeOffset",
")",
"&",
"0x03",
")",
"!=",
"0",
")",
"{",
"pc",
"++",
";",
"}",
"pc",
"+=",
"4",
";",
"int",
"npairs",
"=",
"(",
"int",
")",
"u4At",
"(",
"bytecodes",
",",
"0",
",",
"pc",
")",
";",
"pc",
"+=",
"(",
"4",
"+",
"npairs",
"*",
"8",
")",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_ireturn",
":",
"case",
"Opcodes",
".",
"OPC_lreturn",
":",
"case",
"Opcodes",
".",
"OPC_freturn",
":",
"case",
"Opcodes",
".",
"OPC_dreturn",
":",
"case",
"Opcodes",
".",
"OPC_areturn",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_return",
":",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_getstatic",
":",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"int",
"nameAndTypeIndex",
"=",
"u2At",
"(",
"poolContents",
",",
"3",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
";",
"int",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"3",
",",
"constantPoolOffsets",
"[",
"nameAndTypeIndex",
"]",
")",
";",
"char",
"[",
"]",
"descriptor",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"if",
"(",
"descriptor",
".",
"length",
"==",
"1",
")",
"{",
"switch",
"(",
"descriptor",
"[",
"0",
"]",
")",
"{",
"case",
"'Z'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BOOLEAN",
")",
";",
"break",
";",
"case",
"'B'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BYTE",
")",
";",
"break",
";",
"case",
"'C'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"CHAR",
")",
";",
"break",
";",
"case",
"'D'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"break",
";",
"case",
"'F'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"break",
";",
"case",
"'I'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"break",
";",
"case",
"'J'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"break",
";",
"case",
"'S'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"SHORT",
")",
";",
"break",
";",
"}",
"}",
"else",
"if",
"(",
"descriptor",
"[",
"0",
"]",
"==",
"'['",
")",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"descriptor",
")",
")",
";",
"}",
"else",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"CharOperation",
".",
"subarray",
"(",
"descriptor",
",",
"1",
",",
"descriptor",
".",
"length",
"-",
"1",
")",
")",
")",
";",
"}",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_putstatic",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_getfield",
":",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"nameAndTypeIndex",
"=",
"u2At",
"(",
"poolContents",
",",
"3",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"3",
",",
"constantPoolOffsets",
"[",
"nameAndTypeIndex",
"]",
")",
";",
"descriptor",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"if",
"(",
"descriptor",
".",
"length",
"==",
"1",
")",
"{",
"switch",
"(",
"descriptor",
"[",
"0",
"]",
")",
"{",
"case",
"'Z'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BOOLEAN",
")",
";",
"break",
";",
"case",
"'B'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BYTE",
")",
";",
"break",
";",
"case",
"'C'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"CHAR",
")",
";",
"break",
";",
"case",
"'D'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"break",
";",
"case",
"'F'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"break",
";",
"case",
"'I'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"break",
";",
"case",
"'J'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"break",
";",
"case",
"'S'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"SHORT",
")",
";",
"break",
";",
"}",
"}",
"else",
"if",
"(",
"descriptor",
"[",
"0",
"]",
"==",
"'['",
")",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"descriptor",
")",
")",
";",
"}",
"else",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"CharOperation",
".",
"subarray",
"(",
"descriptor",
",",
"1",
",",
"descriptor",
".",
"length",
"-",
"1",
")",
")",
")",
";",
"}",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_putfield",
":",
"frame",
".",
"numberOfStackItems",
"-=",
"2",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_invokevirtual",
":",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"nameAndTypeIndex",
"=",
"u2At",
"(",
"poolContents",
",",
"3",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"3",
",",
"constantPoolOffsets",
"[",
"nameAndTypeIndex",
"]",
")",
";",
"descriptor",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"nameAndTypeIndex",
"]",
")",
";",
"char",
"[",
"]",
"name",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"frame",
".",
"numberOfStackItems",
"-=",
"(",
"getParametersCount",
"(",
"descriptor",
")",
"+",
"1",
")",
";",
"char",
"[",
"]",
"returnType",
"=",
"getReturnType",
"(",
"descriptor",
")",
";",
"if",
"(",
"returnType",
".",
"length",
"==",
"1",
")",
"{",
"switch",
"(",
"returnType",
"[",
"0",
"]",
")",
"{",
"case",
"'Z'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BOOLEAN",
")",
";",
"break",
";",
"case",
"'B'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BYTE",
")",
";",
"break",
";",
"case",
"'C'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"CHAR",
")",
";",
"break",
";",
"case",
"'D'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"break",
";",
"case",
"'F'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"break",
";",
"case",
"'I'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"break",
";",
"case",
"'J'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"break",
";",
"case",
"'S'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"SHORT",
")",
";",
"break",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"returnType",
"[",
"0",
"]",
"==",
"'['",
")",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"returnType",
")",
")",
";",
"}",
"else",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"CharOperation",
".",
"subarray",
"(",
"returnType",
",",
"1",
",",
"returnType",
".",
"length",
"-",
"1",
")",
")",
")",
";",
"}",
"}",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_invokespecial",
":",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"nameAndTypeIndex",
"=",
"u2At",
"(",
"poolContents",
",",
"3",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"3",
",",
"constantPoolOffsets",
"[",
"nameAndTypeIndex",
"]",
")",
";",
"descriptor",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"nameAndTypeIndex",
"]",
")",
";",
"name",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"frame",
".",
"numberOfStackItems",
"-=",
"getParametersCount",
"(",
"descriptor",
")",
";",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"ConstantPool",
".",
"Init",
",",
"name",
")",
")",
"{",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
".",
"tag",
"=",
"VerificationTypeInfo",
".",
"ITEM_OBJECT",
";",
"}",
"frame",
".",
"numberOfStackItems",
"--",
";",
"returnType",
"=",
"getReturnType",
"(",
"descriptor",
")",
";",
"if",
"(",
"returnType",
".",
"length",
"==",
"1",
")",
"{",
"switch",
"(",
"returnType",
"[",
"0",
"]",
")",
"{",
"case",
"'Z'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BOOLEAN",
")",
";",
"break",
";",
"case",
"'B'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BYTE",
")",
";",
"break",
";",
"case",
"'C'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"CHAR",
")",
";",
"break",
";",
"case",
"'D'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"break",
";",
"case",
"'F'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"break",
";",
"case",
"'I'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"break",
";",
"case",
"'J'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"break",
";",
"case",
"'S'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"SHORT",
")",
";",
"break",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"returnType",
"[",
"0",
"]",
"==",
"'['",
")",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"returnType",
")",
")",
";",
"}",
"else",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"CharOperation",
".",
"subarray",
"(",
"returnType",
",",
"1",
",",
"returnType",
".",
"length",
"-",
"1",
")",
")",
")",
";",
"}",
"}",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_invokestatic",
":",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"nameAndTypeIndex",
"=",
"u2At",
"(",
"poolContents",
",",
"3",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"3",
",",
"constantPoolOffsets",
"[",
"nameAndTypeIndex",
"]",
")",
";",
"descriptor",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"nameAndTypeIndex",
"]",
")",
";",
"name",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"frame",
".",
"numberOfStackItems",
"-=",
"getParametersCount",
"(",
"descriptor",
")",
";",
"returnType",
"=",
"getReturnType",
"(",
"descriptor",
")",
";",
"if",
"(",
"returnType",
".",
"length",
"==",
"1",
")",
"{",
"switch",
"(",
"returnType",
"[",
"0",
"]",
")",
"{",
"case",
"'Z'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BOOLEAN",
")",
";",
"break",
";",
"case",
"'B'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BYTE",
")",
";",
"break",
";",
"case",
"'C'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"CHAR",
")",
";",
"break",
";",
"case",
"'D'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"break",
";",
"case",
"'F'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"break",
";",
"case",
"'I'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"break",
";",
"case",
"'J'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"break",
";",
"case",
"'S'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"SHORT",
")",
";",
"break",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"returnType",
"[",
"0",
"]",
"==",
"'['",
")",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"returnType",
")",
")",
";",
"}",
"else",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"CharOperation",
".",
"subarray",
"(",
"returnType",
",",
"1",
",",
"returnType",
".",
"length",
"-",
"1",
")",
")",
")",
";",
"}",
"}",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_invokeinterface",
":",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"nameAndTypeIndex",
"=",
"u2At",
"(",
"poolContents",
",",
"3",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"3",
",",
"constantPoolOffsets",
"[",
"nameAndTypeIndex",
"]",
")",
";",
"descriptor",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"nameAndTypeIndex",
"]",
")",
";",
"name",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"frame",
".",
"numberOfStackItems",
"-=",
"(",
"getParametersCount",
"(",
"descriptor",
")",
"+",
"1",
")",
";",
"returnType",
"=",
"getReturnType",
"(",
"descriptor",
")",
";",
"if",
"(",
"returnType",
".",
"length",
"==",
"1",
")",
"{",
"switch",
"(",
"returnType",
"[",
"0",
"]",
")",
"{",
"case",
"'Z'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BOOLEAN",
")",
";",
"break",
";",
"case",
"'B'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"BYTE",
")",
";",
"break",
";",
"case",
"'C'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"CHAR",
")",
";",
"break",
";",
"case",
"'D'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"break",
";",
"case",
"'F'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"break",
";",
"case",
"'I'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"break",
";",
"case",
"'J'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"break",
";",
"case",
"'S'",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"SHORT",
")",
";",
"break",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"returnType",
"[",
"0",
"]",
"==",
"'['",
")",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"returnType",
")",
")",
";",
"}",
"else",
"{",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"CharOperation",
".",
"subarray",
"(",
"returnType",
",",
"1",
",",
"returnType",
".",
"length",
"-",
"1",
")",
")",
")",
";",
"}",
"}",
"pc",
"+=",
"5",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_new",
":",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
";",
"char",
"[",
"]",
"className",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"VerificationTypeInfo",
"verificationTypeInfo",
"=",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"VerificationTypeInfo",
".",
"ITEM_UNINITIALIZED",
",",
"className",
")",
";",
"verificationTypeInfo",
".",
"offset",
"=",
"currentPC",
";",
"frame",
".",
"addStackItem",
"(",
"verificationTypeInfo",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_newarray",
":",
"char",
"[",
"]",
"constantPoolName",
"=",
"null",
";",
"switch",
"(",
"u1At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
")",
"{",
"case",
"ClassFileConstants",
".",
"INT_ARRAY",
":",
"constantPoolName",
"=",
"new",
"char",
"[",
"]",
"{",
"'['",
",",
"'I'",
"}",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"BYTE_ARRAY",
":",
"constantPoolName",
"=",
"new",
"char",
"[",
"]",
"{",
"'['",
",",
"'B'",
"}",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"BOOLEAN_ARRAY",
":",
"constantPoolName",
"=",
"new",
"char",
"[",
"]",
"{",
"'['",
",",
"'Z'",
"}",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"SHORT_ARRAY",
":",
"constantPoolName",
"=",
"new",
"char",
"[",
"]",
"{",
"'['",
",",
"'S'",
"}",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"CHAR_ARRAY",
":",
"constantPoolName",
"=",
"new",
"char",
"[",
"]",
"{",
"'['",
",",
"'C'",
"}",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"LONG_ARRAY",
":",
"constantPoolName",
"=",
"new",
"char",
"[",
"]",
"{",
"'['",
",",
"'J'",
"}",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"FLOAT_ARRAY",
":",
"constantPoolName",
"=",
"new",
"char",
"[",
"]",
"{",
"'['",
",",
"'F'",
"}",
";",
"break",
";",
"case",
"ClassFileConstants",
".",
"DOUBLE_ARRAY",
":",
"constantPoolName",
"=",
"new",
"char",
"[",
"]",
"{",
"'['",
",",
"'D'",
"}",
";",
"break",
";",
"}",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeIds",
".",
"T_JavaLangObject",
",",
"constantPoolName",
")",
";",
"pc",
"+=",
"2",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_anewarray",
":",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
";",
"className",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"int",
"classNameLength",
"=",
"className",
".",
"length",
";",
"if",
"(",
"className",
"[",
"0",
"]",
"!=",
"'['",
")",
"{",
"System",
".",
"arraycopy",
"(",
"className",
",",
"0",
",",
"(",
"constantPoolName",
"=",
"new",
"char",
"[",
"classNameLength",
"+",
"3",
"]",
")",
",",
"2",
",",
"classNameLength",
")",
";",
"constantPoolName",
"[",
"0",
"]",
"=",
"'['",
";",
"constantPoolName",
"[",
"1",
"]",
"=",
"'L'",
";",
"constantPoolName",
"[",
"classNameLength",
"+",
"2",
"]",
"=",
"';'",
";",
"}",
"else",
"{",
"System",
".",
"arraycopy",
"(",
"className",
",",
"0",
",",
"(",
"constantPoolName",
"=",
"new",
"char",
"[",
"classNameLength",
"+",
"1",
"]",
")",
",",
"1",
",",
"classNameLength",
")",
";",
"constantPoolName",
"[",
"0",
"]",
"=",
"'['",
";",
"}",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"constantPoolName",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_arraylength",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_athrow",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_checkcast",
":",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
";",
"className",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"className",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_instanceof",
":",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
"=",
"new",
"VerificationTypeInfo",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_monitorenter",
":",
"case",
"Opcodes",
".",
"OPC_monitorexit",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"pc",
"++",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_wide",
":",
"opcode",
"=",
"(",
"byte",
")",
"u1At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"if",
"(",
"opcode",
"==",
"Opcodes",
".",
"OPC_iinc",
")",
"{",
"pc",
"+=",
"6",
";",
"}",
"else",
"{",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"2",
",",
"pc",
")",
";",
"switch",
"(",
"opcode",
")",
"{",
"case",
"Opcodes",
".",
"OPC_iload",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"INT",
")",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_fload",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"FLOAT",
")",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_aload",
":",
"localsN",
"=",
"frame",
".",
"locals",
"[",
"index",
"]",
";",
"if",
"(",
"localsN",
"==",
"null",
")",
"{",
"localsN",
"=",
"retrieveLocal",
"(",
"currentPC",
",",
"index",
")",
";",
"}",
"frame",
".",
"addStackItem",
"(",
"localsN",
")",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_lload",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"LONG",
")",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_dload",
":",
"frame",
".",
"addStackItem",
"(",
"TypeBinding",
".",
"DOUBLE",
")",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_istore",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_fstore",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_astore",
":",
"frame",
".",
"locals",
"[",
"index",
"]",
"=",
"frame",
".",
"stackItems",
"[",
"frame",
".",
"numberOfStackItems",
"-",
"1",
"]",
";",
"frame",
".",
"numberOfStackItems",
"--",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_lstore",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_dstore",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"break",
";",
"}",
"pc",
"+=",
"4",
";",
"}",
"break",
";",
"case",
"Opcodes",
".",
"OPC_multianewarray",
":",
"index",
"=",
"u2At",
"(",
"bytecodes",
",",
"1",
",",
"pc",
")",
";",
"utf8index",
"=",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"index",
"]",
")",
";",
"className",
"=",
"utf8At",
"(",
"poolContents",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
"+",
"3",
",",
"u2At",
"(",
"poolContents",
",",
"1",
",",
"constantPoolOffsets",
"[",
"utf8index",
"]",
")",
")",
";",
"int",
"dimensions",
"=",
"u1At",
"(",
"bytecodes",
",",
"3",
",",
"pc",
")",
";",
"frame",
".",
"numberOfStackItems",
"-=",
"dimensions",
";",
"classNameLength",
"=",
"className",
".",
"length",
";",
"constantPoolName",
"=",
"new",
"char",
"[",
"classNameLength",
"+",
"dimensions",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"dimensions",
";",
"i",
"++",
")",
"{",
"constantPoolName",
"[",
"i",
"]",
"=",
"'['",
";",
"}",
"System",
".",
"arraycopy",
"(",
"className",
",",
"0",
",",
"constantPoolName",
",",
"dimensions",
",",
"classNameLength",
")",
";",
"frame",
".",
"addStackItem",
"(",
"new",
"VerificationTypeInfo",
"(",
"0",
",",
"constantPoolName",
")",
")",
";",
"pc",
"+=",
"4",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_ifnull",
":",
"case",
"Opcodes",
".",
"OPC_ifnonnull",
":",
"frame",
".",
"numberOfStackItems",
"--",
";",
"pc",
"+=",
"3",
";",
"break",
";",
"case",
"Opcodes",
".",
"OPC_goto_w",
":",
"pc",
"+=",
"5",
";",
"break",
";",
"default",
":",
"this",
".",
"codeStream",
".",
"methodDeclaration",
".",
"scope",
".",
"problemReporter",
"(",
")",
".",
"abortDueToInternalError",
"(",
"Messages",
".",
"bind",
"(",
"Messages",
".",
"abort_invalidOpcode",
",",
"new",
"Object",
"[",
"]",
"{",
"new",
"Byte",
"(",
"opcode",
")",
",",
"new",
"Integer",
"(",
"pc",
")",
",",
"new",
"String",
"(",
"methodBinding",
".",
"shortReadableName",
"(",
")",
")",
",",
"}",
")",
",",
"this",
".",
"codeStream",
".",
"methodDeclaration",
")",
";",
"break",
";",
"}",
"if",
"(",
"pc",
">=",
"(",
"codeLength",
"+",
"codeOffset",
")",
")",
"{",
"break",
";",
"}",
"}",
"}",
"private",
"final",
"int",
"u1At",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"relativeOffset",
",",
"int",
"structOffset",
")",
"{",
"return",
"(",
"reference",
"[",
"relativeOffset",
"+",
"structOffset",
"]",
"&",
"0xFF",
")",
";",
"}",
"private",
"final",
"int",
"u2At",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"relativeOffset",
",",
"int",
"structOffset",
")",
"{",
"int",
"position",
"=",
"relativeOffset",
"+",
"structOffset",
";",
"return",
"(",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"8",
")",
"+",
"(",
"reference",
"[",
"position",
"]",
"&",
"0xFF",
")",
";",
"}",
"private",
"final",
"long",
"u4At",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"relativeOffset",
",",
"int",
"structOffset",
")",
"{",
"int",
"position",
"=",
"relativeOffset",
"+",
"structOffset",
";",
"return",
"(",
"(",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFFL",
")",
"<<",
"24",
")",
"+",
"(",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"16",
")",
"+",
"(",
"(",
"reference",
"[",
"position",
"++",
"]",
"&",
"0xFF",
")",
"<<",
"8",
")",
"+",
"(",
"reference",
"[",
"position",
"]",
"&",
"0xFF",
")",
")",
";",
"}",
"public",
"char",
"[",
"]",
"utf8At",
"(",
"byte",
"[",
"]",
"reference",
",",
"int",
"absoluteOffset",
",",
"int",
"bytesAvailable",
")",
"{",
"int",
"length",
"=",
"bytesAvailable",
";",
"char",
"outputBuf",
"[",
"]",
"=",
"new",
"char",
"[",
"bytesAvailable",
"]",
";",
"int",
"outputPos",
"=",
"0",
";",
"int",
"readOffset",
"=",
"absoluteOffset",
";",
"while",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"x",
"=",
"reference",
"[",
"readOffset",
"++",
"]",
"&",
"0xFF",
";",
"length",
"--",
";",
"if",
"(",
"(",
"0x80",
"&",
"x",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"(",
"x",
"&",
"0x20",
")",
"!=",
"0",
")",
"{",
"length",
"-=",
"2",
";",
"x",
"=",
"(",
"(",
"x",
"&",
"0xF",
")",
"<<",
"12",
")",
"|",
"(",
"(",
"reference",
"[",
"readOffset",
"++",
"]",
"&",
"0x3F",
")",
"<<",
"6",
")",
"|",
"(",
"reference",
"[",
"readOffset",
"++",
"]",
"&",
"0x3F",
")",
";",
"}",
"else",
"{",
"length",
"--",
";",
"x",
"=",
"(",
"(",
"x",
"&",
"0x1F",
")",
"<<",
"6",
")",
"|",
"(",
"reference",
"[",
"readOffset",
"++",
"]",
"&",
"0x3F",
")",
";",
"}",
"}",
"outputBuf",
"[",
"outputPos",
"++",
"]",
"=",
"(",
"char",
")",
"x",
";",
"}",
"if",
"(",
"outputPos",
"!=",
"bytesAvailable",
")",
"{",
"System",
".",
"arraycopy",
"(",
"outputBuf",
",",
"0",
",",
"(",
"outputBuf",
"=",
"new",
"char",
"[",
"outputPos",
"]",
")",
",",
"0",
",",
"outputPos",
")",
";",
"}",
"return",
"outputBuf",
";",
"}",
"}",
"</s>"
] |
4,313 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
";",
"import",
"java",
".",
"util",
".",
"Arrays",
";",
"import",
"java",
".",
"util",
".",
"Comparator",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"HashSet",
";",
"import",
"java",
".",
"util",
".",
"Hashtable",
";",
"import",
"java",
".",
"util",
".",
"Iterator",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CategorizedProblem",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"IProblem",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"AbstractMethodDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"ICompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"ReferenceContext",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"SourceTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"parser",
".",
"RecoveryScannerData",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"CompilationResult",
"{",
"public",
"CategorizedProblem",
"problems",
"[",
"]",
";",
"public",
"CategorizedProblem",
"tasks",
"[",
"]",
";",
"public",
"int",
"problemCount",
";",
"public",
"int",
"taskCount",
";",
"public",
"ICompilationUnit",
"compilationUnit",
";",
"private",
"Map",
"problemsMap",
";",
"private",
"Set",
"firstErrors",
";",
"private",
"int",
"maxProblemPerUnit",
";",
"public",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"qualifiedReferences",
";",
"public",
"char",
"[",
"]",
"[",
"]",
"simpleNameReferences",
";",
"public",
"char",
"[",
"]",
"[",
"]",
"rootReferences",
";",
"public",
"boolean",
"hasAnnotations",
"=",
"false",
";",
"public",
"int",
"lineSeparatorPositions",
"[",
"]",
";",
"public",
"RecoveryScannerData",
"recoveryScannerData",
";",
"public",
"Map",
"compiledTypes",
"=",
"new",
"Hashtable",
"(",
"11",
")",
";",
"public",
"int",
"unitIndex",
",",
"totalUnitsKnown",
";",
"public",
"boolean",
"hasBeenAccepted",
"=",
"false",
";",
"public",
"char",
"[",
"]",
"fileName",
";",
"public",
"boolean",
"hasInconsistentToplevelHierarchies",
"=",
"false",
";",
"public",
"boolean",
"hasSyntaxError",
"=",
"false",
";",
"public",
"char",
"[",
"]",
"[",
"]",
"packageName",
";",
"public",
"boolean",
"checkSecondaryTypes",
"=",
"false",
";",
"private",
"int",
"numberOfErrors",
";",
"private",
"static",
"final",
"int",
"[",
"]",
"EMPTY_LINE_ENDS",
"=",
"Util",
".",
"EMPTY_INT_ARRAY",
";",
"private",
"static",
"final",
"Comparator",
"PROBLEM_COMPARATOR",
"=",
"new",
"Comparator",
"(",
")",
"{",
"public",
"int",
"compare",
"(",
"Object",
"o1",
",",
"Object",
"o2",
")",
"{",
"return",
"(",
"(",
"CategorizedProblem",
")",
"o1",
")",
".",
"getSourceStart",
"(",
")",
"-",
"(",
"(",
"CategorizedProblem",
")",
"o2",
")",
".",
"getSourceStart",
"(",
")",
";",
"}",
"}",
";",
"public",
"CompilationResult",
"(",
"char",
"[",
"]",
"fileName",
",",
"int",
"unitIndex",
",",
"int",
"totalUnitsKnown",
",",
"int",
"maxProblemPerUnit",
")",
"{",
"this",
".",
"fileName",
"=",
"fileName",
";",
"this",
".",
"unitIndex",
"=",
"unitIndex",
";",
"this",
".",
"totalUnitsKnown",
"=",
"totalUnitsKnown",
";",
"this",
".",
"maxProblemPerUnit",
"=",
"maxProblemPerUnit",
";",
"}",
"public",
"CompilationResult",
"(",
"ICompilationUnit",
"compilationUnit",
",",
"int",
"unitIndex",
",",
"int",
"totalUnitsKnown",
",",
"int",
"maxProblemPerUnit",
")",
"{",
"this",
".",
"fileName",
"=",
"compilationUnit",
".",
"getFileName",
"(",
")",
";",
"this",
".",
"compilationUnit",
"=",
"compilationUnit",
";",
"this",
".",
"unitIndex",
"=",
"unitIndex",
";",
"this",
".",
"totalUnitsKnown",
"=",
"totalUnitsKnown",
";",
"this",
".",
"maxProblemPerUnit",
"=",
"maxProblemPerUnit",
";",
"}",
"private",
"int",
"computePriority",
"(",
"CategorizedProblem",
"problem",
")",
"{",
"final",
"int",
"P_STATIC",
"=",
"10000",
";",
"final",
"int",
"P_OUTSIDE_METHOD",
"=",
"40000",
";",
"final",
"int",
"P_FIRST_ERROR",
"=",
"20000",
";",
"final",
"int",
"P_ERROR",
"=",
"100000",
";",
"int",
"priority",
"=",
"10000",
"-",
"problem",
".",
"getSourceLineNumber",
"(",
")",
";",
"if",
"(",
"priority",
"<",
"0",
")",
"priority",
"=",
"0",
";",
"if",
"(",
"problem",
".",
"isError",
"(",
")",
")",
"{",
"priority",
"+=",
"P_ERROR",
";",
"}",
"ReferenceContext",
"context",
"=",
"this",
".",
"problemsMap",
"==",
"null",
"?",
"null",
":",
"(",
"ReferenceContext",
")",
"this",
".",
"problemsMap",
".",
"get",
"(",
"problem",
")",
";",
"if",
"(",
"context",
"!=",
"null",
")",
"{",
"if",
"(",
"context",
"instanceof",
"AbstractMethodDeclaration",
")",
"{",
"AbstractMethodDeclaration",
"method",
"=",
"(",
"AbstractMethodDeclaration",
")",
"context",
";",
"if",
"(",
"method",
".",
"isStatic",
"(",
")",
")",
"{",
"priority",
"+=",
"P_STATIC",
";",
"}",
"}",
"else",
"{",
"priority",
"+=",
"P_OUTSIDE_METHOD",
";",
"}",
"if",
"(",
"this",
".",
"firstErrors",
".",
"contains",
"(",
"problem",
")",
")",
"{",
"priority",
"+=",
"P_FIRST_ERROR",
";",
"}",
"}",
"else",
"{",
"priority",
"+=",
"P_OUTSIDE_METHOD",
";",
"}",
"return",
"priority",
";",
"}",
"public",
"CategorizedProblem",
"[",
"]",
"getAllProblems",
"(",
")",
"{",
"CategorizedProblem",
"[",
"]",
"onlyProblems",
"=",
"getProblems",
"(",
")",
";",
"int",
"onlyProblemCount",
"=",
"onlyProblems",
"!=",
"null",
"?",
"onlyProblems",
".",
"length",
":",
"0",
";",
"CategorizedProblem",
"[",
"]",
"onlyTasks",
"=",
"getTasks",
"(",
")",
";",
"int",
"onlyTaskCount",
"=",
"onlyTasks",
"!=",
"null",
"?",
"onlyTasks",
".",
"length",
":",
"0",
";",
"if",
"(",
"onlyTaskCount",
"==",
"0",
")",
"{",
"return",
"onlyProblems",
";",
"}",
"if",
"(",
"onlyProblemCount",
"==",
"0",
")",
"{",
"return",
"onlyTasks",
";",
"}",
"int",
"totalNumberOfProblem",
"=",
"onlyProblemCount",
"+",
"onlyTaskCount",
";",
"CategorizedProblem",
"[",
"]",
"allProblems",
"=",
"new",
"CategorizedProblem",
"[",
"totalNumberOfProblem",
"]",
";",
"int",
"allProblemIndex",
"=",
"0",
";",
"int",
"taskIndex",
"=",
"0",
";",
"int",
"problemIndex",
"=",
"0",
";",
"while",
"(",
"taskIndex",
"+",
"problemIndex",
"<",
"totalNumberOfProblem",
")",
"{",
"CategorizedProblem",
"nextTask",
"=",
"null",
";",
"CategorizedProblem",
"nextProblem",
"=",
"null",
";",
"if",
"(",
"taskIndex",
"<",
"onlyTaskCount",
")",
"{",
"nextTask",
"=",
"onlyTasks",
"[",
"taskIndex",
"]",
";",
"}",
"if",
"(",
"problemIndex",
"<",
"onlyProblemCount",
")",
"{",
"nextProblem",
"=",
"onlyProblems",
"[",
"problemIndex",
"]",
";",
"}",
"CategorizedProblem",
"currentProblem",
"=",
"null",
";",
"if",
"(",
"nextProblem",
"!=",
"null",
")",
"{",
"if",
"(",
"nextTask",
"!=",
"null",
")",
"{",
"if",
"(",
"nextProblem",
".",
"getSourceStart",
"(",
")",
"<",
"nextTask",
".",
"getSourceStart",
"(",
")",
")",
"{",
"currentProblem",
"=",
"nextProblem",
";",
"problemIndex",
"++",
";",
"}",
"else",
"{",
"currentProblem",
"=",
"nextTask",
";",
"taskIndex",
"++",
";",
"}",
"}",
"else",
"{",
"currentProblem",
"=",
"nextProblem",
";",
"problemIndex",
"++",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"nextTask",
"!=",
"null",
")",
"{",
"currentProblem",
"=",
"nextTask",
";",
"taskIndex",
"++",
";",
"}",
"}",
"allProblems",
"[",
"allProblemIndex",
"++",
"]",
"=",
"currentProblem",
";",
"}",
"return",
"allProblems",
";",
"}",
"public",
"ClassFile",
"[",
"]",
"getClassFiles",
"(",
")",
"{",
"ClassFile",
"[",
"]",
"classFiles",
"=",
"new",
"ClassFile",
"[",
"this",
".",
"compiledTypes",
".",
"size",
"(",
")",
"]",
";",
"this",
".",
"compiledTypes",
".",
"values",
"(",
")",
".",
"toArray",
"(",
"classFiles",
")",
";",
"return",
"classFiles",
";",
"}",
"public",
"ICompilationUnit",
"getCompilationUnit",
"(",
")",
"{",
"return",
"this",
".",
"compilationUnit",
";",
"}",
"public",
"CategorizedProblem",
"[",
"]",
"getErrors",
"(",
")",
"{",
"CategorizedProblem",
"[",
"]",
"reportedProblems",
"=",
"getProblems",
"(",
")",
";",
"int",
"errorCount",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"problemCount",
";",
"i",
"++",
")",
"{",
"if",
"(",
"reportedProblems",
"[",
"i",
"]",
".",
"isError",
"(",
")",
")",
"errorCount",
"++",
";",
"}",
"if",
"(",
"errorCount",
"==",
"this",
".",
"problemCount",
")",
"return",
"reportedProblems",
";",
"CategorizedProblem",
"[",
"]",
"errors",
"=",
"new",
"CategorizedProblem",
"[",
"errorCount",
"]",
";",
"int",
"index",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"problemCount",
";",
"i",
"++",
")",
"{",
"if",
"(",
"reportedProblems",
"[",
"i",
"]",
".",
"isError",
"(",
")",
")",
"errors",
"[",
"index",
"++",
"]",
"=",
"reportedProblems",
"[",
"i",
"]",
";",
"}",
"return",
"errors",
";",
"}",
"public",
"char",
"[",
"]",
"getFileName",
"(",
")",
"{",
"return",
"this",
".",
"fileName",
";",
"}",
"public",
"int",
"[",
"]",
"getLineSeparatorPositions",
"(",
")",
"{",
"return",
"this",
".",
"lineSeparatorPositions",
"==",
"null",
"?",
"CompilationResult",
".",
"EMPTY_LINE_ENDS",
":",
"this",
".",
"lineSeparatorPositions",
";",
"}",
"public",
"CategorizedProblem",
"[",
"]",
"getProblems",
"(",
")",
"{",
"if",
"(",
"this",
".",
"problems",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"problemCount",
"!=",
"this",
".",
"problems",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"problems",
",",
"0",
",",
"(",
"this",
".",
"problems",
"=",
"new",
"CategorizedProblem",
"[",
"this",
".",
"problemCount",
"]",
")",
",",
"0",
",",
"this",
".",
"problemCount",
")",
";",
"}",
"if",
"(",
"this",
".",
"maxProblemPerUnit",
">",
"0",
"&&",
"this",
".",
"problemCount",
">",
"this",
".",
"maxProblemPerUnit",
")",
"{",
"quickPrioritize",
"(",
"this",
".",
"problems",
",",
"0",
",",
"this",
".",
"problemCount",
"-",
"1",
")",
";",
"this",
".",
"problemCount",
"=",
"this",
".",
"maxProblemPerUnit",
";",
"System",
".",
"arraycopy",
"(",
"this",
".",
"problems",
",",
"0",
",",
"(",
"this",
".",
"problems",
"=",
"new",
"CategorizedProblem",
"[",
"this",
".",
"problemCount",
"]",
")",
",",
"0",
",",
"this",
".",
"problemCount",
")",
";",
"}",
"Arrays",
".",
"sort",
"(",
"this",
".",
"problems",
",",
"0",
",",
"this",
".",
"problems",
".",
"length",
",",
"CompilationResult",
".",
"PROBLEM_COMPARATOR",
")",
";",
"}",
"return",
"this",
".",
"problems",
";",
"}",
"public",
"CategorizedProblem",
"[",
"]",
"getTasks",
"(",
")",
"{",
"if",
"(",
"this",
".",
"tasks",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"taskCount",
"!=",
"this",
".",
"tasks",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"tasks",
",",
"0",
",",
"(",
"this",
".",
"tasks",
"=",
"new",
"CategorizedProblem",
"[",
"this",
".",
"taskCount",
"]",
")",
",",
"0",
",",
"this",
".",
"taskCount",
")",
";",
"}",
"Arrays",
".",
"sort",
"(",
"this",
".",
"tasks",
",",
"0",
",",
"this",
".",
"tasks",
".",
"length",
",",
"CompilationResult",
".",
"PROBLEM_COMPARATOR",
")",
";",
"}",
"return",
"this",
".",
"tasks",
";",
"}",
"public",
"boolean",
"hasErrors",
"(",
")",
"{",
"return",
"this",
".",
"numberOfErrors",
"!=",
"0",
";",
"}",
"public",
"boolean",
"hasProblems",
"(",
")",
"{",
"return",
"this",
".",
"problemCount",
"!=",
"0",
";",
"}",
"public",
"boolean",
"hasTasks",
"(",
")",
"{",
"return",
"this",
".",
"taskCount",
"!=",
"0",
";",
"}",
"public",
"boolean",
"hasWarnings",
"(",
")",
"{",
"if",
"(",
"this",
".",
"problems",
"!=",
"null",
")",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"problemCount",
";",
"i",
"++",
")",
"{",
"if",
"(",
"this",
".",
"problems",
"[",
"i",
"]",
".",
"isWarning",
"(",
")",
")",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"private",
"void",
"quickPrioritize",
"(",
"CategorizedProblem",
"[",
"]",
"problemList",
",",
"int",
"left",
",",
"int",
"right",
")",
"{",
"if",
"(",
"left",
">=",
"right",
")",
"return",
";",
"int",
"original_left",
"=",
"left",
";",
"int",
"original_right",
"=",
"right",
";",
"int",
"mid",
"=",
"computePriority",
"(",
"problemList",
"[",
"left",
"+",
"(",
"right",
"-",
"left",
")",
"/",
"2",
"]",
")",
";",
"do",
"{",
"while",
"(",
"computePriority",
"(",
"problemList",
"[",
"right",
"]",
")",
"<",
"mid",
")",
"right",
"--",
";",
"while",
"(",
"mid",
"<",
"computePriority",
"(",
"problemList",
"[",
"left",
"]",
")",
")",
"left",
"++",
";",
"if",
"(",
"left",
"<=",
"right",
")",
"{",
"CategorizedProblem",
"tmp",
"=",
"problemList",
"[",
"left",
"]",
";",
"problemList",
"[",
"left",
"]",
"=",
"problemList",
"[",
"right",
"]",
";",
"problemList",
"[",
"right",
"]",
"=",
"tmp",
";",
"left",
"++",
";",
"right",
"--",
";",
"}",
"}",
"while",
"(",
"left",
"<=",
"right",
")",
";",
"if",
"(",
"original_left",
"<",
"right",
")",
"quickPrioritize",
"(",
"problemList",
",",
"original_left",
",",
"right",
")",
";",
"if",
"(",
"left",
"<",
"original_right",
")",
"quickPrioritize",
"(",
"problemList",
",",
"left",
",",
"original_right",
")",
";",
"}",
"public",
"void",
"recordPackageName",
"(",
"char",
"[",
"]",
"[",
"]",
"packName",
")",
"{",
"this",
".",
"packageName",
"=",
"packName",
";",
"}",
"public",
"void",
"record",
"(",
"CategorizedProblem",
"newProblem",
",",
"ReferenceContext",
"referenceContext",
")",
"{",
"if",
"(",
"newProblem",
".",
"getID",
"(",
")",
"==",
"IProblem",
".",
"Task",
")",
"{",
"recordTask",
"(",
"newProblem",
")",
";",
"return",
";",
"}",
"if",
"(",
"this",
".",
"problemCount",
"==",
"0",
")",
"{",
"this",
".",
"problems",
"=",
"new",
"CategorizedProblem",
"[",
"5",
"]",
";",
"}",
"else",
"if",
"(",
"this",
".",
"problemCount",
"==",
"this",
".",
"problems",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"problems",
",",
"0",
",",
"(",
"this",
".",
"problems",
"=",
"new",
"CategorizedProblem",
"[",
"this",
".",
"problemCount",
"*",
"2",
"]",
")",
",",
"0",
",",
"this",
".",
"problemCount",
")",
";",
"}",
"this",
".",
"problems",
"[",
"this",
".",
"problemCount",
"++",
"]",
"=",
"newProblem",
";",
"if",
"(",
"referenceContext",
"!=",
"null",
")",
"{",
"if",
"(",
"this",
".",
"problemsMap",
"==",
"null",
")",
"this",
".",
"problemsMap",
"=",
"new",
"HashMap",
"(",
"5",
")",
";",
"if",
"(",
"this",
".",
"firstErrors",
"==",
"null",
")",
"this",
".",
"firstErrors",
"=",
"new",
"HashSet",
"(",
"5",
")",
";",
"if",
"(",
"newProblem",
".",
"isError",
"(",
")",
"&&",
"!",
"referenceContext",
".",
"hasErrors",
"(",
")",
")",
"this",
".",
"firstErrors",
".",
"add",
"(",
"newProblem",
")",
";",
"this",
".",
"problemsMap",
".",
"put",
"(",
"newProblem",
",",
"referenceContext",
")",
";",
"}",
"if",
"(",
"newProblem",
".",
"isError",
"(",
")",
")",
"{",
"this",
".",
"numberOfErrors",
"++",
";",
"if",
"(",
"(",
"newProblem",
".",
"getID",
"(",
")",
"&",
"IProblem",
".",
"Syntax",
")",
"!=",
"0",
")",
"{",
"this",
".",
"hasSyntaxError",
"=",
"true",
";",
"}",
"}",
"}",
"public",
"void",
"record",
"(",
"char",
"[",
"]",
"typeName",
",",
"ClassFile",
"classFile",
")",
"{",
"SourceTypeBinding",
"sourceType",
"=",
"classFile",
".",
"referenceBinding",
";",
"if",
"(",
"!",
"sourceType",
".",
"isLocalType",
"(",
")",
"&&",
"sourceType",
".",
"isHierarchyInconsistent",
"(",
")",
")",
"{",
"this",
".",
"hasInconsistentToplevelHierarchies",
"=",
"true",
";",
"}",
"this",
".",
"compiledTypes",
".",
"put",
"(",
"typeName",
",",
"classFile",
")",
";",
"}",
"private",
"void",
"recordTask",
"(",
"CategorizedProblem",
"newProblem",
")",
"{",
"if",
"(",
"this",
".",
"taskCount",
"==",
"0",
")",
"{",
"this",
".",
"tasks",
"=",
"new",
"CategorizedProblem",
"[",
"5",
"]",
";",
"}",
"else",
"if",
"(",
"this",
".",
"taskCount",
"==",
"this",
".",
"tasks",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"this",
".",
"tasks",
",",
"0",
",",
"(",
"this",
".",
"tasks",
"=",
"new",
"CategorizedProblem",
"[",
"this",
".",
"taskCount",
"*",
"2",
"]",
")",
",",
"0",
",",
"this",
".",
"taskCount",
")",
";",
"}",
"this",
".",
"tasks",
"[",
"this",
".",
"taskCount",
"++",
"]",
"=",
"newProblem",
";",
"}",
"public",
"void",
"removeProblem",
"(",
"CategorizedProblem",
"problem",
")",
"{",
"if",
"(",
"this",
".",
"problemsMap",
"!=",
"null",
")",
"this",
".",
"problemsMap",
".",
"remove",
"(",
"problem",
")",
";",
"if",
"(",
"this",
".",
"firstErrors",
"!=",
"null",
")",
"this",
".",
"firstErrors",
".",
"remove",
"(",
"problem",
")",
";",
"if",
"(",
"problem",
".",
"isError",
"(",
")",
")",
"{",
"this",
".",
"numberOfErrors",
"--",
";",
"}",
"this",
".",
"problemCount",
"--",
";",
"}",
"public",
"CompilationResult",
"tagAsAccepted",
"(",
")",
"{",
"this",
".",
"hasBeenAccepted",
"=",
"true",
";",
"this",
".",
"problemsMap",
"=",
"null",
";",
"this",
".",
"firstErrors",
"=",
"null",
";",
"return",
"this",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"this",
".",
"fileName",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"Filename",
":",
"\"",
")",
".",
"append",
"(",
"this",
".",
"fileName",
")",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"if",
"(",
"this",
".",
"compiledTypes",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"Iterator",
"keys",
"=",
"this",
".",
"compiledTypes",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"keys",
".",
"hasNext",
"(",
")",
")",
"{",
"char",
"[",
"]",
"typeName",
"=",
"(",
"char",
"[",
"]",
")",
"keys",
".",
"next",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"t",
"-",
"\"",
")",
".",
"append",
"(",
"typeName",
")",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"}",
"if",
"(",
"this",
".",
"problems",
"!=",
"null",
")",
"{",
"buffer",
".",
"append",
"(",
"this",
".",
"problemCount",
")",
".",
"append",
"(",
"\"\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"problemCount",
";",
"i",
"++",
")",
"{",
"buffer",
".",
"append",
"(",
"\"t",
"-",
"\"",
")",
".",
"append",
"(",
"this",
".",
"problems",
"[",
"i",
"]",
")",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"}",
"else",
"{",
"buffer",
".",
"append",
"(",
"\"No",
"PROBLEMn\"",
")",
";",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,314 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"IGenericType",
"extends",
"IDependent",
"{",
"int",
"getModifiers",
"(",
")",
";",
"boolean",
"isBinaryType",
"(",
")",
";",
"}",
"</s>"
] |
4,315 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"ISourceType",
"extends",
"IGenericType",
"{",
"int",
"getDeclarationSourceEnd",
"(",
")",
";",
"int",
"getDeclarationSourceStart",
"(",
")",
";",
"ISourceType",
"getEnclosingType",
"(",
")",
";",
"ISourceField",
"[",
"]",
"getFields",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"getInterfaceNames",
"(",
")",
";",
"ISourceType",
"[",
"]",
"getMemberTypes",
"(",
")",
";",
"ISourceMethod",
"[",
"]",
"getMethods",
"(",
")",
";",
"char",
"[",
"]",
"getName",
"(",
")",
";",
"int",
"getNameSourceEnd",
"(",
")",
";",
"int",
"getNameSourceStart",
"(",
")",
";",
"char",
"[",
"]",
"getSuperclassName",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"getTypeParameterBounds",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"getTypeParameterNames",
"(",
")",
";",
"}",
"</s>"
] |
4,316 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"IProblem",
";",
"public",
"class",
"AccessRule",
"{",
"public",
"static",
"final",
"int",
"IgnoreIfBetter",
"=",
"0x02000000",
";",
"public",
"char",
"[",
"]",
"pattern",
";",
"public",
"int",
"problemId",
";",
"public",
"AccessRule",
"(",
"char",
"[",
"]",
"pattern",
",",
"int",
"problemId",
")",
"{",
"this",
"(",
"pattern",
",",
"problemId",
",",
"false",
")",
";",
"}",
"public",
"AccessRule",
"(",
"char",
"[",
"]",
"pattern",
",",
"int",
"problemId",
",",
"boolean",
"keepLooking",
")",
"{",
"this",
".",
"pattern",
"=",
"pattern",
";",
"this",
".",
"problemId",
"=",
"keepLooking",
"?",
"problemId",
"|",
"IgnoreIfBetter",
":",
"problemId",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"this",
".",
"problemId",
"*",
"17",
"+",
"CharOperation",
".",
"hashCode",
"(",
"this",
".",
"pattern",
")",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"!",
"(",
"obj",
"instanceof",
"AccessRule",
")",
")",
"return",
"false",
";",
"AccessRule",
"other",
"=",
"(",
"AccessRule",
")",
"obj",
";",
"if",
"(",
"this",
".",
"problemId",
"!=",
"other",
".",
"problemId",
")",
"return",
"false",
";",
"return",
"CharOperation",
".",
"equals",
"(",
"this",
".",
"pattern",
",",
"other",
".",
"pattern",
")",
";",
"}",
"public",
"int",
"getProblemId",
"(",
")",
"{",
"return",
"this",
".",
"problemId",
"&",
"~",
"IgnoreIfBetter",
";",
"}",
"public",
"boolean",
"ignoreIfBetter",
"(",
")",
"{",
"return",
"(",
"this",
".",
"problemId",
"&",
"IgnoreIfBetter",
")",
"!=",
"0",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"pattern=\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"pattern",
")",
";",
"switch",
"(",
"getProblemId",
"(",
")",
")",
"{",
"case",
"IProblem",
".",
"ForbiddenReference",
":",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"break",
";",
"case",
"IProblem",
".",
"DiscouragedReference",
":",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"break",
";",
"default",
":",
"buffer",
".",
"append",
"(",
"\"",
"(ACCESSIBLE\"",
")",
";",
"break",
";",
"}",
"if",
"(",
"ignoreIfBetter",
"(",
")",
")",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"')'",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,317 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"IBinaryAnnotation",
"{",
"char",
"[",
"]",
"getTypeName",
"(",
")",
";",
"IBinaryElementValuePair",
"[",
"]",
"getElementValuePairs",
"(",
")",
";",
"}",
"</s>"
] |
4,318 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"IDependent",
"{",
"char",
"JAR_FILE_ENTRY_SEPARATOR",
"=",
"'|'",
";",
"char",
"[",
"]",
"getFileName",
"(",
")",
";",
"}",
"</s>"
] |
4,319 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"import",
"java",
".",
"util",
".",
"Arrays",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"public",
"class",
"ClassSignature",
"{",
"char",
"[",
"]",
"className",
";",
"public",
"ClassSignature",
"(",
"final",
"char",
"[",
"]",
"className",
")",
"{",
"this",
".",
"className",
"=",
"className",
";",
"}",
"public",
"char",
"[",
"]",
"getTypeName",
"(",
")",
"{",
"return",
"this",
".",
"className",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"className",
")",
";",
"buffer",
".",
"append",
"(",
"\".class\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"final",
"int",
"prime",
"=",
"31",
";",
"int",
"result",
"=",
"1",
";",
"result",
"=",
"prime",
"*",
"result",
"+",
"CharOperation",
".",
"hashCode",
"(",
"this",
".",
"className",
")",
";",
"return",
"result",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"this",
"==",
"obj",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"obj",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"getClass",
"(",
")",
"!=",
"obj",
".",
"getClass",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"ClassSignature",
"other",
"=",
"(",
"ClassSignature",
")",
"obj",
";",
"return",
"Arrays",
".",
"equals",
"(",
"this",
".",
"className",
",",
"other",
".",
"className",
")",
";",
"}",
"}",
"</s>"
] |
4,320 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"import",
"java",
".",
"util",
".",
"Arrays",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"public",
"class",
"EnumConstantSignature",
"{",
"char",
"[",
"]",
"typeName",
";",
"char",
"[",
"]",
"constName",
";",
"public",
"EnumConstantSignature",
"(",
"char",
"[",
"]",
"typeName",
",",
"char",
"[",
"]",
"constName",
")",
"{",
"this",
".",
"typeName",
"=",
"typeName",
";",
"this",
".",
"constName",
"=",
"constName",
";",
"}",
"public",
"char",
"[",
"]",
"getTypeName",
"(",
")",
"{",
"return",
"this",
".",
"typeName",
";",
"}",
"public",
"char",
"[",
"]",
"getEnumConstantName",
"(",
")",
"{",
"return",
"this",
".",
"constName",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"typeName",
")",
";",
"buffer",
".",
"append",
"(",
"'.'",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"constName",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"final",
"int",
"prime",
"=",
"31",
";",
"int",
"result",
"=",
"1",
";",
"result",
"=",
"prime",
"*",
"result",
"+",
"CharOperation",
".",
"hashCode",
"(",
"this",
".",
"constName",
")",
";",
"result",
"=",
"prime",
"*",
"result",
"+",
"CharOperation",
".",
"hashCode",
"(",
"this",
".",
"typeName",
")",
";",
"return",
"result",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"this",
"==",
"obj",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"obj",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"getClass",
"(",
")",
"!=",
"obj",
".",
"getClass",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"EnumConstantSignature",
"other",
"=",
"(",
"EnumConstantSignature",
")",
"obj",
";",
"if",
"(",
"!",
"Arrays",
".",
"equals",
"(",
"this",
".",
"constName",
",",
"other",
".",
"constName",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"Arrays",
".",
"equals",
"(",
"this",
".",
"typeName",
",",
"other",
".",
"typeName",
")",
";",
"}",
"}",
"</s>"
] |
4,321 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"Constant",
";",
"public",
"interface",
"IBinaryField",
"extends",
"IGenericField",
"{",
"IBinaryAnnotation",
"[",
"]",
"getAnnotations",
"(",
")",
";",
"Constant",
"getConstant",
"(",
")",
";",
"char",
"[",
"]",
"getGenericSignature",
"(",
")",
";",
"char",
"[",
"]",
"getName",
"(",
")",
";",
"long",
"getTagBits",
"(",
")",
";",
"char",
"[",
"]",
"getTypeName",
"(",
")",
";",
"}",
"</s>"
] |
4,322 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"ISourceMethod",
"extends",
"IGenericMethod",
"{",
"int",
"getDeclarationSourceEnd",
"(",
")",
";",
"int",
"getDeclarationSourceStart",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"getExceptionTypeNames",
"(",
")",
";",
"int",
"getNameSourceEnd",
"(",
")",
";",
"int",
"getNameSourceStart",
"(",
")",
";",
"char",
"[",
"]",
"getReturnTypeName",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"getTypeParameterNames",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"getTypeParameterBounds",
"(",
")",
";",
"}",
"</s>"
] |
4,323 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"IBinaryMethod",
"extends",
"IGenericMethod",
"{",
"IBinaryAnnotation",
"[",
"]",
"getAnnotations",
"(",
")",
";",
"Object",
"getDefaultValue",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"getExceptionTypeNames",
"(",
")",
";",
"char",
"[",
"]",
"getGenericSignature",
"(",
")",
";",
"char",
"[",
"]",
"getMethodDescriptor",
"(",
")",
";",
"IBinaryAnnotation",
"[",
"]",
"getParameterAnnotations",
"(",
"int",
"index",
")",
";",
"char",
"[",
"]",
"getSelector",
"(",
")",
";",
"long",
"getTagBits",
"(",
")",
";",
"boolean",
"isClinit",
"(",
")",
";",
"}",
"</s>"
] |
4,324 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"ISourceField",
"extends",
"IGenericField",
"{",
"int",
"getDeclarationSourceEnd",
"(",
")",
";",
"int",
"getDeclarationSourceStart",
"(",
")",
";",
"char",
"[",
"]",
"getInitializationSource",
"(",
")",
";",
"int",
"getNameSourceEnd",
"(",
")",
";",
"int",
"getNameSourceStart",
"(",
")",
";",
"char",
"[",
"]",
"getTypeName",
"(",
")",
";",
"}",
"</s>"
] |
4,325 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"IBinaryNestedType",
"{",
"char",
"[",
"]",
"getEnclosingTypeName",
"(",
")",
";",
"int",
"getModifiers",
"(",
")",
";",
"char",
"[",
"]",
"getName",
"(",
")",
";",
"}",
"</s>"
] |
4,326 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"INameEnvironment",
"{",
"NameEnvironmentAnswer",
"findType",
"(",
"char",
"[",
"]",
"[",
"]",
"compoundTypeName",
")",
";",
"NameEnvironmentAnswer",
"findType",
"(",
"char",
"[",
"]",
"typeName",
",",
"char",
"[",
"]",
"[",
"]",
"packageName",
")",
";",
"boolean",
"isPackage",
"(",
"char",
"[",
"]",
"[",
"]",
"parentPackageName",
",",
"char",
"[",
"]",
"packageName",
")",
";",
"void",
"cleanup",
"(",
")",
";",
"}",
"</s>"
] |
4,327 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"IGenericField",
"{",
"int",
"getModifiers",
"(",
")",
";",
"}",
"</s>"
] |
4,328 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"public",
"interface",
"IBinaryType",
"extends",
"IGenericType",
"{",
"char",
"[",
"]",
"[",
"]",
"NoInterface",
"=",
"CharOperation",
".",
"NO_CHAR_CHAR",
";",
"IBinaryNestedType",
"[",
"]",
"NoNestedType",
"=",
"new",
"IBinaryNestedType",
"[",
"0",
"]",
";",
"IBinaryField",
"[",
"]",
"NoField",
"=",
"new",
"IBinaryField",
"[",
"0",
"]",
";",
"IBinaryMethod",
"[",
"]",
"NoMethod",
"=",
"new",
"IBinaryMethod",
"[",
"0",
"]",
";",
"IBinaryAnnotation",
"[",
"]",
"getAnnotations",
"(",
")",
";",
"char",
"[",
"]",
"getEnclosingMethod",
"(",
")",
";",
"char",
"[",
"]",
"getEnclosingTypeName",
"(",
")",
";",
"IBinaryField",
"[",
"]",
"getFields",
"(",
")",
";",
"char",
"[",
"]",
"getGenericSignature",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"getInterfaceNames",
"(",
")",
";",
"IBinaryNestedType",
"[",
"]",
"getMemberTypes",
"(",
")",
";",
"IBinaryMethod",
"[",
"]",
"getMethods",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"getMissingTypeNames",
"(",
")",
";",
"char",
"[",
"]",
"getName",
"(",
")",
";",
"char",
"[",
"]",
"getSourceName",
"(",
")",
";",
"char",
"[",
"]",
"getSuperclassName",
"(",
")",
";",
"long",
"getTagBits",
"(",
")",
";",
"boolean",
"isAnonymous",
"(",
")",
";",
"boolean",
"isLocal",
"(",
")",
";",
"boolean",
"isMember",
"(",
")",
";",
"char",
"[",
"]",
"sourceFileName",
"(",
")",
";",
"}",
"</s>"
] |
4,329 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"ICompilationUnit",
"extends",
"IDependent",
"{",
"char",
"[",
"]",
"getContents",
"(",
")",
";",
"char",
"[",
"]",
"getMainTypeName",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"getPackageName",
"(",
")",
";",
"}",
"</s>"
] |
4,330 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"class",
"AccessRestriction",
"{",
"private",
"AccessRule",
"accessRule",
";",
"public",
"byte",
"classpathEntryType",
";",
"public",
"static",
"final",
"byte",
"COMMAND_LINE",
"=",
"0",
",",
"PROJECT",
"=",
"1",
",",
"LIBRARY",
"=",
"2",
";",
"public",
"String",
"classpathEntryName",
";",
"public",
"AccessRestriction",
"(",
"AccessRule",
"accessRule",
",",
"byte",
"classpathEntryType",
",",
"String",
"classpathEntryName",
")",
"{",
"this",
".",
"accessRule",
"=",
"accessRule",
";",
"this",
".",
"classpathEntryName",
"=",
"classpathEntryName",
";",
"this",
".",
"classpathEntryType",
"=",
"classpathEntryType",
";",
"}",
"public",
"int",
"getProblemId",
"(",
")",
"{",
"return",
"this",
".",
"accessRule",
".",
"getProblemId",
"(",
")",
";",
"}",
"public",
"boolean",
"ignoreIfBetter",
"(",
")",
"{",
"return",
"this",
".",
"accessRule",
".",
"ignoreIfBetter",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,331 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"ISourceImport",
"{",
"int",
"getDeclarationSourceEnd",
"(",
")",
";",
"int",
"getDeclarationSourceStart",
"(",
")",
";",
"int",
"getModifiers",
"(",
")",
";",
"}",
"</s>"
] |
4,332 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"IBinaryElementValuePair",
"{",
"char",
"[",
"]",
"getName",
"(",
")",
";",
"Object",
"getValue",
"(",
")",
";",
"}",
"</s>"
] |
4,333 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"interface",
"IGenericMethod",
"{",
"int",
"getModifiers",
"(",
")",
";",
"boolean",
"isConstructor",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"getArgumentNames",
"(",
")",
";",
"}",
"</s>"
] |
4,334 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"public",
"class",
"NameEnvironmentAnswer",
"{",
"IBinaryType",
"binaryType",
";",
"ICompilationUnit",
"compilationUnit",
";",
"ISourceType",
"[",
"]",
"sourceTypes",
";",
"AccessRestriction",
"accessRestriction",
";",
"public",
"NameEnvironmentAnswer",
"(",
"IBinaryType",
"binaryType",
",",
"AccessRestriction",
"accessRestriction",
")",
"{",
"this",
".",
"binaryType",
"=",
"binaryType",
";",
"this",
".",
"accessRestriction",
"=",
"accessRestriction",
";",
"}",
"public",
"NameEnvironmentAnswer",
"(",
"ICompilationUnit",
"compilationUnit",
",",
"AccessRestriction",
"accessRestriction",
")",
"{",
"this",
".",
"compilationUnit",
"=",
"compilationUnit",
";",
"this",
".",
"accessRestriction",
"=",
"accessRestriction",
";",
"}",
"public",
"NameEnvironmentAnswer",
"(",
"ISourceType",
"[",
"]",
"sourceTypes",
",",
"AccessRestriction",
"accessRestriction",
")",
"{",
"this",
".",
"sourceTypes",
"=",
"sourceTypes",
";",
"this",
".",
"accessRestriction",
"=",
"accessRestriction",
";",
"}",
"public",
"AccessRestriction",
"getAccessRestriction",
"(",
")",
"{",
"return",
"this",
".",
"accessRestriction",
";",
"}",
"public",
"IBinaryType",
"getBinaryType",
"(",
")",
"{",
"return",
"this",
".",
"binaryType",
";",
"}",
"public",
"ICompilationUnit",
"getCompilationUnit",
"(",
")",
"{",
"return",
"this",
".",
"compilationUnit",
";",
"}",
"public",
"ISourceType",
"[",
"]",
"getSourceTypes",
"(",
")",
"{",
"return",
"this",
".",
"sourceTypes",
";",
"}",
"public",
"boolean",
"isBinaryType",
"(",
")",
"{",
"return",
"this",
".",
"binaryType",
"!=",
"null",
";",
"}",
"public",
"boolean",
"isCompilationUnit",
"(",
")",
"{",
"return",
"this",
".",
"compilationUnit",
"!=",
"null",
";",
"}",
"public",
"boolean",
"isSourceType",
"(",
")",
"{",
"return",
"this",
".",
"sourceTypes",
"!=",
"null",
";",
"}",
"public",
"boolean",
"ignoreIfBetter",
"(",
")",
"{",
"return",
"this",
".",
"accessRestriction",
"!=",
"null",
"&&",
"this",
".",
"accessRestriction",
".",
"ignoreIfBetter",
"(",
")",
";",
"}",
"public",
"boolean",
"isBetter",
"(",
"NameEnvironmentAnswer",
"otherAnswer",
")",
"{",
"if",
"(",
"otherAnswer",
"==",
"null",
")",
"return",
"true",
";",
"if",
"(",
"this",
".",
"accessRestriction",
"==",
"null",
")",
"return",
"true",
";",
"return",
"otherAnswer",
".",
"accessRestriction",
"!=",
"null",
"&&",
"this",
".",
"accessRestriction",
".",
"getProblemId",
"(",
")",
"<",
"otherAnswer",
".",
"accessRestriction",
".",
"getProblemId",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,335 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"IProblem",
";",
"public",
"class",
"AccessRuleSet",
"{",
"private",
"AccessRule",
"[",
"]",
"accessRules",
";",
"public",
"byte",
"classpathEntryType",
";",
"public",
"String",
"classpathEntryName",
";",
"public",
"AccessRuleSet",
"(",
"AccessRule",
"[",
"]",
"accessRules",
",",
"byte",
"classpathEntryType",
",",
"String",
"classpathEntryName",
")",
"{",
"this",
".",
"accessRules",
"=",
"accessRules",
";",
"this",
".",
"classpathEntryType",
"=",
"classpathEntryType",
";",
"this",
".",
"classpathEntryName",
"=",
"classpathEntryName",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"object",
")",
"{",
"if",
"(",
"this",
"==",
"object",
")",
"return",
"true",
";",
"if",
"(",
"!",
"(",
"object",
"instanceof",
"AccessRuleSet",
")",
")",
"return",
"false",
";",
"AccessRuleSet",
"otherRuleSet",
"=",
"(",
"AccessRuleSet",
")",
"object",
";",
"if",
"(",
"this",
".",
"classpathEntryType",
"!=",
"otherRuleSet",
".",
"classpathEntryType",
"||",
"this",
".",
"classpathEntryName",
"==",
"null",
"&&",
"otherRuleSet",
".",
"classpathEntryName",
"!=",
"null",
"||",
"!",
"this",
".",
"classpathEntryName",
".",
"equals",
"(",
"otherRuleSet",
".",
"classpathEntryName",
")",
")",
"{",
"return",
"false",
";",
"}",
"int",
"rulesLength",
"=",
"this",
".",
"accessRules",
".",
"length",
";",
"if",
"(",
"rulesLength",
"!=",
"otherRuleSet",
".",
"accessRules",
".",
"length",
")",
"return",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"rulesLength",
";",
"i",
"++",
")",
"if",
"(",
"!",
"this",
".",
"accessRules",
"[",
"i",
"]",
".",
"equals",
"(",
"otherRuleSet",
".",
"accessRules",
"[",
"i",
"]",
")",
")",
"return",
"false",
";",
"return",
"true",
";",
"}",
"public",
"AccessRule",
"[",
"]",
"getAccessRules",
"(",
")",
"{",
"return",
"this",
".",
"accessRules",
";",
"}",
"public",
"AccessRestriction",
"getViolatedRestriction",
"(",
"char",
"[",
"]",
"targetTypeFilePath",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"accessRules",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"AccessRule",
"accessRule",
"=",
"this",
".",
"accessRules",
"[",
"i",
"]",
";",
"if",
"(",
"CharOperation",
".",
"pathMatch",
"(",
"accessRule",
".",
"pattern",
",",
"targetTypeFilePath",
",",
"true",
",",
"'/'",
")",
")",
"{",
"switch",
"(",
"accessRule",
".",
"getProblemId",
"(",
")",
")",
"{",
"case",
"IProblem",
".",
"ForbiddenReference",
":",
"case",
"IProblem",
".",
"DiscouragedReference",
":",
"return",
"new",
"AccessRestriction",
"(",
"accessRule",
",",
"this",
".",
"classpathEntryType",
",",
"this",
".",
"classpathEntryName",
")",
";",
"default",
":",
"return",
"null",
";",
"}",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"final",
"int",
"prime",
"=",
"31",
";",
"int",
"result",
"=",
"1",
";",
"result",
"=",
"prime",
"*",
"result",
"+",
"hashCode",
"(",
"this",
".",
"accessRules",
")",
";",
"result",
"=",
"prime",
"*",
"result",
"+",
"(",
"(",
"this",
".",
"classpathEntryName",
"==",
"null",
")",
"?",
"0",
":",
"this",
".",
"classpathEntryName",
".",
"hashCode",
"(",
")",
")",
";",
"result",
"=",
"prime",
"*",
"result",
"+",
"this",
".",
"classpathEntryType",
";",
"return",
"result",
";",
"}",
"private",
"int",
"hashCode",
"(",
"AccessRule",
"[",
"]",
"rules",
")",
"{",
"final",
"int",
"prime",
"=",
"31",
";",
"if",
"(",
"rules",
"==",
"null",
")",
"return",
"0",
";",
"int",
"result",
"=",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"rules",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"result",
"=",
"prime",
"*",
"result",
"+",
"(",
"rules",
"[",
"i",
"]",
"==",
"null",
"?",
"0",
":",
"rules",
"[",
"i",
"]",
".",
"hashCode",
"(",
")",
")",
";",
"}",
"return",
"result",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"toString",
"(",
"true",
")",
";",
"}",
"public",
"String",
"toString",
"(",
"boolean",
"wrap",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"200",
")",
";",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"if",
"(",
"wrap",
")",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"this",
".",
"accessRules",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"wrap",
")",
"buffer",
".",
"append",
"(",
"'\\t'",
")",
";",
"AccessRule",
"accessRule",
"=",
"this",
".",
"accessRules",
"[",
"i",
"]",
";",
"buffer",
".",
"append",
"(",
"accessRule",
")",
";",
"if",
"(",
"wrap",
")",
"buffer",
".",
"append",
"(",
"'\\n'",
")",
";",
"else",
"if",
"(",
"i",
"<",
"length",
"-",
"1",
")",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"buffer",
".",
"append",
"(",
"this",
".",
"classpathEntryName",
")",
";",
"buffer",
".",
"append",
"(",
"\"]\"",
")",
";",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,336 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"DefaultProblem",
";",
"public",
"abstract",
"class",
"CategorizedProblem",
"implements",
"IProblem",
"{",
"public",
"static",
"final",
"int",
"CAT_UNSPECIFIED",
"=",
"0",
";",
"public",
"static",
"final",
"int",
"CAT_BUILDPATH",
"=",
"10",
";",
"public",
"static",
"final",
"int",
"CAT_SYNTAX",
"=",
"20",
";",
"public",
"static",
"final",
"int",
"CAT_IMPORT",
"=",
"30",
";",
"public",
"static",
"final",
"int",
"CAT_TYPE",
"=",
"40",
";",
"public",
"static",
"final",
"int",
"CAT_MEMBER",
"=",
"50",
";",
"public",
"static",
"final",
"int",
"CAT_INTERNAL",
"=",
"60",
";",
"public",
"static",
"final",
"int",
"CAT_JAVADOC",
"=",
"70",
";",
"public",
"static",
"final",
"int",
"CAT_CODE_STYLE",
"=",
"80",
";",
"public",
"static",
"final",
"int",
"CAT_POTENTIAL_PROGRAMMING_PROBLEM",
"=",
"90",
";",
"public",
"static",
"final",
"int",
"CAT_NAME_SHADOWING_CONFLICT",
"=",
"100",
";",
"public",
"static",
"final",
"int",
"CAT_DEPRECATION",
"=",
"110",
";",
"public",
"static",
"final",
"int",
"CAT_UNNECESSARY_CODE",
"=",
"120",
";",
"public",
"static",
"final",
"int",
"CAT_UNCHECKED_RAW",
"=",
"130",
";",
"public",
"static",
"final",
"int",
"CAT_NLS",
"=",
"140",
";",
"public",
"static",
"final",
"int",
"CAT_RESTRICTION",
"=",
"150",
";",
"public",
"abstract",
"int",
"getCategoryID",
"(",
")",
";",
"public",
"abstract",
"String",
"getMarkerType",
"(",
")",
";",
"public",
"String",
"[",
"]",
"getExtraMarkerAttributeNames",
"(",
")",
"{",
"return",
"CharOperation",
".",
"NO_STRINGS",
";",
"}",
"public",
"Object",
"[",
"]",
"getExtraMarkerAttributeValues",
"(",
")",
"{",
"return",
"DefaultProblem",
".",
"EMPTY_VALUES",
";",
"}",
"}",
"</s>"
] |
4,337 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"batch",
".",
"BatchCompiler",
";",
"public",
"abstract",
"class",
"CompilationProgress",
"{",
"public",
"abstract",
"void",
"begin",
"(",
"int",
"remainingWork",
")",
";",
"public",
"abstract",
"void",
"done",
"(",
")",
";",
"public",
"abstract",
"boolean",
"isCanceled",
"(",
")",
";",
"public",
"abstract",
"void",
"setTaskName",
"(",
"String",
"name",
")",
";",
"public",
"abstract",
"void",
"worked",
"(",
"int",
"workIncrement",
",",
"int",
"remainingWork",
")",
";",
"}",
"</s>"
] |
4,338 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"parser",
".",
"ScannerHelper",
";",
"public",
"final",
"class",
"CharOperation",
"{",
"public",
"static",
"final",
"char",
"[",
"]",
"NO_CHAR",
"=",
"new",
"char",
"[",
"0",
"]",
";",
"public",
"static",
"final",
"char",
"[",
"]",
"[",
"]",
"NO_CHAR_CHAR",
"=",
"new",
"char",
"[",
"0",
"]",
"[",
"]",
";",
"public",
"static",
"final",
"String",
"[",
"]",
"NO_STRINGS",
"=",
"new",
"String",
"[",
"0",
"]",
";",
"public",
"static",
"final",
"char",
"[",
"]",
"append",
"(",
"char",
"[",
"]",
"array",
",",
"char",
"suffix",
")",
"{",
"if",
"(",
"array",
"==",
"null",
")",
"return",
"new",
"char",
"[",
"]",
"{",
"suffix",
"}",
";",
"int",
"length",
"=",
"array",
".",
"length",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"0",
",",
"array",
"=",
"new",
"char",
"[",
"length",
"+",
"1",
"]",
",",
"0",
",",
"length",
")",
";",
"array",
"[",
"length",
"]",
"=",
"suffix",
";",
"return",
"array",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"append",
"(",
"char",
"[",
"]",
"target",
",",
"int",
"index",
",",
"char",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"int",
"targetLength",
"=",
"target",
".",
"length",
";",
"int",
"subLength",
"=",
"end",
"-",
"start",
";",
"int",
"newTargetLength",
"=",
"subLength",
"+",
"index",
";",
"if",
"(",
"newTargetLength",
">",
"targetLength",
")",
"{",
"System",
".",
"arraycopy",
"(",
"target",
",",
"0",
",",
"target",
"=",
"new",
"char",
"[",
"newTargetLength",
"*",
"2",
"]",
",",
"0",
",",
"index",
")",
";",
"}",
"System",
".",
"arraycopy",
"(",
"array",
",",
"start",
",",
"target",
",",
"index",
",",
"subLength",
")",
";",
"return",
"target",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"[",
"]",
"arrayConcat",
"(",
"char",
"[",
"]",
"[",
"]",
"first",
",",
"char",
"[",
"]",
"[",
"]",
"second",
")",
"{",
"if",
"(",
"first",
"==",
"null",
")",
"return",
"second",
";",
"if",
"(",
"second",
"==",
"null",
")",
"return",
"first",
";",
"int",
"length1",
"=",
"first",
".",
"length",
";",
"int",
"length2",
"=",
"second",
".",
"length",
";",
"char",
"[",
"]",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"length1",
"+",
"length2",
"]",
"[",
"]",
";",
"System",
".",
"arraycopy",
"(",
"first",
",",
"0",
",",
"result",
",",
"0",
",",
"length1",
")",
";",
"System",
".",
"arraycopy",
"(",
"second",
",",
"0",
",",
"result",
",",
"length1",
",",
"length2",
")",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"boolean",
"camelCaseMatch",
"(",
"char",
"[",
"]",
"pattern",
",",
"char",
"[",
"]",
"name",
")",
"{",
"if",
"(",
"pattern",
"==",
"null",
")",
"return",
"true",
";",
"if",
"(",
"name",
"==",
"null",
")",
"return",
"false",
";",
"return",
"camelCaseMatch",
"(",
"pattern",
",",
"0",
",",
"pattern",
".",
"length",
",",
"name",
",",
"0",
",",
"name",
".",
"length",
",",
"false",
")",
";",
"}",
"public",
"static",
"final",
"boolean",
"camelCaseMatch",
"(",
"char",
"[",
"]",
"pattern",
",",
"char",
"[",
"]",
"name",
",",
"boolean",
"samePartCount",
")",
"{",
"if",
"(",
"pattern",
"==",
"null",
")",
"return",
"true",
";",
"if",
"(",
"name",
"==",
"null",
")",
"return",
"false",
";",
"return",
"camelCaseMatch",
"(",
"pattern",
",",
"0",
",",
"pattern",
".",
"length",
",",
"name",
",",
"0",
",",
"name",
".",
"length",
",",
"samePartCount",
")",
";",
"}",
"public",
"static",
"final",
"boolean",
"camelCaseMatch",
"(",
"char",
"[",
"]",
"pattern",
",",
"int",
"patternStart",
",",
"int",
"patternEnd",
",",
"char",
"[",
"]",
"name",
",",
"int",
"nameStart",
",",
"int",
"nameEnd",
")",
"{",
"return",
"camelCaseMatch",
"(",
"pattern",
",",
"patternStart",
",",
"patternEnd",
",",
"name",
",",
"nameStart",
",",
"nameEnd",
",",
"false",
")",
";",
"}",
"public",
"static",
"final",
"boolean",
"camelCaseMatch",
"(",
"char",
"[",
"]",
"pattern",
",",
"int",
"patternStart",
",",
"int",
"patternEnd",
",",
"char",
"[",
"]",
"name",
",",
"int",
"nameStart",
",",
"int",
"nameEnd",
",",
"boolean",
"samePartCount",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"pattern",
"==",
"null",
")",
"return",
"true",
";",
"if",
"(",
"patternEnd",
"<",
"0",
")",
"patternEnd",
"=",
"pattern",
".",
"length",
";",
"if",
"(",
"nameEnd",
"<",
"0",
")",
"nameEnd",
"=",
"name",
".",
"length",
";",
"if",
"(",
"patternEnd",
"<=",
"patternStart",
")",
"return",
"nameEnd",
"<=",
"nameStart",
";",
"if",
"(",
"nameEnd",
"<=",
"nameStart",
")",
"return",
"false",
";",
"if",
"(",
"name",
"[",
"nameStart",
"]",
"!=",
"pattern",
"[",
"patternStart",
"]",
")",
"{",
"return",
"false",
";",
"}",
"char",
"patternChar",
",",
"nameChar",
";",
"int",
"iPattern",
"=",
"patternStart",
";",
"int",
"iName",
"=",
"nameStart",
";",
"while",
"(",
"true",
")",
"{",
"iPattern",
"++",
";",
"iName",
"++",
";",
"if",
"(",
"iPattern",
"==",
"patternEnd",
")",
"{",
"if",
"(",
"!",
"samePartCount",
"||",
"iName",
"==",
"nameEnd",
")",
"return",
"true",
";",
"while",
"(",
"true",
")",
"{",
"if",
"(",
"iName",
"==",
"nameEnd",
")",
"{",
"return",
"true",
";",
"}",
"nameChar",
"=",
"name",
"[",
"iName",
"]",
";",
"if",
"(",
"nameChar",
"<",
"ScannerHelper",
".",
"MAX_OBVIOUS",
")",
"{",
"if",
"(",
"(",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"nameChar",
"]",
"&",
"ScannerHelper",
".",
"C_UPPER_LETTER",
")",
"!=",
"0",
")",
"{",
"return",
"false",
";",
"}",
"}",
"else",
"if",
"(",
"!",
"Character",
".",
"isJavaIdentifierPart",
"(",
"nameChar",
")",
"||",
"Character",
".",
"isUpperCase",
"(",
"nameChar",
")",
")",
"{",
"return",
"false",
";",
"}",
"iName",
"++",
";",
"}",
"}",
"if",
"(",
"iName",
"==",
"nameEnd",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"(",
"patternChar",
"=",
"pattern",
"[",
"iPattern",
"]",
")",
"==",
"name",
"[",
"iName",
"]",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"patternChar",
"<",
"ScannerHelper",
".",
"MAX_OBVIOUS",
")",
"{",
"if",
"(",
"(",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"patternChar",
"]",
"&",
"(",
"ScannerHelper",
".",
"C_UPPER_LETTER",
"|",
"ScannerHelper",
".",
"C_DIGIT",
")",
")",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"}",
"else",
"if",
"(",
"Character",
".",
"isJavaIdentifierPart",
"(",
"patternChar",
")",
"&&",
"!",
"Character",
".",
"isUpperCase",
"(",
"patternChar",
")",
"&&",
"!",
"Character",
".",
"isDigit",
"(",
"patternChar",
")",
")",
"{",
"return",
"false",
";",
"}",
"while",
"(",
"true",
")",
"{",
"if",
"(",
"iName",
"==",
"nameEnd",
")",
"{",
"return",
"false",
";",
"}",
"nameChar",
"=",
"name",
"[",
"iName",
"]",
";",
"if",
"(",
"nameChar",
"<",
"ScannerHelper",
".",
"MAX_OBVIOUS",
")",
"{",
"int",
"charNature",
"=",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"nameChar",
"]",
";",
"if",
"(",
"(",
"charNature",
"&",
"(",
"ScannerHelper",
".",
"C_LOWER_LETTER",
"|",
"ScannerHelper",
".",
"C_SPECIAL",
")",
")",
"!=",
"0",
")",
"{",
"iName",
"++",
";",
"}",
"else",
"if",
"(",
"(",
"charNature",
"&",
"ScannerHelper",
".",
"C_DIGIT",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"patternChar",
"==",
"nameChar",
")",
"break",
";",
"iName",
"++",
";",
"}",
"else",
"if",
"(",
"patternChar",
"!=",
"nameChar",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"break",
";",
"}",
"}",
"else",
"if",
"(",
"Character",
".",
"isJavaIdentifierPart",
"(",
"nameChar",
")",
"&&",
"!",
"Character",
".",
"isUpperCase",
"(",
"nameChar",
")",
")",
"{",
"iName",
"++",
";",
"}",
"else",
"if",
"(",
"Character",
".",
"isDigit",
"(",
"nameChar",
")",
")",
"{",
"if",
"(",
"patternChar",
"==",
"nameChar",
")",
"break",
";",
"iName",
"++",
";",
"}",
"else",
"if",
"(",
"patternChar",
"!=",
"nameChar",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"break",
";",
"}",
"}",
"}",
"}",
"public",
"static",
"String",
"[",
"]",
"charArrayToStringArray",
"(",
"char",
"[",
"]",
"[",
"]",
"charArrays",
")",
"{",
"if",
"(",
"charArrays",
"==",
"null",
")",
"return",
"null",
";",
"int",
"length",
"=",
"charArrays",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"NO_STRINGS",
";",
"String",
"[",
"]",
"strings",
"=",
"new",
"String",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"strings",
"[",
"i",
"]",
"=",
"new",
"String",
"(",
"charArrays",
"[",
"i",
"]",
")",
";",
"return",
"strings",
";",
"}",
"public",
"static",
"String",
"charToString",
"(",
"char",
"[",
"]",
"charArray",
")",
"{",
"if",
"(",
"charArray",
"==",
"null",
")",
"return",
"null",
";",
"return",
"new",
"String",
"(",
"charArray",
")",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"[",
"]",
"arrayConcat",
"(",
"char",
"[",
"]",
"[",
"]",
"first",
",",
"char",
"[",
"]",
"second",
")",
"{",
"if",
"(",
"second",
"==",
"null",
")",
"return",
"first",
";",
"if",
"(",
"first",
"==",
"null",
")",
"return",
"new",
"char",
"[",
"]",
"[",
"]",
"{",
"second",
"}",
";",
"int",
"length",
"=",
"first",
".",
"length",
";",
"char",
"[",
"]",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"length",
"+",
"1",
"]",
"[",
"]",
";",
"System",
".",
"arraycopy",
"(",
"first",
",",
"0",
",",
"result",
",",
"0",
",",
"length",
")",
";",
"result",
"[",
"length",
"]",
"=",
"second",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"int",
"compareTo",
"(",
"char",
"[",
"]",
"array1",
",",
"char",
"[",
"]",
"array2",
")",
"{",
"int",
"length1",
"=",
"array1",
".",
"length",
";",
"int",
"length2",
"=",
"array2",
".",
"length",
";",
"int",
"min",
"=",
"Math",
".",
"min",
"(",
"length1",
",",
"length2",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"min",
";",
"i",
"++",
")",
"{",
"if",
"(",
"array1",
"[",
"i",
"]",
"!=",
"array2",
"[",
"i",
"]",
")",
"{",
"return",
"array1",
"[",
"i",
"]",
"-",
"array2",
"[",
"i",
"]",
";",
"}",
"}",
"return",
"length1",
"-",
"length2",
";",
"}",
"public",
"static",
"final",
"int",
"compareTo",
"(",
"char",
"[",
"]",
"array1",
",",
"char",
"[",
"]",
"array2",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"int",
"length1",
"=",
"array1",
".",
"length",
";",
"int",
"length2",
"=",
"array2",
".",
"length",
";",
"int",
"min",
"=",
"Math",
".",
"min",
"(",
"length1",
",",
"length2",
")",
";",
"min",
"=",
"Math",
".",
"min",
"(",
"min",
",",
"end",
")",
";",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
"<",
"min",
";",
"i",
"++",
")",
"{",
"if",
"(",
"array1",
"[",
"i",
"]",
"!=",
"array2",
"[",
"i",
"]",
")",
"{",
"return",
"array1",
"[",
"i",
"]",
"-",
"array2",
"[",
"i",
"]",
";",
"}",
"}",
"return",
"length1",
"-",
"length2",
";",
"}",
"public",
"static",
"final",
"int",
"compareWith",
"(",
"char",
"[",
"]",
"array",
",",
"char",
"[",
"]",
"prefix",
")",
"{",
"int",
"arrayLength",
"=",
"array",
".",
"length",
";",
"int",
"prefixLength",
"=",
"prefix",
".",
"length",
";",
"int",
"min",
"=",
"Math",
".",
"min",
"(",
"arrayLength",
",",
"prefixLength",
")",
";",
"int",
"i",
"=",
"0",
";",
"while",
"(",
"min",
"--",
"!=",
"0",
")",
"{",
"char",
"c1",
"=",
"array",
"[",
"i",
"]",
";",
"char",
"c2",
"=",
"prefix",
"[",
"i",
"++",
"]",
";",
"if",
"(",
"c1",
"!=",
"c2",
")",
"return",
"c1",
"-",
"c2",
";",
"}",
"if",
"(",
"prefixLength",
"==",
"i",
")",
"return",
"0",
";",
"return",
"-",
"1",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"concat",
"(",
"char",
"[",
"]",
"first",
",",
"char",
"[",
"]",
"second",
")",
"{",
"if",
"(",
"first",
"==",
"null",
")",
"return",
"second",
";",
"if",
"(",
"second",
"==",
"null",
")",
"return",
"first",
";",
"int",
"length1",
"=",
"first",
".",
"length",
";",
"int",
"length2",
"=",
"second",
".",
"length",
";",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"length1",
"+",
"length2",
"]",
";",
"System",
".",
"arraycopy",
"(",
"first",
",",
"0",
",",
"result",
",",
"0",
",",
"length1",
")",
";",
"System",
".",
"arraycopy",
"(",
"second",
",",
"0",
",",
"result",
",",
"length1",
",",
"length2",
")",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"concat",
"(",
"char",
"[",
"]",
"first",
",",
"char",
"[",
"]",
"second",
",",
"char",
"[",
"]",
"third",
")",
"{",
"if",
"(",
"first",
"==",
"null",
")",
"return",
"concat",
"(",
"second",
",",
"third",
")",
";",
"if",
"(",
"second",
"==",
"null",
")",
"return",
"concat",
"(",
"first",
",",
"third",
")",
";",
"if",
"(",
"third",
"==",
"null",
")",
"return",
"concat",
"(",
"first",
",",
"second",
")",
";",
"int",
"length1",
"=",
"first",
".",
"length",
";",
"int",
"length2",
"=",
"second",
".",
"length",
";",
"int",
"length3",
"=",
"third",
".",
"length",
";",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"length1",
"+",
"length2",
"+",
"length3",
"]",
";",
"System",
".",
"arraycopy",
"(",
"first",
",",
"0",
",",
"result",
",",
"0",
",",
"length1",
")",
";",
"System",
".",
"arraycopy",
"(",
"second",
",",
"0",
",",
"result",
",",
"length1",
",",
"length2",
")",
";",
"System",
".",
"arraycopy",
"(",
"third",
",",
"0",
",",
"result",
",",
"length1",
"+",
"length2",
",",
"length3",
")",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"concat",
"(",
"char",
"[",
"]",
"first",
",",
"char",
"[",
"]",
"second",
",",
"char",
"separator",
")",
"{",
"if",
"(",
"first",
"==",
"null",
")",
"return",
"second",
";",
"if",
"(",
"second",
"==",
"null",
")",
"return",
"first",
";",
"int",
"length1",
"=",
"first",
".",
"length",
";",
"if",
"(",
"length1",
"==",
"0",
")",
"return",
"second",
";",
"int",
"length2",
"=",
"second",
".",
"length",
";",
"if",
"(",
"length2",
"==",
"0",
")",
"return",
"first",
";",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"length1",
"+",
"length2",
"+",
"1",
"]",
";",
"System",
".",
"arraycopy",
"(",
"first",
",",
"0",
",",
"result",
",",
"0",
",",
"length1",
")",
";",
"result",
"[",
"length1",
"]",
"=",
"separator",
";",
"System",
".",
"arraycopy",
"(",
"second",
",",
"0",
",",
"result",
",",
"length1",
"+",
"1",
",",
"length2",
")",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"concat",
"(",
"char",
"[",
"]",
"first",
",",
"char",
"sep1",
",",
"char",
"[",
"]",
"second",
",",
"char",
"sep2",
",",
"char",
"[",
"]",
"third",
")",
"{",
"if",
"(",
"first",
"==",
"null",
")",
"return",
"concat",
"(",
"second",
",",
"third",
",",
"sep2",
")",
";",
"if",
"(",
"second",
"==",
"null",
")",
"return",
"concat",
"(",
"first",
",",
"third",
",",
"sep1",
")",
";",
"if",
"(",
"third",
"==",
"null",
")",
"return",
"concat",
"(",
"first",
",",
"second",
",",
"sep1",
")",
";",
"int",
"length1",
"=",
"first",
".",
"length",
";",
"int",
"length2",
"=",
"second",
".",
"length",
";",
"int",
"length3",
"=",
"third",
".",
"length",
";",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"length1",
"+",
"length2",
"+",
"length3",
"+",
"2",
"]",
";",
"System",
".",
"arraycopy",
"(",
"first",
",",
"0",
",",
"result",
",",
"0",
",",
"length1",
")",
";",
"result",
"[",
"length1",
"]",
"=",
"sep1",
";",
"System",
".",
"arraycopy",
"(",
"second",
",",
"0",
",",
"result",
",",
"length1",
"+",
"1",
",",
"length2",
")",
";",
"result",
"[",
"length1",
"+",
"length2",
"+",
"1",
"]",
"=",
"sep2",
";",
"System",
".",
"arraycopy",
"(",
"third",
",",
"0",
",",
"result",
",",
"length1",
"+",
"length2",
"+",
"2",
",",
"length3",
")",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"concat",
"(",
"char",
"prefix",
",",
"char",
"[",
"]",
"array",
",",
"char",
"suffix",
")",
"{",
"if",
"(",
"array",
"==",
"null",
")",
"return",
"new",
"char",
"[",
"]",
"{",
"prefix",
",",
"suffix",
"}",
";",
"int",
"length",
"=",
"array",
".",
"length",
";",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"length",
"+",
"2",
"]",
";",
"result",
"[",
"0",
"]",
"=",
"prefix",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"0",
",",
"result",
",",
"1",
",",
"length",
")",
";",
"result",
"[",
"length",
"+",
"1",
"]",
"=",
"suffix",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"concatWith",
"(",
"char",
"[",
"]",
"name",
",",
"char",
"[",
"]",
"[",
"]",
"array",
",",
"char",
"separator",
")",
"{",
"int",
"nameLength",
"=",
"name",
"==",
"null",
"?",
"0",
":",
"name",
".",
"length",
";",
"if",
"(",
"nameLength",
"==",
"0",
")",
"return",
"concatWith",
"(",
"array",
",",
"separator",
")",
";",
"int",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"name",
";",
"int",
"size",
"=",
"nameLength",
";",
"int",
"index",
"=",
"length",
";",
"while",
"(",
"--",
"index",
">=",
"0",
")",
"if",
"(",
"array",
"[",
"index",
"]",
".",
"length",
">",
"0",
")",
"size",
"+=",
"array",
"[",
"index",
"]",
".",
"length",
"+",
"1",
";",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"size",
"]",
";",
"index",
"=",
"size",
";",
"for",
"(",
"int",
"i",
"=",
"length",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"int",
"subLength",
"=",
"array",
"[",
"i",
"]",
".",
"length",
";",
"if",
"(",
"subLength",
">",
"0",
")",
"{",
"index",
"-=",
"subLength",
";",
"System",
".",
"arraycopy",
"(",
"array",
"[",
"i",
"]",
",",
"0",
",",
"result",
",",
"index",
",",
"subLength",
")",
";",
"result",
"[",
"--",
"index",
"]",
"=",
"separator",
";",
"}",
"}",
"System",
".",
"arraycopy",
"(",
"name",
",",
"0",
",",
"result",
",",
"0",
",",
"nameLength",
")",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"concatWith",
"(",
"char",
"[",
"]",
"[",
"]",
"array",
",",
"char",
"[",
"]",
"name",
",",
"char",
"separator",
")",
"{",
"int",
"nameLength",
"=",
"name",
"==",
"null",
"?",
"0",
":",
"name",
".",
"length",
";",
"if",
"(",
"nameLength",
"==",
"0",
")",
"return",
"concatWith",
"(",
"array",
",",
"separator",
")",
";",
"int",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"name",
";",
"int",
"size",
"=",
"nameLength",
";",
"int",
"index",
"=",
"length",
";",
"while",
"(",
"--",
"index",
">=",
"0",
")",
"if",
"(",
"array",
"[",
"index",
"]",
".",
"length",
">",
"0",
")",
"size",
"+=",
"array",
"[",
"index",
"]",
".",
"length",
"+",
"1",
";",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"size",
"]",
";",
"index",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"int",
"subLength",
"=",
"array",
"[",
"i",
"]",
".",
"length",
";",
"if",
"(",
"subLength",
">",
"0",
")",
"{",
"System",
".",
"arraycopy",
"(",
"array",
"[",
"i",
"]",
",",
"0",
",",
"result",
",",
"index",
",",
"subLength",
")",
";",
"index",
"+=",
"subLength",
";",
"result",
"[",
"index",
"++",
"]",
"=",
"separator",
";",
"}",
"}",
"System",
".",
"arraycopy",
"(",
"name",
",",
"0",
",",
"result",
",",
"index",
",",
"nameLength",
")",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"concatWith",
"(",
"char",
"[",
"]",
"[",
"]",
"array",
",",
"char",
"separator",
")",
"{",
"int",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"CharOperation",
".",
"NO_CHAR",
";",
"int",
"size",
"=",
"length",
"-",
"1",
";",
"int",
"index",
"=",
"length",
";",
"while",
"(",
"--",
"index",
">=",
"0",
")",
"{",
"if",
"(",
"array",
"[",
"index",
"]",
".",
"length",
"==",
"0",
")",
"size",
"--",
";",
"else",
"size",
"+=",
"array",
"[",
"index",
"]",
".",
"length",
";",
"}",
"if",
"(",
"size",
"<=",
"0",
")",
"return",
"CharOperation",
".",
"NO_CHAR",
";",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"size",
"]",
";",
"index",
"=",
"length",
";",
"while",
"(",
"--",
"index",
">=",
"0",
")",
"{",
"length",
"=",
"array",
"[",
"index",
"]",
".",
"length",
";",
"if",
"(",
"length",
">",
"0",
")",
"{",
"System",
".",
"arraycopy",
"(",
"array",
"[",
"index",
"]",
",",
"0",
",",
"result",
",",
"(",
"size",
"-=",
"length",
")",
",",
"length",
")",
";",
"if",
"(",
"--",
"size",
">=",
"0",
")",
"result",
"[",
"size",
"]",
"=",
"separator",
";",
"}",
"}",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"boolean",
"contains",
"(",
"char",
"character",
",",
"char",
"[",
"]",
"[",
"]",
"array",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"array",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"{",
"char",
"[",
"]",
"subarray",
"=",
"array",
"[",
"i",
"]",
";",
"for",
"(",
"int",
"j",
"=",
"subarray",
".",
"length",
";",
"--",
"j",
">=",
"0",
";",
")",
"if",
"(",
"subarray",
"[",
"j",
"]",
"==",
"character",
")",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"public",
"static",
"final",
"boolean",
"contains",
"(",
"char",
"character",
",",
"char",
"[",
"]",
"array",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"array",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"array",
"[",
"i",
"]",
"==",
"character",
")",
"return",
"true",
";",
"return",
"false",
";",
"}",
"public",
"static",
"final",
"boolean",
"contains",
"(",
"char",
"[",
"]",
"characters",
",",
"char",
"[",
"]",
"array",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"array",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"for",
"(",
"int",
"j",
"=",
"characters",
".",
"length",
";",
"--",
"j",
">=",
"0",
";",
")",
"if",
"(",
"array",
"[",
"i",
"]",
"==",
"characters",
"[",
"j",
"]",
")",
"return",
"true",
";",
"return",
"false",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"[",
"]",
"deepCopy",
"(",
"char",
"[",
"]",
"[",
"]",
"toCopy",
")",
"{",
"int",
"toCopyLength",
"=",
"toCopy",
".",
"length",
";",
"char",
"[",
"]",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"toCopyLength",
"]",
"[",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"toCopyLength",
";",
"i",
"++",
")",
"{",
"char",
"[",
"]",
"toElement",
"=",
"toCopy",
"[",
"i",
"]",
";",
"int",
"toElementLength",
"=",
"toElement",
".",
"length",
";",
"char",
"[",
"]",
"resultElement",
"=",
"new",
"char",
"[",
"toElementLength",
"]",
";",
"System",
".",
"arraycopy",
"(",
"toElement",
",",
"0",
",",
"resultElement",
",",
"0",
",",
"toElementLength",
")",
";",
"result",
"[",
"i",
"]",
"=",
"resultElement",
";",
"}",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"boolean",
"endsWith",
"(",
"char",
"[",
"]",
"array",
",",
"char",
"[",
"]",
"toBeFound",
")",
"{",
"int",
"i",
"=",
"toBeFound",
".",
"length",
";",
"int",
"j",
"=",
"array",
".",
"length",
"-",
"i",
";",
"if",
"(",
"j",
"<",
"0",
")",
"return",
"false",
";",
"while",
"(",
"--",
"i",
">=",
"0",
")",
"if",
"(",
"toBeFound",
"[",
"i",
"]",
"!=",
"array",
"[",
"i",
"+",
"j",
"]",
")",
"return",
"false",
";",
"return",
"true",
";",
"}",
"public",
"static",
"final",
"boolean",
"equals",
"(",
"char",
"[",
"]",
"[",
"]",
"first",
",",
"char",
"[",
"]",
"[",
"]",
"second",
")",
"{",
"if",
"(",
"first",
"==",
"second",
")",
"return",
"true",
";",
"if",
"(",
"first",
"==",
"null",
"||",
"second",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"first",
".",
"length",
"!=",
"second",
".",
"length",
")",
"return",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"first",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"!",
"equals",
"(",
"first",
"[",
"i",
"]",
",",
"second",
"[",
"i",
"]",
")",
")",
"return",
"false",
";",
"return",
"true",
";",
"}",
"public",
"static",
"final",
"boolean",
"equals",
"(",
"char",
"[",
"]",
"[",
"]",
"first",
",",
"char",
"[",
"]",
"[",
"]",
"second",
",",
"boolean",
"isCaseSensitive",
")",
"{",
"if",
"(",
"isCaseSensitive",
")",
"{",
"return",
"equals",
"(",
"first",
",",
"second",
")",
";",
"}",
"if",
"(",
"first",
"==",
"second",
")",
"return",
"true",
";",
"if",
"(",
"first",
"==",
"null",
"||",
"second",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"first",
".",
"length",
"!=",
"second",
".",
"length",
")",
"return",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"first",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"!",
"equals",
"(",
"first",
"[",
"i",
"]",
",",
"second",
"[",
"i",
"]",
",",
"false",
")",
")",
"return",
"false",
";",
"return",
"true",
";",
"}",
"public",
"static",
"final",
"boolean",
"equals",
"(",
"char",
"[",
"]",
"first",
",",
"char",
"[",
"]",
"second",
")",
"{",
"if",
"(",
"first",
"==",
"second",
")",
"return",
"true",
";",
"if",
"(",
"first",
"==",
"null",
"||",
"second",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"first",
".",
"length",
"!=",
"second",
".",
"length",
")",
"return",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"first",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"first",
"[",
"i",
"]",
"!=",
"second",
"[",
"i",
"]",
")",
"return",
"false",
";",
"return",
"true",
";",
"}",
"public",
"static",
"final",
"boolean",
"equals",
"(",
"char",
"[",
"]",
"first",
",",
"char",
"[",
"]",
"second",
",",
"int",
"secondStart",
",",
"int",
"secondEnd",
")",
"{",
"return",
"equals",
"(",
"first",
",",
"second",
",",
"secondStart",
",",
"secondEnd",
",",
"true",
")",
";",
"}",
"public",
"static",
"final",
"boolean",
"equals",
"(",
"char",
"[",
"]",
"first",
",",
"char",
"[",
"]",
"second",
",",
"int",
"secondStart",
",",
"int",
"secondEnd",
",",
"boolean",
"isCaseSensitive",
")",
"{",
"if",
"(",
"first",
"==",
"second",
")",
"return",
"true",
";",
"if",
"(",
"first",
"==",
"null",
"||",
"second",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"first",
".",
"length",
"!=",
"secondEnd",
"-",
"secondStart",
")",
"return",
"false",
";",
"if",
"(",
"isCaseSensitive",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"first",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"first",
"[",
"i",
"]",
"!=",
"second",
"[",
"i",
"+",
"secondStart",
"]",
")",
"return",
"false",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"first",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"ScannerHelper",
".",
"toLowerCase",
"(",
"first",
"[",
"i",
"]",
")",
"!=",
"ScannerHelper",
".",
"toLowerCase",
"(",
"second",
"[",
"i",
"+",
"secondStart",
"]",
")",
")",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"public",
"static",
"final",
"boolean",
"equals",
"(",
"char",
"[",
"]",
"first",
",",
"char",
"[",
"]",
"second",
",",
"boolean",
"isCaseSensitive",
")",
"{",
"if",
"(",
"isCaseSensitive",
")",
"{",
"return",
"equals",
"(",
"first",
",",
"second",
")",
";",
"}",
"if",
"(",
"first",
"==",
"second",
")",
"return",
"true",
";",
"if",
"(",
"first",
"==",
"null",
"||",
"second",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"first",
".",
"length",
"!=",
"second",
".",
"length",
")",
"return",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"first",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"ScannerHelper",
".",
"toLowerCase",
"(",
"first",
"[",
"i",
"]",
")",
"!=",
"ScannerHelper",
".",
"toLowerCase",
"(",
"second",
"[",
"i",
"]",
")",
")",
"return",
"false",
";",
"return",
"true",
";",
"}",
"public",
"static",
"final",
"boolean",
"fragmentEquals",
"(",
"char",
"[",
"]",
"fragment",
",",
"char",
"[",
"]",
"name",
",",
"int",
"startIndex",
",",
"boolean",
"isCaseSensitive",
")",
"{",
"int",
"max",
"=",
"fragment",
".",
"length",
";",
"if",
"(",
"name",
".",
"length",
"<",
"max",
"+",
"startIndex",
")",
"return",
"false",
";",
"if",
"(",
"isCaseSensitive",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"max",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"fragment",
"[",
"i",
"]",
"!=",
"name",
"[",
"i",
"+",
"startIndex",
"]",
")",
"return",
"false",
";",
"return",
"true",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"max",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"ScannerHelper",
".",
"toLowerCase",
"(",
"fragment",
"[",
"i",
"]",
")",
"!=",
"ScannerHelper",
".",
"toLowerCase",
"(",
"name",
"[",
"i",
"+",
"startIndex",
"]",
")",
")",
"return",
"false",
";",
"return",
"true",
";",
"}",
"public",
"static",
"final",
"int",
"hashCode",
"(",
"char",
"[",
"]",
"array",
")",
"{",
"int",
"length",
"=",
"array",
".",
"length",
";",
"int",
"hash",
"=",
"length",
"==",
"0",
"?",
"31",
":",
"array",
"[",
"0",
"]",
";",
"if",
"(",
"length",
"<",
"8",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"length",
";",
"--",
"i",
">",
"0",
";",
")",
"hash",
"=",
"(",
"hash",
"*",
"31",
")",
"+",
"array",
"[",
"i",
"]",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"length",
"-",
"1",
",",
"last",
"=",
"i",
">",
"16",
"?",
"i",
"-",
"16",
":",
"0",
";",
"i",
">",
"last",
";",
"i",
"-=",
"2",
")",
"hash",
"=",
"(",
"hash",
"*",
"31",
")",
"+",
"array",
"[",
"i",
"]",
";",
"}",
"return",
"hash",
"&",
"0x7FFFFFFF",
";",
"}",
"public",
"static",
"boolean",
"isWhitespace",
"(",
"char",
"c",
")",
"{",
"return",
"c",
"<",
"ScannerHelper",
".",
"MAX_OBVIOUS",
"&&",
"(",
"(",
"ScannerHelper",
".",
"OBVIOUS_IDENT_CHAR_NATURES",
"[",
"c",
"]",
"&",
"ScannerHelper",
".",
"C_JLS_SPACE",
")",
"!=",
"0",
")",
";",
"}",
"public",
"static",
"final",
"int",
"indexOf",
"(",
"char",
"toBeFound",
",",
"char",
"[",
"]",
"array",
")",
"{",
"return",
"indexOf",
"(",
"toBeFound",
",",
"array",
",",
"0",
")",
";",
"}",
"public",
"static",
"final",
"int",
"indexOf",
"(",
"char",
"[",
"]",
"toBeFound",
",",
"char",
"[",
"]",
"array",
",",
"boolean",
"isCaseSensitive",
")",
"{",
"return",
"indexOf",
"(",
"toBeFound",
",",
"array",
",",
"isCaseSensitive",
",",
"0",
")",
";",
"}",
"public",
"static",
"final",
"int",
"indexOf",
"(",
"final",
"char",
"[",
"]",
"toBeFound",
",",
"final",
"char",
"[",
"]",
"array",
",",
"final",
"boolean",
"isCaseSensitive",
",",
"final",
"int",
"start",
")",
"{",
"return",
"indexOf",
"(",
"toBeFound",
",",
"array",
",",
"isCaseSensitive",
",",
"start",
",",
"array",
".",
"length",
")",
";",
"}",
"public",
"static",
"final",
"int",
"indexOf",
"(",
"final",
"char",
"[",
"]",
"toBeFound",
",",
"final",
"char",
"[",
"]",
"array",
",",
"final",
"boolean",
"isCaseSensitive",
",",
"final",
"int",
"start",
",",
"final",
"int",
"end",
")",
"{",
"final",
"int",
"arrayLength",
"=",
"end",
";",
"final",
"int",
"toBeFoundLength",
"=",
"toBeFound",
".",
"length",
";",
"if",
"(",
"toBeFoundLength",
">",
"arrayLength",
"||",
"start",
"<",
"0",
")",
"return",
"-",
"1",
";",
"if",
"(",
"toBeFoundLength",
"==",
"0",
")",
"return",
"0",
";",
"if",
"(",
"toBeFoundLength",
"==",
"arrayLength",
")",
"{",
"if",
"(",
"isCaseSensitive",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
"<",
"arrayLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"array",
"[",
"i",
"]",
"!=",
"toBeFound",
"[",
"i",
"]",
")",
"return",
"-",
"1",
";",
"}",
"return",
"0",
";",
"}",
"else",
"{",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
"<",
"arrayLength",
";",
"i",
"++",
")",
"{",
"if",
"(",
"ScannerHelper",
".",
"toLowerCase",
"(",
"array",
"[",
"i",
"]",
")",
"!=",
"ScannerHelper",
".",
"toLowerCase",
"(",
"toBeFound",
"[",
"i",
"]",
")",
")",
"return",
"-",
"1",
";",
"}",
"return",
"0",
";",
"}",
"}",
"if",
"(",
"isCaseSensitive",
")",
"{",
"arrayLoop",
":",
"for",
"(",
"int",
"i",
"=",
"start",
",",
"max",
"=",
"arrayLength",
"-",
"toBeFoundLength",
"+",
"1",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"array",
"[",
"i",
"]",
"==",
"toBeFound",
"[",
"0",
"]",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"1",
";",
"j",
"<",
"toBeFoundLength",
";",
"j",
"++",
")",
"{",
"if",
"(",
"array",
"[",
"i",
"+",
"j",
"]",
"!=",
"toBeFound",
"[",
"j",
"]",
")",
"continue",
"arrayLoop",
";",
"}",
"return",
"i",
";",
"}",
"}",
"}",
"else",
"{",
"arrayLoop",
":",
"for",
"(",
"int",
"i",
"=",
"start",
",",
"max",
"=",
"arrayLength",
"-",
"toBeFoundLength",
"+",
"1",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"ScannerHelper",
".",
"toLowerCase",
"(",
"array",
"[",
"i",
"]",
")",
"==",
"ScannerHelper",
".",
"toLowerCase",
"(",
"toBeFound",
"[",
"0",
"]",
")",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"1",
";",
"j",
"<",
"toBeFoundLength",
";",
"j",
"++",
")",
"{",
"if",
"(",
"ScannerHelper",
".",
"toLowerCase",
"(",
"array",
"[",
"i",
"+",
"j",
"]",
")",
"!=",
"ScannerHelper",
".",
"toLowerCase",
"(",
"toBeFound",
"[",
"j",
"]",
")",
")",
"continue",
"arrayLoop",
";",
"}",
"return",
"i",
";",
"}",
"}",
"}",
"return",
"-",
"1",
";",
"}",
"public",
"static",
"final",
"int",
"indexOf",
"(",
"char",
"toBeFound",
",",
"char",
"[",
"]",
"array",
",",
"int",
"start",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
"<",
"array",
".",
"length",
";",
"i",
"++",
")",
"if",
"(",
"toBeFound",
"==",
"array",
"[",
"i",
"]",
")",
"return",
"i",
";",
"return",
"-",
"1",
";",
"}",
"public",
"static",
"final",
"int",
"indexOf",
"(",
"char",
"toBeFound",
",",
"char",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
"<",
"end",
";",
"i",
"++",
")",
"if",
"(",
"toBeFound",
"==",
"array",
"[",
"i",
"]",
")",
"return",
"i",
";",
"return",
"-",
"1",
";",
"}",
"public",
"static",
"final",
"int",
"lastIndexOf",
"(",
"char",
"toBeFound",
",",
"char",
"[",
"]",
"array",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"array",
".",
"length",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"toBeFound",
"==",
"array",
"[",
"i",
"]",
")",
"return",
"i",
";",
"return",
"-",
"1",
";",
"}",
"public",
"static",
"final",
"int",
"lastIndexOf",
"(",
"char",
"toBeFound",
",",
"char",
"[",
"]",
"array",
",",
"int",
"startIndex",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"array",
".",
"length",
";",
"--",
"i",
">=",
"startIndex",
";",
")",
"if",
"(",
"toBeFound",
"==",
"array",
"[",
"i",
"]",
")",
"return",
"i",
";",
"return",
"-",
"1",
";",
"}",
"public",
"static",
"final",
"int",
"lastIndexOf",
"(",
"char",
"toBeFound",
",",
"char",
"[",
"]",
"array",
",",
"int",
"startIndex",
",",
"int",
"endIndex",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"endIndex",
";",
"--",
"i",
">=",
"startIndex",
";",
")",
"if",
"(",
"toBeFound",
"==",
"array",
"[",
"i",
"]",
")",
"return",
"i",
";",
"return",
"-",
"1",
";",
"}",
"final",
"static",
"public",
"char",
"[",
"]",
"lastSegment",
"(",
"char",
"[",
"]",
"array",
",",
"char",
"separator",
")",
"{",
"int",
"pos",
"=",
"lastIndexOf",
"(",
"separator",
",",
"array",
")",
";",
"if",
"(",
"pos",
"<",
"0",
")",
"return",
"array",
";",
"return",
"subarray",
"(",
"array",
",",
"pos",
"+",
"1",
",",
"array",
".",
"length",
")",
";",
"}",
"public",
"static",
"final",
"boolean",
"match",
"(",
"char",
"[",
"]",
"pattern",
",",
"char",
"[",
"]",
"name",
",",
"boolean",
"isCaseSensitive",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"pattern",
"==",
"null",
")",
"return",
"true",
";",
"return",
"match",
"(",
"pattern",
",",
"0",
",",
"pattern",
".",
"length",
",",
"name",
",",
"0",
",",
"name",
".",
"length",
",",
"isCaseSensitive",
")",
";",
"}",
"public",
"static",
"final",
"boolean",
"match",
"(",
"char",
"[",
"]",
"pattern",
",",
"int",
"patternStart",
",",
"int",
"patternEnd",
",",
"char",
"[",
"]",
"name",
",",
"int",
"nameStart",
",",
"int",
"nameEnd",
",",
"boolean",
"isCaseSensitive",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"pattern",
"==",
"null",
")",
"return",
"true",
";",
"int",
"iPattern",
"=",
"patternStart",
";",
"int",
"iName",
"=",
"nameStart",
";",
"if",
"(",
"patternEnd",
"<",
"0",
")",
"patternEnd",
"=",
"pattern",
".",
"length",
";",
"if",
"(",
"nameEnd",
"<",
"0",
")",
"nameEnd",
"=",
"name",
".",
"length",
";",
"char",
"patternChar",
"=",
"0",
";",
"while",
"(",
"true",
")",
"{",
"if",
"(",
"iPattern",
"==",
"patternEnd",
")",
"{",
"if",
"(",
"iName",
"==",
"nameEnd",
")",
"return",
"true",
";",
"return",
"false",
";",
"}",
"if",
"(",
"(",
"patternChar",
"=",
"pattern",
"[",
"iPattern",
"]",
")",
"==",
"'*'",
")",
"{",
"break",
";",
"}",
"if",
"(",
"iName",
"==",
"nameEnd",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"patternChar",
"!=",
"(",
"isCaseSensitive",
"?",
"name",
"[",
"iName",
"]",
":",
"ScannerHelper",
".",
"toLowerCase",
"(",
"name",
"[",
"iName",
"]",
")",
")",
"&&",
"patternChar",
"!=",
"'?'",
")",
"{",
"return",
"false",
";",
"}",
"iName",
"++",
";",
"iPattern",
"++",
";",
"}",
"int",
"segmentStart",
";",
"if",
"(",
"patternChar",
"==",
"'*'",
")",
"{",
"segmentStart",
"=",
"++",
"iPattern",
";",
"}",
"else",
"{",
"segmentStart",
"=",
"0",
";",
"}",
"int",
"prefixStart",
"=",
"iName",
";",
"checkSegment",
":",
"while",
"(",
"iName",
"<",
"nameEnd",
")",
"{",
"if",
"(",
"iPattern",
"==",
"patternEnd",
")",
"{",
"iPattern",
"=",
"segmentStart",
";",
"iName",
"=",
"++",
"prefixStart",
";",
"continue",
"checkSegment",
";",
"}",
"if",
"(",
"(",
"patternChar",
"=",
"pattern",
"[",
"iPattern",
"]",
")",
"==",
"'*'",
")",
"{",
"segmentStart",
"=",
"++",
"iPattern",
";",
"if",
"(",
"segmentStart",
"==",
"patternEnd",
")",
"{",
"return",
"true",
";",
"}",
"prefixStart",
"=",
"iName",
";",
"continue",
"checkSegment",
";",
"}",
"if",
"(",
"(",
"isCaseSensitive",
"?",
"name",
"[",
"iName",
"]",
":",
"ScannerHelper",
".",
"toLowerCase",
"(",
"name",
"[",
"iName",
"]",
")",
")",
"!=",
"patternChar",
"&&",
"patternChar",
"!=",
"'?'",
")",
"{",
"iPattern",
"=",
"segmentStart",
";",
"iName",
"=",
"++",
"prefixStart",
";",
"continue",
"checkSegment",
";",
"}",
"iName",
"++",
";",
"iPattern",
"++",
";",
"}",
"return",
"(",
"segmentStart",
"==",
"patternEnd",
")",
"||",
"(",
"iName",
"==",
"nameEnd",
"&&",
"iPattern",
"==",
"patternEnd",
")",
"||",
"(",
"iPattern",
"==",
"patternEnd",
"-",
"1",
"&&",
"pattern",
"[",
"iPattern",
"]",
"==",
"'*'",
")",
";",
"}",
"public",
"static",
"final",
"boolean",
"pathMatch",
"(",
"char",
"[",
"]",
"pattern",
",",
"char",
"[",
"]",
"filepath",
",",
"boolean",
"isCaseSensitive",
",",
"char",
"pathSeparator",
")",
"{",
"if",
"(",
"filepath",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"pattern",
"==",
"null",
")",
"return",
"true",
";",
"int",
"pSegmentStart",
"=",
"pattern",
"[",
"0",
"]",
"==",
"pathSeparator",
"?",
"1",
":",
"0",
";",
"int",
"pLength",
"=",
"pattern",
".",
"length",
";",
"int",
"pSegmentEnd",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"pattern",
",",
"pSegmentStart",
"+",
"1",
")",
";",
"if",
"(",
"pSegmentEnd",
"<",
"0",
")",
"pSegmentEnd",
"=",
"pLength",
";",
"boolean",
"freeTrailingDoubleStar",
"=",
"pattern",
"[",
"pLength",
"-",
"1",
"]",
"==",
"pathSeparator",
";",
"int",
"fSegmentStart",
",",
"fLength",
"=",
"filepath",
".",
"length",
";",
"if",
"(",
"filepath",
"[",
"0",
"]",
"!=",
"pathSeparator",
")",
"{",
"fSegmentStart",
"=",
"0",
";",
"}",
"else",
"{",
"fSegmentStart",
"=",
"1",
";",
"}",
"if",
"(",
"fSegmentStart",
"!=",
"pSegmentStart",
")",
"{",
"return",
"false",
";",
"}",
"int",
"fSegmentEnd",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"filepath",
",",
"fSegmentStart",
"+",
"1",
")",
";",
"if",
"(",
"fSegmentEnd",
"<",
"0",
")",
"fSegmentEnd",
"=",
"fLength",
";",
"while",
"(",
"pSegmentStart",
"<",
"pLength",
"&&",
"!",
"(",
"pSegmentEnd",
"==",
"pLength",
"&&",
"freeTrailingDoubleStar",
"||",
"(",
"pSegmentEnd",
"==",
"pSegmentStart",
"+",
"2",
"&&",
"pattern",
"[",
"pSegmentStart",
"]",
"==",
"'*'",
"&&",
"pattern",
"[",
"pSegmentStart",
"+",
"1",
"]",
"==",
"'*'",
")",
")",
")",
"{",
"if",
"(",
"fSegmentStart",
">=",
"fLength",
")",
"return",
"false",
";",
"if",
"(",
"!",
"CharOperation",
".",
"match",
"(",
"pattern",
",",
"pSegmentStart",
",",
"pSegmentEnd",
",",
"filepath",
",",
"fSegmentStart",
",",
"fSegmentEnd",
",",
"isCaseSensitive",
")",
")",
"{",
"return",
"false",
";",
"}",
"pSegmentEnd",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"pattern",
",",
"pSegmentStart",
"=",
"pSegmentEnd",
"+",
"1",
")",
";",
"if",
"(",
"pSegmentEnd",
"<",
"0",
")",
"pSegmentEnd",
"=",
"pLength",
";",
"fSegmentEnd",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"filepath",
",",
"fSegmentStart",
"=",
"fSegmentEnd",
"+",
"1",
")",
";",
"if",
"(",
"fSegmentEnd",
"<",
"0",
")",
"fSegmentEnd",
"=",
"fLength",
";",
"}",
"int",
"pSegmentRestart",
";",
"if",
"(",
"(",
"pSegmentStart",
">=",
"pLength",
"&&",
"freeTrailingDoubleStar",
")",
"||",
"(",
"pSegmentEnd",
"==",
"pSegmentStart",
"+",
"2",
"&&",
"pattern",
"[",
"pSegmentStart",
"]",
"==",
"'*'",
"&&",
"pattern",
"[",
"pSegmentStart",
"+",
"1",
"]",
"==",
"'*'",
")",
")",
"{",
"pSegmentEnd",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"pattern",
",",
"pSegmentStart",
"=",
"pSegmentEnd",
"+",
"1",
")",
";",
"if",
"(",
"pSegmentEnd",
"<",
"0",
")",
"pSegmentEnd",
"=",
"pLength",
";",
"pSegmentRestart",
"=",
"pSegmentStart",
";",
"}",
"else",
"{",
"if",
"(",
"pSegmentStart",
">=",
"pLength",
")",
"return",
"fSegmentStart",
">=",
"fLength",
";",
"pSegmentRestart",
"=",
"0",
";",
"}",
"int",
"fSegmentRestart",
"=",
"fSegmentStart",
";",
"checkSegment",
":",
"while",
"(",
"fSegmentStart",
"<",
"fLength",
")",
"{",
"if",
"(",
"pSegmentStart",
">=",
"pLength",
")",
"{",
"if",
"(",
"freeTrailingDoubleStar",
")",
"return",
"true",
";",
"pSegmentEnd",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"pattern",
",",
"pSegmentStart",
"=",
"pSegmentRestart",
")",
";",
"if",
"(",
"pSegmentEnd",
"<",
"0",
")",
"pSegmentEnd",
"=",
"pLength",
";",
"fSegmentRestart",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"filepath",
",",
"fSegmentRestart",
"+",
"1",
")",
";",
"if",
"(",
"fSegmentRestart",
"<",
"0",
")",
"{",
"fSegmentRestart",
"=",
"fLength",
";",
"}",
"else",
"{",
"fSegmentRestart",
"++",
";",
"}",
"fSegmentEnd",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"filepath",
",",
"fSegmentStart",
"=",
"fSegmentRestart",
")",
";",
"if",
"(",
"fSegmentEnd",
"<",
"0",
")",
"fSegmentEnd",
"=",
"fLength",
";",
"continue",
"checkSegment",
";",
"}",
"if",
"(",
"pSegmentEnd",
"==",
"pSegmentStart",
"+",
"2",
"&&",
"pattern",
"[",
"pSegmentStart",
"]",
"==",
"'*'",
"&&",
"pattern",
"[",
"pSegmentStart",
"+",
"1",
"]",
"==",
"'*'",
")",
"{",
"pSegmentEnd",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"pattern",
",",
"pSegmentStart",
"=",
"pSegmentEnd",
"+",
"1",
")",
";",
"if",
"(",
"pSegmentEnd",
"<",
"0",
")",
"pSegmentEnd",
"=",
"pLength",
";",
"pSegmentRestart",
"=",
"pSegmentStart",
";",
"fSegmentRestart",
"=",
"fSegmentStart",
";",
"if",
"(",
"pSegmentStart",
">=",
"pLength",
")",
"return",
"true",
";",
"continue",
"checkSegment",
";",
"}",
"if",
"(",
"!",
"CharOperation",
".",
"match",
"(",
"pattern",
",",
"pSegmentStart",
",",
"pSegmentEnd",
",",
"filepath",
",",
"fSegmentStart",
",",
"fSegmentEnd",
",",
"isCaseSensitive",
")",
")",
"{",
"pSegmentEnd",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"pattern",
",",
"pSegmentStart",
"=",
"pSegmentRestart",
")",
";",
"if",
"(",
"pSegmentEnd",
"<",
"0",
")",
"pSegmentEnd",
"=",
"pLength",
";",
"fSegmentRestart",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"filepath",
",",
"fSegmentRestart",
"+",
"1",
")",
";",
"if",
"(",
"fSegmentRestart",
"<",
"0",
")",
"{",
"fSegmentRestart",
"=",
"fLength",
";",
"}",
"else",
"{",
"fSegmentRestart",
"++",
";",
"}",
"fSegmentEnd",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"filepath",
",",
"fSegmentStart",
"=",
"fSegmentRestart",
")",
";",
"if",
"(",
"fSegmentEnd",
"<",
"0",
")",
"fSegmentEnd",
"=",
"fLength",
";",
"continue",
"checkSegment",
";",
"}",
"pSegmentEnd",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"pattern",
",",
"pSegmentStart",
"=",
"pSegmentEnd",
"+",
"1",
")",
";",
"if",
"(",
"pSegmentEnd",
"<",
"0",
")",
"pSegmentEnd",
"=",
"pLength",
";",
"fSegmentEnd",
"=",
"CharOperation",
".",
"indexOf",
"(",
"pathSeparator",
",",
"filepath",
",",
"fSegmentStart",
"=",
"fSegmentEnd",
"+",
"1",
")",
";",
"if",
"(",
"fSegmentEnd",
"<",
"0",
")",
"fSegmentEnd",
"=",
"fLength",
";",
"}",
"return",
"(",
"pSegmentRestart",
">=",
"pSegmentEnd",
")",
"||",
"(",
"fSegmentStart",
">=",
"fLength",
"&&",
"pSegmentStart",
">=",
"pLength",
")",
"||",
"(",
"pSegmentStart",
"==",
"pLength",
"-",
"2",
"&&",
"pattern",
"[",
"pSegmentStart",
"]",
"==",
"'*'",
"&&",
"pattern",
"[",
"pSegmentStart",
"+",
"1",
"]",
"==",
"'*'",
")",
"||",
"(",
"pSegmentStart",
"==",
"pLength",
"&&",
"freeTrailingDoubleStar",
")",
";",
"}",
"public",
"static",
"final",
"int",
"occurencesOf",
"(",
"char",
"toBeFound",
",",
"char",
"[",
"]",
"array",
")",
"{",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"array",
".",
"length",
";",
"i",
"++",
")",
"if",
"(",
"toBeFound",
"==",
"array",
"[",
"i",
"]",
")",
"count",
"++",
";",
"return",
"count",
";",
"}",
"public",
"static",
"final",
"int",
"occurencesOf",
"(",
"char",
"toBeFound",
",",
"char",
"[",
"]",
"array",
",",
"int",
"start",
")",
"{",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
"<",
"array",
".",
"length",
";",
"i",
"++",
")",
"if",
"(",
"toBeFound",
"==",
"array",
"[",
"i",
"]",
")",
"count",
"++",
";",
"return",
"count",
";",
"}",
"public",
"static",
"final",
"int",
"parseInt",
"(",
"char",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"length",
")",
"throws",
"NumberFormatException",
"{",
"if",
"(",
"length",
"==",
"1",
")",
"{",
"int",
"result",
"=",
"array",
"[",
"start",
"]",
"-",
"'0'",
";",
"if",
"(",
"result",
"<",
"0",
"||",
"result",
">",
"9",
")",
"{",
"throw",
"new",
"NumberFormatException",
"(",
"\"\"",
")",
";",
"}",
"return",
"result",
";",
"}",
"else",
"{",
"return",
"Integer",
".",
"parseInt",
"(",
"new",
"String",
"(",
"array",
",",
"start",
",",
"length",
")",
")",
";",
"}",
"}",
"public",
"static",
"final",
"boolean",
"prefixEquals",
"(",
"char",
"[",
"]",
"prefix",
",",
"char",
"[",
"]",
"name",
")",
"{",
"int",
"max",
"=",
"prefix",
".",
"length",
";",
"if",
"(",
"name",
".",
"length",
"<",
"max",
")",
"return",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"max",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"prefix",
"[",
"i",
"]",
"!=",
"name",
"[",
"i",
"]",
")",
"return",
"false",
";",
"return",
"true",
";",
"}",
"public",
"static",
"final",
"boolean",
"prefixEquals",
"(",
"char",
"[",
"]",
"prefix",
",",
"char",
"[",
"]",
"name",
",",
"boolean",
"isCaseSensitive",
")",
"{",
"return",
"prefixEquals",
"(",
"prefix",
",",
"name",
",",
"isCaseSensitive",
",",
"0",
")",
";",
"}",
"public",
"static",
"final",
"boolean",
"prefixEquals",
"(",
"char",
"[",
"]",
"prefix",
",",
"char",
"[",
"]",
"name",
",",
"boolean",
"isCaseSensitive",
",",
"int",
"startIndex",
")",
"{",
"int",
"max",
"=",
"prefix",
".",
"length",
";",
"if",
"(",
"name",
".",
"length",
"-",
"startIndex",
"<",
"max",
")",
"return",
"false",
";",
"if",
"(",
"isCaseSensitive",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"max",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"prefix",
"[",
"i",
"]",
"!=",
"name",
"[",
"startIndex",
"+",
"i",
"]",
")",
"return",
"false",
";",
"return",
"true",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"max",
";",
"--",
"i",
">=",
"0",
";",
")",
"if",
"(",
"ScannerHelper",
".",
"toLowerCase",
"(",
"prefix",
"[",
"i",
"]",
")",
"!=",
"ScannerHelper",
".",
"toLowerCase",
"(",
"name",
"[",
"startIndex",
"+",
"i",
"]",
")",
")",
"return",
"false",
";",
"return",
"true",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"remove",
"(",
"char",
"[",
"]",
"array",
",",
"char",
"toBeRemoved",
")",
"{",
"if",
"(",
"array",
"==",
"null",
")",
"return",
"null",
";",
"int",
"length",
"=",
"array",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"array",
";",
"char",
"[",
"]",
"result",
"=",
"null",
";",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"char",
"c",
"=",
"array",
"[",
"i",
"]",
";",
"if",
"(",
"c",
"==",
"toBeRemoved",
")",
"{",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"new",
"char",
"[",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"0",
",",
"result",
",",
"0",
",",
"i",
")",
";",
"count",
"=",
"i",
";",
"}",
"}",
"else",
"if",
"(",
"result",
"!=",
"null",
")",
"{",
"result",
"[",
"count",
"++",
"]",
"=",
"c",
";",
"}",
"}",
"if",
"(",
"result",
"==",
"null",
")",
"return",
"array",
";",
"System",
".",
"arraycopy",
"(",
"result",
",",
"0",
",",
"result",
"=",
"new",
"char",
"[",
"count",
"]",
",",
"0",
",",
"count",
")",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"void",
"replace",
"(",
"char",
"[",
"]",
"array",
",",
"char",
"toBeReplaced",
",",
"char",
"replacementChar",
")",
"{",
"if",
"(",
"toBeReplaced",
"!=",
"replacementChar",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"array",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"array",
"[",
"i",
"]",
"==",
"toBeReplaced",
")",
"array",
"[",
"i",
"]",
"=",
"replacementChar",
";",
"}",
"}",
"}",
"public",
"static",
"final",
"void",
"replace",
"(",
"char",
"[",
"]",
"array",
",",
"char",
"[",
"]",
"toBeReplaced",
",",
"char",
"replacementChar",
")",
"{",
"replace",
"(",
"array",
",",
"toBeReplaced",
",",
"replacementChar",
",",
"0",
",",
"array",
".",
"length",
")",
";",
"}",
"public",
"static",
"final",
"void",
"replace",
"(",
"char",
"[",
"]",
"array",
",",
"char",
"[",
"]",
"toBeReplaced",
",",
"char",
"replacementChar",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"end",
";",
"--",
"i",
">=",
"start",
";",
")",
"for",
"(",
"int",
"j",
"=",
"toBeReplaced",
".",
"length",
";",
"--",
"j",
">=",
"0",
";",
")",
"if",
"(",
"array",
"[",
"i",
"]",
"==",
"toBeReplaced",
"[",
"j",
"]",
")",
"array",
"[",
"i",
"]",
"=",
"replacementChar",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"replace",
"(",
"char",
"[",
"]",
"array",
",",
"char",
"[",
"]",
"toBeReplaced",
",",
"char",
"[",
"]",
"replacementChars",
")",
"{",
"int",
"max",
"=",
"array",
".",
"length",
";",
"int",
"replacedLength",
"=",
"toBeReplaced",
".",
"length",
";",
"int",
"replacementLength",
"=",
"replacementChars",
".",
"length",
";",
"int",
"[",
"]",
"starts",
"=",
"new",
"int",
"[",
"5",
"]",
";",
"int",
"occurrenceCount",
"=",
"0",
";",
"if",
"(",
"!",
"equals",
"(",
"toBeReplaced",
",",
"replacementChars",
")",
")",
"{",
"next",
":",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"max",
";",
")",
"{",
"int",
"index",
"=",
"indexOf",
"(",
"toBeReplaced",
",",
"array",
",",
"true",
",",
"i",
")",
";",
"if",
"(",
"index",
"==",
"-",
"1",
")",
"{",
"i",
"++",
";",
"continue",
"next",
";",
"}",
"if",
"(",
"occurrenceCount",
"==",
"starts",
".",
"length",
")",
"{",
"System",
".",
"arraycopy",
"(",
"starts",
",",
"0",
",",
"starts",
"=",
"new",
"int",
"[",
"occurrenceCount",
"*",
"2",
"]",
",",
"0",
",",
"occurrenceCount",
")",
";",
"}",
"starts",
"[",
"occurrenceCount",
"++",
"]",
"=",
"index",
";",
"i",
"=",
"index",
"+",
"replacedLength",
";",
"}",
"}",
"if",
"(",
"occurrenceCount",
"==",
"0",
")",
"return",
"array",
";",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"max",
"+",
"occurrenceCount",
"*",
"(",
"replacementLength",
"-",
"replacedLength",
")",
"]",
";",
"int",
"inStart",
"=",
"0",
",",
"outStart",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"occurrenceCount",
";",
"i",
"++",
")",
"{",
"int",
"offset",
"=",
"starts",
"[",
"i",
"]",
"-",
"inStart",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"inStart",
",",
"result",
",",
"outStart",
",",
"offset",
")",
";",
"inStart",
"+=",
"offset",
";",
"outStart",
"+=",
"offset",
";",
"System",
".",
"arraycopy",
"(",
"replacementChars",
",",
"0",
",",
"result",
",",
"outStart",
",",
"replacementLength",
")",
";",
"inStart",
"+=",
"replacedLength",
";",
"outStart",
"+=",
"replacementLength",
";",
"}",
"System",
".",
"arraycopy",
"(",
"array",
",",
"inStart",
",",
"result",
",",
"outStart",
",",
"max",
"-",
"inStart",
")",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"replaceOnCopy",
"(",
"char",
"[",
"]",
"array",
",",
"char",
"toBeReplaced",
",",
"char",
"replacementChar",
")",
"{",
"char",
"[",
"]",
"result",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"length",
"=",
"array",
".",
"length",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"char",
"c",
"=",
"array",
"[",
"i",
"]",
";",
"if",
"(",
"c",
"==",
"toBeReplaced",
")",
"{",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"result",
"=",
"new",
"char",
"[",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"0",
",",
"result",
",",
"0",
",",
"i",
")",
";",
"}",
"result",
"[",
"i",
"]",
"=",
"replacementChar",
";",
"}",
"else",
"if",
"(",
"result",
"!=",
"null",
")",
"{",
"result",
"[",
"i",
"]",
"=",
"c",
";",
"}",
"}",
"if",
"(",
"result",
"==",
"null",
")",
"return",
"array",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"[",
"]",
"splitAndTrimOn",
"(",
"char",
"divider",
",",
"char",
"[",
"]",
"array",
")",
"{",
"int",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"NO_CHAR_CHAR",
";",
"int",
"wordCount",
"=",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"if",
"(",
"array",
"[",
"i",
"]",
"==",
"divider",
")",
"wordCount",
"++",
";",
"char",
"[",
"]",
"[",
"]",
"split",
"=",
"new",
"char",
"[",
"wordCount",
"]",
"[",
"]",
";",
"int",
"last",
"=",
"0",
",",
"currentWord",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"array",
"[",
"i",
"]",
"==",
"divider",
")",
"{",
"int",
"start",
"=",
"last",
",",
"end",
"=",
"i",
"-",
"1",
";",
"while",
"(",
"start",
"<",
"i",
"&&",
"array",
"[",
"start",
"]",
"==",
"'",
"'",
")",
"start",
"++",
";",
"while",
"(",
"end",
">",
"start",
"&&",
"array",
"[",
"end",
"]",
"==",
"'",
"'",
")",
"end",
"--",
";",
"split",
"[",
"currentWord",
"]",
"=",
"new",
"char",
"[",
"end",
"-",
"start",
"+",
"1",
"]",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"start",
",",
"split",
"[",
"currentWord",
"++",
"]",
",",
"0",
",",
"end",
"-",
"start",
"+",
"1",
")",
";",
"last",
"=",
"i",
"+",
"1",
";",
"}",
"}",
"int",
"start",
"=",
"last",
",",
"end",
"=",
"length",
"-",
"1",
";",
"while",
"(",
"start",
"<",
"length",
"&&",
"array",
"[",
"start",
"]",
"==",
"'",
"'",
")",
"start",
"++",
";",
"while",
"(",
"end",
">",
"start",
"&&",
"array",
"[",
"end",
"]",
"==",
"'",
"'",
")",
"end",
"--",
";",
"split",
"[",
"currentWord",
"]",
"=",
"new",
"char",
"[",
"end",
"-",
"start",
"+",
"1",
"]",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"start",
",",
"split",
"[",
"currentWord",
"++",
"]",
",",
"0",
",",
"end",
"-",
"start",
"+",
"1",
")",
";",
"return",
"split",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"[",
"]",
"splitOn",
"(",
"char",
"divider",
",",
"char",
"[",
"]",
"array",
")",
"{",
"int",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"NO_CHAR_CHAR",
";",
"int",
"wordCount",
"=",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"if",
"(",
"array",
"[",
"i",
"]",
"==",
"divider",
")",
"wordCount",
"++",
";",
"char",
"[",
"]",
"[",
"]",
"split",
"=",
"new",
"char",
"[",
"wordCount",
"]",
"[",
"]",
";",
"int",
"last",
"=",
"0",
",",
"currentWord",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"array",
"[",
"i",
"]",
"==",
"divider",
")",
"{",
"split",
"[",
"currentWord",
"]",
"=",
"new",
"char",
"[",
"i",
"-",
"last",
"]",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"last",
",",
"split",
"[",
"currentWord",
"++",
"]",
",",
"0",
",",
"i",
"-",
"last",
")",
";",
"last",
"=",
"i",
"+",
"1",
";",
"}",
"}",
"split",
"[",
"currentWord",
"]",
"=",
"new",
"char",
"[",
"length",
"-",
"last",
"]",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"last",
",",
"split",
"[",
"currentWord",
"]",
",",
"0",
",",
"length",
"-",
"last",
")",
";",
"return",
"split",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"[",
"]",
"splitOn",
"(",
"char",
"divider",
",",
"char",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"int",
"length",
"=",
"array",
"==",
"null",
"?",
"0",
":",
"array",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
"||",
"start",
">",
"end",
")",
"return",
"NO_CHAR_CHAR",
";",
"int",
"wordCount",
"=",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
"<",
"end",
";",
"i",
"++",
")",
"if",
"(",
"array",
"[",
"i",
"]",
"==",
"divider",
")",
"wordCount",
"++",
";",
"char",
"[",
"]",
"[",
"]",
"split",
"=",
"new",
"char",
"[",
"wordCount",
"]",
"[",
"]",
";",
"int",
"last",
"=",
"start",
",",
"currentWord",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"start",
";",
"i",
"<",
"end",
";",
"i",
"++",
")",
"{",
"if",
"(",
"array",
"[",
"i",
"]",
"==",
"divider",
")",
"{",
"split",
"[",
"currentWord",
"]",
"=",
"new",
"char",
"[",
"i",
"-",
"last",
"]",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"last",
",",
"split",
"[",
"currentWord",
"++",
"]",
",",
"0",
",",
"i",
"-",
"last",
")",
";",
"last",
"=",
"i",
"+",
"1",
";",
"}",
"}",
"split",
"[",
"currentWord",
"]",
"=",
"new",
"char",
"[",
"end",
"-",
"last",
"]",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"last",
",",
"split",
"[",
"currentWord",
"]",
",",
"0",
",",
"end",
"-",
"last",
")",
";",
"return",
"split",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"[",
"]",
"subarray",
"(",
"char",
"[",
"]",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"if",
"(",
"end",
"==",
"-",
"1",
")",
"end",
"=",
"array",
".",
"length",
";",
"if",
"(",
"start",
">",
"end",
")",
"return",
"null",
";",
"if",
"(",
"start",
"<",
"0",
")",
"return",
"null",
";",
"if",
"(",
"end",
">",
"array",
".",
"length",
")",
"return",
"null",
";",
"char",
"[",
"]",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"end",
"-",
"start",
"]",
"[",
"]",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"start",
",",
"result",
",",
"0",
",",
"end",
"-",
"start",
")",
";",
"return",
"result",
";",
"}",
"public",
"static",
"final",
"char",
"[",
"]",
"subarray",
"(",
"char",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"if",
"(",
"end",
"==",
"-",
"1",
")",
"end",
"=",
"array",
".",
"length",
";",
"if",
"(",
"start",
">",
"end",
")",
"return",
"null",
";",
"if",
"(",
"start",
"<",
"0",
")",
"return",
"null",
";",
"if",
"(",
"end",
">",
"array",
".",
"length",
")",
"return",
"null",
";",
"char",
"[",
"]",
"result",
"=",
"new",
"char",
"[",
"end",
"-",
"start",
"]",
";",
"System",
".",
"arraycopy",
"(",
"array",
",",
"start",
",",
"result",
",",
"0",
",",
"end",
"-",
"start",
")",
";",
"return",
"result",
";",
"}",
"final",
"static",
"public",
"char",
"[",
"]",
"toLowerCase",
"(",
"char",
"[",
"]",
"chars",
")",
"{",
"if",
"(",
"chars",
"==",
"null",
")",
"return",
"null",
";",
"int",
"length",
"=",
"chars",
".",
"length",
";",
"char",
"[",
"]",
"lowerChars",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"char",
"c",
"=",
"chars",
"[",
"i",
"]",
";",
"char",
"lc",
"=",
"ScannerHelper",
".",
"toLowerCase",
"(",
"c",
")",
";",
"if",
"(",
"(",
"c",
"!=",
"lc",
")",
"||",
"(",
"lowerChars",
"!=",
"null",
")",
")",
"{",
"if",
"(",
"lowerChars",
"==",
"null",
")",
"{",
"System",
".",
"arraycopy",
"(",
"chars",
",",
"0",
",",
"lowerChars",
"=",
"new",
"char",
"[",
"length",
"]",
",",
"0",
",",
"i",
")",
";",
"}",
"lowerChars",
"[",
"i",
"]",
"=",
"lc",
";",
"}",
"}",
"return",
"lowerChars",
"==",
"null",
"?",
"chars",
":",
"lowerChars",
";",
"}",
"final",
"static",
"public",
"char",
"[",
"]",
"toUpperCase",
"(",
"char",
"[",
"]",
"chars",
")",
"{",
"if",
"(",
"chars",
"==",
"null",
")",
"return",
"null",
";",
"int",
"length",
"=",
"chars",
".",
"length",
";",
"char",
"[",
"]",
"upperChars",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"char",
"c",
"=",
"chars",
"[",
"i",
"]",
";",
"char",
"lc",
"=",
"ScannerHelper",
".",
"toUpperCase",
"(",
"c",
")",
";",
"if",
"(",
"(",
"c",
"!=",
"lc",
")",
"||",
"(",
"upperChars",
"!=",
"null",
")",
")",
"{",
"if",
"(",
"upperChars",
"==",
"null",
")",
"{",
"System",
".",
"arraycopy",
"(",
"chars",
",",
"0",
",",
"upperChars",
"=",
"new",
"char",
"[",
"length",
"]",
",",
"0",
",",
"i",
")",
";",
"}",
"upperChars",
"[",
"i",
"]",
"=",
"lc",
";",
"}",
"}",
"return",
"upperChars",
"==",
"null",
"?",
"chars",
":",
"upperChars",
";",
"}",
"final",
"static",
"public",
"char",
"[",
"]",
"trim",
"(",
"char",
"[",
"]",
"chars",
")",
"{",
"if",
"(",
"chars",
"==",
"null",
")",
"return",
"null",
";",
"int",
"start",
"=",
"0",
",",
"length",
"=",
"chars",
".",
"length",
",",
"end",
"=",
"length",
"-",
"1",
";",
"while",
"(",
"start",
"<",
"length",
"&&",
"chars",
"[",
"start",
"]",
"==",
"'",
"'",
")",
"{",
"start",
"++",
";",
"}",
"while",
"(",
"end",
">",
"start",
"&&",
"chars",
"[",
"end",
"]",
"==",
"'",
"'",
")",
"{",
"end",
"--",
";",
"}",
"if",
"(",
"start",
"!=",
"0",
"||",
"end",
"!=",
"length",
"-",
"1",
")",
"{",
"return",
"subarray",
"(",
"chars",
",",
"start",
",",
"end",
"+",
"1",
")",
";",
"}",
"return",
"chars",
";",
"}",
"final",
"static",
"public",
"String",
"toString",
"(",
"char",
"[",
"]",
"[",
"]",
"array",
")",
"{",
"char",
"[",
"]",
"result",
"=",
"concatWith",
"(",
"array",
",",
"'.'",
")",
";",
"return",
"new",
"String",
"(",
"result",
")",
";",
"}",
"final",
"static",
"public",
"String",
"[",
"]",
"toStrings",
"(",
"char",
"[",
"]",
"[",
"]",
"array",
")",
"{",
"if",
"(",
"array",
"==",
"null",
")",
"return",
"NO_STRINGS",
";",
"int",
"length",
"=",
"array",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"return",
"NO_STRINGS",
";",
"String",
"[",
"]",
"result",
"=",
"new",
"String",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"result",
"[",
"i",
"]",
"=",
"new",
"String",
"(",
"array",
"[",
"i",
"]",
")",
";",
"return",
"result",
";",
"}",
"}",
"</s>"
] |
4,339 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ProblemReasons",
";",
"public",
"interface",
"IProblem",
"{",
"String",
"[",
"]",
"getArguments",
"(",
")",
";",
"int",
"getID",
"(",
")",
";",
"String",
"getMessage",
"(",
")",
";",
"char",
"[",
"]",
"getOriginatingFileName",
"(",
")",
";",
"int",
"getSourceEnd",
"(",
")",
";",
"int",
"getSourceLineNumber",
"(",
")",
";",
"int",
"getSourceStart",
"(",
")",
";",
"boolean",
"isError",
"(",
")",
";",
"boolean",
"isWarning",
"(",
")",
";",
"void",
"setSourceEnd",
"(",
"int",
"sourceEnd",
")",
";",
"void",
"setSourceLineNumber",
"(",
"int",
"lineNumber",
")",
";",
"void",
"setSourceStart",
"(",
"int",
"sourceStart",
")",
";",
"int",
"TypeRelated",
"=",
"0x01000000",
";",
"int",
"FieldRelated",
"=",
"0x02000000",
";",
"int",
"MethodRelated",
"=",
"0x04000000",
";",
"int",
"ConstructorRelated",
"=",
"0x08000000",
";",
"int",
"ImportRelated",
"=",
"0x10000000",
";",
"int",
"Internal",
"=",
"0x20000000",
";",
"int",
"Syntax",
"=",
"0x40000000",
";",
"int",
"Javadoc",
"=",
"0x80000000",
";",
"int",
"IgnoreCategoriesMask",
"=",
"0xFFFFFF",
";",
"int",
"Unclassified",
"=",
"0",
";",
"int",
"ObjectHasNoSuperclass",
"=",
"TypeRelated",
"+",
"1",
";",
"int",
"UndefinedType",
"=",
"TypeRelated",
"+",
"2",
";",
"int",
"NotVisibleType",
"=",
"TypeRelated",
"+",
"3",
";",
"int",
"AmbiguousType",
"=",
"TypeRelated",
"+",
"4",
";",
"int",
"UsingDeprecatedType",
"=",
"TypeRelated",
"+",
"5",
";",
"int",
"InternalTypeNameProvided",
"=",
"TypeRelated",
"+",
"6",
";",
"int",
"UnusedPrivateType",
"=",
"Internal",
"+",
"TypeRelated",
"+",
"7",
";",
"int",
"IncompatibleTypesInEqualityOperator",
"=",
"TypeRelated",
"+",
"15",
";",
"int",
"IncompatibleTypesInConditionalOperator",
"=",
"TypeRelated",
"+",
"16",
";",
"int",
"TypeMismatch",
"=",
"TypeRelated",
"+",
"17",
";",
"int",
"IndirectAccessToStaticType",
"=",
"Internal",
"+",
"TypeRelated",
"+",
"18",
";",
"int",
"MissingEnclosingInstanceForConstructorCall",
"=",
"TypeRelated",
"+",
"20",
";",
"int",
"MissingEnclosingInstance",
"=",
"TypeRelated",
"+",
"21",
";",
"int",
"IncorrectEnclosingInstanceReference",
"=",
"TypeRelated",
"+",
"22",
";",
"int",
"IllegalEnclosingInstanceSpecification",
"=",
"TypeRelated",
"+",
"23",
";",
"int",
"CannotDefineStaticInitializerInLocalType",
"=",
"Internal",
"+",
"24",
";",
"int",
"OuterLocalMustBeFinal",
"=",
"Internal",
"+",
"25",
";",
"int",
"CannotDefineInterfaceInLocalType",
"=",
"Internal",
"+",
"26",
";",
"int",
"IllegalPrimitiveOrArrayTypeForEnclosingInstance",
"=",
"TypeRelated",
"+",
"27",
";",
"int",
"EnclosingInstanceInConstructorCall",
"=",
"Internal",
"+",
"28",
";",
"int",
"AnonymousClassCannotExtendFinalClass",
"=",
"TypeRelated",
"+",
"29",
";",
"int",
"CannotDefineAnnotationInLocalType",
"=",
"Internal",
"+",
"30",
";",
"int",
"CannotDefineEnumInLocalType",
"=",
"Internal",
"+",
"31",
";",
"int",
"NonStaticContextForEnumMemberType",
"=",
"Internal",
"+",
"32",
";",
"int",
"TypeHidingType",
"=",
"TypeRelated",
"+",
"33",
";",
"int",
"UndefinedName",
"=",
"Internal",
"+",
"FieldRelated",
"+",
"50",
";",
"int",
"UninitializedLocalVariable",
"=",
"Internal",
"+",
"51",
";",
"int",
"VariableTypeCannotBeVoid",
"=",
"Internal",
"+",
"52",
";",
"int",
"VariableTypeCannotBeVoidArray",
"=",
"Internal",
"+",
"53",
";",
"int",
"CannotAllocateVoidArray",
"=",
"Internal",
"+",
"54",
";",
"int",
"RedefinedLocal",
"=",
"Internal",
"+",
"55",
";",
"int",
"RedefinedArgument",
"=",
"Internal",
"+",
"56",
";",
"int",
"DuplicateFinalLocalInitialization",
"=",
"Internal",
"+",
"57",
";",
"int",
"NonBlankFinalLocalAssignment",
"=",
"Internal",
"+",
"58",
";",
"int",
"ParameterAssignment",
"=",
"Internal",
"+",
"59",
";",
"int",
"FinalOuterLocalAssignment",
"=",
"Internal",
"+",
"60",
";",
"int",
"LocalVariableIsNeverUsed",
"=",
"Internal",
"+",
"61",
";",
"int",
"ArgumentIsNeverUsed",
"=",
"Internal",
"+",
"62",
";",
"int",
"BytecodeExceeds64KLimit",
"=",
"Internal",
"+",
"63",
";",
"int",
"BytecodeExceeds64KLimitForClinit",
"=",
"Internal",
"+",
"64",
";",
"int",
"TooManyArgumentSlots",
"=",
"Internal",
"+",
"65",
";",
"int",
"TooManyLocalVariableSlots",
"=",
"Internal",
"+",
"66",
";",
"int",
"TooManySyntheticArgumentSlots",
"=",
"Internal",
"+",
"67",
";",
"int",
"TooManyArrayDimensions",
"=",
"Internal",
"+",
"68",
";",
"int",
"BytecodeExceeds64KLimitForConstructor",
"=",
"Internal",
"+",
"69",
";",
"int",
"UndefinedField",
"=",
"FieldRelated",
"+",
"70",
";",
"int",
"NotVisibleField",
"=",
"FieldRelated",
"+",
"71",
";",
"int",
"AmbiguousField",
"=",
"FieldRelated",
"+",
"72",
";",
"int",
"UsingDeprecatedField",
"=",
"FieldRelated",
"+",
"73",
";",
"int",
"NonStaticFieldFromStaticInvocation",
"=",
"FieldRelated",
"+",
"74",
";",
"int",
"ReferenceToForwardField",
"=",
"FieldRelated",
"+",
"Internal",
"+",
"75",
";",
"int",
"NonStaticAccessToStaticField",
"=",
"Internal",
"+",
"FieldRelated",
"+",
"76",
";",
"int",
"UnusedPrivateField",
"=",
"Internal",
"+",
"FieldRelated",
"+",
"77",
";",
"int",
"IndirectAccessToStaticField",
"=",
"Internal",
"+",
"FieldRelated",
"+",
"78",
";",
"int",
"UnqualifiedFieldAccess",
"=",
"Internal",
"+",
"FieldRelated",
"+",
"79",
";",
"int",
"FinalFieldAssignment",
"=",
"FieldRelated",
"+",
"80",
";",
"int",
"UninitializedBlankFinalField",
"=",
"FieldRelated",
"+",
"81",
";",
"int",
"DuplicateBlankFinalFieldInitialization",
"=",
"FieldRelated",
"+",
"82",
";",
"int",
"UnresolvedVariable",
"=",
"FieldRelated",
"+",
"83",
";",
"int",
"LocalVariableHidingLocalVariable",
"=",
"Internal",
"+",
"90",
";",
"int",
"LocalVariableHidingField",
"=",
"Internal",
"+",
"FieldRelated",
"+",
"91",
";",
"int",
"FieldHidingLocalVariable",
"=",
"Internal",
"+",
"FieldRelated",
"+",
"92",
";",
"int",
"FieldHidingField",
"=",
"Internal",
"+",
"FieldRelated",
"+",
"93",
";",
"int",
"ArgumentHidingLocalVariable",
"=",
"Internal",
"+",
"94",
";",
"int",
"ArgumentHidingField",
"=",
"Internal",
"+",
"95",
";",
"int",
"MissingSerialVersion",
"=",
"Internal",
"+",
"96",
";",
"int",
"UndefinedMethod",
"=",
"MethodRelated",
"+",
"100",
";",
"int",
"NotVisibleMethod",
"=",
"MethodRelated",
"+",
"101",
";",
"int",
"AmbiguousMethod",
"=",
"MethodRelated",
"+",
"102",
";",
"int",
"UsingDeprecatedMethod",
"=",
"MethodRelated",
"+",
"103",
";",
"int",
"DirectInvocationOfAbstractMethod",
"=",
"MethodRelated",
"+",
"104",
";",
"int",
"VoidMethodReturnsValue",
"=",
"MethodRelated",
"+",
"105",
";",
"int",
"MethodReturnsVoid",
"=",
"MethodRelated",
"+",
"106",
";",
"int",
"MethodRequiresBody",
"=",
"Internal",
"+",
"MethodRelated",
"+",
"107",
";",
"int",
"ShouldReturnValue",
"=",
"Internal",
"+",
"MethodRelated",
"+",
"108",
";",
"int",
"MethodButWithConstructorName",
"=",
"MethodRelated",
"+",
"110",
";",
"int",
"MissingReturnType",
"=",
"TypeRelated",
"+",
"111",
";",
"int",
"BodyForNativeMethod",
"=",
"Internal",
"+",
"MethodRelated",
"+",
"112",
";",
"int",
"BodyForAbstractMethod",
"=",
"Internal",
"+",
"MethodRelated",
"+",
"113",
";",
"int",
"NoMessageSendOnBaseType",
"=",
"MethodRelated",
"+",
"114",
";",
"int",
"ParameterMismatch",
"=",
"MethodRelated",
"+",
"115",
";",
"int",
"NoMessageSendOnArrayType",
"=",
"MethodRelated",
"+",
"116",
";",
"int",
"NonStaticAccessToStaticMethod",
"=",
"Internal",
"+",
"MethodRelated",
"+",
"117",
";",
"int",
"UnusedPrivateMethod",
"=",
"Internal",
"+",
"MethodRelated",
"+",
"118",
";",
"int",
"IndirectAccessToStaticMethod",
"=",
"Internal",
"+",
"MethodRelated",
"+",
"119",
";",
"int",
"MissingTypeInMethod",
"=",
"MethodRelated",
"+",
"120",
";",
"int",
"MethodCanBeStatic",
"=",
"Internal",
"+",
"MethodRelated",
"+",
"121",
";",
"int",
"MethodCanBePotentiallyStatic",
"=",
"Internal",
"+",
"MethodRelated",
"+",
"122",
";",
"int",
"MissingTypeInConstructor",
"=",
"ConstructorRelated",
"+",
"129",
";",
"int",
"UndefinedConstructor",
"=",
"ConstructorRelated",
"+",
"130",
";",
"int",
"NotVisibleConstructor",
"=",
"ConstructorRelated",
"+",
"131",
";",
"int",
"AmbiguousConstructor",
"=",
"ConstructorRelated",
"+",
"132",
";",
"int",
"UsingDeprecatedConstructor",
"=",
"ConstructorRelated",
"+",
"133",
";",
"int",
"UnusedPrivateConstructor",
"=",
"Internal",
"+",
"MethodRelated",
"+",
"134",
";",
"int",
"InstanceFieldDuringConstructorInvocation",
"=",
"ConstructorRelated",
"+",
"135",
";",
"int",
"InstanceMethodDuringConstructorInvocation",
"=",
"ConstructorRelated",
"+",
"136",
";",
"int",
"RecursiveConstructorInvocation",
"=",
"ConstructorRelated",
"+",
"137",
";",
"int",
"ThisSuperDuringConstructorInvocation",
"=",
"ConstructorRelated",
"+",
"138",
";",
"int",
"InvalidExplicitConstructorCall",
"=",
"ConstructorRelated",
"+",
"Syntax",
"+",
"139",
";",
"int",
"UndefinedConstructorInDefaultConstructor",
"=",
"ConstructorRelated",
"+",
"140",
";",
"int",
"NotVisibleConstructorInDefaultConstructor",
"=",
"ConstructorRelated",
"+",
"141",
";",
"int",
"AmbiguousConstructorInDefaultConstructor",
"=",
"ConstructorRelated",
"+",
"142",
";",
"int",
"UndefinedConstructorInImplicitConstructorCall",
"=",
"ConstructorRelated",
"+",
"143",
";",
"int",
"NotVisibleConstructorInImplicitConstructorCall",
"=",
"ConstructorRelated",
"+",
"144",
";",
"int",
"AmbiguousConstructorInImplicitConstructorCall",
"=",
"ConstructorRelated",
"+",
"145",
";",
"int",
"UnhandledExceptionInDefaultConstructor",
"=",
"TypeRelated",
"+",
"146",
";",
"int",
"UnhandledExceptionInImplicitConstructorCall",
"=",
"TypeRelated",
"+",
"147",
";",
"int",
"UnusedObjectAllocation",
"=",
"Internal",
"+",
"148",
";",
"int",
"DeadCode",
"=",
"Internal",
"+",
"149",
";",
"int",
"ArrayReferenceRequired",
"=",
"Internal",
"+",
"150",
";",
"int",
"NoImplicitStringConversionForCharArrayExpression",
"=",
"Internal",
"+",
"151",
";",
"int",
"StringConstantIsExceedingUtf8Limit",
"=",
"Internal",
"+",
"152",
";",
"int",
"NonConstantExpression",
"=",
"Internal",
"+",
"153",
";",
"int",
"NumericValueOutOfRange",
"=",
"Internal",
"+",
"154",
";",
"int",
"IllegalCast",
"=",
"TypeRelated",
"+",
"156",
";",
"int",
"InvalidClassInstantiation",
"=",
"TypeRelated",
"+",
"157",
";",
"int",
"CannotDefineDimensionExpressionsWithInit",
"=",
"Internal",
"+",
"158",
";",
"int",
"MustDefineEitherDimensionExpressionsOrInitializer",
"=",
"Internal",
"+",
"159",
";",
"int",
"InvalidOperator",
"=",
"Internal",
"+",
"160",
";",
"int",
"CodeCannotBeReached",
"=",
"Internal",
"+",
"161",
";",
"int",
"CannotReturnInInitializer",
"=",
"Internal",
"+",
"162",
";",
"int",
"InitializerMustCompleteNormally",
"=",
"Internal",
"+",
"163",
";",
"int",
"InvalidVoidExpression",
"=",
"Internal",
"+",
"164",
";",
"int",
"MaskedCatch",
"=",
"TypeRelated",
"+",
"165",
";",
"int",
"DuplicateDefaultCase",
"=",
"Internal",
"+",
"166",
";",
"int",
"UnreachableCatch",
"=",
"TypeRelated",
"+",
"MethodRelated",
"+",
"167",
";",
"int",
"UnhandledException",
"=",
"TypeRelated",
"+",
"168",
";",
"int",
"IncorrectSwitchType",
"=",
"TypeRelated",
"+",
"169",
";",
"int",
"DuplicateCase",
"=",
"FieldRelated",
"+",
"170",
";",
"int",
"DuplicateLabel",
"=",
"Internal",
"+",
"171",
";",
"int",
"InvalidBreak",
"=",
"Internal",
"+",
"172",
";",
"int",
"InvalidContinue",
"=",
"Internal",
"+",
"173",
";",
"int",
"UndefinedLabel",
"=",
"Internal",
"+",
"174",
";",
"int",
"InvalidTypeToSynchronized",
"=",
"Internal",
"+",
"175",
";",
"int",
"InvalidNullToSynchronized",
"=",
"Internal",
"+",
"176",
";",
"int",
"CannotThrowNull",
"=",
"Internal",
"+",
"177",
";",
"int",
"AssignmentHasNoEffect",
"=",
"Internal",
"+",
"178",
";",
"int",
"PossibleAccidentalBooleanAssignment",
"=",
"Internal",
"+",
"179",
";",
"int",
"SuperfluousSemicolon",
"=",
"Internal",
"+",
"180",
";",
"int",
"UnnecessaryCast",
"=",
"Internal",
"+",
"TypeRelated",
"+",
"181",
";",
"int",
"UnnecessaryArgumentCast",
"=",
"Internal",
"+",
"TypeRelated",
"+",
"182",
";",
"int",
"UnnecessaryInstanceof",
"=",
"Internal",
"+",
"TypeRelated",
"+",
"183",
";",
"int",
"FinallyMustCompleteNormally",
"=",
"Internal",
"+",
"184",
";",
"int",
"UnusedMethodDeclaredThrownException",
"=",
"Internal",
"+",
"185",
";",
"int",
"UnusedConstructorDeclaredThrownException",
"=",
"Internal",
"+",
"186",
";",
"int",
"InvalidCatchBlockSequence",
"=",
"Internal",
"+",
"TypeRelated",
"+",
"187",
";",
"int",
"EmptyControlFlowStatement",
"=",
"Internal",
"+",
"TypeRelated",
"+",
"188",
";",
"int",
"UnnecessaryElse",
"=",
"Internal",
"+",
"189",
";",
"int",
"NeedToEmulateFieldReadAccess",
"=",
"FieldRelated",
"+",
"190",
";",
"int",
"NeedToEmulateFieldWriteAccess",
"=",
"FieldRelated",
"+",
"191",
";",
"int",
"NeedToEmulateMethodAccess",
"=",
"MethodRelated",
"+",
"192",
";",
"int",
"NeedToEmulateConstructorAccess",
"=",
"MethodRelated",
"+",
"193",
";",
"int",
"FallthroughCase",
"=",
"Internal",
"+",
"194",
";",
"int",
"InheritedMethodHidesEnclosingName",
"=",
"MethodRelated",
"+",
"195",
";",
"int",
"InheritedFieldHidesEnclosingName",
"=",
"FieldRelated",
"+",
"196",
";",
"int",
"InheritedTypeHidesEnclosingName",
"=",
"TypeRelated",
"+",
"197",
";",
"int",
"IllegalUsageOfQualifiedTypeReference",
"=",
"Internal",
"+",
"Syntax",
"+",
"198",
";",
"int",
"UnusedLabel",
"=",
"Internal",
"+",
"199",
";",
"int",
"ThisInStaticContext",
"=",
"Internal",
"+",
"200",
";",
"int",
"StaticMethodRequested",
"=",
"Internal",
"+",
"MethodRelated",
"+",
"201",
";",
"int",
"IllegalDimension",
"=",
"Internal",
"+",
"202",
";",
"int",
"InvalidTypeExpression",
"=",
"Internal",
"+",
"203",
";",
"int",
"ParsingError",
"=",
"Syntax",
"+",
"Internal",
"+",
"204",
";",
"int",
"ParsingErrorNoSuggestion",
"=",
"Syntax",
"+",
"Internal",
"+",
"205",
";",
"int",
"InvalidUnaryExpression",
"=",
"Syntax",
"+",
"Internal",
"+",
"206",
";",
"int",
"InterfaceCannotHaveConstructors",
"=",
"Syntax",
"+",
"Internal",
"+",
"207",
";",
"int",
"ArrayConstantsOnlyInArrayInitializers",
"=",
"Syntax",
"+",
"Internal",
"+",
"208",
";",
"int",
"ParsingErrorOnKeyword",
"=",
"Syntax",
"+",
"Internal",
"+",
"209",
";",
"int",
"ParsingErrorOnKeywordNoSuggestion",
"=",
"Syntax",
"+",
"Internal",
"+",
"210",
";",
"int",
"ComparingIdentical",
"=",
"Internal",
"+",
"211",
";",
"int",
"UnmatchedBracket",
"=",
"Syntax",
"+",
"Internal",
"+",
"220",
";",
"int",
"NoFieldOnBaseType",
"=",
"FieldRelated",
"+",
"221",
";",
"int",
"InvalidExpressionAsStatement",
"=",
"Syntax",
"+",
"Internal",
"+",
"222",
";",
"int",
"ExpressionShouldBeAVariable",
"=",
"Syntax",
"+",
"Internal",
"+",
"223",
";",
"int",
"MissingSemiColon",
"=",
"Syntax",
"+",
"Internal",
"+",
"224",
";",
"int",
"InvalidParenthesizedExpression",
"=",
"Syntax",
"+",
"Internal",
"+",
"225",
";",
"int",
"ParsingErrorInsertTokenBefore",
"=",
"Syntax",
"+",
"Internal",
"+",
"230",
";",
"int",
"ParsingErrorInsertTokenAfter",
"=",
"Syntax",
"+",
"Internal",
"+",
"231",
";",
"int",
"ParsingErrorDeleteToken",
"=",
"Syntax",
"+",
"Internal",
"+",
"232",
";",
"int",
"ParsingErrorDeleteTokens",
"=",
"Syntax",
"+",
"Internal",
"+",
"233",
";",
"int",
"ParsingErrorMergeTokens",
"=",
"Syntax",
"+",
"Internal",
"+",
"234",
";",
"int",
"ParsingErrorInvalidToken",
"=",
"Syntax",
"+",
"Internal",
"+",
"235",
";",
"int",
"ParsingErrorMisplacedConstruct",
"=",
"Syntax",
"+",
"Internal",
"+",
"236",
";",
"int",
"ParsingErrorReplaceTokens",
"=",
"Syntax",
"+",
"Internal",
"+",
"237",
";",
"int",
"ParsingErrorNoSuggestionForTokens",
"=",
"Syntax",
"+",
"Internal",
"+",
"238",
";",
"int",
"ParsingErrorUnexpectedEOF",
"=",
"Syntax",
"+",
"Internal",
"+",
"239",
";",
"int",
"ParsingErrorInsertToComplete",
"=",
"Syntax",
"+",
"Internal",
"+",
"240",
";",
"int",
"ParsingErrorInsertToCompleteScope",
"=",
"Syntax",
"+",
"Internal",
"+",
"241",
";",
"int",
"ParsingErrorInsertToCompletePhrase",
"=",
"Syntax",
"+",
"Internal",
"+",
"242",
";",
"int",
"EndOfSource",
"=",
"Syntax",
"+",
"Internal",
"+",
"250",
";",
"int",
"InvalidHexa",
"=",
"Syntax",
"+",
"Internal",
"+",
"251",
";",
"int",
"InvalidOctal",
"=",
"Syntax",
"+",
"Internal",
"+",
"252",
";",
"int",
"InvalidCharacterConstant",
"=",
"Syntax",
"+",
"Internal",
"+",
"253",
";",
"int",
"InvalidEscape",
"=",
"Syntax",
"+",
"Internal",
"+",
"254",
";",
"int",
"InvalidInput",
"=",
"Syntax",
"+",
"Internal",
"+",
"255",
";",
"int",
"InvalidUnicodeEscape",
"=",
"Syntax",
"+",
"Internal",
"+",
"256",
";",
"int",
"InvalidFloat",
"=",
"Syntax",
"+",
"Internal",
"+",
"257",
";",
"int",
"NullSourceString",
"=",
"Syntax",
"+",
"Internal",
"+",
"258",
";",
"int",
"UnterminatedString",
"=",
"Syntax",
"+",
"Internal",
"+",
"259",
";",
"int",
"UnterminatedComment",
"=",
"Syntax",
"+",
"Internal",
"+",
"260",
";",
"int",
"NonExternalizedStringLiteral",
"=",
"Internal",
"+",
"261",
";",
"int",
"InvalidDigit",
"=",
"Syntax",
"+",
"Internal",
"+",
"262",
";",
"int",
"InvalidLowSurrogate",
"=",
"Syntax",
"+",
"Internal",
"+",
"263",
";",
"int",
"InvalidHighSurrogate",
"=",
"Syntax",
"+",
"Internal",
"+",
"264",
";",
"int",
"UnnecessaryNLSTag",
"=",
"Internal",
"+",
"265",
";",
"int",
"InvalidBinary",
"=",
"Syntax",
"+",
"Internal",
"+",
"266",
";",
"int",
"BinaryLiteralNotBelow17",
"=",
"Syntax",
"+",
"Internal",
"+",
"267",
";",
"int",
"IllegalUnderscorePosition",
"=",
"Syntax",
"+",
"Internal",
"+",
"268",
";",
"int",
"UnderscoresInLiteralsNotBelow17",
"=",
"Syntax",
"+",
"Internal",
"+",
"269",
";",
"int",
"IllegalHexaLiteral",
"=",
"Syntax",
"+",
"Internal",
"+",
"270",
";",
"int",
"DiscouragedReference",
"=",
"TypeRelated",
"+",
"280",
";",
"int",
"InterfaceCannotHaveInitializers",
"=",
"TypeRelated",
"+",
"300",
";",
"int",
"DuplicateModifierForType",
"=",
"TypeRelated",
"+",
"301",
";",
"int",
"IllegalModifierForClass",
"=",
"TypeRelated",
"+",
"302",
";",
"int",
"IllegalModifierForInterface",
"=",
"TypeRelated",
"+",
"303",
";",
"int",
"IllegalModifierForMemberClass",
"=",
"TypeRelated",
"+",
"304",
";",
"int",
"IllegalModifierForMemberInterface",
"=",
"TypeRelated",
"+",
"305",
";",
"int",
"IllegalModifierForLocalClass",
"=",
"TypeRelated",
"+",
"306",
";",
"int",
"ForbiddenReference",
"=",
"TypeRelated",
"+",
"307",
";",
"int",
"IllegalModifierCombinationFinalAbstractForClass",
"=",
"TypeRelated",
"+",
"308",
";",
"int",
"IllegalVisibilityModifierForInterfaceMemberType",
"=",
"TypeRelated",
"+",
"309",
";",
"int",
"IllegalVisibilityModifierCombinationForMemberType",
"=",
"TypeRelated",
"+",
"310",
";",
"int",
"IllegalStaticModifierForMemberType",
"=",
"TypeRelated",
"+",
"311",
";",
"int",
"SuperclassMustBeAClass",
"=",
"TypeRelated",
"+",
"312",
";",
"int",
"ClassExtendFinalClass",
"=",
"TypeRelated",
"+",
"313",
";",
"int",
"DuplicateSuperInterface",
"=",
"TypeRelated",
"+",
"314",
";",
"int",
"SuperInterfaceMustBeAnInterface",
"=",
"TypeRelated",
"+",
"315",
";",
"int",
"HierarchyCircularitySelfReference",
"=",
"TypeRelated",
"+",
"316",
";",
"int",
"HierarchyCircularity",
"=",
"TypeRelated",
"+",
"317",
";",
"int",
"HidingEnclosingType",
"=",
"TypeRelated",
"+",
"318",
";",
"int",
"DuplicateNestedType",
"=",
"TypeRelated",
"+",
"319",
";",
"int",
"CannotThrowType",
"=",
"TypeRelated",
"+",
"320",
";",
"int",
"PackageCollidesWithType",
"=",
"TypeRelated",
"+",
"321",
";",
"int",
"TypeCollidesWithPackage",
"=",
"TypeRelated",
"+",
"322",
";",
"int",
"DuplicateTypes",
"=",
"TypeRelated",
"+",
"323",
";",
"int",
"IsClassPathCorrect",
"=",
"TypeRelated",
"+",
"324",
";",
"int",
"PublicClassMustMatchFileName",
"=",
"TypeRelated",
"+",
"325",
";",
"int",
"MustSpecifyPackage",
"=",
"Internal",
"+",
"326",
";",
"int",
"HierarchyHasProblems",
"=",
"TypeRelated",
"+",
"327",
";",
"int",
"PackageIsNotExpectedPackage",
"=",
"Internal",
"+",
"328",
";",
"int",
"ObjectCannotHaveSuperTypes",
"=",
"Internal",
"+",
"329",
";",
"int",
"ObjectMustBeClass",
"=",
"Internal",
"+",
"330",
";",
"int",
"RedundantSuperinterface",
"=",
"TypeRelated",
"+",
"331",
";",
"int",
"ShouldImplementHashcode",
"=",
"TypeRelated",
"+",
"332",
";",
"int",
"AbstractMethodsInConcreteClass",
"=",
"TypeRelated",
"+",
"333",
";",
"int",
"SuperclassNotFound",
"=",
"TypeRelated",
"+",
"329",
"+",
"ProblemReasons",
".",
"NotFound",
";",
"int",
"SuperclassNotVisible",
"=",
"TypeRelated",
"+",
"329",
"+",
"ProblemReasons",
".",
"NotVisible",
";",
"int",
"SuperclassAmbiguous",
"=",
"TypeRelated",
"+",
"329",
"+",
"ProblemReasons",
".",
"Ambiguous",
";",
"int",
"SuperclassInternalNameProvided",
"=",
"TypeRelated",
"+",
"329",
"+",
"ProblemReasons",
".",
"InternalNameProvided",
";",
"int",
"SuperclassInheritedNameHidesEnclosingName",
"=",
"TypeRelated",
"+",
"329",
"+",
"ProblemReasons",
".",
"InheritedNameHidesEnclosingName",
";",
"int",
"InterfaceNotFound",
"=",
"TypeRelated",
"+",
"334",
"+",
"ProblemReasons",
".",
"NotFound",
";",
"int",
"InterfaceNotVisible",
"=",
"TypeRelated",
"+",
"334",
"+",
"ProblemReasons",
".",
"NotVisible",
";",
"int",
"InterfaceAmbiguous",
"=",
"TypeRelated",
"+",
"334",
"+",
"ProblemReasons",
".",
"Ambiguous",
";",
"int",
"InterfaceInternalNameProvided",
"=",
"TypeRelated",
"+",
"334",
"+",
"ProblemReasons",
".",
"InternalNameProvided",
";",
"int",
"InterfaceInheritedNameHidesEnclosingName",
"=",
"TypeRelated",
"+",
"334",
"+",
"ProblemReasons",
".",
"InheritedNameHidesEnclosingName",
";",
"int",
"DuplicateField",
"=",
"FieldRelated",
"+",
"340",
";",
"int",
"DuplicateModifierForField",
"=",
"FieldRelated",
"+",
"341",
";",
"int",
"IllegalModifierForField",
"=",
"FieldRelated",
"+",
"342",
";",
"int",
"IllegalModifierForInterfaceField",
"=",
"FieldRelated",
"+",
"343",
";",
"int",
"IllegalVisibilityModifierCombinationForField",
"=",
"FieldRelated",
"+",
"344",
";",
"int",
"IllegalModifierCombinationFinalVolatileForField",
"=",
"FieldRelated",
"+",
"345",
";",
"int",
"UnexpectedStaticModifierForField",
"=",
"FieldRelated",
"+",
"346",
";",
"int",
"FieldTypeNotFound",
"=",
"FieldRelated",
"+",
"349",
"+",
"ProblemReasons",
".",
"NotFound",
";",
"int",
"FieldTypeNotVisible",
"=",
"FieldRelated",
"+",
"349",
"+",
"ProblemReasons",
".",
"NotVisible",
";",
"int",
"FieldTypeAmbiguous",
"=",
"FieldRelated",
"+",
"349",
"+",
"ProblemReasons",
".",
"Ambiguous",
";",
"int",
"FieldTypeInternalNameProvided",
"=",
"FieldRelated",
"+",
"349",
"+",
"ProblemReasons",
".",
"InternalNameProvided",
";",
"int",
"FieldTypeInheritedNameHidesEnclosingName",
"=",
"FieldRelated",
"+",
"349",
"+",
"ProblemReasons",
".",
"InheritedNameHidesEnclosingName",
";",
"int",
"DuplicateMethod",
"=",
"MethodRelated",
"+",
"355",
";",
"int",
"IllegalModifierForArgument",
"=",
"MethodRelated",
"+",
"356",
";",
"int",
"DuplicateModifierForMethod",
"=",
"MethodRelated",
"+",
"357",
";",
"int",
"IllegalModifierForMethod",
"=",
"MethodRelated",
"+",
"358",
";",
"int",
"IllegalModifierForInterfaceMethod",
"=",
"MethodRelated",
"+",
"359",
";",
"int",
"IllegalVisibilityModifierCombinationForMethod",
"=",
"MethodRelated",
"+",
"360",
";",
"int",
"UnexpectedStaticModifierForMethod",
"=",
"MethodRelated",
"+",
"361",
";",
"int",
"IllegalAbstractModifierCombinationForMethod",
"=",
"MethodRelated",
"+",
"362",
";",
"int",
"AbstractMethodInAbstractClass",
"=",
"MethodRelated",
"+",
"363",
";",
"int",
"ArgumentTypeCannotBeVoid",
"=",
"MethodRelated",
"+",
"364",
";",
"int",
"ArgumentTypeCannotBeVoidArray",
"=",
"MethodRelated",
"+",
"365",
";",
"int",
"ReturnTypeCannotBeVoidArray",
"=",
"MethodRelated",
"+",
"366",
";",
"int",
"NativeMethodsCannotBeStrictfp",
"=",
"MethodRelated",
"+",
"367",
";",
"int",
"DuplicateModifierForArgument",
"=",
"MethodRelated",
"+",
"368",
";",
"int",
"IllegalModifierForConstructor",
"=",
"MethodRelated",
"+",
"369",
";",
"int",
"ArgumentTypeNotFound",
"=",
"MethodRelated",
"+",
"369",
"+",
"ProblemReasons",
".",
"NotFound",
";",
"int",
"ArgumentTypeNotVisible",
"=",
"MethodRelated",
"+",
"369",
"+",
"ProblemReasons",
".",
"NotVisible",
";",
"int",
"ArgumentTypeAmbiguous",
"=",
"MethodRelated",
"+",
"369",
"+",
"ProblemReasons",
".",
"Ambiguous",
";",
"int",
"ArgumentTypeInternalNameProvided",
"=",
"MethodRelated",
"+",
"369",
"+",
"ProblemReasons",
".",
"InternalNameProvided",
";",
"int",
"ArgumentTypeInheritedNameHidesEnclosingName",
"=",
"MethodRelated",
"+",
"369",
"+",
"ProblemReasons",
".",
"InheritedNameHidesEnclosingName",
";",
"int",
"ExceptionTypeNotFound",
"=",
"MethodRelated",
"+",
"374",
"+",
"ProblemReasons",
".",
"NotFound",
";",
"int",
"ExceptionTypeNotVisible",
"=",
"MethodRelated",
"+",
"374",
"+",
"ProblemReasons",
".",
"NotVisible",
";",
"int",
"ExceptionTypeAmbiguous",
"=",
"MethodRelated",
"+",
"374",
"+",
"ProblemReasons",
".",
"Ambiguous",
";",
"int",
"ExceptionTypeInternalNameProvided",
"=",
"MethodRelated",
"+",
"374",
"+",
"ProblemReasons",
".",
"InternalNameProvided",
";",
"int",
"ExceptionTypeInheritedNameHidesEnclosingName",
"=",
"MethodRelated",
"+",
"374",
"+",
"ProblemReasons",
".",
"InheritedNameHidesEnclosingName",
";",
"int",
"ReturnTypeNotFound",
"=",
"MethodRelated",
"+",
"379",
"+",
"ProblemReasons",
".",
"NotFound",
";",
"int",
"ReturnTypeNotVisible",
"=",
"MethodRelated",
"+",
"379",
"+",
"ProblemReasons",
".",
"NotVisible",
";",
"int",
"ReturnTypeAmbiguous",
"=",
"MethodRelated",
"+",
"379",
"+",
"ProblemReasons",
".",
"Ambiguous",
";",
"int",
"ReturnTypeInternalNameProvided",
"=",
"MethodRelated",
"+",
"379",
"+",
"ProblemReasons",
".",
"InternalNameProvided",
";",
"int",
"ReturnTypeInheritedNameHidesEnclosingName",
"=",
"MethodRelated",
"+",
"379",
"+",
"ProblemReasons",
".",
"InheritedNameHidesEnclosingName",
";",
"int",
"ConflictingImport",
"=",
"ImportRelated",
"+",
"385",
";",
"int",
"DuplicateImport",
"=",
"ImportRelated",
"+",
"386",
";",
"int",
"CannotImportPackage",
"=",
"ImportRelated",
"+",
"387",
";",
"int",
"UnusedImport",
"=",
"ImportRelated",
"+",
"388",
";",
"int",
"ImportNotFound",
"=",
"ImportRelated",
"+",
"389",
"+",
"ProblemReasons",
".",
"NotFound",
";",
"int",
"ImportNotVisible",
"=",
"ImportRelated",
"+",
"389",
"+",
"ProblemReasons",
".",
"NotVisible",
";",
"int",
"ImportAmbiguous",
"=",
"ImportRelated",
"+",
"389",
"+",
"ProblemReasons",
".",
"Ambiguous",
";",
"int",
"ImportInternalNameProvided",
"=",
"ImportRelated",
"+",
"389",
"+",
"ProblemReasons",
".",
"InternalNameProvided",
";",
"int",
"ImportInheritedNameHidesEnclosingName",
"=",
"ImportRelated",
"+",
"389",
"+",
"ProblemReasons",
".",
"InheritedNameHidesEnclosingName",
";",
"int",
"InvalidTypeForStaticImport",
"=",
"ImportRelated",
"+",
"391",
";",
"int",
"DuplicateModifierForVariable",
"=",
"MethodRelated",
"+",
"395",
";",
"int",
"IllegalModifierForVariable",
"=",
"MethodRelated",
"+",
"396",
";",
"int",
"LocalVariableCannotBeNull",
"=",
"Internal",
"+",
"397",
";",
"int",
"LocalVariableCanOnlyBeNull",
"=",
"Internal",
"+",
"398",
";",
"int",
"LocalVariableMayBeNull",
"=",
"Internal",
"+",
"399",
";",
"int",
"AbstractMethodMustBeImplemented",
"=",
"MethodRelated",
"+",
"400",
";",
"int",
"FinalMethodCannotBeOverridden",
"=",
"MethodRelated",
"+",
"401",
";",
"int",
"IncompatibleExceptionInThrowsClause",
"=",
"MethodRelated",
"+",
"402",
";",
"int",
"IncompatibleExceptionInInheritedMethodThrowsClause",
"=",
"MethodRelated",
"+",
"403",
";",
"int",
"IncompatibleReturnType",
"=",
"MethodRelated",
"+",
"404",
";",
"int",
"InheritedMethodReducesVisibility",
"=",
"MethodRelated",
"+",
"405",
";",
"int",
"CannotOverrideAStaticMethodWithAnInstanceMethod",
"=",
"MethodRelated",
"+",
"406",
";",
"int",
"CannotHideAnInstanceMethodWithAStaticMethod",
"=",
"MethodRelated",
"+",
"407",
";",
"int",
"StaticInheritedMethodConflicts",
"=",
"MethodRelated",
"+",
"408",
";",
"int",
"MethodReducesVisibility",
"=",
"MethodRelated",
"+",
"409",
";",
"int",
"OverridingNonVisibleMethod",
"=",
"MethodRelated",
"+",
"410",
";",
"int",
"AbstractMethodCannotBeOverridden",
"=",
"MethodRelated",
"+",
"411",
";",
"int",
"OverridingDeprecatedMethod",
"=",
"MethodRelated",
"+",
"412",
";",
"int",
"IncompatibleReturnTypeForNonInheritedInterfaceMethod",
"=",
"MethodRelated",
"+",
"413",
";",
"int",
"IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod",
"=",
"MethodRelated",
"+",
"414",
";",
"int",
"IllegalVararg",
"=",
"MethodRelated",
"+",
"415",
";",
"int",
"OverridingMethodWithoutSuperInvocation",
"=",
"MethodRelated",
"+",
"416",
";",
"int",
"MissingSynchronizedModifierInInheritedMethod",
"=",
"MethodRelated",
"+",
"417",
";",
"int",
"AbstractMethodMustBeImplementedOverConcreteMethod",
"=",
"MethodRelated",
"+",
"418",
";",
"int",
"InheritedIncompatibleReturnType",
"=",
"MethodRelated",
"+",
"419",
";",
"int",
"CodeSnippetMissingClass",
"=",
"Internal",
"+",
"420",
";",
"int",
"CodeSnippetMissingMethod",
"=",
"Internal",
"+",
"421",
";",
"int",
"CannotUseSuperInCodeSnippet",
"=",
"Internal",
"+",
"422",
";",
"int",
"TooManyConstantsInConstantPool",
"=",
"Internal",
"+",
"430",
";",
"int",
"TooManyBytesForStringConstant",
"=",
"Internal",
"+",
"431",
";",
"int",
"TooManyFields",
"=",
"Internal",
"+",
"432",
";",
"int",
"TooManyMethods",
"=",
"Internal",
"+",
"433",
";",
"int",
"TooManyParametersForSyntheticMethod",
"=",
"Internal",
"+",
"434",
";",
"int",
"UseAssertAsAnIdentifier",
"=",
"Internal",
"+",
"440",
";",
"int",
"UseEnumAsAnIdentifier",
"=",
"Internal",
"+",
"441",
";",
"int",
"EnumConstantsCannotBeSurroundedByParenthesis",
"=",
"Syntax",
"+",
"Internal",
"+",
"442",
";",
"int",
"Task",
"=",
"Internal",
"+",
"450",
";",
"int",
"NullLocalVariableReference",
"=",
"Internal",
"+",
"451",
";",
"int",
"PotentialNullLocalVariableReference",
"=",
"Internal",
"+",
"452",
";",
"int",
"RedundantNullCheckOnNullLocalVariable",
"=",
"Internal",
"+",
"453",
";",
"int",
"NullLocalVariableComparisonYieldsFalse",
"=",
"Internal",
"+",
"454",
";",
"int",
"RedundantLocalVariableNullAssignment",
"=",
"Internal",
"+",
"455",
";",
"int",
"NullLocalVariableInstanceofYieldsFalse",
"=",
"Internal",
"+",
"456",
";",
"int",
"RedundantNullCheckOnNonNullLocalVariable",
"=",
"Internal",
"+",
"457",
";",
"int",
"NonNullLocalVariableComparisonYieldsFalse",
"=",
"Internal",
"+",
"458",
";",
"int",
"UndocumentedEmptyBlock",
"=",
"Internal",
"+",
"460",
";",
"int",
"JavadocInvalidSeeUrlReference",
"=",
"Javadoc",
"+",
"Internal",
"+",
"462",
";",
"int",
"JavadocMissingTagDescription",
"=",
"Javadoc",
"+",
"Internal",
"+",
"463",
";",
"int",
"JavadocDuplicateTag",
"=",
"Javadoc",
"+",
"Internal",
"+",
"464",
";",
"int",
"JavadocHiddenReference",
"=",
"Javadoc",
"+",
"Internal",
"+",
"465",
";",
"int",
"JavadocInvalidMemberTypeQualification",
"=",
"Javadoc",
"+",
"Internal",
"+",
"466",
";",
"int",
"JavadocMissingIdentifier",
"=",
"Javadoc",
"+",
"Internal",
"+",
"467",
";",
"int",
"JavadocNonStaticTypeFromStaticInvocation",
"=",
"Javadoc",
"+",
"Internal",
"+",
"468",
";",
"int",
"JavadocInvalidParamTagTypeParameter",
"=",
"Javadoc",
"+",
"Internal",
"+",
"469",
";",
"int",
"JavadocUnexpectedTag",
"=",
"Javadoc",
"+",
"Internal",
"+",
"470",
";",
"int",
"JavadocMissingParamTag",
"=",
"Javadoc",
"+",
"Internal",
"+",
"471",
";",
"int",
"JavadocMissingParamName",
"=",
"Javadoc",
"+",
"Internal",
"+",
"472",
";",
"int",
"JavadocDuplicateParamName",
"=",
"Javadoc",
"+",
"Internal",
"+",
"473",
";",
"int",
"JavadocInvalidParamName",
"=",
"Javadoc",
"+",
"Internal",
"+",
"474",
";",
"int",
"JavadocMissingReturnTag",
"=",
"Javadoc",
"+",
"Internal",
"+",
"475",
";",
"int",
"JavadocDuplicateReturnTag",
"=",
"Javadoc",
"+",
"Internal",
"+",
"476",
";",
"int",
"JavadocMissingThrowsTag",
"=",
"Javadoc",
"+",
"Internal",
"+",
"477",
";",
"int",
"JavadocMissingThrowsClassName",
"=",
"Javadoc",
"+",
"Internal",
"+",
"478",
";",
"int",
"JavadocInvalidThrowsClass",
"=",
"Javadoc",
"+",
"Internal",
"+",
"479",
";",
"int",
"JavadocDuplicateThrowsClassName",
"=",
"Javadoc",
"+",
"Internal",
"+",
"480",
";",
"int",
"JavadocInvalidThrowsClassName",
"=",
"Javadoc",
"+",
"Internal",
"+",
"481",
";",
"int",
"JavadocMissingSeeReference",
"=",
"Javadoc",
"+",
"Internal",
"+",
"482",
";",
"int",
"JavadocInvalidSeeReference",
"=",
"Javadoc",
"+",
"Internal",
"+",
"483",
";",
"int",
"JavadocInvalidSeeHref",
"=",
"Javadoc",
"+",
"Internal",
"+",
"484",
";",
"int",
"JavadocInvalidSeeArgs",
"=",
"Javadoc",
"+",
"Internal",
"+",
"485",
";",
"int",
"JavadocMissing",
"=",
"Javadoc",
"+",
"Internal",
"+",
"486",
";",
"int",
"JavadocInvalidTag",
"=",
"Javadoc",
"+",
"Internal",
"+",
"487",
";",
"int",
"JavadocUndefinedField",
"=",
"Javadoc",
"+",
"Internal",
"+",
"488",
";",
"int",
"JavadocNotVisibleField",
"=",
"Javadoc",
"+",
"Internal",
"+",
"489",
";",
"int",
"JavadocAmbiguousField",
"=",
"Javadoc",
"+",
"Internal",
"+",
"490",
";",
"int",
"JavadocUsingDeprecatedField",
"=",
"Javadoc",
"+",
"Internal",
"+",
"491",
";",
"int",
"JavadocUndefinedConstructor",
"=",
"Javadoc",
"+",
"Internal",
"+",
"492",
";",
"int",
"JavadocNotVisibleConstructor",
"=",
"Javadoc",
"+",
"Internal",
"+",
"493",
";",
"int",
"JavadocAmbiguousConstructor",
"=",
"Javadoc",
"+",
"Internal",
"+",
"494",
";",
"int",
"JavadocUsingDeprecatedConstructor",
"=",
"Javadoc",
"+",
"Internal",
"+",
"495",
";",
"int",
"JavadocUndefinedMethod",
"=",
"Javadoc",
"+",
"Internal",
"+",
"496",
";",
"int",
"JavadocNotVisibleMethod",
"=",
"Javadoc",
"+",
"Internal",
"+",
"497",
";",
"int",
"JavadocAmbiguousMethod",
"=",
"Javadoc",
"+",
"Internal",
"+",
"498",
";",
"int",
"JavadocUsingDeprecatedMethod",
"=",
"Javadoc",
"+",
"Internal",
"+",
"499",
";",
"int",
"JavadocNoMessageSendOnBaseType",
"=",
"Javadoc",
"+",
"Internal",
"+",
"500",
";",
"int",
"JavadocParameterMismatch",
"=",
"Javadoc",
"+",
"Internal",
"+",
"501",
";",
"int",
"JavadocNoMessageSendOnArrayType",
"=",
"Javadoc",
"+",
"Internal",
"+",
"502",
";",
"int",
"JavadocUndefinedType",
"=",
"Javadoc",
"+",
"Internal",
"+",
"503",
";",
"int",
"JavadocNotVisibleType",
"=",
"Javadoc",
"+",
"Internal",
"+",
"504",
";",
"int",
"JavadocAmbiguousType",
"=",
"Javadoc",
"+",
"Internal",
"+",
"505",
";",
"int",
"JavadocUsingDeprecatedType",
"=",
"Javadoc",
"+",
"Internal",
"+",
"506",
";",
"int",
"JavadocInternalTypeNameProvided",
"=",
"Javadoc",
"+",
"Internal",
"+",
"507",
";",
"int",
"JavadocInheritedMethodHidesEnclosingName",
"=",
"Javadoc",
"+",
"Internal",
"+",
"508",
";",
"int",
"JavadocInheritedFieldHidesEnclosingName",
"=",
"Javadoc",
"+",
"Internal",
"+",
"509",
";",
"int",
"JavadocInheritedNameHidesEnclosingTypeName",
"=",
"Javadoc",
"+",
"Internal",
"+",
"510",
";",
"int",
"JavadocAmbiguousMethodReference",
"=",
"Javadoc",
"+",
"Internal",
"+",
"511",
";",
"int",
"JavadocUnterminatedInlineTag",
"=",
"Javadoc",
"+",
"Internal",
"+",
"512",
";",
"int",
"JavadocMalformedSeeReference",
"=",
"Javadoc",
"+",
"Internal",
"+",
"513",
";",
"int",
"JavadocMessagePrefix",
"=",
"Internal",
"+",
"514",
";",
"int",
"JavadocMissingHashCharacter",
"=",
"Javadoc",
"+",
"Internal",
"+",
"515",
";",
"int",
"JavadocEmptyReturnTag",
"=",
"Javadoc",
"+",
"Internal",
"+",
"516",
";",
"int",
"JavadocInvalidValueReference",
"=",
"Javadoc",
"+",
"Internal",
"+",
"517",
";",
"int",
"JavadocUnexpectedText",
"=",
"Javadoc",
"+",
"Internal",
"+",
"518",
";",
"int",
"JavadocInvalidParamTagName",
"=",
"Javadoc",
"+",
"Internal",
"+",
"519",
";",
"int",
"DuplicateTypeVariable",
"=",
"Internal",
"+",
"520",
";",
"int",
"IllegalTypeVariableSuperReference",
"=",
"Internal",
"+",
"521",
";",
"int",
"NonStaticTypeFromStaticInvocation",
"=",
"Internal",
"+",
"522",
";",
"int",
"ObjectCannotBeGeneric",
"=",
"Internal",
"+",
"523",
";",
"int",
"NonGenericType",
"=",
"TypeRelated",
"+",
"524",
";",
"int",
"IncorrectArityForParameterizedType",
"=",
"TypeRelated",
"+",
"525",
";",
"int",
"TypeArgumentMismatch",
"=",
"TypeRelated",
"+",
"526",
";",
"int",
"DuplicateMethodErasure",
"=",
"TypeRelated",
"+",
"527",
";",
"int",
"ReferenceToForwardTypeVariable",
"=",
"TypeRelated",
"+",
"528",
";",
"int",
"BoundMustBeAnInterface",
"=",
"TypeRelated",
"+",
"529",
";",
"int",
"UnsafeRawConstructorInvocation",
"=",
"TypeRelated",
"+",
"530",
";",
"int",
"UnsafeRawMethodInvocation",
"=",
"TypeRelated",
"+",
"531",
";",
"int",
"UnsafeTypeConversion",
"=",
"TypeRelated",
"+",
"532",
";",
"int",
"InvalidTypeVariableExceptionType",
"=",
"TypeRelated",
"+",
"533",
";",
"int",
"InvalidParameterizedExceptionType",
"=",
"TypeRelated",
"+",
"534",
";",
"int",
"IllegalGenericArray",
"=",
"TypeRelated",
"+",
"535",
";",
"int",
"UnsafeRawFieldAssignment",
"=",
"TypeRelated",
"+",
"536",
";",
"int",
"FinalBoundForTypeVariable",
"=",
"TypeRelated",
"+",
"537",
";",
"int",
"UndefinedTypeVariable",
"=",
"Internal",
"+",
"538",
";",
"int",
"SuperInterfacesCollide",
"=",
"TypeRelated",
"+",
"539",
";",
"int",
"WildcardConstructorInvocation",
"=",
"TypeRelated",
"+",
"540",
";",
"int",
"WildcardMethodInvocation",
"=",
"TypeRelated",
"+",
"541",
";",
"int",
"WildcardFieldAssignment",
"=",
"TypeRelated",
"+",
"542",
";",
"int",
"GenericMethodTypeArgumentMismatch",
"=",
"TypeRelated",
"+",
"543",
";",
"int",
"GenericConstructorTypeArgumentMismatch",
"=",
"TypeRelated",
"+",
"544",
";",
"int",
"UnsafeGenericCast",
"=",
"TypeRelated",
"+",
"545",
";",
"int",
"IllegalInstanceofParameterizedType",
"=",
"Internal",
"+",
"546",
";",
"int",
"IllegalInstanceofTypeParameter",
"=",
"Internal",
"+",
"547",
";",
"int",
"NonGenericMethod",
"=",
"TypeRelated",
"+",
"548",
";",
"int",
"IncorrectArityForParameterizedMethod",
"=",
"TypeRelated",
"+",
"549",
";",
"int",
"ParameterizedMethodArgumentTypeMismatch",
"=",
"TypeRelated",
"+",
"550",
";",
"int",
"NonGenericConstructor",
"=",
"TypeRelated",
"+",
"551",
";",
"int",
"IncorrectArityForParameterizedConstructor",
"=",
"TypeRelated",
"+",
"552",
";",
"int",
"ParameterizedConstructorArgumentTypeMismatch",
"=",
"TypeRelated",
"+",
"553",
";",
"int",
"TypeArgumentsForRawGenericMethod",
"=",
"TypeRelated",
"+",
"554",
";",
"int",
"TypeArgumentsForRawGenericConstructor",
"=",
"TypeRelated",
"+",
"555",
";",
"int",
"SuperTypeUsingWildcard",
"=",
"TypeRelated",
"+",
"556",
";",
"int",
"GenericTypeCannotExtendThrowable",
"=",
"TypeRelated",
"+",
"557",
";",
"int",
"IllegalClassLiteralForTypeVariable",
"=",
"TypeRelated",
"+",
"558",
";",
"int",
"UnsafeReturnTypeOverride",
"=",
"MethodRelated",
"+",
"559",
";",
"int",
"MethodNameClash",
"=",
"MethodRelated",
"+",
"560",
";",
"int",
"RawMemberTypeCannotBeParameterized",
"=",
"TypeRelated",
"+",
"561",
";",
"int",
"MissingArgumentsForParameterizedMemberType",
"=",
"TypeRelated",
"+",
"562",
";",
"int",
"StaticMemberOfParameterizedType",
"=",
"TypeRelated",
"+",
"563",
";",
"int",
"BoundHasConflictingArguments",
"=",
"TypeRelated",
"+",
"564",
";",
"int",
"DuplicateParameterizedMethods",
"=",
"MethodRelated",
"+",
"565",
";",
"int",
"IllegalQualifiedParameterizedTypeAllocation",
"=",
"TypeRelated",
"+",
"566",
";",
"int",
"DuplicateBounds",
"=",
"TypeRelated",
"+",
"567",
";",
"int",
"BoundCannotBeArray",
"=",
"TypeRelated",
"+",
"568",
";",
"int",
"UnsafeRawGenericConstructorInvocation",
"=",
"TypeRelated",
"+",
"569",
";",
"int",
"UnsafeRawGenericMethodInvocation",
"=",
"TypeRelated",
"+",
"570",
";",
"int",
"TypeParameterHidingType",
"=",
"TypeRelated",
"+",
"571",
";",
"int",
"RawTypeReference",
"=",
"TypeRelated",
"+",
"572",
";",
"int",
"NoAdditionalBoundAfterTypeVariable",
"=",
"TypeRelated",
"+",
"573",
";",
"int",
"UnsafeGenericArrayForVarargs",
"=",
"MethodRelated",
"+",
"574",
";",
"int",
"IllegalAccessFromTypeVariable",
"=",
"TypeRelated",
"+",
"575",
";",
"int",
"TypeHidingTypeParameterFromType",
"=",
"TypeRelated",
"+",
"576",
";",
"int",
"TypeHidingTypeParameterFromMethod",
"=",
"TypeRelated",
"+",
"577",
";",
"int",
"InvalidUsageOfWildcard",
"=",
"Syntax",
"+",
"Internal",
"+",
"578",
";",
"int",
"UnusedTypeArgumentsForMethodInvocation",
"=",
"MethodRelated",
"+",
"579",
";",
"int",
"IncompatibleTypesInForeach",
"=",
"TypeRelated",
"+",
"580",
";",
"int",
"InvalidTypeForCollection",
"=",
"Internal",
"+",
"581",
";",
"int",
"InvalidTypeForCollectionTarget14",
"=",
"Internal",
"+",
"582",
";",
"int",
"DuplicateInheritedMethods",
"=",
"MethodRelated",
"+",
"583",
";",
"int",
"InvalidUsageOfTypeParameters",
"=",
"Syntax",
"+",
"Internal",
"+",
"590",
";",
"int",
"InvalidUsageOfStaticImports",
"=",
"Syntax",
"+",
"Internal",
"+",
"591",
";",
"int",
"InvalidUsageOfForeachStatements",
"=",
"Syntax",
"+",
"Internal",
"+",
"592",
";",
"int",
"InvalidUsageOfTypeArguments",
"=",
"Syntax",
"+",
"Internal",
"+",
"593",
";",
"int",
"InvalidUsageOfEnumDeclarations",
"=",
"Syntax",
"+",
"Internal",
"+",
"594",
";",
"int",
"InvalidUsageOfVarargs",
"=",
"Syntax",
"+",
"Internal",
"+",
"595",
";",
"int",
"InvalidUsageOfAnnotations",
"=",
"Syntax",
"+",
"Internal",
"+",
"596",
";",
"int",
"InvalidUsageOfAnnotationDeclarations",
"=",
"Syntax",
"+",
"Internal",
"+",
"597",
";",
"int",
"InvalidUsageOfTypeParametersForAnnotationDeclaration",
"=",
"Syntax",
"+",
"Internal",
"+",
"598",
";",
"int",
"InvalidUsageOfTypeParametersForEnumDeclaration",
"=",
"Syntax",
"+",
"Internal",
"+",
"599",
";",
"int",
"IllegalModifierForAnnotationMethod",
"=",
"MethodRelated",
"+",
"600",
";",
"int",
"IllegalExtendedDimensions",
"=",
"MethodRelated",
"+",
"601",
";",
"int",
"InvalidFileNameForPackageAnnotations",
"=",
"Syntax",
"+",
"Internal",
"+",
"602",
";",
"int",
"IllegalModifierForAnnotationType",
"=",
"TypeRelated",
"+",
"603",
";",
"int",
"IllegalModifierForAnnotationMemberType",
"=",
"TypeRelated",
"+",
"604",
";",
"int",
"InvalidAnnotationMemberType",
"=",
"TypeRelated",
"+",
"605",
";",
"int",
"AnnotationCircularitySelfReference",
"=",
"TypeRelated",
"+",
"606",
";",
"int",
"AnnotationCircularity",
"=",
"TypeRelated",
"+",
"607",
";",
"int",
"DuplicateAnnotation",
"=",
"TypeRelated",
"+",
"608",
";",
"int",
"MissingValueForAnnotationMember",
"=",
"TypeRelated",
"+",
"609",
";",
"int",
"DuplicateAnnotationMember",
"=",
"Internal",
"+",
"610",
";",
"int",
"UndefinedAnnotationMember",
"=",
"MethodRelated",
"+",
"611",
";",
"int",
"AnnotationValueMustBeClassLiteral",
"=",
"Internal",
"+",
"612",
";",
"int",
"AnnotationValueMustBeConstant",
"=",
"Internal",
"+",
"613",
";",
"int",
"AnnotationFieldNeedConstantInitialization",
"=",
"Internal",
"+",
"614",
";",
"int",
"IllegalModifierForAnnotationField",
"=",
"Internal",
"+",
"615",
";",
"int",
"AnnotationCannotOverrideMethod",
"=",
"MethodRelated",
"+",
"616",
";",
"int",
"AnnotationMembersCannotHaveParameters",
"=",
"Syntax",
"+",
"Internal",
"+",
"617",
";",
"int",
"AnnotationMembersCannotHaveTypeParameters",
"=",
"Syntax",
"+",
"Internal",
"+",
"618",
";",
"int",
"AnnotationTypeDeclarationCannotHaveSuperclass",
"=",
"Syntax",
"+",
"Internal",
"+",
"619",
";",
"int",
"AnnotationTypeDeclarationCannotHaveSuperinterfaces",
"=",
"Syntax",
"+",
"Internal",
"+",
"620",
";",
"int",
"DuplicateTargetInTargetAnnotation",
"=",
"Internal",
"+",
"621",
";",
"int",
"DisallowedTargetForAnnotation",
"=",
"TypeRelated",
"+",
"622",
";",
"int",
"MethodMustOverride",
"=",
"MethodRelated",
"+",
"623",
";",
"int",
"AnnotationTypeDeclarationCannotHaveConstructor",
"=",
"Syntax",
"+",
"Internal",
"+",
"624",
";",
"int",
"AnnotationValueMustBeAnnotation",
"=",
"Internal",
"+",
"625",
";",
"int",
"AnnotationTypeUsedAsSuperInterface",
"=",
"TypeRelated",
"+",
"626",
";",
"int",
"MissingOverrideAnnotation",
"=",
"MethodRelated",
"+",
"627",
";",
"int",
"FieldMissingDeprecatedAnnotation",
"=",
"Internal",
"+",
"628",
";",
"int",
"MethodMissingDeprecatedAnnotation",
"=",
"Internal",
"+",
"629",
";",
"int",
"TypeMissingDeprecatedAnnotation",
"=",
"Internal",
"+",
"630",
";",
"int",
"UnhandledWarningToken",
"=",
"Internal",
"+",
"631",
";",
"int",
"AnnotationValueMustBeArrayInitializer",
"=",
"Internal",
"+",
"632",
";",
"int",
"AnnotationValueMustBeAnEnumConstant",
"=",
"Internal",
"+",
"633",
";",
"int",
"MethodMustOverrideOrImplement",
"=",
"MethodRelated",
"+",
"634",
";",
"int",
"UnusedWarningToken",
"=",
"Internal",
"+",
"635",
";",
"int",
"MissingOverrideAnnotationForInterfaceMethodImplementation",
"=",
"MethodRelated",
"+",
"636",
";",
"int",
"UnusedTypeArgumentsForConstructorInvocation",
"=",
"MethodRelated",
"+",
"660",
";",
"int",
"CorruptedSignature",
"=",
"Internal",
"+",
"700",
";",
"int",
"InvalidEncoding",
"=",
"Internal",
"+",
"701",
";",
"int",
"CannotReadSource",
"=",
"Internal",
"+",
"702",
";",
"int",
"BoxingConversion",
"=",
"Internal",
"+",
"720",
";",
"int",
"UnboxingConversion",
"=",
"Internal",
"+",
"721",
";",
"int",
"IllegalModifierForEnum",
"=",
"TypeRelated",
"+",
"750",
";",
"int",
"IllegalModifierForEnumConstant",
"=",
"FieldRelated",
"+",
"751",
";",
"int",
"IllegalModifierForLocalEnum",
"=",
"TypeRelated",
"+",
"752",
";",
"int",
"IllegalModifierForMemberEnum",
"=",
"TypeRelated",
"+",
"753",
";",
"int",
"CannotDeclareEnumSpecialMethod",
"=",
"MethodRelated",
"+",
"754",
";",
"int",
"IllegalQualifiedEnumConstantLabel",
"=",
"FieldRelated",
"+",
"755",
";",
"int",
"CannotExtendEnum",
"=",
"TypeRelated",
"+",
"756",
";",
"int",
"CannotInvokeSuperConstructorInEnum",
"=",
"MethodRelated",
"+",
"757",
";",
"int",
"EnumAbstractMethodMustBeImplemented",
"=",
"MethodRelated",
"+",
"758",
";",
"int",
"EnumSwitchCannotTargetField",
"=",
"FieldRelated",
"+",
"759",
";",
"int",
"IllegalModifierForEnumConstructor",
"=",
"MethodRelated",
"+",
"760",
";",
"int",
"MissingEnumConstantCase",
"=",
"FieldRelated",
"+",
"761",
";",
"int",
"EnumStaticFieldInInInitializerContext",
"=",
"FieldRelated",
"+",
"762",
";",
"int",
"EnumConstantMustImplementAbstractMethod",
"=",
"MethodRelated",
"+",
"763",
";",
"int",
"EnumConstantCannotDefineAbstractMethod",
"=",
"MethodRelated",
"+",
"764",
";",
"int",
"AbstractMethodInEnum",
"=",
"MethodRelated",
"+",
"765",
";",
"int",
"IllegalExtendedDimensionsForVarArgs",
"=",
"Syntax",
"+",
"Internal",
"+",
"800",
";",
"int",
"MethodVarargsArgumentNeedCast",
"=",
"MethodRelated",
"+",
"801",
";",
"int",
"ConstructorVarargsArgumentNeedCast",
"=",
"ConstructorRelated",
"+",
"802",
";",
"int",
"VarargsConflict",
"=",
"MethodRelated",
"+",
"803",
";",
"int",
"SafeVarargsOnFixedArityMethod",
"=",
"MethodRelated",
"+",
"804",
";",
"int",
"SafeVarargsOnNonFinalInstanceMethod",
"=",
"MethodRelated",
"+",
"805",
";",
"int",
"PotentialHeapPollutionFromVararg",
"=",
"MethodRelated",
"+",
"806",
";",
"int",
"JavadocGenericMethodTypeArgumentMismatch",
"=",
"Javadoc",
"+",
"Internal",
"+",
"850",
";",
"int",
"JavadocNonGenericMethod",
"=",
"Javadoc",
"+",
"Internal",
"+",
"851",
";",
"int",
"JavadocIncorrectArityForParameterizedMethod",
"=",
"Javadoc",
"+",
"Internal",
"+",
"852",
";",
"int",
"JavadocParameterizedMethodArgumentTypeMismatch",
"=",
"Javadoc",
"+",
"Internal",
"+",
"853",
";",
"int",
"JavadocTypeArgumentsForRawGenericMethod",
"=",
"Javadoc",
"+",
"Internal",
"+",
"854",
";",
"int",
"JavadocGenericConstructorTypeArgumentMismatch",
"=",
"Javadoc",
"+",
"Internal",
"+",
"855",
";",
"int",
"JavadocNonGenericConstructor",
"=",
"Javadoc",
"+",
"Internal",
"+",
"856",
";",
"int",
"JavadocIncorrectArityForParameterizedConstructor",
"=",
"Javadoc",
"+",
"Internal",
"+",
"857",
";",
"int",
"JavadocParameterizedConstructorArgumentTypeMismatch",
"=",
"Javadoc",
"+",
"Internal",
"+",
"858",
";",
"int",
"JavadocTypeArgumentsForRawGenericConstructor",
"=",
"Javadoc",
"+",
"Internal",
"+",
"859",
";",
"int",
"AssignmentToMultiCatchParameter",
"=",
"Internal",
"+",
"870",
";",
"int",
"ResourceHasToImplementAutoCloseable",
"=",
"TypeRelated",
"+",
"871",
";",
"int",
"AssignmentToResource",
"=",
"Internal",
"+",
"872",
";",
"int",
"InvalidUnionTypeReferenceSequence",
"=",
"Internal",
"+",
"TypeRelated",
"+",
"873",
";",
"int",
"AutoManagedResourceNotBelow17",
"=",
"Syntax",
"+",
"Internal",
"+",
"874",
";",
"int",
"MultiCatchNotBelow17",
"=",
"Syntax",
"+",
"Internal",
"+",
"875",
";",
"int",
"PolymorphicMethodNotBelow17",
"=",
"MethodRelated",
"+",
"876",
";",
"int",
"IncorrectSwitchType17",
"=",
"TypeRelated",
"+",
"877",
";",
"int",
"CannotInferElidedTypes",
"=",
"TypeRelated",
"+",
"878",
";",
"int",
"CannotUseDiamondWithExplicitTypeArguments",
"=",
"TypeRelated",
"+",
"879",
";",
"int",
"CannotUseDiamondWithAnonymousClasses",
"=",
"TypeRelated",
"+",
"880",
";",
"int",
"SwitchOnStringsNotBelow17",
"=",
"TypeRelated",
"+",
"881",
";",
"int",
"UnhandledExceptionOnAutoClose",
"=",
"TypeRelated",
"+",
"882",
";",
"int",
"DiamondNotBelow17",
"=",
"TypeRelated",
"+",
"883",
";",
"int",
"RedundantSpecificationOfTypeArguments",
"=",
"TypeRelated",
"+",
"884",
";",
"int",
"ExternalProblemNotFixable",
"=",
"900",
";",
"int",
"ExternalProblemFixable",
"=",
"901",
";",
"}",
"</s>"
] |
4,340 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
";",
"public",
"class",
"InvalidInputException",
"extends",
"Exception",
"{",
"private",
"static",
"final",
"long",
"serialVersionUID",
"=",
"2909732853499731592L",
";",
"public",
"InvalidInputException",
"(",
")",
"{",
"super",
"(",
")",
";",
"}",
"public",
"InvalidInputException",
"(",
"String",
"message",
")",
"{",
"super",
"(",
"message",
")",
";",
"}",
"}",
"</s>"
] |
4,341 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"antadapter",
";",
"import",
"java",
".",
"text",
".",
"MessageFormat",
";",
"import",
"java",
".",
"util",
".",
"Locale",
";",
"import",
"java",
".",
"util",
".",
"MissingResourceException",
";",
"import",
"java",
".",
"util",
".",
"ResourceBundle",
";",
"public",
"class",
"AntAdapterMessages",
"{",
"private",
"static",
"final",
"String",
"BUNDLE_NAME",
"=",
"\"\"",
";",
"private",
"static",
"ResourceBundle",
"RESOURCE_BUNDLE",
";",
"static",
"{",
"try",
"{",
"RESOURCE_BUNDLE",
"=",
"ResourceBundle",
".",
"getBundle",
"(",
"BUNDLE_NAME",
",",
"Locale",
".",
"getDefault",
"(",
")",
")",
";",
"}",
"catch",
"(",
"MissingResourceException",
"e",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
"+",
"BUNDLE_NAME",
".",
"replace",
"(",
"'.'",
",",
"'/'",
")",
"+",
"\"\"",
"+",
"Locale",
".",
"getDefault",
"(",
")",
")",
";",
"throw",
"e",
";",
"}",
"}",
"private",
"AntAdapterMessages",
"(",
")",
"{",
"}",
"public",
"static",
"String",
"getString",
"(",
"String",
"key",
")",
"{",
"try",
"{",
"return",
"RESOURCE_BUNDLE",
".",
"getString",
"(",
"key",
")",
";",
"}",
"catch",
"(",
"MissingResourceException",
"e",
")",
"{",
"return",
"'!'",
"+",
"key",
"+",
"'!'",
";",
"}",
"}",
"public",
"static",
"String",
"getString",
"(",
"String",
"key",
",",
"String",
"argument",
")",
"{",
"try",
"{",
"String",
"message",
"=",
"RESOURCE_BUNDLE",
".",
"getString",
"(",
"key",
")",
";",
"MessageFormat",
"messageFormat",
"=",
"new",
"MessageFormat",
"(",
"message",
")",
";",
"return",
"messageFormat",
".",
"format",
"(",
"new",
"String",
"[",
"]",
"{",
"argument",
"}",
")",
";",
"}",
"catch",
"(",
"MissingResourceException",
"e",
")",
"{",
"return",
"'!'",
"+",
"key",
"+",
"'!'",
";",
"}",
"}",
"}",
"</s>"
] |
4,342 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
";",
"import",
"java",
".",
"io",
".",
"File",
";",
"import",
"java",
".",
"io",
".",
"IOException",
";",
"import",
"java",
".",
"io",
".",
"PrintWriter",
";",
"import",
"java",
".",
"lang",
".",
"reflect",
".",
"Constructor",
";",
"import",
"java",
".",
"lang",
".",
"reflect",
".",
"InvocationTargetException",
";",
"import",
"java",
".",
"lang",
".",
"reflect",
".",
"Method",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Arrays",
";",
"import",
"java",
".",
"util",
".",
"Comparator",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"apache",
".",
"tools",
".",
"ant",
".",
"BuildException",
";",
"import",
"org",
".",
"apache",
".",
"tools",
".",
"ant",
".",
"Project",
";",
"import",
"org",
".",
"apache",
".",
"tools",
".",
"ant",
".",
"taskdefs",
".",
"Javac",
";",
"import",
"org",
".",
"apache",
".",
"tools",
".",
"ant",
".",
"taskdefs",
".",
"compilers",
".",
"DefaultCompilerAdapter",
";",
"import",
"org",
".",
"apache",
".",
"tools",
".",
"ant",
".",
"types",
".",
"Commandline",
";",
"import",
"org",
".",
"apache",
".",
"tools",
".",
"ant",
".",
"types",
".",
"Path",
";",
"import",
"org",
".",
"apache",
".",
"tools",
".",
"ant",
".",
"types",
".",
"Commandline",
".",
"Argument",
";",
"import",
"org",
".",
"apache",
".",
"tools",
".",
"ant",
".",
"util",
".",
"JavaEnvUtils",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"antadapter",
".",
"AntAdapterMessages",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"CompilerOptions",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"SuffixConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"JDTCompilerAdapter",
"extends",
"DefaultCompilerAdapter",
"{",
"private",
"static",
"final",
"char",
"[",
"]",
"SEPARATOR_CHARS",
"=",
"new",
"char",
"[",
"]",
"{",
"'/'",
",",
"'\\\\'",
"}",
";",
"private",
"static",
"final",
"char",
"[",
"]",
"ADAPTER_PREFIX",
"=",
"\"#ADAPTER#\"",
".",
"toCharArray",
"(",
")",
";",
"private",
"static",
"final",
"char",
"[",
"]",
"ADAPTER_ENCODING",
"=",
"\"ENCODING#\"",
".",
"toCharArray",
"(",
")",
";",
"private",
"static",
"final",
"char",
"[",
"]",
"ADAPTER_ACCESS",
"=",
"\"ACCESS#\"",
".",
"toCharArray",
"(",
")",
";",
"private",
"static",
"String",
"compilerClass",
"=",
"\"\"",
";",
"String",
"logFileName",
";",
"Map",
"customDefaultOptions",
";",
"private",
"Map",
"fileEncodings",
"=",
"null",
";",
"private",
"Map",
"dirEncodings",
"=",
"null",
";",
"private",
"List",
"accessRules",
"=",
"null",
";",
"public",
"boolean",
"execute",
"(",
")",
"throws",
"BuildException",
"{",
"this",
".",
"attributes",
".",
"log",
"(",
"AntAdapterMessages",
".",
"getString",
"(",
"\"\"",
")",
",",
"Project",
".",
"MSG_VERBOSE",
")",
";",
"Commandline",
"cmd",
"=",
"setupJavacCommand",
"(",
")",
";",
"try",
"{",
"Class",
"c",
"=",
"Class",
".",
"forName",
"(",
"compilerClass",
")",
";",
"Constructor",
"batchCompilerConstructor",
"=",
"c",
".",
"getConstructor",
"(",
"new",
"Class",
"[",
"]",
"{",
"PrintWriter",
".",
"class",
",",
"PrintWriter",
".",
"class",
",",
"Boolean",
".",
"TYPE",
",",
"Map",
".",
"class",
"}",
")",
";",
"Object",
"batchCompilerInstance",
"=",
"batchCompilerConstructor",
".",
"newInstance",
"(",
"new",
"Object",
"[",
"]",
"{",
"new",
"PrintWriter",
"(",
"System",
".",
"out",
")",
",",
"new",
"PrintWriter",
"(",
"System",
".",
"err",
")",
",",
"Boolean",
".",
"TRUE",
",",
"this",
".",
"customDefaultOptions",
"}",
")",
";",
"Method",
"compile",
"=",
"c",
".",
"getMethod",
"(",
"\"compile\"",
",",
"new",
"Class",
"[",
"]",
"{",
"String",
"[",
"]",
".",
"class",
"}",
")",
";",
"Object",
"result",
"=",
"compile",
".",
"invoke",
"(",
"batchCompilerInstance",
",",
"new",
"Object",
"[",
"]",
"{",
"cmd",
".",
"getArguments",
"(",
")",
"}",
")",
";",
"final",
"boolean",
"resultValue",
"=",
"(",
"(",
"Boolean",
")",
"result",
")",
".",
"booleanValue",
"(",
")",
";",
"if",
"(",
"!",
"resultValue",
"&&",
"this",
".",
"logFileName",
"!=",
"null",
")",
"{",
"this",
".",
"attributes",
".",
"log",
"(",
"AntAdapterMessages",
".",
"getString",
"(",
"\"\"",
",",
"this",
".",
"logFileName",
")",
")",
";",
"}",
"return",
"resultValue",
";",
"}",
"catch",
"(",
"ClassNotFoundException",
"cnfe",
")",
"{",
"throw",
"new",
"BuildException",
"(",
"AntAdapterMessages",
".",
"getString",
"(",
"\"\"",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"ex",
")",
"{",
"throw",
"new",
"BuildException",
"(",
"ex",
")",
";",
"}",
"}",
"protected",
"Commandline",
"setupJavacCommand",
"(",
")",
"throws",
"BuildException",
"{",
"Commandline",
"cmd",
"=",
"new",
"Commandline",
"(",
")",
";",
"this",
".",
"customDefaultOptions",
"=",
"new",
"CompilerOptions",
"(",
")",
".",
"getMap",
"(",
")",
";",
"Class",
"javacClass",
"=",
"Javac",
".",
"class",
";",
"String",
"[",
"]",
"compilerArgs",
"=",
"processCompilerArguments",
"(",
"javacClass",
")",
";",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"\"-noExit\"",
")",
";",
"if",
"(",
"this",
".",
"bootclasspath",
"!=",
"null",
")",
"{",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"\"\"",
")",
";",
"if",
"(",
"this",
".",
"bootclasspath",
".",
"size",
"(",
")",
"!=",
"0",
")",
"{",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setPath",
"(",
"this",
".",
"bootclasspath",
")",
";",
"}",
"else",
"{",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"Util",
".",
"EMPTY_STRING",
")",
";",
"}",
"}",
"if",
"(",
"this",
".",
"extdirs",
"!=",
"null",
")",
"{",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"\"-extdirs\"",
")",
";",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setPath",
"(",
"this",
".",
"extdirs",
")",
";",
"}",
"Path",
"classpath",
"=",
"new",
"Path",
"(",
"this",
".",
"project",
")",
";",
"classpath",
".",
"append",
"(",
"getCompileClasspath",
"(",
")",
")",
";",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"\"-classpath\"",
")",
";",
"createClasspathArgument",
"(",
"cmd",
",",
"classpath",
")",
";",
"Path",
"sourcepath",
"=",
"null",
";",
"Method",
"getSourcepathMethod",
"=",
"null",
";",
"try",
"{",
"getSourcepathMethod",
"=",
"javacClass",
".",
"getMethod",
"(",
"\"\"",
",",
"null",
")",
";",
"}",
"catch",
"(",
"NoSuchMethodException",
"e",
")",
"{",
"}",
"Path",
"compileSourcePath",
"=",
"null",
";",
"if",
"(",
"getSourcepathMethod",
"!=",
"null",
")",
"{",
"try",
"{",
"compileSourcePath",
"=",
"(",
"Path",
")",
"getSourcepathMethod",
".",
"invoke",
"(",
"this",
".",
"attributes",
",",
"null",
")",
";",
"}",
"catch",
"(",
"IllegalAccessException",
"e",
")",
"{",
"}",
"catch",
"(",
"InvocationTargetException",
"e",
")",
"{",
"}",
"}",
"if",
"(",
"compileSourcePath",
"!=",
"null",
")",
"{",
"sourcepath",
"=",
"compileSourcePath",
";",
"}",
"else",
"{",
"sourcepath",
"=",
"this",
".",
"src",
";",
"}",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"\"-sourcepath\"",
")",
";",
"createClasspathArgument",
"(",
"cmd",
",",
"sourcepath",
")",
";",
"final",
"String",
"javaVersion",
"=",
"JavaEnvUtils",
".",
"getJavaVersion",
"(",
")",
";",
"String",
"memoryParameterPrefix",
"=",
"javaVersion",
".",
"equals",
"(",
"JavaEnvUtils",
".",
"JAVA_1_1",
")",
"?",
"\"-J-\"",
":",
"\"-J-X\"",
";",
"if",
"(",
"this",
".",
"memoryInitialSize",
"!=",
"null",
")",
"{",
"if",
"(",
"!",
"this",
".",
"attributes",
".",
"isForkedJavac",
"(",
")",
")",
"{",
"this",
".",
"attributes",
".",
"log",
"(",
"AntAdapterMessages",
".",
"getString",
"(",
"\"\"",
")",
",",
"Project",
".",
"MSG_WARN",
")",
";",
"}",
"else",
"{",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"memoryParameterPrefix",
"+",
"\"ms\"",
"+",
"this",
".",
"memoryInitialSize",
")",
";",
"}",
"}",
"if",
"(",
"this",
".",
"memoryMaximumSize",
"!=",
"null",
")",
"{",
"if",
"(",
"!",
"this",
".",
"attributes",
".",
"isForkedJavac",
"(",
")",
")",
"{",
"this",
".",
"attributes",
".",
"log",
"(",
"AntAdapterMessages",
".",
"getString",
"(",
"\"\"",
")",
",",
"Project",
".",
"MSG_WARN",
")",
";",
"}",
"else",
"{",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"memoryParameterPrefix",
"+",
"\"mx\"",
"+",
"this",
".",
"memoryMaximumSize",
")",
";",
"}",
"}",
"if",
"(",
"this",
".",
"debug",
")",
"{",
"Method",
"getDebugLevelMethod",
"=",
"null",
";",
"try",
"{",
"getDebugLevelMethod",
"=",
"javacClass",
".",
"getMethod",
"(",
"\"\"",
",",
"null",
")",
";",
"}",
"catch",
"(",
"NoSuchMethodException",
"e",
")",
"{",
"}",
"String",
"debugLevel",
"=",
"null",
";",
"if",
"(",
"getDebugLevelMethod",
"!=",
"null",
")",
"{",
"try",
"{",
"debugLevel",
"=",
"(",
"String",
")",
"getDebugLevelMethod",
".",
"invoke",
"(",
"this",
".",
"attributes",
",",
"null",
")",
";",
"}",
"catch",
"(",
"IllegalAccessException",
"e",
")",
"{",
"}",
"catch",
"(",
"InvocationTargetException",
"e",
")",
"{",
"}",
"}",
"if",
"(",
"debugLevel",
"!=",
"null",
")",
"{",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_LocalVariableAttribute",
",",
"CompilerOptions",
".",
"DO_NOT_GENERATE",
")",
";",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_LineNumberAttribute",
",",
"CompilerOptions",
".",
"DO_NOT_GENERATE",
")",
";",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_SourceFileAttribute",
",",
"CompilerOptions",
".",
"DO_NOT_GENERATE",
")",
";",
"if",
"(",
"debugLevel",
".",
"length",
"(",
")",
"!=",
"0",
")",
"{",
"if",
"(",
"debugLevel",
".",
"indexOf",
"(",
"\"vars\"",
")",
"!=",
"-",
"1",
")",
"{",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_LocalVariableAttribute",
",",
"CompilerOptions",
".",
"GENERATE",
")",
";",
"}",
"if",
"(",
"debugLevel",
".",
"indexOf",
"(",
"\"lines\"",
")",
"!=",
"-",
"1",
")",
"{",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_LineNumberAttribute",
",",
"CompilerOptions",
".",
"GENERATE",
")",
";",
"}",
"if",
"(",
"debugLevel",
".",
"indexOf",
"(",
"\"source\"",
")",
"!=",
"-",
"1",
")",
"{",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_SourceFileAttribute",
",",
"CompilerOptions",
".",
"GENERATE",
")",
";",
"}",
"}",
"}",
"else",
"{",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_LocalVariableAttribute",
",",
"CompilerOptions",
".",
"GENERATE",
")",
";",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_LineNumberAttribute",
",",
"CompilerOptions",
".",
"GENERATE",
")",
";",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_SourceFileAttribute",
",",
"CompilerOptions",
".",
"GENERATE",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_LocalVariableAttribute",
",",
"CompilerOptions",
".",
"DO_NOT_GENERATE",
")",
";",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_LineNumberAttribute",
",",
"CompilerOptions",
".",
"DO_NOT_GENERATE",
")",
";",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_SourceFileAttribute",
",",
"CompilerOptions",
".",
"DO_NOT_GENERATE",
")",
";",
"}",
"if",
"(",
"this",
".",
"attributes",
".",
"getNowarn",
"(",
")",
")",
"{",
"Object",
"[",
"]",
"entries",
"=",
"this",
".",
"customDefaultOptions",
".",
"entrySet",
"(",
")",
".",
"toArray",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"entries",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"entries",
"[",
"i",
"]",
";",
"if",
"(",
"!",
"(",
"entry",
".",
"getKey",
"(",
")",
"instanceof",
"String",
")",
")",
"continue",
";",
"if",
"(",
"!",
"(",
"entry",
".",
"getValue",
"(",
")",
"instanceof",
"String",
")",
")",
"continue",
";",
"if",
"(",
"(",
"(",
"String",
")",
"entry",
".",
"getValue",
"(",
")",
")",
".",
"equals",
"(",
"CompilerOptions",
".",
"WARNING",
")",
")",
"{",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"entry",
".",
"getKey",
"(",
")",
",",
"CompilerOptions",
".",
"IGNORE",
")",
";",
"}",
"}",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_TaskTags",
",",
"Util",
".",
"EMPTY_STRING",
")",
";",
"if",
"(",
"this",
".",
"deprecation",
")",
"{",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_ReportDeprecation",
",",
"CompilerOptions",
".",
"WARNING",
")",
";",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_ReportDeprecationInDeprecatedCode",
",",
"CompilerOptions",
".",
"ENABLED",
")",
";",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_ReportDeprecationWhenOverridingDeprecatedMethod",
",",
"CompilerOptions",
".",
"ENABLED",
")",
";",
"}",
"}",
"else",
"if",
"(",
"this",
".",
"deprecation",
")",
"{",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_ReportDeprecation",
",",
"CompilerOptions",
".",
"WARNING",
")",
";",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_ReportDeprecationInDeprecatedCode",
",",
"CompilerOptions",
".",
"ENABLED",
")",
";",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_ReportDeprecationWhenOverridingDeprecatedMethod",
",",
"CompilerOptions",
".",
"ENABLED",
")",
";",
"}",
"else",
"{",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_ReportDeprecation",
",",
"CompilerOptions",
".",
"IGNORE",
")",
";",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_ReportDeprecationInDeprecatedCode",
",",
"CompilerOptions",
".",
"DISABLED",
")",
";",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_ReportDeprecationWhenOverridingDeprecatedMethod",
",",
"CompilerOptions",
".",
"DISABLED",
")",
";",
"}",
"if",
"(",
"this",
".",
"destDir",
"!=",
"null",
")",
"{",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"\"-d\"",
")",
";",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setFile",
"(",
"this",
".",
"destDir",
".",
"getAbsoluteFile",
"(",
")",
")",
";",
"}",
"if",
"(",
"this",
".",
"verbose",
")",
"{",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"\"-verbose\"",
")",
";",
"}",
"if",
"(",
"!",
"this",
".",
"attributes",
".",
"getFailonerror",
"(",
")",
")",
"{",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"\"\"",
")",
";",
"}",
"if",
"(",
"this",
".",
"target",
"!=",
"null",
")",
"{",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_TargetPlatform",
",",
"this",
".",
"target",
")",
";",
"}",
"String",
"source",
"=",
"this",
".",
"attributes",
".",
"getSource",
"(",
")",
";",
"if",
"(",
"source",
"!=",
"null",
")",
"{",
"this",
".",
"customDefaultOptions",
".",
"put",
"(",
"CompilerOptions",
".",
"OPTION_Source",
",",
"source",
")",
";",
"}",
"if",
"(",
"compilerArgs",
"!=",
"null",
")",
"{",
"final",
"int",
"length",
"=",
"compilerArgs",
".",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"String",
"arg",
"=",
"compilerArgs",
"[",
"i",
"]",
";",
"if",
"(",
"this",
".",
"logFileName",
"==",
"null",
"&&",
"\"-log\"",
".",
"equals",
"(",
"arg",
")",
"&&",
"(",
"(",
"i",
"+",
"1",
")",
"<",
"max",
")",
")",
"{",
"this",
".",
"logFileName",
"=",
"compilerArgs",
"[",
"i",
"+",
"1",
"]",
";",
"}",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"arg",
")",
";",
"}",
"}",
"}",
"if",
"(",
"this",
".",
"encoding",
"!=",
"null",
")",
"{",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"\"-encoding\"",
")",
";",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"this",
".",
"encoding",
")",
";",
"}",
"logAndAddFilesToCompile",
"(",
"cmd",
")",
";",
"return",
"cmd",
";",
"}",
"private",
"String",
"[",
"]",
"processCompilerArguments",
"(",
"Class",
"javacClass",
")",
"{",
"Method",
"getCurrentCompilerArgsMethod",
"=",
"null",
";",
"try",
"{",
"getCurrentCompilerArgsMethod",
"=",
"javacClass",
".",
"getMethod",
"(",
"\"\"",
",",
"null",
")",
";",
"}",
"catch",
"(",
"NoSuchMethodException",
"e",
")",
"{",
"}",
"String",
"[",
"]",
"compilerArgs",
"=",
"null",
";",
"if",
"(",
"getCurrentCompilerArgsMethod",
"!=",
"null",
")",
"{",
"try",
"{",
"compilerArgs",
"=",
"(",
"String",
"[",
"]",
")",
"getCurrentCompilerArgsMethod",
".",
"invoke",
"(",
"this",
".",
"attributes",
",",
"null",
")",
";",
"}",
"catch",
"(",
"IllegalAccessException",
"e",
")",
"{",
"}",
"catch",
"(",
"InvocationTargetException",
"e",
")",
"{",
"}",
"}",
"if",
"(",
"compilerArgs",
"!=",
"null",
")",
"checkCompilerArgs",
"(",
"compilerArgs",
")",
";",
"return",
"compilerArgs",
";",
"}",
"private",
"void",
"checkCompilerArgs",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"args",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"args",
"[",
"i",
"]",
".",
"charAt",
"(",
"0",
")",
"==",
"'@'",
")",
"{",
"try",
"{",
"char",
"[",
"]",
"content",
"=",
"Util",
".",
"getFileCharContent",
"(",
"new",
"File",
"(",
"args",
"[",
"i",
"]",
".",
"substring",
"(",
"1",
")",
")",
",",
"null",
")",
";",
"int",
"offset",
"=",
"0",
";",
"int",
"prefixLength",
"=",
"ADAPTER_PREFIX",
".",
"length",
";",
"while",
"(",
"(",
"offset",
"=",
"CharOperation",
".",
"indexOf",
"(",
"ADAPTER_PREFIX",
",",
"content",
",",
"true",
",",
"offset",
")",
")",
">",
"-",
"1",
")",
"{",
"int",
"start",
"=",
"offset",
"+",
"prefixLength",
";",
"int",
"end",
"=",
"CharOperation",
".",
"indexOf",
"(",
"'\\n'",
",",
"content",
",",
"start",
")",
";",
"if",
"(",
"end",
"==",
"-",
"1",
")",
"end",
"=",
"content",
".",
"length",
";",
"while",
"(",
"CharOperation",
".",
"isWhitespace",
"(",
"content",
"[",
"end",
"]",
")",
")",
"{",
"end",
"--",
";",
"}",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"ADAPTER_ENCODING",
",",
"content",
",",
"start",
",",
"start",
"+",
"ADAPTER_ENCODING",
".",
"length",
")",
")",
"{",
"CharOperation",
".",
"replace",
"(",
"content",
",",
"SEPARATOR_CHARS",
",",
"File",
".",
"separatorChar",
",",
"start",
",",
"end",
"+",
"1",
")",
";",
"start",
"+=",
"ADAPTER_ENCODING",
".",
"length",
";",
"int",
"encodeStart",
"=",
"CharOperation",
".",
"lastIndexOf",
"(",
"'['",
",",
"content",
",",
"start",
",",
"end",
")",
";",
"if",
"(",
"start",
"<",
"encodeStart",
"&&",
"encodeStart",
"<",
"end",
")",
"{",
"boolean",
"isFile",
"=",
"CharOperation",
".",
"equals",
"(",
"SuffixConstants",
".",
"SUFFIX_java",
",",
"content",
",",
"encodeStart",
"-",
"5",
",",
"encodeStart",
",",
"false",
")",
";",
"String",
"str",
"=",
"String",
".",
"valueOf",
"(",
"content",
",",
"start",
",",
"encodeStart",
"-",
"start",
")",
";",
"String",
"enc",
"=",
"String",
".",
"valueOf",
"(",
"content",
",",
"encodeStart",
",",
"end",
"-",
"encodeStart",
"+",
"1",
")",
";",
"if",
"(",
"isFile",
")",
"{",
"if",
"(",
"this",
".",
"fileEncodings",
"==",
"null",
")",
"this",
".",
"fileEncodings",
"=",
"new",
"HashMap",
"(",
")",
";",
"this",
".",
"fileEncodings",
".",
"put",
"(",
"str",
",",
"enc",
")",
";",
"}",
"else",
"{",
"if",
"(",
"this",
".",
"dirEncodings",
"==",
"null",
")",
"this",
".",
"dirEncodings",
"=",
"new",
"HashMap",
"(",
")",
";",
"this",
".",
"dirEncodings",
".",
"put",
"(",
"str",
",",
"enc",
")",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"CharOperation",
".",
"equals",
"(",
"ADAPTER_ACCESS",
",",
"content",
",",
"start",
",",
"start",
"+",
"ADAPTER_ACCESS",
".",
"length",
")",
")",
"{",
"start",
"+=",
"ADAPTER_ACCESS",
".",
"length",
";",
"int",
"accessStart",
"=",
"CharOperation",
".",
"indexOf",
"(",
"'['",
",",
"content",
",",
"start",
",",
"end",
")",
";",
"CharOperation",
".",
"replace",
"(",
"content",
",",
"SEPARATOR_CHARS",
",",
"File",
".",
"separatorChar",
",",
"start",
",",
"accessStart",
")",
";",
"if",
"(",
"start",
"<",
"accessStart",
"&&",
"accessStart",
"<",
"end",
")",
"{",
"String",
"path",
"=",
"String",
".",
"valueOf",
"(",
"content",
",",
"start",
",",
"accessStart",
"-",
"start",
")",
";",
"String",
"access",
"=",
"String",
".",
"valueOf",
"(",
"content",
",",
"accessStart",
",",
"end",
"-",
"accessStart",
"+",
"1",
")",
";",
"if",
"(",
"this",
".",
"accessRules",
"==",
"null",
")",
"this",
".",
"accessRules",
"=",
"new",
"ArrayList",
"(",
")",
";",
"this",
".",
"accessRules",
".",
"add",
"(",
"path",
")",
";",
"this",
".",
"accessRules",
".",
"add",
"(",
"access",
")",
";",
"}",
"}",
"offset",
"=",
"end",
";",
"}",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"}",
"}",
"}",
"}",
"private",
"void",
"createClasspathArgument",
"(",
"Commandline",
"cmd",
",",
"Path",
"classpath",
")",
"{",
"Argument",
"arg",
"=",
"cmd",
".",
"createArgument",
"(",
")",
";",
"final",
"String",
"[",
"]",
"pathElements",
"=",
"classpath",
".",
"list",
"(",
")",
";",
"if",
"(",
"pathElements",
".",
"length",
"==",
"0",
")",
"{",
"arg",
".",
"setValue",
"(",
"Util",
".",
"EMPTY_STRING",
")",
";",
"return",
";",
"}",
"if",
"(",
"this",
".",
"accessRules",
"==",
"null",
")",
"{",
"arg",
".",
"setPath",
"(",
"classpath",
")",
";",
"return",
";",
"}",
"int",
"rulesLength",
"=",
"this",
".",
"accessRules",
".",
"size",
"(",
")",
";",
"String",
"[",
"]",
"rules",
"=",
"(",
"String",
"[",
"]",
")",
"this",
".",
"accessRules",
".",
"toArray",
"(",
"new",
"String",
"[",
"rulesLength",
"]",
")",
";",
"int",
"nextRule",
"=",
"0",
";",
"final",
"StringBuffer",
"result",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"pathElements",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
">",
"0",
")",
"result",
".",
"append",
"(",
"File",
".",
"pathSeparatorChar",
")",
";",
"String",
"pathElement",
"=",
"pathElements",
"[",
"i",
"]",
";",
"result",
".",
"append",
"(",
"pathElement",
")",
";",
"for",
"(",
"int",
"j",
"=",
"nextRule",
";",
"j",
"<",
"rulesLength",
";",
"j",
"+=",
"2",
")",
"{",
"String",
"rule",
"=",
"rules",
"[",
"j",
"]",
";",
"if",
"(",
"pathElement",
".",
"endsWith",
"(",
"rule",
")",
")",
"{",
"result",
".",
"append",
"(",
"rules",
"[",
"j",
"+",
"1",
"]",
")",
";",
"nextRule",
"=",
"j",
"+",
"2",
";",
"break",
";",
"}",
"if",
"(",
"rule",
".",
"endsWith",
"(",
"File",
".",
"separator",
")",
")",
"{",
"int",
"ruleLength",
"=",
"rule",
".",
"length",
"(",
")",
";",
"if",
"(",
"pathElement",
".",
"regionMatches",
"(",
"false",
",",
"pathElement",
".",
"length",
"(",
")",
"-",
"ruleLength",
"+",
"1",
",",
"rule",
",",
"0",
",",
"ruleLength",
"-",
"1",
")",
")",
"{",
"result",
".",
"append",
"(",
"rules",
"[",
"j",
"+",
"1",
"]",
")",
";",
"nextRule",
"=",
"j",
"+",
"2",
";",
"break",
";",
"}",
"}",
"else",
"if",
"(",
"pathElement",
".",
"endsWith",
"(",
"File",
".",
"separator",
")",
")",
"{",
"int",
"ruleLength",
"=",
"rule",
".",
"length",
"(",
")",
";",
"if",
"(",
"pathElement",
".",
"regionMatches",
"(",
"false",
",",
"pathElement",
".",
"length",
"(",
")",
"-",
"ruleLength",
"-",
"1",
",",
"rule",
",",
"0",
",",
"ruleLength",
")",
")",
"{",
"result",
".",
"append",
"(",
"rules",
"[",
"j",
"+",
"1",
"]",
")",
";",
"nextRule",
"=",
"j",
"+",
"2",
";",
"break",
";",
"}",
"}",
"}",
"}",
"arg",
".",
"setValue",
"(",
"result",
".",
"toString",
"(",
")",
")",
";",
"}",
"protected",
"void",
"logAndAddFilesToCompile",
"(",
"Commandline",
"cmd",
")",
"{",
"this",
".",
"attributes",
".",
"log",
"(",
"\"Compilation",
"\"",
"+",
"cmd",
".",
"describeArguments",
"(",
")",
",",
"Project",
".",
"MSG_VERBOSE",
")",
";",
"StringBuffer",
"niceSourceList",
"=",
"new",
"StringBuffer",
"(",
"\"File\"",
")",
";",
"if",
"(",
"this",
".",
"compileList",
".",
"length",
"!=",
"1",
")",
"{",
"niceSourceList",
".",
"append",
"(",
"\"s\"",
")",
";",
"}",
"niceSourceList",
".",
"append",
"(",
"\"\"",
")",
";",
"niceSourceList",
".",
"append",
"(",
"lSep",
")",
";",
"String",
"[",
"]",
"encodedFiles",
"=",
"null",
",",
"encodedDirs",
"=",
"null",
";",
"int",
"encodedFilesLength",
"=",
"0",
",",
"encodedDirsLength",
"=",
"0",
";",
"if",
"(",
"this",
".",
"fileEncodings",
"!=",
"null",
")",
"{",
"encodedFilesLength",
"=",
"this",
".",
"fileEncodings",
".",
"size",
"(",
")",
";",
"encodedFiles",
"=",
"new",
"String",
"[",
"encodedFilesLength",
"]",
";",
"this",
".",
"fileEncodings",
".",
"keySet",
"(",
")",
".",
"toArray",
"(",
"encodedFiles",
")",
";",
"}",
"if",
"(",
"this",
".",
"dirEncodings",
"!=",
"null",
")",
"{",
"encodedDirsLength",
"=",
"this",
".",
"dirEncodings",
".",
"size",
"(",
")",
";",
"encodedDirs",
"=",
"new",
"String",
"[",
"encodedDirsLength",
"]",
";",
"this",
".",
"dirEncodings",
".",
"keySet",
"(",
")",
".",
"toArray",
"(",
"encodedDirs",
")",
";",
"Comparator",
"comparator",
"=",
"new",
"Comparator",
"(",
")",
"{",
"public",
"int",
"compare",
"(",
"Object",
"o1",
",",
"Object",
"o2",
")",
"{",
"return",
"(",
"(",
"String",
")",
"o2",
")",
".",
"length",
"(",
")",
"-",
"(",
"(",
"String",
")",
"o1",
")",
".",
"length",
"(",
")",
";",
"}",
"}",
";",
"Arrays",
".",
"sort",
"(",
"encodedDirs",
",",
"comparator",
")",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"compileList",
".",
"length",
";",
"i",
"++",
")",
"{",
"String",
"arg",
"=",
"this",
".",
"compileList",
"[",
"i",
"]",
".",
"getAbsolutePath",
"(",
")",
";",
"boolean",
"encoded",
"=",
"false",
";",
"if",
"(",
"encodedFiles",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"encodedFilesLength",
";",
"j",
"++",
")",
"{",
"if",
"(",
"arg",
".",
"endsWith",
"(",
"encodedFiles",
"[",
"j",
"]",
")",
")",
"{",
"arg",
"=",
"arg",
"+",
"(",
"String",
")",
"this",
".",
"fileEncodings",
".",
"get",
"(",
"encodedFiles",
"[",
"j",
"]",
")",
";",
"if",
"(",
"j",
"<",
"encodedFilesLength",
"-",
"1",
")",
"{",
"System",
".",
"arraycopy",
"(",
"encodedFiles",
",",
"j",
"+",
"1",
",",
"encodedFiles",
",",
"j",
",",
"encodedFilesLength",
"-",
"j",
"-",
"1",
")",
";",
"}",
"encodedFiles",
"[",
"--",
"encodedFilesLength",
"]",
"=",
"null",
";",
"encoded",
"=",
"true",
";",
"break",
";",
"}",
"}",
"}",
"if",
"(",
"!",
"encoded",
"&&",
"encodedDirs",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"encodedDirsLength",
";",
"j",
"++",
")",
"{",
"if",
"(",
"arg",
".",
"lastIndexOf",
"(",
"encodedDirs",
"[",
"j",
"]",
")",
"!=",
"-",
"1",
")",
"{",
"arg",
"=",
"arg",
"+",
"(",
"String",
")",
"this",
".",
"dirEncodings",
".",
"get",
"(",
"encodedDirs",
"[",
"j",
"]",
")",
";",
"break",
";",
"}",
"}",
"}",
"cmd",
".",
"createArgument",
"(",
")",
".",
"setValue",
"(",
"arg",
")",
";",
"niceSourceList",
".",
"append",
"(",
"\"",
"\"",
"+",
"arg",
"+",
"lSep",
")",
";",
"}",
"this",
".",
"attributes",
".",
"log",
"(",
"niceSourceList",
".",
"toString",
"(",
")",
",",
"Project",
".",
"MSG_VERBOSE",
")",
";",
"}",
"}",
"</s>"
] |
4,343 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
";",
"import",
"java",
".",
"io",
".",
"IOException",
";",
"import",
"java",
".",
"util",
".",
"Enumeration",
";",
"import",
"java",
".",
"util",
".",
"zip",
".",
"ZipEntry",
";",
"import",
"java",
".",
"util",
".",
"zip",
".",
"ZipException",
";",
"import",
"java",
".",
"util",
".",
"zip",
".",
"ZipFile",
";",
"import",
"org",
".",
"apache",
".",
"tools",
".",
"ant",
".",
"BuildException",
";",
"import",
"org",
".",
"apache",
".",
"tools",
".",
"ant",
".",
"Task",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IClassFileReader",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"ICodeAttribute",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"util",
".",
"IMethodInfo",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"antadapter",
".",
"AntAdapterMessages",
";",
"public",
"final",
"class",
"CheckDebugAttributes",
"extends",
"Task",
"{",
"private",
"String",
"file",
";",
"private",
"String",
"property",
";",
"public",
"void",
"execute",
"(",
")",
"throws",
"BuildException",
"{",
"if",
"(",
"this",
".",
"file",
"==",
"null",
")",
"{",
"throw",
"new",
"BuildException",
"(",
"AntAdapterMessages",
".",
"getString",
"(",
"\"\"",
")",
")",
";",
"}",
"if",
"(",
"this",
".",
"property",
"==",
"null",
")",
"{",
"throw",
"new",
"BuildException",
"(",
"AntAdapterMessages",
".",
"getString",
"(",
"\"\"",
")",
")",
";",
"}",
"try",
"{",
"boolean",
"hasDebugAttributes",
"=",
"false",
";",
"if",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"isClassFileName",
"(",
"this",
".",
"file",
")",
")",
"{",
"IClassFileReader",
"classFileReader",
"=",
"ToolFactory",
".",
"createDefaultClassFileReader",
"(",
"this",
".",
"file",
",",
"IClassFileReader",
".",
"ALL",
")",
";",
"hasDebugAttributes",
"=",
"checkClassFile",
"(",
"classFileReader",
")",
";",
"}",
"else",
"{",
"ZipFile",
"jarFile",
"=",
"null",
";",
"try",
"{",
"jarFile",
"=",
"new",
"ZipFile",
"(",
"this",
".",
"file",
")",
";",
"}",
"catch",
"(",
"ZipException",
"e",
")",
"{",
"throw",
"new",
"BuildException",
"(",
"AntAdapterMessages",
".",
"getString",
"(",
"\"\"",
")",
")",
";",
"}",
"for",
"(",
"Enumeration",
"entries",
"=",
"jarFile",
".",
"entries",
"(",
")",
";",
"!",
"hasDebugAttributes",
"&&",
"entries",
".",
"hasMoreElements",
"(",
")",
";",
")",
"{",
"ZipEntry",
"entry",
"=",
"(",
"ZipEntry",
")",
"entries",
".",
"nextElement",
"(",
")",
";",
"if",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
".",
"isClassFileName",
"(",
"entry",
".",
"getName",
"(",
")",
")",
")",
"{",
"IClassFileReader",
"classFileReader",
"=",
"ToolFactory",
".",
"createDefaultClassFileReader",
"(",
"this",
".",
"file",
",",
"entry",
".",
"getName",
"(",
")",
",",
"IClassFileReader",
".",
"ALL",
")",
";",
"hasDebugAttributes",
"=",
"checkClassFile",
"(",
"classFileReader",
")",
";",
"}",
"}",
"}",
"if",
"(",
"hasDebugAttributes",
")",
"{",
"getProject",
"(",
")",
".",
"setUserProperty",
"(",
"this",
".",
"property",
",",
"\"has",
"debug\"",
")",
";",
"}",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"throw",
"new",
"BuildException",
"(",
"AntAdapterMessages",
".",
"getString",
"(",
"\"\"",
")",
"+",
"this",
".",
"file",
")",
";",
"}",
"}",
"private",
"boolean",
"checkClassFile",
"(",
"IClassFileReader",
"classFileReader",
")",
"{",
"IMethodInfo",
"[",
"]",
"methodInfos",
"=",
"classFileReader",
".",
"getMethodInfos",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"methodInfos",
".",
"length",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"ICodeAttribute",
"codeAttribute",
"=",
"methodInfos",
"[",
"i",
"]",
".",
"getCodeAttribute",
"(",
")",
";",
"if",
"(",
"codeAttribute",
"!=",
"null",
"&&",
"codeAttribute",
".",
"getLineNumberAttribute",
"(",
")",
"!=",
"null",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"void",
"setFile",
"(",
"String",
"value",
")",
"{",
"this",
".",
"file",
"=",
"value",
";",
"}",
"public",
"void",
"setProperty",
"(",
"String",
"value",
")",
"{",
"this",
".",
"property",
"=",
"value",
";",
"}",
"}",
"</s>"
] |
4,344 |
[
"<s>",
"import",
"java",
".",
"io",
".",
"BufferedWriter",
";",
"import",
"java",
".",
"io",
".",
"File",
";",
"import",
"java",
".",
"io",
".",
"FileFilter",
";",
"import",
"java",
".",
"io",
".",
"FileWriter",
";",
"import",
"java",
".",
"io",
".",
"IOException",
";",
"import",
"java",
".",
"io",
".",
"Writer",
";",
"import",
"java",
".",
"text",
".",
"MessageFormat",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"public",
"class",
"GenerateBuildScript",
"{",
"private",
"static",
"final",
"String",
"LINE_SEPARATOR",
"=",
"System",
".",
"getProperty",
"(",
"\"\"",
")",
";",
"private",
"static",
"final",
"String",
"HEADER",
"=",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
";",
"private",
"static",
"final",
"String",
"SOURCE_FILES",
"=",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"LINE_SEPARATOR",
";",
"private",
"static",
"final",
"String",
"FOOTER",
"=",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"</project>\"",
"+",
"LINE_SEPARATOR",
";",
"private",
"static",
"void",
"collectAllFiles",
"(",
"File",
"root",
",",
"ArrayList",
"collector",
",",
"FileFilter",
"fileFilter",
")",
"{",
"File",
"[",
"]",
"files",
"=",
"root",
".",
"listFiles",
"(",
"fileFilter",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"files",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"files",
"[",
"i",
"]",
".",
"isDirectory",
"(",
")",
")",
"{",
"collectAllFiles",
"(",
"files",
"[",
"i",
"]",
",",
"collector",
",",
"fileFilter",
")",
";",
"}",
"else",
"{",
"String",
"newElement",
"=",
"files",
"[",
"i",
"]",
".",
"getAbsolutePath",
"(",
")",
";",
"newElement",
"=",
"newElement",
".",
"replace",
"(",
"'\\\\'",
",",
"'/'",
")",
";",
"collector",
".",
"add",
"(",
"newElement",
")",
";",
"}",
"}",
"}",
"private",
"static",
"void",
"dumpAllProperties",
"(",
"Writer",
"writer",
",",
"File",
"sourceDir",
",",
"ArrayList",
"collector",
",",
"String",
"gcj_exe",
",",
"String",
"dest_dir",
")",
"throws",
"IOException",
"{",
"writer",
".",
"write",
"(",
"\"\"",
"+",
"LINE_SEPARATOR",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"max",
"=",
"collector",
".",
"size",
"(",
")",
";",
"i",
"<",
"max",
";",
"i",
"++",
")",
"{",
"String",
"absolutePath",
"=",
"(",
"String",
")",
"collector",
".",
"get",
"(",
"i",
")",
";",
"String",
"fileName",
"=",
"absolutePath",
".",
"substring",
"(",
"sourceDir",
".",
"getAbsolutePath",
"(",
")",
".",
"length",
"(",
")",
"+",
"1",
")",
";",
"writer",
".",
"write",
"(",
"MessageFormat",
".",
"format",
"(",
"\"\"",
"+",
"LINE_SEPARATOR",
",",
"new",
"Object",
"[",
"]",
"{",
"gcj_exe",
",",
"dest_dir",
"}",
")",
")",
";",
"writer",
".",
"write",
"(",
"\"\"",
")",
";",
"writer",
".",
"write",
"(",
"fileName",
"+",
"\"",
"\"",
"+",
"fileName",
"+",
"\"",
"-c",
"-o",
"\"",
"+",
"getObjectName",
"(",
"fileName",
")",
"+",
"\"\\\"/>\"",
"+",
"LINE_SEPARATOR",
")",
";",
"writer",
".",
"write",
"(",
"\"",
"tt</exec>\"",
"+",
"LINE_SEPARATOR",
")",
";",
"}",
"}",
"private",
"static",
"void",
"dumpAllClassFiles",
"(",
"Writer",
"writer",
",",
"File",
"sourceDir",
",",
"ArrayList",
"collector",
",",
"String",
"gcj_exe",
",",
"String",
"dest_dir",
")",
"throws",
"IOException",
"{",
"writer",
".",
"write",
"(",
"\"\"",
"+",
"LINE_SEPARATOR",
")",
";",
"writer",
".",
"write",
"(",
"MessageFormat",
".",
"format",
"(",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"\"\"",
"+",
"LINE_SEPARATOR",
"+",
"LINE_SEPARATOR",
",",
"new",
"Object",
"[",
"]",
"{",
"gcj_exe",
",",
"dest_dir",
"}",
")",
")",
";",
"}",
"private",
"static",
"String",
"getObjectName",
"(",
"String",
"fileName",
")",
"{",
"return",
"fileName",
".",
"substring",
"(",
"0",
",",
"fileName",
".",
"lastIndexOf",
"(",
"'.'",
")",
")",
"+",
"\".o\"",
";",
"}",
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"if",
"(",
"args",
".",
"length",
"!=",
"5",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"\"",
")",
";",
"return",
";",
"}",
"try",
"{",
"BufferedWriter",
"writer",
"=",
"new",
"BufferedWriter",
"(",
"new",
"FileWriter",
"(",
"new",
"File",
"(",
"args",
"[",
"0",
"]",
")",
")",
")",
";",
"writer",
".",
"write",
"(",
"HEADER",
")",
";",
"File",
"sourceDir",
"=",
"new",
"File",
"(",
"args",
"[",
"1",
"]",
")",
";",
"if",
"(",
"sourceDir",
".",
"exists",
"(",
")",
")",
"{",
"ArrayList",
"collector",
"=",
"new",
"ArrayList",
"(",
")",
";",
"collectAllFiles",
"(",
"sourceDir",
",",
"collector",
",",
"new",
"FileFilter",
"(",
")",
"{",
"public",
"boolean",
"accept",
"(",
"File",
"pathname",
")",
"{",
"String",
"fileName",
"=",
"pathname",
".",
"getAbsolutePath",
"(",
")",
";",
"return",
"pathname",
".",
"isDirectory",
"(",
")",
"||",
"fileName",
".",
"endsWith",
"(",
"\".rsc\"",
")",
"||",
"fileName",
".",
"endsWith",
"(",
"\".properties\"",
")",
";",
"}",
"}",
")",
";",
"dumpAllProperties",
"(",
"writer",
",",
"sourceDir",
",",
"collector",
",",
"args",
"[",
"2",
"]",
",",
"args",
"[",
"3",
"]",
")",
";",
"if",
"(",
"\"source\"",
".",
"equals",
"(",
"args",
"[",
"4",
"]",
")",
")",
"{",
"writer",
".",
"write",
"(",
"MessageFormat",
".",
"format",
"(",
"SOURCE_FILES",
",",
"new",
"Object",
"[",
"]",
"{",
"args",
"[",
"2",
"]",
",",
"args",
"[",
"3",
"]",
"}",
")",
")",
";",
"}",
"else",
"{",
"collector",
"=",
"new",
"ArrayList",
"(",
")",
";",
"collectAllFiles",
"(",
"sourceDir",
",",
"collector",
",",
"new",
"FileFilter",
"(",
")",
"{",
"public",
"boolean",
"accept",
"(",
"File",
"pathname",
")",
"{",
"String",
"fileName",
"=",
"pathname",
".",
"getAbsolutePath",
"(",
")",
";",
"return",
"pathname",
".",
"isDirectory",
"(",
")",
"||",
"fileName",
".",
"endsWith",
"(",
"\".class\"",
")",
";",
"}",
"}",
")",
";",
"dumpAllClassFiles",
"(",
"writer",
",",
"sourceDir",
",",
"collector",
",",
"args",
"[",
"2",
"]",
",",
"args",
"[",
"3",
"]",
")",
";",
"}",
"}",
"writer",
".",
"write",
"(",
"MessageFormat",
".",
"format",
"(",
"FOOTER",
",",
"new",
"Object",
"[",
"]",
"{",
"args",
"[",
"2",
"]",
",",
"args",
"[",
"3",
"]",
"}",
")",
")",
";",
"writer",
".",
"flush",
"(",
")",
";",
"writer",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"e",
".",
"printStackTrace",
"(",
")",
";",
"}",
"}",
"}",
"</s>"
] |
4,345 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"import",
"java",
".",
"util",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"Signature",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Block",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"StructuralPropertyDescriptor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"TargetSourceRangeComputer",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"TextEditGroup",
";",
"public",
"final",
"class",
"RewriteEventStore",
"{",
"public",
"static",
"final",
"class",
"PropertyLocation",
"{",
"private",
"final",
"ASTNode",
"parent",
";",
"private",
"final",
"StructuralPropertyDescriptor",
"property",
";",
"public",
"PropertyLocation",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"this",
".",
"parent",
"=",
"parent",
";",
"this",
".",
"property",
"=",
"property",
";",
"}",
"public",
"ASTNode",
"getParent",
"(",
")",
"{",
"return",
"this",
".",
"parent",
";",
"}",
"public",
"StructuralPropertyDescriptor",
"getProperty",
"(",
")",
"{",
"return",
"this",
".",
"property",
";",
"}",
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"obj",
"!=",
"null",
"&&",
"obj",
".",
"getClass",
"(",
")",
".",
"equals",
"(",
"getClass",
"(",
")",
")",
")",
"{",
"PropertyLocation",
"other",
"=",
"(",
"PropertyLocation",
")",
"obj",
";",
"return",
"other",
".",
"getParent",
"(",
")",
".",
"equals",
"(",
"getParent",
"(",
")",
")",
"&&",
"other",
".",
"getProperty",
"(",
")",
".",
"equals",
"(",
"getProperty",
"(",
")",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"int",
"hashCode",
"(",
")",
"{",
"return",
"getParent",
"(",
")",
".",
"hashCode",
"(",
")",
"+",
"getProperty",
"(",
")",
".",
"hashCode",
"(",
")",
";",
"}",
"}",
"public",
"static",
"interface",
"INodePropertyMapper",
"{",
"Object",
"getOriginalValue",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
")",
";",
"}",
"private",
"static",
"class",
"EventHolder",
"{",
"public",
"final",
"ASTNode",
"parent",
";",
"public",
"final",
"StructuralPropertyDescriptor",
"childProperty",
";",
"public",
"final",
"RewriteEvent",
"event",
";",
"public",
"EventHolder",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
",",
"RewriteEvent",
"change",
")",
"{",
"this",
".",
"parent",
"=",
"parent",
";",
"this",
".",
"childProperty",
"=",
"childProperty",
";",
"this",
".",
"event",
"=",
"change",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buf",
".",
"append",
"(",
"this",
".",
"parent",
")",
".",
"append",
"(",
"\"",
"-",
"\"",
")",
";",
"buf",
".",
"append",
"(",
"this",
".",
"childProperty",
".",
"getId",
"(",
")",
")",
".",
"append",
"(",
"\":",
"\"",
")",
";",
"buf",
".",
"append",
"(",
"this",
".",
"event",
")",
".",
"append",
"(",
"'\\n'",
")",
";",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}",
"}",
"public",
"static",
"class",
"CopySourceInfo",
"implements",
"Comparable",
"{",
"public",
"final",
"PropertyLocation",
"location",
";",
"private",
"final",
"ASTNode",
"node",
";",
"public",
"final",
"boolean",
"isMove",
";",
"public",
"CopySourceInfo",
"(",
"PropertyLocation",
"location",
",",
"ASTNode",
"node",
",",
"boolean",
"isMove",
")",
"{",
"this",
".",
"location",
"=",
"location",
";",
"this",
".",
"node",
"=",
"node",
";",
"this",
".",
"isMove",
"=",
"isMove",
";",
"}",
"public",
"ASTNode",
"getNode",
"(",
")",
"{",
"return",
"this",
".",
"node",
";",
"}",
"public",
"int",
"compareTo",
"(",
"Object",
"o2",
")",
"{",
"CopySourceInfo",
"r2",
"=",
"(",
"CopySourceInfo",
")",
"o2",
";",
"int",
"startDiff",
"=",
"getNode",
"(",
")",
".",
"getStartPosition",
"(",
")",
"-",
"r2",
".",
"getNode",
"(",
")",
".",
"getStartPosition",
"(",
")",
";",
"if",
"(",
"startDiff",
"!=",
"0",
")",
"{",
"return",
"startDiff",
";",
"}",
"if",
"(",
"r2",
".",
"isMove",
"!=",
"this",
".",
"isMove",
")",
"{",
"return",
"this",
".",
"isMove",
"?",
"-",
"1",
":",
"1",
";",
"}",
"return",
"0",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"this",
".",
"isMove",
")",
"{",
"buf",
".",
"append",
"(",
"\"\"",
")",
";",
"}",
"else",
"{",
"buf",
".",
"append",
"(",
"\"\"",
")",
";",
"}",
"buf",
".",
"append",
"(",
"this",
".",
"node",
")",
";",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}",
"}",
"private",
"static",
"class",
"NodeRangeInfo",
"implements",
"Comparable",
"{",
"private",
"final",
"ASTNode",
"first",
";",
"private",
"final",
"ASTNode",
"last",
";",
"public",
"final",
"CopySourceInfo",
"copyInfo",
";",
"public",
"final",
"ASTNode",
"replacingNode",
";",
"public",
"final",
"TextEditGroup",
"editGroup",
";",
"public",
"NodeRangeInfo",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
",",
"ASTNode",
"first",
",",
"ASTNode",
"last",
",",
"CopySourceInfo",
"copyInfo",
",",
"ASTNode",
"replacingNode",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"this",
".",
"first",
"=",
"first",
";",
"this",
".",
"last",
"=",
"last",
";",
"this",
".",
"copyInfo",
"=",
"copyInfo",
";",
"this",
".",
"replacingNode",
"=",
"replacingNode",
";",
"this",
".",
"editGroup",
"=",
"editGroup",
";",
"}",
"public",
"ASTNode",
"getStartNode",
"(",
")",
"{",
"return",
"this",
".",
"first",
";",
"}",
"public",
"ASTNode",
"getEndNode",
"(",
")",
"{",
"return",
"this",
".",
"last",
";",
"}",
"public",
"boolean",
"isMove",
"(",
")",
"{",
"return",
"this",
".",
"copyInfo",
".",
"isMove",
";",
"}",
"public",
"Block",
"getInternalPlaceholder",
"(",
")",
"{",
"return",
"(",
"Block",
")",
"this",
".",
"copyInfo",
".",
"getNode",
"(",
")",
";",
"}",
"public",
"int",
"compareTo",
"(",
"Object",
"o2",
")",
"{",
"NodeRangeInfo",
"r2",
"=",
"(",
"NodeRangeInfo",
")",
"o2",
";",
"int",
"startDiff",
"=",
"getStartNode",
"(",
")",
".",
"getStartPosition",
"(",
")",
"-",
"r2",
".",
"getStartNode",
"(",
")",
".",
"getStartPosition",
"(",
")",
";",
"if",
"(",
"startDiff",
"!=",
"0",
")",
"{",
"return",
"startDiff",
";",
"}",
"int",
"endDiff",
"=",
"getEndNode",
"(",
")",
".",
"getStartPosition",
"(",
")",
"-",
"r2",
".",
"getEndNode",
"(",
")",
".",
"getStartPosition",
"(",
")",
";",
"if",
"(",
"endDiff",
"!=",
"0",
")",
"{",
"return",
"-",
"endDiff",
";",
"}",
"if",
"(",
"r2",
".",
"isMove",
"(",
")",
"!=",
"isMove",
"(",
")",
")",
"{",
"return",
"isMove",
"(",
")",
"?",
"-",
"1",
":",
"1",
";",
"}",
"return",
"0",
";",
"}",
"public",
"void",
"updatePlaceholderSourceRanges",
"(",
"TargetSourceRangeComputer",
"sourceRangeComputer",
")",
"{",
"TargetSourceRangeComputer",
".",
"SourceRange",
"startRange",
"=",
"sourceRangeComputer",
".",
"computeSourceRange",
"(",
"getStartNode",
"(",
")",
")",
";",
"TargetSourceRangeComputer",
".",
"SourceRange",
"endRange",
"=",
"sourceRangeComputer",
".",
"computeSourceRange",
"(",
"getEndNode",
"(",
")",
")",
";",
"int",
"startPos",
"=",
"startRange",
".",
"getStartPosition",
"(",
")",
";",
"int",
"endPos",
"=",
"endRange",
".",
"getStartPosition",
"(",
")",
"+",
"endRange",
".",
"getLength",
"(",
")",
";",
"Block",
"internalPlaceholder",
"=",
"getInternalPlaceholder",
"(",
")",
";",
"internalPlaceholder",
".",
"setSourceRange",
"(",
"startPos",
",",
"endPos",
"-",
"startPos",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"this",
".",
"first",
"!=",
"this",
".",
"last",
")",
"{",
"buf",
".",
"append",
"(",
"\"range",
"\"",
")",
";",
"}",
"if",
"(",
"isMove",
"(",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"\"",
")",
";",
"}",
"else",
"{",
"buf",
".",
"append",
"(",
"\"\"",
")",
";",
"}",
"buf",
".",
"append",
"(",
"this",
".",
"first",
")",
";",
"buf",
".",
"append",
"(",
"\"",
"-",
"\"",
")",
";",
"buf",
".",
"append",
"(",
"this",
".",
"last",
")",
";",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}",
"}",
"private",
"class",
"ParentIterator",
"implements",
"Iterator",
"{",
"private",
"Iterator",
"eventIter",
";",
"private",
"Iterator",
"sourceNodeIter",
";",
"private",
"Iterator",
"rangeNodeIter",
";",
"private",
"Iterator",
"trackedNodeIter",
";",
"public",
"ParentIterator",
"(",
")",
"{",
"this",
".",
"eventIter",
"=",
"RewriteEventStore",
".",
"this",
".",
"eventLookup",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"if",
"(",
"RewriteEventStore",
".",
"this",
".",
"nodeCopySources",
"!=",
"null",
")",
"{",
"this",
".",
"sourceNodeIter",
"=",
"RewriteEventStore",
".",
"this",
".",
"nodeCopySources",
".",
"iterator",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"sourceNodeIter",
"=",
"Collections",
".",
"EMPTY_LIST",
".",
"iterator",
"(",
")",
";",
"}",
"if",
"(",
"RewriteEventStore",
".",
"this",
".",
"nodeRangeInfos",
"!=",
"null",
")",
"{",
"this",
".",
"rangeNodeIter",
"=",
"RewriteEventStore",
".",
"this",
".",
"nodeRangeInfos",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"rangeNodeIter",
"=",
"Collections",
".",
"EMPTY_LIST",
".",
"iterator",
"(",
")",
";",
"}",
"if",
"(",
"RewriteEventStore",
".",
"this",
".",
"trackedNodes",
"!=",
"null",
")",
"{",
"this",
".",
"trackedNodeIter",
"=",
"RewriteEventStore",
".",
"this",
".",
"trackedNodes",
".",
"keySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"trackedNodeIter",
"=",
"Collections",
".",
"EMPTY_LIST",
".",
"iterator",
"(",
")",
";",
"}",
"}",
"public",
"boolean",
"hasNext",
"(",
")",
"{",
"return",
"this",
".",
"eventIter",
".",
"hasNext",
"(",
")",
"||",
"this",
".",
"sourceNodeIter",
".",
"hasNext",
"(",
")",
"||",
"this",
".",
"rangeNodeIter",
".",
"hasNext",
"(",
")",
"||",
"this",
".",
"trackedNodeIter",
".",
"hasNext",
"(",
")",
";",
"}",
"public",
"Object",
"next",
"(",
")",
"{",
"if",
"(",
"this",
".",
"eventIter",
".",
"hasNext",
"(",
")",
")",
"{",
"return",
"this",
".",
"eventIter",
".",
"next",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"sourceNodeIter",
".",
"hasNext",
"(",
")",
")",
"{",
"return",
"(",
"(",
"CopySourceInfo",
")",
"this",
".",
"sourceNodeIter",
".",
"next",
"(",
")",
")",
".",
"getNode",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"rangeNodeIter",
".",
"hasNext",
"(",
")",
")",
"{",
"return",
"(",
"(",
"PropertyLocation",
")",
"this",
".",
"rangeNodeIter",
".",
"next",
"(",
")",
")",
".",
"getParent",
"(",
")",
";",
"}",
"return",
"this",
".",
"trackedNodeIter",
".",
"next",
"(",
")",
";",
"}",
"public",
"void",
"remove",
"(",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}",
"}",
"public",
"final",
"static",
"int",
"NEW",
"=",
"1",
";",
"public",
"final",
"static",
"int",
"ORIGINAL",
"=",
"2",
";",
"public",
"final",
"static",
"int",
"BOTH",
"=",
"NEW",
"|",
"ORIGINAL",
";",
"final",
"Map",
"eventLookup",
";",
"private",
"EventHolder",
"lastEvent",
";",
"private",
"Map",
"editGroups",
";",
"List",
"nodeCopySources",
";",
"Map",
"nodeRangeInfos",
";",
"Map",
"trackedNodes",
";",
"private",
"Set",
"insertBoundToPrevious",
";",
"private",
"INodePropertyMapper",
"nodePropertyMapper",
";",
"private",
"static",
"final",
"String",
"INTERNAL_PLACEHOLDER_PROPERTY",
"=",
"\"\"",
";",
"public",
"RewriteEventStore",
"(",
")",
"{",
"this",
".",
"eventLookup",
"=",
"new",
"HashMap",
"(",
")",
";",
"this",
".",
"lastEvent",
"=",
"null",
";",
"this",
".",
"editGroups",
"=",
"null",
";",
"this",
".",
"trackedNodes",
"=",
"null",
";",
"this",
".",
"insertBoundToPrevious",
"=",
"null",
";",
"this",
".",
"nodePropertyMapper",
"=",
"null",
";",
"this",
".",
"nodeCopySources",
"=",
"null",
";",
"this",
".",
"nodeRangeInfos",
"=",
"null",
";",
"}",
"public",
"void",
"setNodePropertyMapper",
"(",
"INodePropertyMapper",
"nodePropertyMapper",
")",
"{",
"this",
".",
"nodePropertyMapper",
"=",
"nodePropertyMapper",
";",
"}",
"public",
"void",
"clear",
"(",
")",
"{",
"this",
".",
"eventLookup",
".",
"clear",
"(",
")",
";",
"this",
".",
"lastEvent",
"=",
"null",
";",
"this",
".",
"trackedNodes",
"=",
"null",
";",
"this",
".",
"editGroups",
"=",
"null",
";",
"this",
".",
"insertBoundToPrevious",
"=",
"null",
";",
"this",
".",
"nodeCopySources",
"=",
"null",
";",
"}",
"public",
"void",
"addEvent",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
",",
"RewriteEvent",
"event",
")",
"{",
"validateHasChildProperty",
"(",
"parent",
",",
"childProperty",
")",
";",
"if",
"(",
"event",
".",
"isListRewrite",
"(",
")",
")",
"{",
"validateIsListProperty",
"(",
"childProperty",
")",
";",
"}",
"EventHolder",
"holder",
"=",
"new",
"EventHolder",
"(",
"parent",
",",
"childProperty",
",",
"event",
")",
";",
"List",
"entriesList",
"=",
"(",
"List",
")",
"this",
".",
"eventLookup",
".",
"get",
"(",
"parent",
")",
";",
"if",
"(",
"entriesList",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"entriesList",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"EventHolder",
"curr",
"=",
"(",
"EventHolder",
")",
"entriesList",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"curr",
".",
"childProperty",
"==",
"childProperty",
")",
"{",
"entriesList",
".",
"set",
"(",
"i",
",",
"holder",
")",
";",
"this",
".",
"lastEvent",
"=",
"null",
";",
"return",
";",
"}",
"}",
"}",
"else",
"{",
"entriesList",
"=",
"new",
"ArrayList",
"(",
"3",
")",
";",
"this",
".",
"eventLookup",
".",
"put",
"(",
"parent",
",",
"entriesList",
")",
";",
"}",
"entriesList",
".",
"add",
"(",
"holder",
")",
";",
"}",
"public",
"RewriteEvent",
"getEvent",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"validateHasChildProperty",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"this",
".",
"lastEvent",
"!=",
"null",
"&&",
"this",
".",
"lastEvent",
".",
"parent",
"==",
"parent",
"&&",
"this",
".",
"lastEvent",
".",
"childProperty",
"==",
"property",
")",
"{",
"return",
"this",
".",
"lastEvent",
".",
"event",
";",
"}",
"List",
"entriesList",
"=",
"(",
"List",
")",
"this",
".",
"eventLookup",
".",
"get",
"(",
"parent",
")",
";",
"if",
"(",
"entriesList",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"entriesList",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"EventHolder",
"holder",
"=",
"(",
"EventHolder",
")",
"entriesList",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"holder",
".",
"childProperty",
"==",
"property",
")",
"{",
"this",
".",
"lastEvent",
"=",
"holder",
";",
"return",
"holder",
".",
"event",
";",
"}",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"NodeRewriteEvent",
"getNodeEvent",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
",",
"boolean",
"forceCreation",
")",
"{",
"validateIsNodeProperty",
"(",
"childProperty",
")",
";",
"NodeRewriteEvent",
"event",
"=",
"(",
"NodeRewriteEvent",
")",
"getEvent",
"(",
"parent",
",",
"childProperty",
")",
";",
"if",
"(",
"event",
"==",
"null",
"&&",
"forceCreation",
")",
"{",
"Object",
"originalValue",
"=",
"accessOriginalValue",
"(",
"parent",
",",
"childProperty",
")",
";",
"event",
"=",
"new",
"NodeRewriteEvent",
"(",
"originalValue",
",",
"originalValue",
")",
";",
"addEvent",
"(",
"parent",
",",
"childProperty",
",",
"event",
")",
";",
"}",
"return",
"event",
";",
"}",
"public",
"ListRewriteEvent",
"getListEvent",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
",",
"boolean",
"forceCreation",
")",
"{",
"validateIsListProperty",
"(",
"childProperty",
")",
";",
"ListRewriteEvent",
"event",
"=",
"(",
"ListRewriteEvent",
")",
"getEvent",
"(",
"parent",
",",
"childProperty",
")",
";",
"if",
"(",
"event",
"==",
"null",
"&&",
"forceCreation",
")",
"{",
"List",
"originalValue",
"=",
"(",
"List",
")",
"accessOriginalValue",
"(",
"parent",
",",
"childProperty",
")",
";",
"event",
"=",
"new",
"ListRewriteEvent",
"(",
"originalValue",
")",
";",
"addEvent",
"(",
"parent",
",",
"childProperty",
",",
"event",
")",
";",
"}",
"return",
"event",
";",
"}",
"public",
"Iterator",
"getChangeRootIterator",
"(",
")",
"{",
"return",
"new",
"ParentIterator",
"(",
")",
";",
"}",
"public",
"boolean",
"hasChangedProperties",
"(",
"ASTNode",
"parent",
")",
"{",
"List",
"entriesList",
"=",
"(",
"List",
")",
"this",
".",
"eventLookup",
".",
"get",
"(",
"parent",
")",
";",
"if",
"(",
"entriesList",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"entriesList",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"EventHolder",
"holder",
"=",
"(",
"EventHolder",
")",
"entriesList",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"holder",
".",
"event",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"PropertyLocation",
"getPropertyLocation",
"(",
"Object",
"value",
",",
"int",
"kind",
")",
"{",
"for",
"(",
"Iterator",
"iter",
"=",
"this",
".",
"eventLookup",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"iter",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"List",
"events",
"=",
"(",
"List",
")",
"iter",
".",
"next",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"events",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"EventHolder",
"holder",
"=",
"(",
"EventHolder",
")",
"events",
".",
"get",
"(",
"i",
")",
";",
"RewriteEvent",
"event",
"=",
"holder",
".",
"event",
";",
"if",
"(",
"isNodeInEvent",
"(",
"event",
",",
"value",
",",
"kind",
")",
")",
"{",
"return",
"new",
"PropertyLocation",
"(",
"holder",
".",
"parent",
",",
"holder",
".",
"childProperty",
")",
";",
"}",
"if",
"(",
"event",
".",
"isListRewrite",
"(",
")",
")",
"{",
"RewriteEvent",
"[",
"]",
"children",
"=",
"event",
".",
"getChildren",
"(",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"children",
".",
"length",
";",
"k",
"++",
")",
"{",
"if",
"(",
"isNodeInEvent",
"(",
"children",
"[",
"k",
"]",
",",
"value",
",",
"kind",
")",
")",
"{",
"return",
"new",
"PropertyLocation",
"(",
"holder",
".",
"parent",
",",
"holder",
".",
"childProperty",
")",
";",
"}",
"}",
"}",
"}",
"}",
"if",
"(",
"value",
"instanceof",
"ASTNode",
")",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"value",
";",
"return",
"new",
"PropertyLocation",
"(",
"node",
".",
"getParent",
"(",
")",
",",
"node",
".",
"getLocationInParent",
"(",
")",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"RewriteEvent",
"findEvent",
"(",
"Object",
"value",
",",
"int",
"kind",
")",
"{",
"for",
"(",
"Iterator",
"iter",
"=",
"this",
".",
"eventLookup",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"iter",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"List",
"events",
"=",
"(",
"List",
")",
"iter",
".",
"next",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"events",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"RewriteEvent",
"event",
"=",
"(",
"(",
"EventHolder",
")",
"events",
".",
"get",
"(",
"i",
")",
")",
".",
"event",
";",
"if",
"(",
"isNodeInEvent",
"(",
"event",
",",
"value",
",",
"kind",
")",
")",
"{",
"return",
"event",
";",
"}",
"if",
"(",
"event",
".",
"isListRewrite",
"(",
")",
")",
"{",
"RewriteEvent",
"[",
"]",
"children",
"=",
"event",
".",
"getChildren",
"(",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"children",
".",
"length",
";",
"k",
"++",
")",
"{",
"if",
"(",
"isNodeInEvent",
"(",
"children",
"[",
"k",
"]",
",",
"value",
",",
"kind",
")",
")",
"{",
"return",
"children",
"[",
"k",
"]",
";",
"}",
"}",
"}",
"}",
"}",
"return",
"null",
";",
"}",
"private",
"boolean",
"isNodeInEvent",
"(",
"RewriteEvent",
"event",
",",
"Object",
"value",
",",
"int",
"kind",
")",
"{",
"if",
"(",
"(",
"(",
"kind",
"&",
"NEW",
")",
"!=",
"0",
")",
"&&",
"event",
".",
"getNewValue",
"(",
")",
"==",
"value",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"(",
"(",
"kind",
"&",
"ORIGINAL",
")",
"!=",
"0",
")",
"&&",
"event",
".",
"getOriginalValue",
"(",
")",
"==",
"value",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"public",
"Object",
"getOriginalValue",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
")",
"{",
"return",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"}",
"return",
"accessOriginalValue",
"(",
"parent",
",",
"property",
")",
";",
"}",
"public",
"Object",
"getNewValue",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
")",
"{",
"return",
"event",
".",
"getNewValue",
"(",
")",
";",
"}",
"return",
"accessOriginalValue",
"(",
"parent",
",",
"property",
")",
";",
"}",
"public",
"List",
"getChangedPropertieEvents",
"(",
"ASTNode",
"parent",
")",
"{",
"List",
"changedPropertiesEvent",
"=",
"new",
"ArrayList",
"(",
")",
";",
"List",
"entriesList",
"=",
"(",
"List",
")",
"this",
".",
"eventLookup",
".",
"get",
"(",
"parent",
")",
";",
"if",
"(",
"entriesList",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"entriesList",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"EventHolder",
"holder",
"=",
"(",
"EventHolder",
")",
"entriesList",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"holder",
".",
"event",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"changedPropertiesEvent",
".",
"add",
"(",
"holder",
".",
"event",
")",
";",
"}",
"}",
"}",
"return",
"changedPropertiesEvent",
";",
"}",
"public",
"int",
"getChangeKind",
"(",
"ASTNode",
"node",
")",
"{",
"RewriteEvent",
"event",
"=",
"findEvent",
"(",
"node",
",",
"ORIGINAL",
")",
";",
"if",
"(",
"event",
"!=",
"null",
")",
"{",
"return",
"event",
".",
"getChangeKind",
"(",
")",
";",
"}",
"return",
"RewriteEvent",
".",
"UNCHANGED",
";",
"}",
"private",
"Object",
"accessOriginalValue",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
")",
"{",
"if",
"(",
"this",
".",
"nodePropertyMapper",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"nodePropertyMapper",
".",
"getOriginalValue",
"(",
"parent",
",",
"childProperty",
")",
";",
"}",
"return",
"parent",
".",
"getStructuralProperty",
"(",
"childProperty",
")",
";",
"}",
"public",
"TextEditGroup",
"getEventEditGroup",
"(",
"RewriteEvent",
"event",
")",
"{",
"if",
"(",
"this",
".",
"editGroups",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"(",
"TextEditGroup",
")",
"this",
".",
"editGroups",
".",
"get",
"(",
"event",
")",
";",
"}",
"public",
"void",
"setEventEditGroup",
"(",
"RewriteEvent",
"event",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"if",
"(",
"this",
".",
"editGroups",
"==",
"null",
")",
"{",
"this",
".",
"editGroups",
"=",
"new",
"IdentityHashMap",
"(",
"5",
")",
";",
"}",
"this",
".",
"editGroups",
".",
"put",
"(",
"event",
",",
"editGroup",
")",
";",
"}",
"public",
"final",
"TextEditGroup",
"getTrackedNodeData",
"(",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"this",
".",
"trackedNodes",
"!=",
"null",
")",
"{",
"return",
"(",
"TextEditGroup",
")",
"this",
".",
"trackedNodes",
".",
"get",
"(",
"node",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"void",
"setTrackedNodeData",
"(",
"ASTNode",
"node",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"if",
"(",
"this",
".",
"trackedNodes",
"==",
"null",
")",
"{",
"this",
".",
"trackedNodes",
"=",
"new",
"IdentityHashMap",
"(",
")",
";",
"}",
"this",
".",
"trackedNodes",
".",
"put",
"(",
"node",
",",
"editGroup",
")",
";",
"}",
"public",
"final",
"void",
"markAsTracked",
"(",
"ASTNode",
"node",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"if",
"(",
"getTrackedNodeData",
"(",
"node",
")",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"setTrackedNodeData",
"(",
"node",
",",
"editGroup",
")",
";",
"}",
"private",
"final",
"CopySourceInfo",
"createCopySourceInfo",
"(",
"PropertyLocation",
"location",
",",
"ASTNode",
"node",
",",
"boolean",
"isMove",
")",
"{",
"CopySourceInfo",
"copySource",
"=",
"new",
"CopySourceInfo",
"(",
"location",
",",
"node",
",",
"isMove",
")",
";",
"if",
"(",
"this",
".",
"nodeCopySources",
"==",
"null",
")",
"{",
"this",
".",
"nodeCopySources",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"this",
".",
"nodeCopySources",
".",
"add",
"(",
"copySource",
")",
";",
"return",
"copySource",
";",
"}",
"public",
"final",
"CopySourceInfo",
"markAsCopySource",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"ASTNode",
"node",
",",
"boolean",
"isMove",
")",
"{",
"return",
"createCopySourceInfo",
"(",
"new",
"PropertyLocation",
"(",
"parent",
",",
"property",
")",
",",
"node",
",",
"isMove",
")",
";",
"}",
"public",
"final",
"boolean",
"isRangeCopyPlaceholder",
"(",
"ASTNode",
"node",
")",
"{",
"return",
"node",
".",
"getProperty",
"(",
"INTERNAL_PLACEHOLDER_PROPERTY",
")",
"!=",
"null",
";",
"}",
"public",
"final",
"CopySourceInfo",
"createRangeCopy",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
",",
"ASTNode",
"first",
",",
"ASTNode",
"last",
",",
"boolean",
"isMove",
",",
"ASTNode",
"internalPlaceholder",
",",
"ASTNode",
"replacingNode",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"CopySourceInfo",
"copyInfo",
"=",
"createCopySourceInfo",
"(",
"null",
",",
"internalPlaceholder",
",",
"isMove",
")",
";",
"internalPlaceholder",
".",
"setProperty",
"(",
"INTERNAL_PLACEHOLDER_PROPERTY",
",",
"internalPlaceholder",
")",
";",
"NodeRangeInfo",
"copyRangeInfo",
"=",
"new",
"NodeRangeInfo",
"(",
"parent",
",",
"childProperty",
",",
"first",
",",
"last",
",",
"copyInfo",
",",
"replacingNode",
",",
"editGroup",
")",
";",
"ListRewriteEvent",
"listEvent",
"=",
"getListEvent",
"(",
"parent",
",",
"childProperty",
",",
"true",
")",
";",
"int",
"indexFirst",
"=",
"listEvent",
".",
"getIndex",
"(",
"first",
",",
"ListRewriteEvent",
".",
"OLD",
")",
";",
"if",
"(",
"indexFirst",
"==",
"-",
"1",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"int",
"indexLast",
"=",
"listEvent",
".",
"getIndex",
"(",
"last",
",",
"ListRewriteEvent",
".",
"OLD",
")",
";",
"if",
"(",
"indexLast",
"==",
"-",
"1",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"if",
"(",
"indexFirst",
">",
"indexLast",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"if",
"(",
"this",
".",
"nodeRangeInfos",
"==",
"null",
")",
"{",
"this",
".",
"nodeRangeInfos",
"=",
"new",
"HashMap",
"(",
")",
";",
"}",
"PropertyLocation",
"loc",
"=",
"new",
"PropertyLocation",
"(",
"parent",
",",
"childProperty",
")",
";",
"List",
"innerList",
"=",
"(",
"List",
")",
"this",
".",
"nodeRangeInfos",
".",
"get",
"(",
"loc",
")",
";",
"if",
"(",
"innerList",
"==",
"null",
")",
"{",
"innerList",
"=",
"new",
"ArrayList",
"(",
"2",
")",
";",
"this",
".",
"nodeRangeInfos",
".",
"put",
"(",
"loc",
",",
"innerList",
")",
";",
"}",
"else",
"{",
"assertNoOverlap",
"(",
"listEvent",
",",
"indexFirst",
",",
"indexLast",
",",
"innerList",
")",
";",
"}",
"innerList",
".",
"add",
"(",
"copyRangeInfo",
")",
";",
"return",
"copyInfo",
";",
"}",
"public",
"CopySourceInfo",
"[",
"]",
"getNodeCopySources",
"(",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"this",
".",
"nodeCopySources",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"internalGetCopySources",
"(",
"this",
".",
"nodeCopySources",
",",
"node",
")",
";",
"}",
"public",
"CopySourceInfo",
"[",
"]",
"internalGetCopySources",
"(",
"List",
"copySources",
",",
"ASTNode",
"node",
")",
"{",
"ArrayList",
"res",
"=",
"new",
"ArrayList",
"(",
"3",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"copySources",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"CopySourceInfo",
"curr",
"=",
"(",
"CopySourceInfo",
")",
"copySources",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"curr",
".",
"getNode",
"(",
")",
"==",
"node",
")",
"{",
"res",
".",
"add",
"(",
"curr",
")",
";",
"}",
"}",
"if",
"(",
"res",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"CopySourceInfo",
"[",
"]",
"arr",
"=",
"(",
"CopySourceInfo",
"[",
"]",
")",
"res",
".",
"toArray",
"(",
"new",
"CopySourceInfo",
"[",
"res",
".",
"size",
"(",
")",
"]",
")",
";",
"Arrays",
".",
"sort",
"(",
"arr",
")",
";",
"return",
"arr",
";",
"}",
"private",
"void",
"assertNoOverlap",
"(",
"ListRewriteEvent",
"listEvent",
",",
"int",
"indexFirst",
",",
"int",
"indexLast",
",",
"List",
"innerList",
")",
"{",
"for",
"(",
"Iterator",
"iter",
"=",
"innerList",
".",
"iterator",
"(",
")",
";",
"iter",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"NodeRangeInfo",
"curr",
"=",
"(",
"NodeRangeInfo",
")",
"iter",
".",
"next",
"(",
")",
";",
"int",
"currStart",
"=",
"listEvent",
".",
"getIndex",
"(",
"curr",
".",
"getStartNode",
"(",
")",
",",
"ListRewriteEvent",
".",
"BOTH",
")",
";",
"int",
"currEnd",
"=",
"listEvent",
".",
"getIndex",
"(",
"curr",
".",
"getEndNode",
"(",
")",
",",
"ListRewriteEvent",
".",
"BOTH",
")",
";",
"if",
"(",
"currStart",
"<",
"indexFirst",
"&&",
"currEnd",
"<",
"indexLast",
"&&",
"currEnd",
">=",
"indexFirst",
"||",
"currStart",
">",
"indexFirst",
"&&",
"currStart",
"<=",
"currEnd",
"&&",
"currEnd",
">",
"indexLast",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"}",
"}",
"public",
"void",
"prepareMovedNodes",
"(",
"TargetSourceRangeComputer",
"sourceRangeComputer",
")",
"{",
"if",
"(",
"this",
".",
"nodeCopySources",
"!=",
"null",
")",
"{",
"prepareSingleNodeCopies",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"nodeRangeInfos",
"!=",
"null",
")",
"{",
"prepareNodeRangeCopies",
"(",
"sourceRangeComputer",
")",
";",
"}",
"}",
"public",
"void",
"revertMovedNodes",
"(",
")",
"{",
"if",
"(",
"this",
".",
"nodeRangeInfos",
"!=",
"null",
")",
"{",
"removeMoveRangePlaceholders",
"(",
")",
";",
"}",
"}",
"private",
"void",
"removeMoveRangePlaceholders",
"(",
")",
"{",
"for",
"(",
"Iterator",
"iter",
"=",
"this",
".",
"nodeRangeInfos",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"iter",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"iter",
".",
"next",
"(",
")",
";",
"Set",
"placeholders",
"=",
"new",
"HashSet",
"(",
")",
";",
"List",
"rangeInfos",
"=",
"(",
"List",
")",
"entry",
".",
"getValue",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"rangeInfos",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"placeholders",
".",
"add",
"(",
"(",
"(",
"NodeRangeInfo",
")",
"rangeInfos",
".",
"get",
"(",
"i",
")",
")",
".",
"getInternalPlaceholder",
"(",
")",
")",
";",
"}",
"PropertyLocation",
"loc",
"=",
"(",
"PropertyLocation",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"RewriteEvent",
"[",
"]",
"children",
"=",
"getListEvent",
"(",
"loc",
".",
"getParent",
"(",
")",
",",
"loc",
".",
"getProperty",
"(",
")",
",",
"true",
")",
".",
"getChildren",
"(",
")",
";",
"List",
"revertedChildren",
"=",
"new",
"ArrayList",
"(",
")",
";",
"revertListWithRanges",
"(",
"children",
",",
"placeholders",
",",
"revertedChildren",
")",
";",
"RewriteEvent",
"[",
"]",
"revertedChildrenArr",
"=",
"(",
"RewriteEvent",
"[",
"]",
")",
"revertedChildren",
".",
"toArray",
"(",
"new",
"RewriteEvent",
"[",
"revertedChildren",
".",
"size",
"(",
")",
"]",
")",
";",
"addEvent",
"(",
"loc",
".",
"getParent",
"(",
")",
",",
"loc",
".",
"getProperty",
"(",
")",
",",
"new",
"ListRewriteEvent",
"(",
"revertedChildrenArr",
")",
")",
";",
"}",
"}",
"private",
"void",
"revertListWithRanges",
"(",
"RewriteEvent",
"[",
"]",
"childEvents",
",",
"Set",
"placeholders",
",",
"List",
"revertedChildren",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"childEvents",
".",
"length",
";",
"i",
"++",
")",
"{",
"RewriteEvent",
"event",
"=",
"childEvents",
"[",
"i",
"]",
";",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"if",
"(",
"placeholders",
".",
"contains",
"(",
"node",
")",
")",
"{",
"RewriteEvent",
"[",
"]",
"placeholderChildren",
"=",
"getListEvent",
"(",
"node",
",",
"Block",
".",
"STATEMENTS_PROPERTY",
",",
"false",
")",
".",
"getChildren",
"(",
")",
";",
"revertListWithRanges",
"(",
"placeholderChildren",
",",
"placeholders",
",",
"revertedChildren",
")",
";",
"}",
"else",
"{",
"revertedChildren",
".",
"add",
"(",
"event",
")",
";",
"}",
"}",
"}",
"private",
"void",
"prepareNodeRangeCopies",
"(",
"TargetSourceRangeComputer",
"sourceRangeComputer",
")",
"{",
"for",
"(",
"Iterator",
"iter",
"=",
"this",
".",
"nodeRangeInfos",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"iter",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Map",
".",
"Entry",
"entry",
"=",
"(",
"Map",
".",
"Entry",
")",
"iter",
".",
"next",
"(",
")",
";",
"List",
"rangeInfos",
"=",
"(",
"List",
")",
"entry",
".",
"getValue",
"(",
")",
";",
"Collections",
".",
"sort",
"(",
"rangeInfos",
")",
";",
"PropertyLocation",
"loc",
"=",
"(",
"PropertyLocation",
")",
"entry",
".",
"getKey",
"(",
")",
";",
"RewriteEvent",
"[",
"]",
"children",
"=",
"getListEvent",
"(",
"loc",
".",
"getParent",
"(",
")",
",",
"loc",
".",
"getProperty",
"(",
")",
",",
"true",
")",
".",
"getChildren",
"(",
")",
";",
"RewriteEvent",
"[",
"]",
"newChildren",
"=",
"processListWithRanges",
"(",
"rangeInfos",
",",
"children",
",",
"sourceRangeComputer",
")",
";",
"addEvent",
"(",
"loc",
".",
"getParent",
"(",
")",
",",
"loc",
".",
"getProperty",
"(",
")",
",",
"new",
"ListRewriteEvent",
"(",
"newChildren",
")",
")",
";",
"}",
"}",
"private",
"RewriteEvent",
"[",
"]",
"processListWithRanges",
"(",
"List",
"rangeInfos",
",",
"RewriteEvent",
"[",
"]",
"childEvents",
",",
"TargetSourceRangeComputer",
"sourceRangeComputer",
")",
"{",
"List",
"newChildEvents",
"=",
"new",
"ArrayList",
"(",
"childEvents",
".",
"length",
")",
";",
"NodeRangeInfo",
"topInfo",
"=",
"null",
";",
"Stack",
"newChildrenStack",
"=",
"new",
"Stack",
"(",
")",
";",
"Stack",
"topInfoStack",
"=",
"new",
"Stack",
"(",
")",
";",
"Iterator",
"rangeInfoIterator",
"=",
"rangeInfos",
".",
"iterator",
"(",
")",
";",
"NodeRangeInfo",
"nextInfo",
"=",
"(",
"NodeRangeInfo",
")",
"rangeInfoIterator",
".",
"next",
"(",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"childEvents",
".",
"length",
";",
"k",
"++",
")",
"{",
"RewriteEvent",
"event",
"=",
"childEvents",
"[",
"k",
"]",
";",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"while",
"(",
"nextInfo",
"!=",
"null",
"&&",
"node",
"==",
"nextInfo",
".",
"getStartNode",
"(",
")",
")",
"{",
"nextInfo",
".",
"updatePlaceholderSourceRanges",
"(",
"sourceRangeComputer",
")",
";",
"Block",
"internalPlaceholder",
"=",
"nextInfo",
".",
"getInternalPlaceholder",
"(",
")",
";",
"RewriteEvent",
"newEvent",
";",
"if",
"(",
"nextInfo",
".",
"isMove",
"(",
")",
")",
"{",
"newEvent",
"=",
"new",
"NodeRewriteEvent",
"(",
"internalPlaceholder",
",",
"nextInfo",
".",
"replacingNode",
")",
";",
"}",
"else",
"{",
"newEvent",
"=",
"new",
"NodeRewriteEvent",
"(",
"internalPlaceholder",
",",
"internalPlaceholder",
")",
";",
"}",
"newChildEvents",
".",
"add",
"(",
"newEvent",
")",
";",
"if",
"(",
"nextInfo",
".",
"editGroup",
"!=",
"null",
")",
"{",
"setEventEditGroup",
"(",
"newEvent",
",",
"nextInfo",
".",
"editGroup",
")",
";",
"}",
"newChildrenStack",
".",
"push",
"(",
"newChildEvents",
")",
";",
"topInfoStack",
".",
"push",
"(",
"topInfo",
")",
";",
"newChildEvents",
"=",
"new",
"ArrayList",
"(",
"childEvents",
".",
"length",
")",
";",
"topInfo",
"=",
"nextInfo",
";",
"nextInfo",
"=",
"rangeInfoIterator",
".",
"hasNext",
"(",
")",
"?",
"(",
"NodeRangeInfo",
")",
"rangeInfoIterator",
".",
"next",
"(",
")",
":",
"null",
";",
"}",
"newChildEvents",
".",
"add",
"(",
"event",
")",
";",
"while",
"(",
"topInfo",
"!=",
"null",
"&&",
"node",
"==",
"topInfo",
".",
"getEndNode",
"(",
")",
")",
"{",
"RewriteEvent",
"[",
"]",
"placeholderChildEvents",
"=",
"(",
"RewriteEvent",
"[",
"]",
")",
"newChildEvents",
".",
"toArray",
"(",
"new",
"RewriteEvent",
"[",
"newChildEvents",
".",
"size",
"(",
")",
"]",
")",
";",
"Block",
"internalPlaceholder",
"=",
"topInfo",
".",
"getInternalPlaceholder",
"(",
")",
";",
"addEvent",
"(",
"internalPlaceholder",
",",
"Block",
".",
"STATEMENTS_PROPERTY",
",",
"new",
"ListRewriteEvent",
"(",
"placeholderChildEvents",
")",
")",
";",
"newChildEvents",
"=",
"(",
"List",
")",
"newChildrenStack",
".",
"pop",
"(",
")",
";",
"topInfo",
"=",
"(",
"NodeRangeInfo",
")",
"topInfoStack",
".",
"pop",
"(",
")",
";",
"}",
"}",
"return",
"(",
"RewriteEvent",
"[",
"]",
")",
"newChildEvents",
".",
"toArray",
"(",
"new",
"RewriteEvent",
"[",
"newChildEvents",
".",
"size",
"(",
")",
"]",
")",
";",
"}",
"private",
"void",
"prepareSingleNodeCopies",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"nodeCopySources",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"CopySourceInfo",
"curr",
"=",
"(",
"CopySourceInfo",
")",
"this",
".",
"nodeCopySources",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"curr",
".",
"isMove",
"&&",
"curr",
".",
"location",
"!=",
"null",
")",
"{",
"doMarkMovedAsRemoved",
"(",
"curr",
",",
"curr",
".",
"location",
".",
"getParent",
"(",
")",
",",
"curr",
".",
"location",
".",
"getProperty",
"(",
")",
")",
";",
"}",
"}",
"}",
"private",
"void",
"doMarkMovedAsRemoved",
"(",
"CopySourceInfo",
"curr",
",",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
")",
"{",
"if",
"(",
"childProperty",
".",
"isChildListProperty",
"(",
")",
")",
"{",
"ListRewriteEvent",
"event",
"=",
"getListEvent",
"(",
"parent",
",",
"childProperty",
",",
"true",
")",
";",
"int",
"index",
"=",
"event",
".",
"getIndex",
"(",
"curr",
".",
"getNode",
"(",
")",
",",
"ListRewriteEvent",
".",
"OLD",
")",
";",
"if",
"(",
"index",
"!=",
"-",
"1",
"&&",
"event",
".",
"getChangeKind",
"(",
"index",
")",
"==",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"event",
".",
"setNewValue",
"(",
"null",
",",
"index",
")",
";",
"}",
"}",
"else",
"{",
"NodeRewriteEvent",
"event",
"=",
"getNodeEvent",
"(",
"parent",
",",
"childProperty",
",",
"true",
")",
";",
"if",
"(",
"event",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"event",
".",
"setNewValue",
"(",
"null",
")",
";",
"}",
"}",
"}",
"public",
"boolean",
"isInsertBoundToPrevious",
"(",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"this",
".",
"insertBoundToPrevious",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"insertBoundToPrevious",
".",
"contains",
"(",
"node",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"void",
"setInsertBoundToPrevious",
"(",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"this",
".",
"insertBoundToPrevious",
"==",
"null",
")",
"{",
"this",
".",
"insertBoundToPrevious",
"=",
"new",
"HashSet",
"(",
")",
";",
"}",
"this",
".",
"insertBoundToPrevious",
".",
"add",
"(",
"node",
")",
";",
"}",
"private",
"void",
"validateIsListProperty",
"(",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"!",
"property",
".",
"isChildListProperty",
"(",
")",
")",
"{",
"String",
"message",
"=",
"property",
".",
"getId",
"(",
")",
"+",
"\"\"",
";",
"throw",
"new",
"IllegalArgumentException",
"(",
"message",
")",
";",
"}",
"}",
"private",
"void",
"validateHasChildProperty",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"!",
"parent",
".",
"structuralPropertiesForType",
"(",
")",
".",
"contains",
"(",
"property",
")",
")",
"{",
"String",
"message",
"=",
"Signature",
".",
"getSimpleName",
"(",
"parent",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
"+",
"\"\"",
"+",
"property",
".",
"getId",
"(",
")",
";",
"throw",
"new",
"IllegalArgumentException",
"(",
"message",
")",
";",
"}",
"}",
"private",
"void",
"validateIsNodeProperty",
"(",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"property",
".",
"isChildListProperty",
"(",
")",
")",
"{",
"String",
"message",
"=",
"property",
".",
"getId",
"(",
")",
"+",
"\"\"",
";",
"throw",
"new",
"IllegalArgumentException",
"(",
"message",
")",
";",
"}",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"for",
"(",
"Iterator",
"iter",
"=",
"this",
".",
"eventLookup",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"iter",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"List",
"events",
"=",
"(",
"List",
")",
"iter",
".",
"next",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"events",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"buf",
".",
"append",
"(",
"events",
".",
"get",
"(",
"i",
")",
".",
"toString",
"(",
")",
")",
".",
"append",
"(",
"'\\n'",
")",
";",
"}",
"}",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}",
"public",
"static",
"boolean",
"isNewNode",
"(",
"ASTNode",
"node",
")",
"{",
"return",
"(",
"node",
".",
"getFlags",
"(",
")",
"&",
"ASTNode",
".",
"ORIGINAL",
")",
"==",
"0",
";",
"}",
"}",
"</s>"
] |
4,346 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"CompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jface",
".",
"text",
".",
"BadLocationException",
";",
"import",
"org",
".",
"eclipse",
".",
"jface",
".",
"text",
".",
"IDocument",
";",
"public",
"abstract",
"class",
"LineInformation",
"{",
"public",
"static",
"LineInformation",
"create",
"(",
"final",
"IDocument",
"doc",
")",
"{",
"return",
"new",
"LineInformation",
"(",
")",
"{",
"public",
"int",
"getLineOfOffset",
"(",
"int",
"offset",
")",
"{",
"try",
"{",
"return",
"doc",
".",
"getLineOfOffset",
"(",
"offset",
")",
";",
"}",
"catch",
"(",
"BadLocationException",
"e",
")",
"{",
"return",
"-",
"1",
";",
"}",
"}",
"public",
"int",
"getLineOffset",
"(",
"int",
"line",
")",
"{",
"try",
"{",
"return",
"doc",
".",
"getLineOffset",
"(",
"line",
")",
";",
"}",
"catch",
"(",
"BadLocationException",
"e",
")",
"{",
"return",
"-",
"1",
";",
"}",
"}",
"}",
";",
"}",
"public",
"static",
"LineInformation",
"create",
"(",
"final",
"CompilationUnit",
"astRoot",
")",
"{",
"return",
"new",
"LineInformation",
"(",
")",
"{",
"public",
"int",
"getLineOfOffset",
"(",
"int",
"offset",
")",
"{",
"return",
"astRoot",
".",
"getLineNumber",
"(",
"offset",
")",
"-",
"1",
";",
"}",
"public",
"int",
"getLineOffset",
"(",
"int",
"line",
")",
"{",
"return",
"astRoot",
".",
"getPosition",
"(",
"line",
"+",
"1",
",",
"0",
")",
";",
"}",
"}",
";",
"}",
"public",
"abstract",
"int",
"getLineOfOffset",
"(",
"int",
"offset",
")",
";",
"public",
"abstract",
"int",
"getLineOffset",
"(",
"int",
"line",
")",
";",
"}",
"</s>"
] |
4,347 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"public",
"class",
"NodeRewriteEvent",
"extends",
"RewriteEvent",
"{",
"private",
"Object",
"originalValue",
";",
"private",
"Object",
"newValue",
";",
"public",
"NodeRewriteEvent",
"(",
"Object",
"originalValue",
",",
"Object",
"newValue",
")",
"{",
"this",
".",
"originalValue",
"=",
"originalValue",
";",
"this",
".",
"newValue",
"=",
"newValue",
";",
"}",
"public",
"Object",
"getNewValue",
"(",
")",
"{",
"return",
"this",
".",
"newValue",
";",
"}",
"public",
"Object",
"getOriginalValue",
"(",
")",
"{",
"return",
"this",
".",
"originalValue",
";",
"}",
"public",
"int",
"getChangeKind",
"(",
")",
"{",
"if",
"(",
"this",
".",
"originalValue",
"==",
"this",
".",
"newValue",
")",
"{",
"return",
"UNCHANGED",
";",
"}",
"if",
"(",
"this",
".",
"originalValue",
"==",
"null",
")",
"{",
"return",
"INSERTED",
";",
"}",
"if",
"(",
"this",
".",
"newValue",
"==",
"null",
")",
"{",
"return",
"REMOVED",
";",
"}",
"if",
"(",
"this",
".",
"originalValue",
".",
"equals",
"(",
"this",
".",
"newValue",
")",
")",
"{",
"return",
"UNCHANGED",
";",
"}",
"return",
"REPLACED",
";",
"}",
"public",
"boolean",
"isListRewrite",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"void",
"setNewValue",
"(",
"Object",
"newValue",
")",
"{",
"this",
".",
"newValue",
"=",
"newValue",
";",
"}",
"public",
"RewriteEvent",
"[",
"]",
"getChildren",
"(",
")",
"{",
"return",
"null",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"switch",
"(",
"getChangeKind",
"(",
")",
")",
"{",
"case",
"INSERTED",
":",
"buf",
".",
"append",
"(",
"\"",
"[inserted:",
"\"",
")",
";",
"buf",
".",
"append",
"(",
"getNewValue",
"(",
")",
")",
";",
"buf",
".",
"append",
"(",
"']'",
")",
";",
"break",
";",
"case",
"REPLACED",
":",
"buf",
".",
"append",
"(",
"\"",
"[replaced:",
"\"",
")",
";",
"buf",
".",
"append",
"(",
"getOriginalValue",
"(",
")",
")",
";",
"buf",
".",
"append",
"(",
"\"",
"->",
"\"",
")",
";",
"buf",
".",
"append",
"(",
"getNewValue",
"(",
")",
")",
";",
"buf",
".",
"append",
"(",
"']'",
")",
";",
"break",
";",
"case",
"REMOVED",
":",
"buf",
".",
"append",
"(",
"\"",
"[removed:",
"\"",
")",
";",
"buf",
".",
"append",
"(",
"getOriginalValue",
"(",
")",
")",
";",
"buf",
".",
"append",
"(",
"']'",
")",
";",
"break",
";",
"default",
":",
"buf",
".",
"append",
"(",
"\"",
"[unchanged]\"",
")",
";",
"}",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,348 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"IdentityHashMap",
";",
"import",
"java",
".",
"util",
".",
"Iterator",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"java",
".",
"util",
".",
"Stack",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"Assert",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"CoreException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"TargetSourceRangeComputer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"TargetSourceRangeComputer",
".",
"SourceRange",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"formatter",
".",
"DefaultCodeFormatterConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"formatter",
".",
"IndentManipulation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"impl",
".",
"CompilerOptions",
";",
"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",
".",
"parser",
".",
"ScannerHelper",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"parser",
".",
"TerminalTokens",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"ASTRewriteFormatter",
".",
"BlockContext",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"ASTRewriteFormatter",
".",
"NodeMarker",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"ASTRewriteFormatter",
".",
"Prefix",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"NodeInfoStore",
".",
"CopyPlaceholderData",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"NodeInfoStore",
".",
"StringPlaceholderData",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"RewriteEventStore",
".",
"CopySourceInfo",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"CopySourceEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"CopyTargetEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"DeleteEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"InsertEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"MoveSourceEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"MoveTargetEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"RangeMarker",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"ReplaceEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"TextEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"TextEditGroup",
";",
"public",
"final",
"class",
"ASTRewriteAnalyzer",
"extends",
"ASTVisitor",
"{",
"static",
"final",
"int",
"JLS2_INTERNAL",
"=",
"AST",
".",
"JLS2",
";",
"TextEdit",
"currentEdit",
";",
"final",
"RewriteEventStore",
"eventStore",
";",
"private",
"TokenScanner",
"tokenScanner",
";",
"private",
"final",
"Map",
"sourceCopyInfoToEdit",
";",
"private",
"final",
"Stack",
"sourceCopyEndNodes",
";",
"private",
"final",
"char",
"[",
"]",
"content",
";",
"private",
"final",
"LineInformation",
"lineInfo",
";",
"private",
"final",
"ASTRewriteFormatter",
"formatter",
";",
"private",
"final",
"NodeInfoStore",
"nodeInfos",
";",
"private",
"final",
"TargetSourceRangeComputer",
"extendedSourceRangeComputer",
";",
"private",
"final",
"LineCommentEndOffsets",
"lineCommentEndOffsets",
";",
"private",
"int",
"beforeRequiredSpaceIndex",
"=",
"-",
"1",
";",
"Map",
"options",
";",
"private",
"RecoveryScannerData",
"recoveryScannerData",
";",
"public",
"ASTRewriteAnalyzer",
"(",
"char",
"[",
"]",
"content",
",",
"LineInformation",
"lineInfo",
",",
"String",
"lineDelim",
",",
"TextEdit",
"rootEdit",
",",
"RewriteEventStore",
"eventStore",
",",
"NodeInfoStore",
"nodeInfos",
",",
"List",
"comments",
",",
"Map",
"options",
",",
"TargetSourceRangeComputer",
"extendedSourceRangeComputer",
",",
"RecoveryScannerData",
"recoveryScannerData",
")",
"{",
"this",
".",
"eventStore",
"=",
"eventStore",
";",
"this",
".",
"content",
"=",
"content",
";",
"this",
".",
"lineInfo",
"=",
"lineInfo",
";",
"this",
".",
"nodeInfos",
"=",
"nodeInfos",
";",
"this",
".",
"tokenScanner",
"=",
"null",
";",
"this",
".",
"currentEdit",
"=",
"rootEdit",
";",
"this",
".",
"sourceCopyInfoToEdit",
"=",
"new",
"IdentityHashMap",
"(",
")",
";",
"this",
".",
"sourceCopyEndNodes",
"=",
"new",
"Stack",
"(",
")",
";",
"this",
".",
"formatter",
"=",
"new",
"ASTRewriteFormatter",
"(",
"nodeInfos",
",",
"eventStore",
",",
"options",
",",
"lineDelim",
")",
";",
"this",
".",
"extendedSourceRangeComputer",
"=",
"extendedSourceRangeComputer",
";",
"this",
".",
"lineCommentEndOffsets",
"=",
"new",
"LineCommentEndOffsets",
"(",
"comments",
")",
";",
"this",
".",
"options",
"=",
"options",
";",
"this",
".",
"recoveryScannerData",
"=",
"recoveryScannerData",
";",
"}",
"final",
"TokenScanner",
"getScanner",
"(",
")",
"{",
"if",
"(",
"this",
".",
"tokenScanner",
"==",
"null",
")",
"{",
"CompilerOptions",
"compilerOptions",
"=",
"new",
"CompilerOptions",
"(",
"this",
".",
"options",
")",
";",
"Scanner",
"scanner",
";",
"if",
"(",
"this",
".",
"recoveryScannerData",
"==",
"null",
")",
"{",
"scanner",
"=",
"new",
"Scanner",
"(",
"true",
",",
"false",
",",
"false",
",",
"compilerOptions",
".",
"sourceLevel",
",",
"compilerOptions",
".",
"complianceLevel",
",",
"null",
",",
"null",
",",
"true",
")",
";",
"}",
"else",
"{",
"scanner",
"=",
"new",
"RecoveryScanner",
"(",
"false",
",",
"false",
",",
"compilerOptions",
".",
"sourceLevel",
",",
"compilerOptions",
".",
"complianceLevel",
",",
"null",
",",
"null",
",",
"true",
",",
"this",
".",
"recoveryScannerData",
")",
";",
"}",
"scanner",
".",
"setSource",
"(",
"this",
".",
"content",
")",
";",
"this",
".",
"tokenScanner",
"=",
"new",
"TokenScanner",
"(",
"scanner",
")",
";",
"}",
"return",
"this",
".",
"tokenScanner",
";",
"}",
"final",
"char",
"[",
"]",
"getContent",
"(",
")",
"{",
"return",
"this",
".",
"content",
";",
"}",
"final",
"LineInformation",
"getLineInformation",
"(",
")",
"{",
"return",
"this",
".",
"lineInfo",
";",
"}",
"final",
"SourceRange",
"getExtendedRange",
"(",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"this",
".",
"eventStore",
".",
"isRangeCopyPlaceholder",
"(",
"node",
")",
")",
"{",
"return",
"new",
"SourceRange",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"node",
".",
"getLength",
"(",
")",
")",
";",
"}",
"return",
"this",
".",
"extendedSourceRangeComputer",
".",
"computeSourceRange",
"(",
"node",
")",
";",
"}",
"final",
"int",
"getExtendedOffset",
"(",
"ASTNode",
"node",
")",
"{",
"return",
"getExtendedRange",
"(",
"node",
")",
".",
"getStartPosition",
"(",
")",
";",
"}",
"final",
"int",
"getExtendedEnd",
"(",
"ASTNode",
"node",
")",
"{",
"TargetSourceRangeComputer",
".",
"SourceRange",
"range",
"=",
"getExtendedRange",
"(",
"node",
")",
";",
"return",
"range",
".",
"getStartPosition",
"(",
")",
"+",
"range",
".",
"getLength",
"(",
")",
";",
"}",
"final",
"TextEdit",
"getCopySourceEdit",
"(",
"CopySourceInfo",
"info",
")",
"{",
"TextEdit",
"edit",
"=",
"(",
"TextEdit",
")",
"this",
".",
"sourceCopyInfoToEdit",
".",
"get",
"(",
"info",
")",
";",
"if",
"(",
"edit",
"==",
"null",
")",
"{",
"SourceRange",
"range",
"=",
"getExtendedRange",
"(",
"info",
".",
"getNode",
"(",
")",
")",
";",
"int",
"start",
"=",
"range",
".",
"getStartPosition",
"(",
")",
";",
"int",
"end",
"=",
"start",
"+",
"range",
".",
"getLength",
"(",
")",
";",
"if",
"(",
"info",
".",
"isMove",
")",
"{",
"MoveSourceEdit",
"moveSourceEdit",
"=",
"new",
"MoveSourceEdit",
"(",
"start",
",",
"end",
"-",
"start",
")",
";",
"moveSourceEdit",
".",
"setTargetEdit",
"(",
"new",
"MoveTargetEdit",
"(",
"0",
")",
")",
";",
"edit",
"=",
"moveSourceEdit",
";",
"}",
"else",
"{",
"CopySourceEdit",
"copySourceEdit",
"=",
"new",
"CopySourceEdit",
"(",
"start",
",",
"end",
"-",
"start",
")",
";",
"copySourceEdit",
".",
"setTargetEdit",
"(",
"new",
"CopyTargetEdit",
"(",
"0",
")",
")",
";",
"edit",
"=",
"copySourceEdit",
";",
"}",
"this",
".",
"sourceCopyInfoToEdit",
".",
"put",
"(",
"info",
",",
"edit",
")",
";",
"}",
"return",
"edit",
";",
"}",
"private",
"final",
"int",
"getChangeKind",
"(",
"ASTNode",
"node",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"node",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
")",
"{",
"return",
"event",
".",
"getChangeKind",
"(",
")",
";",
"}",
"return",
"RewriteEvent",
".",
"UNCHANGED",
";",
"}",
"private",
"final",
"boolean",
"hasChildrenChanges",
"(",
"ASTNode",
"node",
")",
"{",
"return",
"this",
".",
"eventStore",
".",
"hasChangedProperties",
"(",
"node",
")",
";",
"}",
"private",
"final",
"boolean",
"isChanged",
"(",
"ASTNode",
"node",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"node",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
")",
"{",
"return",
"event",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
";",
"}",
"return",
"false",
";",
"}",
"private",
"final",
"boolean",
"isCollapsed",
"(",
"ASTNode",
"node",
")",
"{",
"return",
"this",
".",
"nodeInfos",
".",
"isCollapsed",
"(",
"node",
")",
";",
"}",
"final",
"boolean",
"isInsertBoundToPrevious",
"(",
"ASTNode",
"node",
")",
"{",
"return",
"this",
".",
"eventStore",
".",
"isInsertBoundToPrevious",
"(",
"node",
")",
";",
"}",
"private",
"final",
"TextEditGroup",
"getEditGroup",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
")",
"{",
"return",
"getEditGroup",
"(",
"event",
")",
";",
"}",
"return",
"null",
";",
"}",
"final",
"RewriteEvent",
"getEvent",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"return",
"this",
".",
"eventStore",
".",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"}",
"final",
"TextEditGroup",
"getEditGroup",
"(",
"RewriteEvent",
"change",
")",
"{",
"return",
"this",
".",
"eventStore",
".",
"getEventEditGroup",
"(",
"change",
")",
";",
"}",
"private",
"final",
"Object",
"getOriginalValue",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"return",
"this",
".",
"eventStore",
".",
"getOriginalValue",
"(",
"parent",
",",
"property",
")",
";",
"}",
"private",
"final",
"Object",
"getNewValue",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"return",
"this",
".",
"eventStore",
".",
"getNewValue",
"(",
"parent",
",",
"property",
")",
";",
"}",
"final",
"void",
"addEdit",
"(",
"TextEdit",
"edit",
")",
"{",
"this",
".",
"currentEdit",
".",
"addChild",
"(",
"edit",
")",
";",
"}",
"final",
"String",
"getLineDelimiter",
"(",
")",
"{",
"return",
"this",
".",
"formatter",
".",
"getLineDelimiter",
"(",
")",
";",
"}",
"final",
"String",
"createIndentString",
"(",
"int",
"indent",
")",
"{",
"return",
"this",
".",
"formatter",
".",
"createIndentString",
"(",
"indent",
")",
";",
"}",
"final",
"private",
"String",
"getIndentOfLine",
"(",
"int",
"pos",
")",
"{",
"int",
"line",
"=",
"getLineInformation",
"(",
")",
".",
"getLineOfOffset",
"(",
"pos",
")",
";",
"if",
"(",
"line",
">=",
"0",
")",
"{",
"char",
"[",
"]",
"cont",
"=",
"getContent",
"(",
")",
";",
"int",
"lineStart",
"=",
"getLineInformation",
"(",
")",
".",
"getLineOffset",
"(",
"line",
")",
";",
"int",
"i",
"=",
"lineStart",
";",
"while",
"(",
"i",
"<",
"cont",
".",
"length",
"&&",
"IndentManipulation",
".",
"isIndentChar",
"(",
"this",
".",
"content",
"[",
"i",
"]",
")",
")",
"{",
"i",
"++",
";",
"}",
"return",
"new",
"String",
"(",
"cont",
",",
"lineStart",
",",
"i",
"-",
"lineStart",
")",
";",
"}",
"return",
"Util",
".",
"EMPTY_STRING",
";",
"}",
"final",
"String",
"getIndentAtOffset",
"(",
"int",
"pos",
")",
"{",
"return",
"this",
".",
"formatter",
".",
"getIndentString",
"(",
"getIndentOfLine",
"(",
"pos",
")",
")",
";",
"}",
"final",
"void",
"doTextInsert",
"(",
"int",
"offset",
",",
"String",
"insertString",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"if",
"(",
"insertString",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"if",
"(",
"this",
".",
"lineCommentEndOffsets",
".",
"isEndOfLineComment",
"(",
"offset",
",",
"this",
".",
"content",
")",
")",
"{",
"if",
"(",
"!",
"insertString",
".",
"startsWith",
"(",
"getLineDelimiter",
"(",
")",
")",
")",
"{",
"TextEdit",
"edit",
"=",
"new",
"InsertEdit",
"(",
"offset",
",",
"getLineDelimiter",
"(",
")",
")",
";",
"addEdit",
"(",
"edit",
")",
";",
"if",
"(",
"editGroup",
"!=",
"null",
")",
"{",
"addEditGroup",
"(",
"editGroup",
",",
"edit",
")",
";",
"}",
"}",
"this",
".",
"lineCommentEndOffsets",
".",
"remove",
"(",
"offset",
")",
";",
"}",
"TextEdit",
"edit",
"=",
"new",
"InsertEdit",
"(",
"offset",
",",
"insertString",
")",
";",
"addEdit",
"(",
"edit",
")",
";",
"if",
"(",
"editGroup",
"!=",
"null",
")",
"{",
"addEditGroup",
"(",
"editGroup",
",",
"edit",
")",
";",
"}",
"}",
"}",
"final",
"void",
"addEditGroup",
"(",
"TextEditGroup",
"editGroup",
",",
"TextEdit",
"edit",
")",
"{",
"editGroup",
".",
"addTextEdit",
"(",
"edit",
")",
";",
"}",
"final",
"TextEdit",
"doTextRemove",
"(",
"int",
"offset",
",",
"int",
"len",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"if",
"(",
"len",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"TextEdit",
"edit",
"=",
"new",
"DeleteEdit",
"(",
"offset",
",",
"len",
")",
";",
"addEdit",
"(",
"edit",
")",
";",
"if",
"(",
"editGroup",
"!=",
"null",
")",
"{",
"addEditGroup",
"(",
"editGroup",
",",
"edit",
")",
";",
"}",
"return",
"edit",
";",
"}",
"final",
"void",
"doTextRemoveAndVisit",
"(",
"int",
"offset",
",",
"int",
"len",
",",
"ASTNode",
"node",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"TextEdit",
"edit",
"=",
"doTextRemove",
"(",
"offset",
",",
"len",
",",
"editGroup",
")",
";",
"if",
"(",
"edit",
"!=",
"null",
")",
"{",
"this",
".",
"currentEdit",
"=",
"edit",
";",
"voidVisit",
"(",
"node",
")",
";",
"this",
".",
"currentEdit",
"=",
"edit",
".",
"getParent",
"(",
")",
";",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
")",
";",
"}",
"}",
"final",
"int",
"doVisit",
"(",
"ASTNode",
"node",
")",
"{",
"node",
".",
"accept",
"(",
"this",
")",
";",
"return",
"getExtendedEnd",
"(",
"node",
")",
";",
"}",
"private",
"final",
"int",
"doVisit",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"offset",
")",
"{",
"Object",
"node",
"=",
"getOriginalValue",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"property",
".",
"isChildProperty",
"(",
")",
"&&",
"node",
"!=",
"null",
")",
"{",
"return",
"doVisit",
"(",
"(",
"ASTNode",
")",
"node",
")",
";",
"}",
"else",
"if",
"(",
"property",
".",
"isChildListProperty",
"(",
")",
")",
"{",
"return",
"doVisitList",
"(",
"(",
"List",
")",
"node",
",",
"offset",
")",
";",
"}",
"return",
"offset",
";",
"}",
"private",
"int",
"doVisitList",
"(",
"List",
"list",
",",
"int",
"offset",
")",
"{",
"int",
"endPos",
"=",
"offset",
";",
"for",
"(",
"Iterator",
"iter",
"=",
"list",
".",
"iterator",
"(",
")",
";",
"iter",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"ASTNode",
"curr",
"=",
"(",
"(",
"ASTNode",
")",
"iter",
".",
"next",
"(",
")",
")",
";",
"endPos",
"=",
"doVisit",
"(",
"curr",
")",
";",
"}",
"return",
"endPos",
";",
"}",
"final",
"void",
"voidVisit",
"(",
"ASTNode",
"node",
")",
"{",
"node",
".",
"accept",
"(",
"this",
")",
";",
"}",
"private",
"final",
"void",
"voidVisit",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"Object",
"node",
"=",
"getOriginalValue",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"property",
".",
"isChildProperty",
"(",
")",
"&&",
"node",
"!=",
"null",
")",
"{",
"voidVisit",
"(",
"(",
"ASTNode",
")",
"node",
")",
";",
"}",
"else",
"if",
"(",
"property",
".",
"isChildListProperty",
"(",
")",
")",
"{",
"voidVisitList",
"(",
"(",
"List",
")",
"node",
")",
";",
"}",
"}",
"private",
"void",
"voidVisitList",
"(",
"List",
"list",
")",
"{",
"for",
"(",
"Iterator",
"iter",
"=",
"list",
".",
"iterator",
"(",
")",
";",
"iter",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"doVisit",
"(",
"(",
"(",
"ASTNode",
")",
"iter",
".",
"next",
"(",
")",
")",
")",
";",
"}",
"}",
"private",
"final",
"boolean",
"doVisitUnchangedChildren",
"(",
"ASTNode",
"parent",
")",
"{",
"List",
"properties",
"=",
"parent",
".",
"structuralPropertiesForType",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"properties",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"voidVisit",
"(",
"parent",
",",
"(",
"StructuralPropertyDescriptor",
")",
"properties",
".",
"get",
"(",
"i",
")",
")",
";",
"}",
"return",
"false",
";",
"}",
"private",
"final",
"void",
"doTextReplace",
"(",
"int",
"offset",
",",
"int",
"len",
",",
"String",
"insertString",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"if",
"(",
"len",
">",
"0",
"||",
"insertString",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"TextEdit",
"edit",
"=",
"new",
"ReplaceEdit",
"(",
"offset",
",",
"len",
",",
"insertString",
")",
";",
"addEdit",
"(",
"edit",
")",
";",
"if",
"(",
"editGroup",
"!=",
"null",
")",
"{",
"addEditGroup",
"(",
"editGroup",
",",
"edit",
")",
";",
"}",
"}",
"}",
"private",
"final",
"TextEdit",
"doTextCopy",
"(",
"TextEdit",
"sourceEdit",
",",
"int",
"destOffset",
",",
"int",
"sourceIndentLevel",
",",
"String",
"destIndentString",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"TextEdit",
"targetEdit",
";",
"SourceModifier",
"modifier",
"=",
"new",
"SourceModifier",
"(",
"sourceIndentLevel",
",",
"destIndentString",
",",
"this",
".",
"formatter",
".",
"getTabWidth",
"(",
")",
",",
"this",
".",
"formatter",
".",
"getIndentWidth",
"(",
")",
")",
";",
"if",
"(",
"sourceEdit",
"instanceof",
"MoveSourceEdit",
")",
"{",
"MoveSourceEdit",
"moveEdit",
"=",
"(",
"MoveSourceEdit",
")",
"sourceEdit",
";",
"moveEdit",
".",
"setSourceModifier",
"(",
"modifier",
")",
";",
"targetEdit",
"=",
"new",
"MoveTargetEdit",
"(",
"destOffset",
",",
"moveEdit",
")",
";",
"addEdit",
"(",
"targetEdit",
")",
";",
"}",
"else",
"{",
"CopySourceEdit",
"copyEdit",
"=",
"(",
"CopySourceEdit",
")",
"sourceEdit",
";",
"copyEdit",
".",
"setSourceModifier",
"(",
"modifier",
")",
";",
"targetEdit",
"=",
"new",
"CopyTargetEdit",
"(",
"destOffset",
",",
"copyEdit",
")",
";",
"addEdit",
"(",
"targetEdit",
")",
";",
"}",
"if",
"(",
"editGroup",
"!=",
"null",
")",
"{",
"addEditGroup",
"(",
"editGroup",
",",
"sourceEdit",
")",
";",
"addEditGroup",
"(",
"editGroup",
",",
"targetEdit",
")",
";",
"}",
"return",
"targetEdit",
";",
"}",
"private",
"void",
"changeNotSupported",
"(",
"ASTNode",
"node",
")",
"{",
"Assert",
".",
"isTrue",
"(",
"false",
",",
"\"\"",
"+",
"node",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
")",
";",
"}",
"class",
"ListRewriter",
"{",
"protected",
"String",
"constantSeparator",
";",
"protected",
"int",
"startPos",
";",
"protected",
"RewriteEvent",
"[",
"]",
"list",
";",
"protected",
"final",
"ASTNode",
"getOriginalNode",
"(",
"int",
"index",
")",
"{",
"return",
"(",
"ASTNode",
")",
"this",
".",
"list",
"[",
"index",
"]",
".",
"getOriginalValue",
"(",
")",
";",
"}",
"protected",
"final",
"ASTNode",
"getNewNode",
"(",
"int",
"index",
")",
"{",
"return",
"(",
"ASTNode",
")",
"this",
".",
"list",
"[",
"index",
"]",
".",
"getNewValue",
"(",
")",
";",
"}",
"protected",
"String",
"getSeparatorString",
"(",
"int",
"nodeIndex",
")",
"{",
"return",
"this",
".",
"constantSeparator",
";",
"}",
"protected",
"int",
"getInitialIndent",
"(",
")",
"{",
"return",
"getIndent",
"(",
"this",
".",
"startPos",
")",
";",
"}",
"protected",
"int",
"getNodeIndent",
"(",
"int",
"nodeIndex",
")",
"{",
"ASTNode",
"node",
"=",
"getOriginalNode",
"(",
"nodeIndex",
")",
";",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"nodeIndex",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"ASTNode",
"curr",
"=",
"getOriginalNode",
"(",
"i",
")",
";",
"if",
"(",
"curr",
"!=",
"null",
")",
"{",
"return",
"getIndent",
"(",
"curr",
".",
"getStartPosition",
"(",
")",
")",
";",
"}",
"}",
"return",
"getInitialIndent",
"(",
")",
";",
"}",
"return",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"}",
"protected",
"int",
"getStartOfNextNode",
"(",
"int",
"nextIndex",
",",
"int",
"defaultPos",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"nextIndex",
";",
"i",
"<",
"this",
".",
"list",
".",
"length",
";",
"i",
"++",
")",
"{",
"RewriteEvent",
"elem",
"=",
"this",
".",
"list",
"[",
"i",
"]",
";",
"if",
"(",
"elem",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"INSERTED",
")",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"elem",
".",
"getOriginalValue",
"(",
")",
";",
"return",
"getExtendedOffset",
"(",
"node",
")",
";",
"}",
"}",
"return",
"defaultPos",
";",
"}",
"protected",
"int",
"getEndOfNode",
"(",
"ASTNode",
"node",
")",
"{",
"return",
"getExtendedEnd",
"(",
"node",
")",
";",
"}",
"public",
"final",
"int",
"rewriteList",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"offset",
",",
"String",
"keyword",
",",
"String",
"separator",
")",
"{",
"this",
".",
"constantSeparator",
"=",
"separator",
";",
"return",
"rewriteList",
"(",
"parent",
",",
"property",
",",
"keyword",
",",
"null",
",",
"offset",
")",
";",
"}",
"private",
"boolean",
"insertAfterSeparator",
"(",
"ASTNode",
"node",
")",
"{",
"return",
"!",
"isInsertBoundToPrevious",
"(",
"node",
")",
";",
"}",
"protected",
"boolean",
"mustRemoveSeparator",
"(",
"int",
"originalOffset",
",",
"int",
"nodeIndex",
")",
"{",
"return",
"true",
";",
"}",
"private",
"int",
"rewriteList",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"String",
"keyword",
",",
"String",
"endKeyword",
",",
"int",
"offset",
")",
"{",
"this",
".",
"startPos",
"=",
"offset",
";",
"this",
".",
"list",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
".",
"getChildren",
"(",
")",
";",
"int",
"total",
"=",
"this",
".",
"list",
".",
"length",
";",
"if",
"(",
"total",
"==",
"0",
")",
"{",
"return",
"this",
".",
"startPos",
";",
"}",
"int",
"currPos",
"=",
"-",
"1",
";",
"int",
"lastNonInsert",
"=",
"-",
"1",
";",
"int",
"lastNonDelete",
"=",
"-",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"total",
";",
"i",
"++",
")",
"{",
"int",
"currMark",
"=",
"this",
".",
"list",
"[",
"i",
"]",
".",
"getChangeKind",
"(",
")",
";",
"if",
"(",
"currMark",
"!=",
"RewriteEvent",
".",
"INSERTED",
")",
"{",
"lastNonInsert",
"=",
"i",
";",
"if",
"(",
"currPos",
"==",
"-",
"1",
")",
"{",
"ASTNode",
"elem",
"=",
"(",
"ASTNode",
")",
"this",
".",
"list",
"[",
"i",
"]",
".",
"getOriginalValue",
"(",
")",
";",
"currPos",
"=",
"getExtendedOffset",
"(",
"elem",
")",
";",
"}",
"}",
"if",
"(",
"currMark",
"!=",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"lastNonDelete",
"=",
"i",
";",
"}",
"}",
"boolean",
"insertNew",
"=",
"currPos",
"==",
"-",
"1",
";",
"if",
"(",
"insertNew",
")",
"{",
"if",
"(",
"keyword",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"this",
".",
"list",
"[",
"0",
"]",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"keyword",
",",
"editGroup",
")",
";",
"}",
"currPos",
"=",
"offset",
";",
"}",
"if",
"(",
"lastNonDelete",
"==",
"-",
"1",
")",
"{",
"currPos",
"=",
"offset",
";",
"}",
"int",
"prevEnd",
"=",
"currPos",
";",
"int",
"prevMark",
"=",
"RewriteEvent",
".",
"UNCHANGED",
";",
"final",
"int",
"NONE",
"=",
"0",
",",
"NEW",
"=",
"1",
",",
"EXISTING",
"=",
"2",
";",
"int",
"separatorState",
"=",
"NEW",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"total",
";",
"i",
"++",
")",
"{",
"RewriteEvent",
"currEvent",
"=",
"this",
".",
"list",
"[",
"i",
"]",
";",
"int",
"currMark",
"=",
"currEvent",
".",
"getChangeKind",
"(",
")",
";",
"int",
"nextIndex",
"=",
"i",
"+",
"1",
";",
"if",
"(",
"currMark",
"==",
"RewriteEvent",
".",
"INSERTED",
")",
"{",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"currEvent",
")",
";",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"currEvent",
".",
"getNewValue",
"(",
")",
";",
"if",
"(",
"separatorState",
"==",
"NONE",
")",
"{",
"doTextInsert",
"(",
"currPos",
",",
"getSeparatorString",
"(",
"i",
"-",
"1",
")",
",",
"editGroup",
")",
";",
"separatorState",
"=",
"NEW",
";",
"}",
"if",
"(",
"separatorState",
"==",
"NEW",
"||",
"insertAfterSeparator",
"(",
"node",
")",
")",
"{",
"if",
"(",
"separatorState",
"==",
"EXISTING",
")",
"{",
"updateIndent",
"(",
"prevMark",
",",
"currPos",
",",
"i",
",",
"editGroup",
")",
";",
"}",
"doTextInsert",
"(",
"currPos",
",",
"node",
",",
"getNodeIndent",
"(",
"i",
")",
",",
"true",
",",
"editGroup",
")",
";",
"separatorState",
"=",
"NEW",
";",
"if",
"(",
"i",
"!=",
"lastNonDelete",
")",
"{",
"if",
"(",
"this",
".",
"list",
"[",
"nextIndex",
"]",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"INSERTED",
")",
"{",
"doTextInsert",
"(",
"currPos",
",",
"getSeparatorString",
"(",
"i",
")",
",",
"editGroup",
")",
";",
"}",
"else",
"{",
"separatorState",
"=",
"NONE",
";",
"}",
"}",
"}",
"else",
"{",
"doTextInsert",
"(",
"prevEnd",
",",
"getSeparatorString",
"(",
"i",
"-",
"1",
")",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"prevEnd",
",",
"node",
",",
"getNodeIndent",
"(",
"i",
")",
",",
"true",
",",
"editGroup",
")",
";",
"}",
"if",
"(",
"insertNew",
")",
"{",
"if",
"(",
"endKeyword",
"!=",
"null",
"&&",
"endKeyword",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"doTextInsert",
"(",
"currPos",
",",
"endKeyword",
",",
"editGroup",
")",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"currMark",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"currEvent",
".",
"getOriginalValue",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"currEvent",
")",
";",
"int",
"currEnd",
"=",
"getEndOfNode",
"(",
"node",
")",
";",
"try",
"{",
"TokenScanner",
"scanner",
"=",
"getScanner",
"(",
")",
";",
"int",
"newOffset",
"=",
"prevEnd",
";",
"int",
"extendedOffset",
"=",
"getExtendedOffset",
"(",
"node",
")",
";",
"while",
"(",
"TokenScanner",
".",
"isComment",
"(",
"scanner",
".",
"readNext",
"(",
"newOffset",
",",
"false",
")",
")",
")",
"{",
"int",
"tempOffset",
"=",
"scanner",
".",
"getNextEndOffset",
"(",
"newOffset",
",",
"false",
")",
";",
"if",
"(",
"tempOffset",
"<",
"extendedOffset",
")",
"{",
"newOffset",
"=",
"tempOffset",
";",
"}",
"else",
"{",
"break",
";",
"}",
"}",
"if",
"(",
"currPos",
"<",
"newOffset",
")",
"{",
"currPos",
"=",
"extendedOffset",
";",
"}",
"prevEnd",
"=",
"newOffset",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"}",
"if",
"(",
"i",
">",
"lastNonDelete",
"&&",
"separatorState",
"==",
"EXISTING",
")",
"{",
"doTextRemove",
"(",
"prevEnd",
",",
"currPos",
"-",
"prevEnd",
",",
"editGroup",
")",
";",
"doTextRemoveAndVisit",
"(",
"currPos",
",",
"currEnd",
"-",
"currPos",
",",
"node",
",",
"editGroup",
")",
";",
"currPos",
"=",
"currEnd",
";",
"prevEnd",
"=",
"currEnd",
";",
"}",
"else",
"{",
"if",
"(",
"i",
"<",
"lastNonDelete",
")",
"{",
"updateIndent",
"(",
"prevMark",
",",
"currPos",
",",
"i",
",",
"editGroup",
")",
";",
"}",
"int",
"end",
"=",
"getStartOfNextNode",
"(",
"nextIndex",
",",
"currEnd",
")",
";",
"try",
"{",
"TokenScanner",
"scanner",
"=",
"getScanner",
"(",
")",
";",
"int",
"nextToken",
"=",
"scanner",
".",
"readNext",
"(",
"currEnd",
",",
"false",
")",
";",
"if",
"(",
"TokenScanner",
".",
"isComment",
"(",
"nextToken",
")",
")",
"{",
"if",
"(",
"end",
"!=",
"scanner",
".",
"getNextStartOffset",
"(",
"currEnd",
",",
"false",
")",
")",
"{",
"end",
"=",
"currEnd",
";",
"}",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"}",
"doTextRemoveAndVisit",
"(",
"currPos",
",",
"currEnd",
"-",
"currPos",
",",
"node",
",",
"getEditGroup",
"(",
"currEvent",
")",
")",
";",
"if",
"(",
"mustRemoveSeparator",
"(",
"currPos",
",",
"i",
")",
")",
"{",
"doTextRemove",
"(",
"currEnd",
",",
"end",
"-",
"currEnd",
",",
"editGroup",
")",
";",
"}",
"currPos",
"=",
"end",
";",
"prevEnd",
"=",
"currEnd",
";",
"separatorState",
"=",
"NEW",
";",
"}",
"}",
"else",
"{",
"if",
"(",
"currMark",
"==",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"currEvent",
".",
"getOriginalValue",
"(",
")",
";",
"int",
"currEnd",
"=",
"getEndOfNode",
"(",
"node",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"currEvent",
")",
";",
"ASTNode",
"changed",
"=",
"(",
"ASTNode",
")",
"currEvent",
".",
"getNewValue",
"(",
")",
";",
"updateIndent",
"(",
"prevMark",
",",
"currPos",
",",
"i",
",",
"editGroup",
")",
";",
"try",
"{",
"TokenScanner",
"scanner",
"=",
"getScanner",
"(",
")",
";",
"int",
"newOffset",
"=",
"prevEnd",
";",
"int",
"extendedOffset",
"=",
"getExtendedOffset",
"(",
"node",
")",
";",
"while",
"(",
"TokenScanner",
".",
"isComment",
"(",
"scanner",
".",
"readNext",
"(",
"newOffset",
",",
"false",
")",
")",
")",
"{",
"int",
"tempOffset",
"=",
"scanner",
".",
"getNextEndOffset",
"(",
"newOffset",
",",
"false",
")",
";",
"if",
"(",
"tempOffset",
"<",
"extendedOffset",
")",
"{",
"newOffset",
"=",
"tempOffset",
";",
"}",
"else",
"{",
"break",
";",
"}",
"}",
"if",
"(",
"currPos",
"<",
"newOffset",
")",
"{",
"currPos",
"=",
"extendedOffset",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"}",
"doTextRemoveAndVisit",
"(",
"currPos",
",",
"currEnd",
"-",
"currPos",
",",
"node",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"currPos",
",",
"changed",
",",
"getNodeIndent",
"(",
"i",
")",
",",
"true",
",",
"editGroup",
")",
";",
"prevEnd",
"=",
"currEnd",
";",
"}",
"else",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"currEvent",
".",
"getOriginalValue",
"(",
")",
";",
"voidVisit",
"(",
"node",
")",
";",
"}",
"if",
"(",
"i",
"==",
"lastNonInsert",
")",
"{",
"separatorState",
"=",
"NONE",
";",
"if",
"(",
"currMark",
"==",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"currEvent",
".",
"getOriginalValue",
"(",
")",
";",
"prevEnd",
"=",
"getEndOfNode",
"(",
"node",
")",
";",
"}",
"currPos",
"=",
"prevEnd",
";",
"}",
"else",
"if",
"(",
"this",
".",
"list",
"[",
"nextIndex",
"]",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"if",
"(",
"currMark",
"==",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"currEvent",
".",
"getOriginalValue",
"(",
")",
";",
"prevEnd",
"=",
"getEndOfNode",
"(",
"node",
")",
";",
"}",
"currPos",
"=",
"getStartOfNextNode",
"(",
"nextIndex",
",",
"prevEnd",
")",
";",
"separatorState",
"=",
"EXISTING",
";",
"}",
"}",
"prevMark",
"=",
"currMark",
";",
"}",
"return",
"currPos",
";",
"}",
"public",
"final",
"int",
"rewriteList",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"offset",
",",
"String",
"keyword",
")",
"{",
"return",
"rewriteList",
"(",
"parent",
",",
"property",
",",
"keyword",
",",
"null",
",",
"offset",
")",
";",
"}",
"protected",
"void",
"updateIndent",
"(",
"int",
"prevMark",
",",
"int",
"originalOffset",
",",
"int",
"nodeIndex",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"}",
"public",
"final",
"int",
"rewriteList",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"offset",
",",
"String",
"keyword",
",",
"String",
"endKeyword",
",",
"String",
"separator",
")",
"{",
"this",
".",
"constantSeparator",
"=",
"separator",
";",
"return",
"rewriteList",
"(",
"parent",
",",
"property",
",",
"keyword",
",",
"endKeyword",
",",
"offset",
")",
";",
"}",
"}",
"private",
"int",
"rewriteRequiredNode",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
"&&",
"event",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"SourceRange",
"range",
"=",
"getExtendedRange",
"(",
"node",
")",
";",
"int",
"offset",
"=",
"range",
".",
"getStartPosition",
"(",
")",
";",
"int",
"length",
"=",
"range",
".",
"getLength",
"(",
")",
";",
"doTextRemoveAndVisit",
"(",
"offset",
",",
"length",
",",
"node",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"(",
"ASTNode",
")",
"event",
".",
"getNewValue",
"(",
")",
",",
"getIndent",
"(",
"offset",
")",
",",
"true",
",",
"editGroup",
")",
";",
"return",
"offset",
"+",
"length",
";",
"}",
"return",
"doVisit",
"(",
"parent",
",",
"property",
",",
"0",
")",
";",
"}",
"private",
"int",
"rewriteNode",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"offset",
",",
"Prefix",
"prefix",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
")",
"{",
"switch",
"(",
"event",
".",
"getChangeKind",
"(",
")",
")",
"{",
"case",
"RewriteEvent",
".",
"INSERTED",
":",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getNewValue",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"int",
"indent",
"=",
"getIndent",
"(",
"offset",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"prefix",
".",
"getPrefix",
"(",
"indent",
")",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"node",
",",
"indent",
",",
"true",
",",
"editGroup",
")",
";",
"return",
"offset",
";",
"}",
"case",
"RewriteEvent",
".",
"REMOVED",
":",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"int",
"nodeEnd",
";",
"int",
"len",
";",
"if",
"(",
"offset",
"==",
"0",
")",
"{",
"SourceRange",
"range",
"=",
"getExtendedRange",
"(",
"node",
")",
";",
"offset",
"=",
"range",
".",
"getStartPosition",
"(",
")",
";",
"len",
"=",
"range",
".",
"getLength",
"(",
")",
";",
"nodeEnd",
"=",
"offset",
"+",
"len",
";",
"}",
"else",
"{",
"nodeEnd",
"=",
"getExtendedEnd",
"(",
"node",
")",
";",
"len",
"=",
"nodeEnd",
"-",
"offset",
";",
"}",
"doTextRemoveAndVisit",
"(",
"offset",
",",
"len",
",",
"node",
",",
"editGroup",
")",
";",
"return",
"nodeEnd",
";",
"}",
"case",
"RewriteEvent",
".",
"REPLACED",
":",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"SourceRange",
"range",
"=",
"getExtendedRange",
"(",
"node",
")",
";",
"int",
"nodeOffset",
"=",
"range",
".",
"getStartPosition",
"(",
")",
";",
"int",
"nodeLen",
"=",
"range",
".",
"getLength",
"(",
")",
";",
"doTextRemoveAndVisit",
"(",
"nodeOffset",
",",
"nodeLen",
",",
"node",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"nodeOffset",
",",
"(",
"ASTNode",
")",
"event",
".",
"getNewValue",
"(",
")",
",",
"getIndent",
"(",
"offset",
")",
",",
"true",
",",
"editGroup",
")",
";",
"return",
"nodeOffset",
"+",
"nodeLen",
";",
"}",
"}",
"}",
"return",
"doVisit",
"(",
"parent",
",",
"property",
",",
"offset",
")",
";",
"}",
"private",
"int",
"rewriteJavadoc",
"(",
"ASTNode",
"node",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"int",
"pos",
"=",
"rewriteNode",
"(",
"node",
",",
"property",
",",
"node",
".",
"getStartPosition",
"(",
")",
",",
"ASTRewriteFormatter",
".",
"NONE",
")",
";",
"int",
"changeKind",
"=",
"getChangeKind",
"(",
"node",
",",
"property",
")",
";",
"if",
"(",
"changeKind",
"==",
"RewriteEvent",
".",
"INSERTED",
")",
"{",
"String",
"indent",
"=",
"getLineDelimiter",
"(",
")",
"+",
"getIndentAtOffset",
"(",
"pos",
")",
";",
"doTextInsert",
"(",
"pos",
",",
"indent",
",",
"getEditGroup",
"(",
"node",
",",
"property",
")",
")",
";",
"}",
"else",
"if",
"(",
"changeKind",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"try",
"{",
"getScanner",
"(",
")",
".",
"readNext",
"(",
"pos",
",",
"false",
")",
";",
"doTextRemove",
"(",
"pos",
",",
"getScanner",
"(",
")",
".",
"getCurrentStartOffset",
"(",
")",
"-",
"pos",
",",
"getEditGroup",
"(",
"node",
",",
"property",
")",
")",
";",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getCurrentStartOffset",
"(",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"return",
"pos",
";",
"}",
"private",
"int",
"rewriteBodyNode",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"offset",
",",
"int",
"endPos",
",",
"int",
"indent",
",",
"BlockContext",
"context",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
")",
"{",
"switch",
"(",
"event",
".",
"getChangeKind",
"(",
")",
")",
"{",
"case",
"RewriteEvent",
".",
"INSERTED",
":",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getNewValue",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"String",
"[",
"]",
"strings",
"=",
"context",
".",
"getPrefixAndSuffix",
"(",
"indent",
",",
"node",
",",
"this",
".",
"eventStore",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"strings",
"[",
"0",
"]",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"node",
",",
"indent",
",",
"true",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"strings",
"[",
"1",
"]",
",",
"editGroup",
")",
";",
"return",
"offset",
";",
"}",
"case",
"RewriteEvent",
".",
"REMOVED",
":",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"if",
"(",
"endPos",
"==",
"-",
"1",
")",
"{",
"endPos",
"=",
"getExtendedEnd",
"(",
"node",
")",
";",
"}",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"int",
"len",
"=",
"endPos",
"-",
"offset",
";",
"doTextRemoveAndVisit",
"(",
"offset",
",",
"len",
",",
"node",
",",
"editGroup",
")",
";",
"return",
"endPos",
";",
"}",
"case",
"RewriteEvent",
".",
"REPLACED",
":",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"boolean",
"insertNewLine",
"=",
"false",
";",
"if",
"(",
"endPos",
"==",
"-",
"1",
")",
"{",
"int",
"previousEnd",
"=",
"node",
".",
"getStartPosition",
"(",
")",
"+",
"node",
".",
"getLength",
"(",
")",
";",
"endPos",
"=",
"getExtendedEnd",
"(",
"node",
")",
";",
"if",
"(",
"endPos",
"!=",
"previousEnd",
")",
"{",
"int",
"token",
"=",
"TokenScanner",
".",
"END_OF_FILE",
";",
"try",
"{",
"token",
"=",
"getScanner",
"(",
")",
".",
"readNext",
"(",
"previousEnd",
",",
"false",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"}",
"if",
"(",
"token",
"==",
"TerminalTokens",
".",
"TokenNameCOMMENT_LINE",
")",
"{",
"insertNewLine",
"=",
"true",
";",
"}",
"}",
"}",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"int",
"nodeLen",
"=",
"endPos",
"-",
"offset",
";",
"ASTNode",
"replacingNode",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getNewValue",
"(",
")",
";",
"String",
"[",
"]",
"strings",
"=",
"context",
".",
"getPrefixAndSuffix",
"(",
"indent",
",",
"replacingNode",
",",
"this",
".",
"eventStore",
")",
";",
"doTextRemoveAndVisit",
"(",
"offset",
",",
"nodeLen",
",",
"node",
",",
"editGroup",
")",
";",
"String",
"prefix",
"=",
"strings",
"[",
"0",
"]",
";",
"String",
"insertedPrefix",
"=",
"prefix",
";",
"if",
"(",
"insertNewLine",
")",
"{",
"insertedPrefix",
"=",
"getLineDelimiter",
"(",
")",
"+",
"this",
".",
"formatter",
".",
"createIndentString",
"(",
"indent",
")",
"+",
"insertedPrefix",
".",
"trim",
"(",
")",
"+",
"'",
"'",
";",
"}",
"doTextInsert",
"(",
"offset",
",",
"insertedPrefix",
",",
"editGroup",
")",
";",
"String",
"lineInPrefix",
"=",
"getCurrentLine",
"(",
"prefix",
",",
"prefix",
".",
"length",
"(",
")",
")",
";",
"if",
"(",
"prefix",
".",
"length",
"(",
")",
"!=",
"lineInPrefix",
".",
"length",
"(",
")",
")",
"{",
"indent",
"=",
"this",
".",
"formatter",
".",
"computeIndentUnits",
"(",
"lineInPrefix",
")",
";",
"}",
"doTextInsert",
"(",
"offset",
",",
"replacingNode",
",",
"indent",
",",
"true",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"strings",
"[",
"1",
"]",
",",
"editGroup",
")",
";",
"return",
"endPos",
";",
"}",
"}",
"}",
"int",
"pos",
"=",
"doVisit",
"(",
"parent",
",",
"property",
",",
"offset",
")",
";",
"if",
"(",
"endPos",
"!=",
"-",
"1",
")",
"{",
"return",
"endPos",
";",
"}",
"return",
"pos",
";",
"}",
"private",
"int",
"rewriteOptionalQualifier",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"startPos",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
")",
"{",
"switch",
"(",
"event",
".",
"getChangeKind",
"(",
")",
")",
"{",
"case",
"RewriteEvent",
".",
"INSERTED",
":",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getNewValue",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"doTextInsert",
"(",
"startPos",
",",
"node",
",",
"getIndent",
"(",
"startPos",
")",
",",
"true",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"startPos",
",",
"\".\"",
",",
"editGroup",
")",
";",
"return",
"startPos",
";",
"}",
"case",
"RewriteEvent",
".",
"REMOVED",
":",
"{",
"try",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"int",
"dotEnd",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameDOT",
",",
"node",
".",
"getStartPosition",
"(",
")",
"+",
"node",
".",
"getLength",
"(",
")",
")",
";",
"doTextRemoveAndVisit",
"(",
"startPos",
",",
"dotEnd",
"-",
"startPos",
",",
"node",
",",
"editGroup",
")",
";",
"return",
"dotEnd",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"break",
";",
"}",
"case",
"RewriteEvent",
".",
"REPLACED",
":",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"SourceRange",
"range",
"=",
"getExtendedRange",
"(",
"node",
")",
";",
"int",
"offset",
"=",
"range",
".",
"getStartPosition",
"(",
")",
";",
"int",
"length",
"=",
"range",
".",
"getLength",
"(",
")",
";",
"doTextRemoveAndVisit",
"(",
"offset",
",",
"length",
",",
"node",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"(",
"ASTNode",
")",
"event",
".",
"getNewValue",
"(",
")",
",",
"getIndent",
"(",
"startPos",
")",
",",
"true",
",",
"editGroup",
")",
";",
"try",
"{",
"return",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameDOT",
",",
"offset",
"+",
"length",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"break",
";",
"}",
"}",
"}",
"Object",
"node",
"=",
"getOriginalValue",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"return",
"startPos",
";",
"}",
"int",
"pos",
"=",
"doVisit",
"(",
"(",
"ASTNode",
")",
"node",
")",
";",
"try",
"{",
"return",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameDOT",
",",
"pos",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"pos",
";",
"}",
"class",
"ParagraphListRewriter",
"extends",
"ListRewriter",
"{",
"public",
"final",
"static",
"int",
"DEFAULT_SPACING",
"=",
"1",
";",
"private",
"int",
"initialIndent",
";",
"private",
"int",
"separatorLines",
";",
"public",
"ParagraphListRewriter",
"(",
"int",
"initialIndent",
",",
"int",
"separator",
")",
"{",
"this",
".",
"initialIndent",
"=",
"initialIndent",
";",
"this",
".",
"separatorLines",
"=",
"separator",
";",
"}",
"protected",
"int",
"getInitialIndent",
"(",
")",
"{",
"return",
"this",
".",
"initialIndent",
";",
"}",
"protected",
"String",
"getSeparatorString",
"(",
"int",
"nodeIndex",
")",
"{",
"return",
"getSeparatorString",
"(",
"nodeIndex",
",",
"nodeIndex",
"+",
"1",
")",
";",
"}",
"protected",
"String",
"getSeparatorString",
"(",
"int",
"nodeIndex",
",",
"int",
"nextNodeIndex",
")",
"{",
"int",
"newLines",
"=",
"this",
".",
"separatorLines",
"==",
"-",
"1",
"?",
"getNewLines",
"(",
"nodeIndex",
")",
":",
"this",
".",
"separatorLines",
";",
"String",
"lineDelim",
"=",
"getLineDelimiter",
"(",
")",
";",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
"lineDelim",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"newLines",
";",
"i",
"++",
")",
"{",
"buf",
".",
"append",
"(",
"lineDelim",
")",
";",
"}",
"buf",
".",
"append",
"(",
"createIndentString",
"(",
"getNodeIndent",
"(",
"nextNodeIndex",
")",
")",
")",
";",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}",
"private",
"ASTNode",
"getNode",
"(",
"int",
"nodeIndex",
")",
"{",
"ASTNode",
"elem",
"=",
"(",
"ASTNode",
")",
"this",
".",
"list",
"[",
"nodeIndex",
"]",
".",
"getOriginalValue",
"(",
")",
";",
"if",
"(",
"elem",
"==",
"null",
")",
"{",
"elem",
"=",
"(",
"ASTNode",
")",
"this",
".",
"list",
"[",
"nodeIndex",
"]",
".",
"getNewValue",
"(",
")",
";",
"}",
"return",
"elem",
";",
"}",
"private",
"int",
"getNewLines",
"(",
"int",
"nodeIndex",
")",
"{",
"ASTNode",
"curr",
"=",
"getNode",
"(",
"nodeIndex",
")",
";",
"ASTNode",
"next",
"=",
"getNode",
"(",
"nodeIndex",
"+",
"1",
")",
";",
"int",
"currKind",
"=",
"curr",
".",
"getNodeType",
"(",
")",
";",
"int",
"nextKind",
"=",
"next",
".",
"getNodeType",
"(",
")",
";",
"ASTNode",
"last",
"=",
"null",
";",
"ASTNode",
"secondLast",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"list",
".",
"length",
";",
"i",
"++",
")",
"{",
"ASTNode",
"elem",
"=",
"(",
"ASTNode",
")",
"this",
".",
"list",
"[",
"i",
"]",
".",
"getOriginalValue",
"(",
")",
";",
"if",
"(",
"elem",
"!=",
"null",
")",
"{",
"if",
"(",
"last",
"!=",
"null",
")",
"{",
"if",
"(",
"elem",
".",
"getNodeType",
"(",
")",
"==",
"nextKind",
"&&",
"last",
".",
"getNodeType",
"(",
")",
"==",
"currKind",
")",
"{",
"return",
"countEmptyLines",
"(",
"last",
")",
";",
"}",
"secondLast",
"=",
"last",
";",
"}",
"last",
"=",
"elem",
";",
"}",
"}",
"if",
"(",
"currKind",
"==",
"ASTNode",
".",
"FIELD_DECLARATION",
"&&",
"nextKind",
"==",
"ASTNode",
".",
"FIELD_DECLARATION",
")",
"{",
"return",
"0",
";",
"}",
"if",
"(",
"secondLast",
"!=",
"null",
")",
"{",
"return",
"countEmptyLines",
"(",
"secondLast",
")",
";",
"}",
"return",
"DEFAULT_SPACING",
";",
"}",
"private",
"int",
"countEmptyLines",
"(",
"ASTNode",
"last",
")",
"{",
"LineInformation",
"lineInformation",
"=",
"getLineInformation",
"(",
")",
";",
"int",
"lastLine",
"=",
"lineInformation",
".",
"getLineOfOffset",
"(",
"getExtendedEnd",
"(",
"last",
")",
")",
";",
"if",
"(",
"lastLine",
">=",
"0",
")",
"{",
"int",
"startLine",
"=",
"lastLine",
"+",
"1",
";",
"int",
"start",
"=",
"lineInformation",
".",
"getLineOffset",
"(",
"startLine",
")",
";",
"if",
"(",
"start",
"<",
"0",
")",
"{",
"return",
"0",
";",
"}",
"char",
"[",
"]",
"cont",
"=",
"getContent",
"(",
")",
";",
"int",
"i",
"=",
"start",
";",
"while",
"(",
"i",
"<",
"cont",
".",
"length",
"&&",
"ScannerHelper",
".",
"isWhitespace",
"(",
"cont",
"[",
"i",
"]",
")",
")",
"{",
"i",
"++",
";",
"}",
"if",
"(",
"i",
">",
"start",
")",
"{",
"lastLine",
"=",
"lineInformation",
".",
"getLineOfOffset",
"(",
"i",
")",
";",
"if",
"(",
"lastLine",
">",
"startLine",
")",
"{",
"return",
"lastLine",
"-",
"startLine",
";",
"}",
"}",
"}",
"return",
"0",
";",
"}",
"protected",
"boolean",
"mustRemoveSeparator",
"(",
"int",
"originalOffset",
",",
"int",
"nodeIndex",
")",
"{",
"int",
"previousNonRemovedNodeIndex",
"=",
"nodeIndex",
"-",
"1",
";",
"while",
"(",
"previousNonRemovedNodeIndex",
">=",
"0",
"&&",
"this",
".",
"list",
"[",
"previousNonRemovedNodeIndex",
"]",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"previousNonRemovedNodeIndex",
"--",
";",
"}",
"if",
"(",
"previousNonRemovedNodeIndex",
">",
"-",
"1",
")",
"{",
"LineInformation",
"lineInformation",
"=",
"getLineInformation",
"(",
")",
";",
"RewriteEvent",
"prevEvent",
"=",
"this",
".",
"list",
"[",
"previousNonRemovedNodeIndex",
"]",
";",
"int",
"prevKind",
"=",
"prevEvent",
".",
"getChangeKind",
"(",
")",
";",
"if",
"(",
"prevKind",
"==",
"RewriteEvent",
".",
"UNCHANGED",
"||",
"prevKind",
"==",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"ASTNode",
"prevNode",
"=",
"(",
"ASTNode",
")",
"this",
".",
"list",
"[",
"previousNonRemovedNodeIndex",
"]",
".",
"getOriginalValue",
"(",
")",
";",
"int",
"prevEndPosition",
"=",
"prevNode",
".",
"getStartPosition",
"(",
")",
"+",
"prevNode",
".",
"getLength",
"(",
")",
";",
"int",
"prevLine",
"=",
"lineInformation",
".",
"getLineOfOffset",
"(",
"prevEndPosition",
")",
";",
"int",
"line",
"=",
"lineInformation",
".",
"getLineOfOffset",
"(",
"originalOffset",
")",
";",
"if",
"(",
"prevLine",
"==",
"line",
"&&",
"nodeIndex",
"+",
"1",
"<",
"this",
".",
"list",
".",
"length",
")",
"{",
"RewriteEvent",
"nextEvent",
"=",
"this",
".",
"list",
"[",
"nodeIndex",
"+",
"1",
"]",
";",
"int",
"nextKind",
"=",
"nextEvent",
".",
"getChangeKind",
"(",
")",
";",
"if",
"(",
"nextKind",
"==",
"RewriteEvent",
".",
"UNCHANGED",
"||",
"prevKind",
"==",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"ASTNode",
"nextNode",
"=",
"(",
"ASTNode",
")",
"nextEvent",
".",
"getOriginalValue",
"(",
")",
";",
"int",
"nextStartPosition",
"=",
"nextNode",
".",
"getStartPosition",
"(",
")",
";",
"int",
"nextLine",
"=",
"lineInformation",
".",
"getLineOfOffset",
"(",
"nextStartPosition",
")",
";",
"return",
"nextLine",
"==",
"line",
";",
"}",
"return",
"false",
";",
"}",
"}",
"}",
"return",
"true",
";",
"}",
"}",
"private",
"int",
"rewriteParagraphList",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"insertPos",
",",
"int",
"insertIndent",
",",
"int",
"separator",
",",
"int",
"lead",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"==",
"null",
"||",
"event",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"return",
"doVisit",
"(",
"parent",
",",
"property",
",",
"insertPos",
")",
";",
"}",
"RewriteEvent",
"[",
"]",
"events",
"=",
"event",
".",
"getChildren",
"(",
")",
";",
"ParagraphListRewriter",
"listRewriter",
"=",
"new",
"ParagraphListRewriter",
"(",
"insertIndent",
",",
"separator",
")",
";",
"StringBuffer",
"leadString",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"isAllOfKind",
"(",
"events",
",",
"RewriteEvent",
".",
"INSERTED",
")",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"lead",
";",
"i",
"++",
")",
"{",
"leadString",
".",
"append",
"(",
"getLineDelimiter",
"(",
")",
")",
";",
"}",
"leadString",
".",
"append",
"(",
"createIndentString",
"(",
"insertIndent",
")",
")",
";",
"}",
"return",
"listRewriter",
".",
"rewriteList",
"(",
"parent",
",",
"property",
",",
"insertPos",
",",
"leadString",
".",
"toString",
"(",
")",
")",
";",
"}",
"private",
"int",
"rewriteOptionalTypeParameters",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"offset",
",",
"String",
"keyword",
",",
"boolean",
"adjustOnNext",
",",
"boolean",
"needsSpaceOnRemoveAll",
")",
"{",
"int",
"pos",
"=",
"offset",
";",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
"&&",
"event",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"RewriteEvent",
"[",
"]",
"children",
"=",
"event",
".",
"getChildren",
"(",
")",
";",
"try",
"{",
"boolean",
"isAllInserted",
"=",
"isAllOfKind",
"(",
"children",
",",
"RewriteEvent",
".",
"INSERTED",
")",
";",
"if",
"(",
"isAllInserted",
"&&",
"adjustOnNext",
")",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getNextStartOffset",
"(",
"pos",
",",
"false",
")",
";",
"}",
"boolean",
"isAllRemoved",
"=",
"!",
"isAllInserted",
"&&",
"isAllOfKind",
"(",
"children",
",",
"RewriteEvent",
".",
"REMOVED",
")",
";",
"if",
"(",
"isAllRemoved",
")",
"{",
"int",
"posBeforeOpenBracket",
"=",
"getScanner",
"(",
")",
".",
"getTokenStartOffset",
"(",
"TerminalTokens",
".",
"TokenNameLESS",
",",
"pos",
")",
";",
"if",
"(",
"posBeforeOpenBracket",
"!=",
"pos",
")",
"{",
"needsSpaceOnRemoveAll",
"=",
"false",
";",
"}",
"pos",
"=",
"posBeforeOpenBracket",
";",
"}",
"pos",
"=",
"new",
"ListRewriter",
"(",
")",
".",
"rewriteList",
"(",
"parent",
",",
"property",
",",
"pos",
",",
"String",
".",
"valueOf",
"(",
"'<'",
")",
",",
"\",",
"\"",
")",
";",
"if",
"(",
"isAllRemoved",
")",
"{",
"int",
"endPos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameGREATER",
",",
"pos",
")",
";",
"endPos",
"=",
"getScanner",
"(",
")",
".",
"getNextStartOffset",
"(",
"endPos",
",",
"false",
")",
";",
"String",
"replacement",
"=",
"needsSpaceOnRemoveAll",
"?",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
":",
"Util",
".",
"EMPTY_STRING",
";",
"doTextReplace",
"(",
"pos",
",",
"endPos",
"-",
"pos",
",",
"replacement",
",",
"getEditGroup",
"(",
"children",
"[",
"children",
".",
"length",
"-",
"1",
"]",
")",
")",
";",
"return",
"endPos",
";",
"}",
"else",
"if",
"(",
"isAllInserted",
")",
"{",
"doTextInsert",
"(",
"pos",
",",
"String",
".",
"valueOf",
"(",
"'>'",
"+",
"keyword",
")",
",",
"getEditGroup",
"(",
"children",
"[",
"children",
".",
"length",
"-",
"1",
"]",
")",
")",
";",
"return",
"pos",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"pos",
"=",
"doVisit",
"(",
"parent",
",",
"property",
",",
"pos",
")",
";",
"}",
"if",
"(",
"pos",
"!=",
"offset",
")",
"{",
"try",
"{",
"return",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameGREATER",
",",
"pos",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"return",
"pos",
";",
"}",
"private",
"boolean",
"isAllOfKind",
"(",
"RewriteEvent",
"[",
"]",
"children",
",",
"int",
"kind",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"children",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"children",
"[",
"i",
"]",
".",
"getChangeKind",
"(",
")",
"!=",
"kind",
")",
"{",
"return",
"false",
";",
"}",
"}",
"return",
"true",
";",
"}",
"private",
"int",
"rewriteNodeList",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"pos",
",",
"String",
"keyword",
",",
"String",
"endKeyword",
",",
"String",
"separator",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
"&&",
"event",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"return",
"new",
"ListRewriter",
"(",
")",
".",
"rewriteList",
"(",
"parent",
",",
"property",
",",
"pos",
",",
"keyword",
",",
"endKeyword",
",",
"separator",
")",
";",
"}",
"return",
"doVisit",
"(",
"parent",
",",
"property",
",",
"pos",
")",
";",
"}",
"private",
"int",
"rewriteNodeList",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"pos",
",",
"String",
"keyword",
",",
"String",
"separator",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
"&&",
"event",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"return",
"new",
"ListRewriter",
"(",
")",
".",
"rewriteList",
"(",
"parent",
",",
"property",
",",
"pos",
",",
"keyword",
",",
"separator",
")",
";",
"}",
"return",
"doVisit",
"(",
"parent",
",",
"property",
",",
"pos",
")",
";",
"}",
"private",
"void",
"rewriteMethodBody",
"(",
"MethodDeclaration",
"parent",
",",
"int",
"startPos",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"MethodDeclaration",
".",
"BODY_PROPERTY",
")",
";",
"if",
"(",
"event",
"!=",
"null",
")",
"{",
"switch",
"(",
"event",
".",
"getChangeKind",
"(",
")",
")",
"{",
"case",
"RewriteEvent",
".",
"INSERTED",
":",
"{",
"int",
"endPos",
"=",
"parent",
".",
"getStartPosition",
"(",
")",
"+",
"parent",
".",
"getLength",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"ASTNode",
"body",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getNewValue",
"(",
")",
";",
"doTextRemove",
"(",
"startPos",
",",
"endPos",
"-",
"startPos",
",",
"editGroup",
")",
";",
"int",
"indent",
"=",
"getIndent",
"(",
"parent",
".",
"getStartPosition",
"(",
")",
")",
";",
"String",
"prefix",
"=",
"this",
".",
"formatter",
".",
"METHOD_BODY",
".",
"getPrefix",
"(",
"indent",
")",
";",
"doTextInsert",
"(",
"startPos",
",",
"prefix",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"startPos",
",",
"body",
",",
"indent",
",",
"true",
",",
"editGroup",
")",
";",
"return",
";",
"}",
"case",
"RewriteEvent",
".",
"REMOVED",
":",
"{",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"ASTNode",
"body",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"int",
"endPos",
"=",
"parent",
".",
"getStartPosition",
"(",
")",
"+",
"parent",
".",
"getLength",
"(",
")",
";",
"doTextRemoveAndVisit",
"(",
"startPos",
",",
"endPos",
"-",
"startPos",
",",
"body",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"startPos",
",",
"\";\"",
",",
"editGroup",
")",
";",
"return",
";",
"}",
"case",
"RewriteEvent",
".",
"REPLACED",
":",
"{",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"ASTNode",
"body",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"doTextRemoveAndVisit",
"(",
"body",
".",
"getStartPosition",
"(",
")",
",",
"body",
".",
"getLength",
"(",
")",
",",
"body",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"body",
".",
"getStartPosition",
"(",
")",
",",
"(",
"ASTNode",
")",
"event",
".",
"getNewValue",
"(",
")",
",",
"getIndent",
"(",
"body",
".",
"getStartPosition",
"(",
")",
")",
",",
"true",
",",
"editGroup",
")",
";",
"return",
";",
"}",
"}",
"}",
"voidVisit",
"(",
"parent",
",",
"MethodDeclaration",
".",
"BODY_PROPERTY",
")",
";",
"}",
"private",
"int",
"rewriteExtraDimensions",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"pos",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"==",
"null",
"||",
"event",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"return",
"(",
"(",
"Integer",
")",
"getOriginalValue",
"(",
"parent",
",",
"property",
")",
")",
".",
"intValue",
"(",
")",
";",
"}",
"int",
"oldDim",
"=",
"(",
"(",
"Integer",
")",
"event",
".",
"getOriginalValue",
"(",
")",
")",
".",
"intValue",
"(",
")",
";",
"int",
"newDim",
"=",
"(",
"(",
"Integer",
")",
"event",
".",
"getNewValue",
"(",
")",
")",
".",
"intValue",
"(",
")",
";",
"if",
"(",
"oldDim",
"!=",
"newDim",
")",
"{",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"rewriteExtraDimensions",
"(",
"oldDim",
",",
"newDim",
",",
"pos",
",",
"editGroup",
")",
";",
"}",
"return",
"oldDim",
";",
"}",
"private",
"void",
"rewriteExtraDimensions",
"(",
"int",
"oldDim",
",",
"int",
"newDim",
",",
"int",
"pos",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"if",
"(",
"oldDim",
"<",
"newDim",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"oldDim",
";",
"i",
"<",
"newDim",
";",
"i",
"++",
")",
"{",
"doTextInsert",
"(",
"pos",
",",
"\"[]\"",
",",
"editGroup",
")",
";",
"}",
"}",
"else",
"if",
"(",
"newDim",
"<",
"oldDim",
")",
"{",
"try",
"{",
"getScanner",
"(",
")",
".",
"setOffset",
"(",
"pos",
")",
";",
"for",
"(",
"int",
"i",
"=",
"newDim",
";",
"i",
"<",
"oldDim",
";",
"i",
"++",
")",
"{",
"getScanner",
"(",
")",
".",
"readToToken",
"(",
"TerminalTokens",
".",
"TokenNameRBRACKET",
")",
";",
"}",
"doTextRemove",
"(",
"pos",
",",
"getScanner",
"(",
")",
".",
"getCurrentEndOffset",
"(",
")",
"-",
"pos",
",",
"editGroup",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"}",
"private",
"int",
"getPosAfterLeftBrace",
"(",
"int",
"pos",
")",
"{",
"try",
"{",
"int",
"nextToken",
"=",
"getScanner",
"(",
")",
".",
"readNext",
"(",
"pos",
",",
"true",
")",
";",
"if",
"(",
"nextToken",
"==",
"TerminalTokens",
".",
"TokenNameLBRACE",
")",
"{",
"return",
"getScanner",
"(",
")",
".",
"getCurrentEndOffset",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"pos",
";",
"}",
"private",
"int",
"getPosAfterTry",
"(",
"int",
"pos",
")",
"{",
"try",
"{",
"int",
"nextToken",
"=",
"getScanner",
"(",
")",
".",
"readNext",
"(",
"pos",
",",
"true",
")",
";",
"if",
"(",
"nextToken",
"==",
"TerminalTokens",
".",
"TokenNametry",
")",
"{",
"return",
"getScanner",
"(",
")",
".",
"getCurrentEndOffset",
"(",
")",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"pos",
";",
"}",
"final",
"int",
"getIndent",
"(",
"int",
"offset",
")",
"{",
"return",
"this",
".",
"formatter",
".",
"computeIndentUnits",
"(",
"getIndentOfLine",
"(",
"offset",
")",
")",
";",
"}",
"final",
"void",
"doTextInsert",
"(",
"int",
"insertOffset",
",",
"ASTNode",
"node",
",",
"int",
"initialIndentLevel",
",",
"boolean",
"removeLeadingIndent",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"ArrayList",
"markers",
"=",
"new",
"ArrayList",
"(",
")",
";",
"String",
"formatted",
"=",
"this",
".",
"formatter",
".",
"getFormattedResult",
"(",
"node",
",",
"initialIndentLevel",
",",
"markers",
")",
";",
"int",
"currPos",
"=",
"0",
";",
"if",
"(",
"removeLeadingIndent",
")",
"{",
"while",
"(",
"currPos",
"<",
"formatted",
".",
"length",
"(",
")",
"&&",
"ScannerHelper",
".",
"isWhitespace",
"(",
"formatted",
".",
"charAt",
"(",
"currPos",
")",
")",
")",
"{",
"currPos",
"++",
";",
"}",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"markers",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"NodeMarker",
"curr",
"=",
"(",
"NodeMarker",
")",
"markers",
".",
"get",
"(",
"i",
")",
";",
"int",
"offset",
"=",
"curr",
".",
"offset",
";",
"if",
"(",
"offset",
">=",
"currPos",
")",
"{",
"String",
"insertStr",
"=",
"formatted",
".",
"substring",
"(",
"currPos",
",",
"offset",
")",
";",
"doTextInsert",
"(",
"insertOffset",
",",
"insertStr",
",",
"editGroup",
")",
";",
"}",
"else",
"{",
"continue",
";",
"}",
"Object",
"data",
"=",
"curr",
".",
"data",
";",
"if",
"(",
"data",
"instanceof",
"TextEditGroup",
")",
"{",
"TextEdit",
"edit",
"=",
"new",
"RangeMarker",
"(",
"insertOffset",
",",
"0",
")",
";",
"addEditGroup",
"(",
"(",
"TextEditGroup",
")",
"data",
",",
"edit",
")",
";",
"addEdit",
"(",
"edit",
")",
";",
"if",
"(",
"curr",
".",
"length",
"!=",
"0",
")",
"{",
"int",
"end",
"=",
"offset",
"+",
"curr",
".",
"length",
";",
"int",
"k",
"=",
"i",
"+",
"1",
";",
"while",
"(",
"k",
"<",
"markers",
".",
"size",
"(",
")",
"&&",
"(",
"(",
"NodeMarker",
")",
"markers",
".",
"get",
"(",
"k",
")",
")",
".",
"offset",
"<",
"end",
")",
"{",
"k",
"++",
";",
"}",
"curr",
".",
"offset",
"=",
"end",
";",
"curr",
".",
"length",
"=",
"0",
";",
"markers",
".",
"add",
"(",
"k",
",",
"curr",
")",
";",
"}",
"currPos",
"=",
"offset",
";",
"}",
"else",
"{",
"String",
"destIndentString",
"=",
"this",
".",
"formatter",
".",
"getIndentString",
"(",
"getCurrentLine",
"(",
"formatted",
",",
"offset",
")",
")",
";",
"if",
"(",
"data",
"instanceof",
"CopyPlaceholderData",
")",
"{",
"CopySourceInfo",
"copySource",
"=",
"(",
"(",
"CopyPlaceholderData",
")",
"data",
")",
".",
"copySource",
";",
"int",
"srcIndentLevel",
"=",
"getIndent",
"(",
"copySource",
".",
"getNode",
"(",
")",
".",
"getStartPosition",
"(",
")",
")",
";",
"TextEdit",
"sourceEdit",
"=",
"getCopySourceEdit",
"(",
"copySource",
")",
";",
"doTextCopy",
"(",
"sourceEdit",
",",
"insertOffset",
",",
"srcIndentLevel",
",",
"destIndentString",
",",
"editGroup",
")",
";",
"currPos",
"=",
"offset",
"+",
"curr",
".",
"length",
";",
"if",
"(",
"needsNewLineForLineComment",
"(",
"copySource",
".",
"getNode",
"(",
")",
",",
"formatted",
",",
"currPos",
")",
")",
"{",
"doTextInsert",
"(",
"insertOffset",
",",
"getLineDelimiter",
"(",
")",
",",
"editGroup",
")",
";",
"}",
"}",
"else",
"if",
"(",
"data",
"instanceof",
"StringPlaceholderData",
")",
"{",
"String",
"code",
"=",
"(",
"(",
"StringPlaceholderData",
")",
"data",
")",
".",
"code",
";",
"String",
"str",
"=",
"this",
".",
"formatter",
".",
"changeIndent",
"(",
"code",
",",
"0",
",",
"destIndentString",
")",
";",
"doTextInsert",
"(",
"insertOffset",
",",
"str",
",",
"editGroup",
")",
";",
"currPos",
"=",
"offset",
"+",
"curr",
".",
"length",
";",
"}",
"}",
"}",
"if",
"(",
"currPos",
"<",
"formatted",
".",
"length",
"(",
")",
")",
"{",
"String",
"insertStr",
"=",
"formatted",
".",
"substring",
"(",
"currPos",
")",
";",
"doTextInsert",
"(",
"insertOffset",
",",
"insertStr",
",",
"editGroup",
")",
";",
"}",
"}",
"private",
"boolean",
"needsNewLineForLineComment",
"(",
"ASTNode",
"node",
",",
"String",
"formatted",
",",
"int",
"offset",
")",
"{",
"if",
"(",
"!",
"this",
".",
"lineCommentEndOffsets",
".",
"isEndOfLineComment",
"(",
"getExtendedEnd",
"(",
"node",
")",
",",
"this",
".",
"content",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"offset",
"<",
"formatted",
".",
"length",
"(",
")",
"&&",
"!",
"IndentManipulation",
".",
"isLineDelimiterChar",
"(",
"formatted",
".",
"charAt",
"(",
"offset",
")",
")",
";",
"}",
"private",
"String",
"getCurrentLine",
"(",
"String",
"str",
",",
"int",
"pos",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"pos",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"char",
"ch",
"=",
"str",
".",
"charAt",
"(",
"i",
")",
";",
"if",
"(",
"IndentManipulation",
".",
"isLineDelimiterChar",
"(",
"ch",
")",
")",
"{",
"return",
"str",
".",
"substring",
"(",
"i",
"+",
"1",
",",
"pos",
")",
";",
"}",
"}",
"return",
"str",
".",
"substring",
"(",
"0",
",",
"pos",
")",
";",
"}",
"private",
"void",
"rewriteModifiers",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"offset",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"==",
"null",
"||",
"event",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"return",
";",
"}",
"try",
"{",
"int",
"oldModifiers",
"=",
"(",
"(",
"Integer",
")",
"event",
".",
"getOriginalValue",
"(",
")",
")",
".",
"intValue",
"(",
")",
";",
"int",
"newModifiers",
"=",
"(",
"(",
"Integer",
")",
"event",
".",
"getNewValue",
"(",
")",
")",
".",
"intValue",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"TokenScanner",
"scanner",
"=",
"getScanner",
"(",
")",
";",
"int",
"tok",
"=",
"scanner",
".",
"readNext",
"(",
"offset",
",",
"false",
")",
";",
"int",
"startPos",
"=",
"scanner",
".",
"getCurrentStartOffset",
"(",
")",
";",
"int",
"nextStart",
"=",
"startPos",
";",
"loop",
":",
"while",
"(",
"true",
")",
"{",
"if",
"(",
"TokenScanner",
".",
"isComment",
"(",
"tok",
")",
")",
"{",
"tok",
"=",
"scanner",
".",
"readNext",
"(",
"true",
")",
";",
"}",
"boolean",
"keep",
"=",
"true",
";",
"switch",
"(",
"tok",
")",
"{",
"case",
"TerminalTokens",
".",
"TokenNamepublic",
":",
"keep",
"=",
"Modifier",
".",
"isPublic",
"(",
"newModifiers",
")",
";",
"break",
";",
"case",
"TerminalTokens",
".",
"TokenNameprotected",
":",
"keep",
"=",
"Modifier",
".",
"isProtected",
"(",
"newModifiers",
")",
";",
"break",
";",
"case",
"TerminalTokens",
".",
"TokenNameprivate",
":",
"keep",
"=",
"Modifier",
".",
"isPrivate",
"(",
"newModifiers",
")",
";",
"break",
";",
"case",
"TerminalTokens",
".",
"TokenNamestatic",
":",
"keep",
"=",
"Modifier",
".",
"isStatic",
"(",
"newModifiers",
")",
";",
"break",
";",
"case",
"TerminalTokens",
".",
"TokenNamefinal",
":",
"keep",
"=",
"Modifier",
".",
"isFinal",
"(",
"newModifiers",
")",
";",
"break",
";",
"case",
"TerminalTokens",
".",
"TokenNameabstract",
":",
"keep",
"=",
"Modifier",
".",
"isAbstract",
"(",
"newModifiers",
")",
";",
"break",
";",
"case",
"TerminalTokens",
".",
"TokenNamenative",
":",
"keep",
"=",
"Modifier",
".",
"isNative",
"(",
"newModifiers",
")",
";",
"break",
";",
"case",
"TerminalTokens",
".",
"TokenNamevolatile",
":",
"keep",
"=",
"Modifier",
".",
"isVolatile",
"(",
"newModifiers",
")",
";",
"break",
";",
"case",
"TerminalTokens",
".",
"TokenNamestrictfp",
":",
"keep",
"=",
"Modifier",
".",
"isStrictfp",
"(",
"newModifiers",
")",
";",
"break",
";",
"case",
"TerminalTokens",
".",
"TokenNametransient",
":",
"keep",
"=",
"Modifier",
".",
"isTransient",
"(",
"newModifiers",
")",
";",
"break",
";",
"case",
"TerminalTokens",
".",
"TokenNamesynchronized",
":",
"keep",
"=",
"Modifier",
".",
"isSynchronized",
"(",
"newModifiers",
")",
";",
"break",
";",
"default",
":",
"break",
"loop",
";",
"}",
"tok",
"=",
"getScanner",
"(",
")",
".",
"readNext",
"(",
"false",
")",
";",
"int",
"currPos",
"=",
"nextStart",
";",
"nextStart",
"=",
"getScanner",
"(",
")",
".",
"getCurrentStartOffset",
"(",
")",
";",
"if",
"(",
"!",
"keep",
")",
"{",
"doTextRemove",
"(",
"currPos",
",",
"nextStart",
"-",
"currPos",
",",
"editGroup",
")",
";",
"}",
"}",
"int",
"addedModifiers",
"=",
"newModifiers",
"&",
"~",
"oldModifiers",
";",
"if",
"(",
"addedModifiers",
"!=",
"0",
")",
"{",
"if",
"(",
"startPos",
"!=",
"nextStart",
")",
"{",
"int",
"visibilityModifiers",
"=",
"addedModifiers",
"&",
"(",
"Modifier",
".",
"PUBLIC",
"|",
"Modifier",
".",
"PRIVATE",
"|",
"Modifier",
".",
"PROTECTED",
")",
";",
"if",
"(",
"visibilityModifiers",
"!=",
"0",
")",
"{",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"ASTRewriteFlattener",
".",
"printModifiers",
"(",
"visibilityModifiers",
",",
"buf",
")",
";",
"doTextInsert",
"(",
"startPos",
",",
"buf",
".",
"toString",
"(",
")",
",",
"editGroup",
")",
";",
"addedModifiers",
"&=",
"~",
"visibilityModifiers",
";",
"}",
"}",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"ASTRewriteFlattener",
".",
"printModifiers",
"(",
"addedModifiers",
",",
"buf",
")",
";",
"doTextInsert",
"(",
"nextStart",
",",
"buf",
".",
"toString",
"(",
")",
",",
"editGroup",
")",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"class",
"ModifierRewriter",
"extends",
"ListRewriter",
"{",
"private",
"final",
"Prefix",
"annotationSeparation",
";",
"public",
"ModifierRewriter",
"(",
"Prefix",
"annotationSeparation",
")",
"{",
"this",
".",
"annotationSeparation",
"=",
"annotationSeparation",
";",
"}",
"protected",
"String",
"getSeparatorString",
"(",
"int",
"nodeIndex",
")",
"{",
"ASTNode",
"curr",
"=",
"getNewNode",
"(",
"nodeIndex",
")",
";",
"if",
"(",
"curr",
"instanceof",
"Annotation",
")",
"{",
"return",
"this",
".",
"annotationSeparation",
".",
"getPrefix",
"(",
"getNodeIndent",
"(",
"nodeIndex",
"+",
"1",
")",
")",
";",
"}",
"return",
"super",
".",
"getSeparatorString",
"(",
"nodeIndex",
")",
";",
"}",
"}",
"private",
"int",
"rewriteModifiers2",
"(",
"ASTNode",
"node",
",",
"ChildListPropertyDescriptor",
"property",
",",
"int",
"pos",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"node",
",",
"property",
")",
";",
"if",
"(",
"event",
"==",
"null",
"||",
"event",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"return",
"doVisit",
"(",
"node",
",",
"property",
",",
"pos",
")",
";",
"}",
"RewriteEvent",
"[",
"]",
"children",
"=",
"event",
".",
"getChildren",
"(",
")",
";",
"boolean",
"isAllInsert",
"=",
"isAllOfKind",
"(",
"children",
",",
"RewriteEvent",
".",
"INSERTED",
")",
";",
"boolean",
"isAllRemove",
"=",
"isAllOfKind",
"(",
"children",
",",
"RewriteEvent",
".",
"REMOVED",
")",
";",
"if",
"(",
"isAllInsert",
"||",
"isAllRemove",
")",
"{",
"try",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getNextStartOffset",
"(",
"pos",
",",
"false",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"Prefix",
"formatterPrefix",
";",
"if",
"(",
"property",
"==",
"SingleVariableDeclaration",
".",
"MODIFIERS2_PROPERTY",
")",
"formatterPrefix",
"=",
"this",
".",
"formatter",
".",
"PARAM_ANNOTATION_SEPARATION",
";",
"else",
"formatterPrefix",
"=",
"this",
".",
"formatter",
".",
"ANNOTATION_SEPARATION",
";",
"int",
"endPos",
"=",
"new",
"ModifierRewriter",
"(",
"formatterPrefix",
")",
".",
"rewriteList",
"(",
"node",
",",
"property",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\"",
"\"",
")",
";",
"try",
"{",
"int",
"nextPos",
"=",
"getScanner",
"(",
")",
".",
"getNextStartOffset",
"(",
"endPos",
",",
"false",
")",
";",
"boolean",
"lastUnchanged",
"=",
"children",
"[",
"children",
".",
"length",
"-",
"1",
"]",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
";",
"if",
"(",
"isAllRemove",
")",
"{",
"doTextRemove",
"(",
"endPos",
",",
"nextPos",
"-",
"endPos",
",",
"getEditGroup",
"(",
"children",
"[",
"children",
".",
"length",
"-",
"1",
"]",
")",
")",
";",
"return",
"nextPos",
";",
"}",
"else",
"if",
"(",
"isAllInsert",
"||",
"(",
"nextPos",
"==",
"endPos",
"&&",
"lastUnchanged",
")",
")",
"{",
"RewriteEvent",
"lastChild",
"=",
"children",
"[",
"children",
".",
"length",
"-",
"1",
"]",
";",
"String",
"separator",
";",
"if",
"(",
"lastChild",
".",
"getNewValue",
"(",
")",
"instanceof",
"Annotation",
")",
"{",
"separator",
"=",
"formatterPrefix",
".",
"getPrefix",
"(",
"getIndent",
"(",
"pos",
")",
")",
";",
"}",
"else",
"{",
"separator",
"=",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
";",
"}",
"doTextInsert",
"(",
"endPos",
",",
"separator",
",",
"getEditGroup",
"(",
"lastChild",
")",
")",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"endPos",
";",
"}",
"private",
"void",
"replaceOperation",
"(",
"int",
"posBeforeOperation",
",",
"String",
"newOperation",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"try",
"{",
"getScanner",
"(",
")",
".",
"readNext",
"(",
"posBeforeOperation",
",",
"true",
")",
";",
"doTextReplace",
"(",
"getScanner",
"(",
")",
".",
"getCurrentStartOffset",
"(",
")",
",",
"getScanner",
"(",
")",
".",
"getCurrentLength",
"(",
")",
",",
"newOperation",
",",
"editGroup",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"private",
"void",
"rewriteOperation",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
",",
"int",
"posBeforeOperation",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"parent",
",",
"property",
")",
";",
"if",
"(",
"event",
"!=",
"null",
"&&",
"event",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"try",
"{",
"String",
"newOperation",
"=",
"event",
".",
"getNewValue",
"(",
")",
".",
"toString",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"getScanner",
"(",
")",
".",
"readNext",
"(",
"posBeforeOperation",
",",
"true",
")",
";",
"doTextReplace",
"(",
"getScanner",
"(",
")",
".",
"getCurrentStartOffset",
"(",
")",
",",
"getScanner",
"(",
")",
".",
"getCurrentLength",
"(",
")",
",",
"newOperation",
",",
"editGroup",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"}",
"public",
"void",
"postVisit",
"(",
"ASTNode",
"node",
")",
"{",
"TextEditGroup",
"editGroup",
"=",
"this",
".",
"eventStore",
".",
"getTrackedNodeData",
"(",
"node",
")",
";",
"if",
"(",
"editGroup",
"!=",
"null",
")",
"{",
"this",
".",
"currentEdit",
"=",
"this",
".",
"currentEdit",
".",
"getParent",
"(",
")",
";",
"}",
"doCopySourcePostVisit",
"(",
"node",
",",
"this",
".",
"sourceCopyEndNodes",
")",
";",
"}",
"public",
"void",
"preVisit",
"(",
"ASTNode",
"node",
")",
"{",
"CopySourceInfo",
"[",
"]",
"infos",
"=",
"this",
".",
"eventStore",
".",
"getNodeCopySources",
"(",
"node",
")",
";",
"doCopySourcePreVisit",
"(",
"infos",
",",
"this",
".",
"sourceCopyEndNodes",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"this",
".",
"eventStore",
".",
"getTrackedNodeData",
"(",
"node",
")",
";",
"if",
"(",
"editGroup",
"!=",
"null",
")",
"{",
"SourceRange",
"range",
"=",
"getExtendedRange",
"(",
"node",
")",
";",
"int",
"offset",
"=",
"range",
".",
"getStartPosition",
"(",
")",
";",
"int",
"length",
"=",
"range",
".",
"getLength",
"(",
")",
";",
"TextEdit",
"edit",
"=",
"new",
"RangeMarker",
"(",
"offset",
",",
"length",
")",
";",
"addEditGroup",
"(",
"editGroup",
",",
"edit",
")",
";",
"addEdit",
"(",
"edit",
")",
";",
"this",
".",
"currentEdit",
"=",
"edit",
";",
"}",
"ensureSpaceBeforeReplace",
"(",
"node",
")",
";",
"}",
"final",
"void",
"doCopySourcePreVisit",
"(",
"CopySourceInfo",
"[",
"]",
"infos",
",",
"Stack",
"nodeEndStack",
")",
"{",
"if",
"(",
"infos",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"infos",
".",
"length",
";",
"i",
"++",
")",
"{",
"CopySourceInfo",
"curr",
"=",
"infos",
"[",
"i",
"]",
";",
"TextEdit",
"edit",
"=",
"getCopySourceEdit",
"(",
"curr",
")",
";",
"addEdit",
"(",
"edit",
")",
";",
"this",
".",
"currentEdit",
"=",
"edit",
";",
"nodeEndStack",
".",
"push",
"(",
"curr",
".",
"getNode",
"(",
")",
")",
";",
"}",
"}",
"}",
"final",
"void",
"doCopySourcePostVisit",
"(",
"ASTNode",
"node",
",",
"Stack",
"nodeEndStack",
")",
"{",
"while",
"(",
"!",
"nodeEndStack",
".",
"isEmpty",
"(",
")",
"&&",
"nodeEndStack",
".",
"peek",
"(",
")",
"==",
"node",
")",
"{",
"nodeEndStack",
".",
"pop",
"(",
")",
";",
"this",
".",
"currentEdit",
"=",
"this",
".",
"currentEdit",
".",
"getParent",
"(",
")",
";",
"}",
"}",
"public",
"boolean",
"visit",
"(",
"CompilationUnit",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"startPos",
"=",
"rewriteNode",
"(",
"node",
",",
"CompilationUnit",
".",
"PACKAGE_PROPERTY",
",",
"0",
",",
"ASTRewriteFormatter",
".",
"NONE",
")",
";",
"if",
"(",
"getChangeKind",
"(",
"node",
",",
"CompilationUnit",
".",
"PACKAGE_PROPERTY",
")",
"==",
"RewriteEvent",
".",
"INSERTED",
")",
"{",
"doTextInsert",
"(",
"0",
",",
"getLineDelimiter",
"(",
")",
",",
"getEditGroup",
"(",
"node",
",",
"CompilationUnit",
".",
"PACKAGE_PROPERTY",
")",
")",
";",
"}",
"startPos",
"=",
"rewriteParagraphList",
"(",
"node",
",",
"CompilationUnit",
".",
"IMPORTS_PROPERTY",
",",
"startPos",
",",
"0",
",",
"0",
",",
"2",
")",
";",
"rewriteParagraphList",
"(",
"node",
",",
"CompilationUnit",
".",
"TYPES_PROPERTY",
",",
"startPos",
",",
"0",
",",
"-",
"1",
",",
"2",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeDeclaration",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"apiLevel",
"=",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
";",
"int",
"pos",
"=",
"rewriteJavadoc",
"(",
"node",
",",
"TypeDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"boolean",
"isJLS2",
"=",
"apiLevel",
"==",
"JLS2_INTERNAL",
";",
"if",
"(",
"isJLS2",
")",
"{",
"rewriteModifiers",
"(",
"node",
",",
"TypeDeclaration",
".",
"MODIFIERS_PROPERTY",
",",
"pos",
")",
";",
"}",
"else",
"{",
"rewriteModifiers2",
"(",
"node",
",",
"TypeDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"pos",
")",
";",
"}",
"boolean",
"isInterface",
"=",
"(",
"(",
"Boolean",
")",
"getOriginalValue",
"(",
"node",
",",
"TypeDeclaration",
".",
"INTERFACE_PROPERTY",
")",
")",
".",
"booleanValue",
"(",
")",
";",
"boolean",
"invertType",
"=",
"isChanged",
"(",
"node",
",",
"TypeDeclaration",
".",
"INTERFACE_PROPERTY",
")",
";",
"if",
"(",
"invertType",
")",
"{",
"try",
"{",
"int",
"typeToken",
"=",
"isInterface",
"?",
"TerminalTokens",
".",
"TokenNameinterface",
":",
"TerminalTokens",
".",
"TokenNameclass",
";",
"int",
"startPosition",
"=",
"node",
".",
"getStartPosition",
"(",
")",
";",
"if",
"(",
"!",
"isJLS2",
")",
"{",
"List",
"modifiers",
"=",
"node",
".",
"modifiers",
"(",
")",
";",
"final",
"int",
"size",
"=",
"modifiers",
".",
"size",
"(",
")",
";",
"if",
"(",
"size",
"!=",
"0",
")",
"{",
"ASTNode",
"modifierNode",
"=",
"(",
"ASTNode",
")",
"modifiers",
".",
"get",
"(",
"size",
"-",
"1",
")",
";",
"startPosition",
"=",
"modifierNode",
".",
"getStartPosition",
"(",
")",
"+",
"modifierNode",
".",
"getLength",
"(",
")",
";",
"}",
"}",
"getScanner",
"(",
")",
".",
"readToToken",
"(",
"typeToken",
",",
"startPosition",
")",
";",
"String",
"str",
"=",
"isInterface",
"?",
"\"class\"",
":",
"\"interface\"",
";",
"int",
"start",
"=",
"getScanner",
"(",
")",
".",
"getCurrentStartOffset",
"(",
")",
";",
"int",
"end",
"=",
"getScanner",
"(",
")",
".",
"getCurrentEndOffset",
"(",
")",
";",
"doTextReplace",
"(",
"start",
",",
"end",
"-",
"start",
",",
"str",
",",
"getEditGroup",
"(",
"node",
",",
"TypeDeclaration",
".",
"INTERFACE_PROPERTY",
")",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"}",
"}",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"TypeDeclaration",
".",
"NAME_PROPERTY",
")",
";",
"if",
"(",
"!",
"isJLS2",
")",
"{",
"pos",
"=",
"rewriteOptionalTypeParameters",
"(",
"node",
",",
"TypeDeclaration",
".",
"TYPE_PARAMETERS_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"false",
",",
"true",
")",
";",
"}",
"if",
"(",
"!",
"isInterface",
"||",
"invertType",
")",
"{",
"ChildPropertyDescriptor",
"superClassProperty",
"=",
"isJLS2",
"?",
"TypeDeclaration",
".",
"SUPERCLASS_PROPERTY",
":",
"TypeDeclaration",
".",
"SUPERCLASS_TYPE_PROPERTY",
";",
"RewriteEvent",
"superClassEvent",
"=",
"getEvent",
"(",
"node",
",",
"superClassProperty",
")",
";",
"int",
"changeKind",
"=",
"superClassEvent",
"!=",
"null",
"?",
"superClassEvent",
".",
"getChangeKind",
"(",
")",
":",
"RewriteEvent",
".",
"UNCHANGED",
";",
"switch",
"(",
"changeKind",
")",
"{",
"case",
"RewriteEvent",
".",
"INSERTED",
":",
"{",
"doTextInsert",
"(",
"pos",
",",
"\"",
"extends",
"\"",
",",
"getEditGroup",
"(",
"superClassEvent",
")",
")",
";",
"doTextInsert",
"(",
"pos",
",",
"(",
"ASTNode",
")",
"superClassEvent",
".",
"getNewValue",
"(",
")",
",",
"0",
",",
"false",
",",
"getEditGroup",
"(",
"superClassEvent",
")",
")",
";",
"break",
";",
"}",
"case",
"RewriteEvent",
".",
"REMOVED",
":",
"{",
"ASTNode",
"superClass",
"=",
"(",
"ASTNode",
")",
"superClassEvent",
".",
"getOriginalValue",
"(",
")",
";",
"int",
"endPos",
"=",
"getExtendedEnd",
"(",
"superClass",
")",
";",
"doTextRemoveAndVisit",
"(",
"pos",
",",
"endPos",
"-",
"pos",
",",
"superClass",
",",
"getEditGroup",
"(",
"superClassEvent",
")",
")",
";",
"pos",
"=",
"endPos",
";",
"break",
";",
"}",
"case",
"RewriteEvent",
".",
"REPLACED",
":",
"{",
"ASTNode",
"superClass",
"=",
"(",
"ASTNode",
")",
"superClassEvent",
".",
"getOriginalValue",
"(",
")",
";",
"SourceRange",
"range",
"=",
"getExtendedRange",
"(",
"superClass",
")",
";",
"int",
"offset",
"=",
"range",
".",
"getStartPosition",
"(",
")",
";",
"int",
"length",
"=",
"range",
".",
"getLength",
"(",
")",
";",
"doTextRemoveAndVisit",
"(",
"offset",
",",
"length",
",",
"superClass",
",",
"getEditGroup",
"(",
"superClassEvent",
")",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"(",
"ASTNode",
")",
"superClassEvent",
".",
"getNewValue",
"(",
")",
",",
"0",
",",
"false",
",",
"getEditGroup",
"(",
"superClassEvent",
")",
")",
";",
"pos",
"=",
"offset",
"+",
"length",
";",
"break",
";",
"}",
"case",
"RewriteEvent",
".",
"UNCHANGED",
":",
"{",
"pos",
"=",
"doVisit",
"(",
"node",
",",
"superClassProperty",
",",
"pos",
")",
";",
"}",
"}",
"}",
"ChildListPropertyDescriptor",
"superInterfaceProperty",
"=",
"isJLS2",
"?",
"TypeDeclaration",
".",
"SUPER_INTERFACES_PROPERTY",
":",
"TypeDeclaration",
".",
"SUPER_INTERFACE_TYPES_PROPERTY",
";",
"RewriteEvent",
"interfaceEvent",
"=",
"getEvent",
"(",
"node",
",",
"superInterfaceProperty",
")",
";",
"if",
"(",
"interfaceEvent",
"==",
"null",
"||",
"interfaceEvent",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"if",
"(",
"invertType",
")",
"{",
"List",
"originalNodes",
"=",
"(",
"List",
")",
"getOriginalValue",
"(",
"node",
",",
"superInterfaceProperty",
")",
";",
"if",
"(",
"!",
"originalNodes",
".",
"isEmpty",
"(",
")",
")",
"{",
"String",
"keyword",
"=",
"isInterface",
"?",
"\"",
"implements",
"\"",
":",
"\"",
"extends",
"\"",
";",
"ASTNode",
"firstNode",
"=",
"(",
"ASTNode",
")",
"originalNodes",
".",
"get",
"(",
"0",
")",
";",
"doTextReplace",
"(",
"pos",
",",
"firstNode",
".",
"getStartPosition",
"(",
")",
"-",
"pos",
",",
"keyword",
",",
"getEditGroup",
"(",
"node",
",",
"TypeDeclaration",
".",
"INTERFACE_PROPERTY",
")",
")",
";",
"}",
"}",
"pos",
"=",
"doVisit",
"(",
"node",
",",
"superInterfaceProperty",
",",
"pos",
")",
";",
"}",
"else",
"{",
"String",
"keyword",
"=",
"(",
"isInterface",
"==",
"invertType",
")",
"?",
"\"",
"implements",
"\"",
":",
"\"",
"extends",
"\"",
";",
"if",
"(",
"invertType",
")",
"{",
"List",
"newNodes",
"=",
"(",
"List",
")",
"interfaceEvent",
".",
"getNewValue",
"(",
")",
";",
"if",
"(",
"!",
"newNodes",
".",
"isEmpty",
"(",
")",
")",
"{",
"List",
"origNodes",
"=",
"(",
"List",
")",
"interfaceEvent",
".",
"getOriginalValue",
"(",
")",
";",
"int",
"firstStart",
"=",
"pos",
";",
"if",
"(",
"!",
"origNodes",
".",
"isEmpty",
"(",
")",
")",
"{",
"firstStart",
"=",
"(",
"(",
"ASTNode",
")",
"origNodes",
".",
"get",
"(",
"0",
")",
")",
".",
"getStartPosition",
"(",
")",
";",
"}",
"doTextReplace",
"(",
"pos",
",",
"firstStart",
"-",
"pos",
",",
"keyword",
",",
"getEditGroup",
"(",
"node",
",",
"TypeDeclaration",
".",
"INTERFACE_PROPERTY",
")",
")",
";",
"keyword",
"=",
"Util",
".",
"EMPTY_STRING",
";",
"pos",
"=",
"firstStart",
";",
"}",
"}",
"pos",
"=",
"rewriteNodeList",
"(",
"node",
",",
"superInterfaceProperty",
",",
"pos",
",",
"keyword",
",",
"\",",
"\"",
")",
";",
"}",
"int",
"startIndent",
"=",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
"+",
"1",
";",
"int",
"startPos",
"=",
"getPosAfterLeftBrace",
"(",
"pos",
")",
";",
"rewriteParagraphList",
"(",
"node",
",",
"TypeDeclaration",
".",
"BODY_DECLARATIONS_PROPERTY",
",",
"startPos",
",",
"startIndent",
",",
"-",
"1",
",",
"2",
")",
";",
"return",
"false",
";",
"}",
"private",
"void",
"rewriteReturnType",
"(",
"MethodDeclaration",
"node",
",",
"boolean",
"isConstructor",
",",
"boolean",
"isConstructorChange",
")",
"{",
"ChildPropertyDescriptor",
"property",
"=",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"?",
"MethodDeclaration",
".",
"RETURN_TYPE_PROPERTY",
":",
"MethodDeclaration",
".",
"RETURN_TYPE2_PROPERTY",
";",
"ASTNode",
"originalReturnType",
"=",
"(",
"ASTNode",
")",
"getOriginalValue",
"(",
"node",
",",
"property",
")",
";",
"boolean",
"returnTypeExists",
"=",
"originalReturnType",
"!=",
"null",
"&&",
"originalReturnType",
".",
"getStartPosition",
"(",
")",
"!=",
"-",
"1",
";",
"if",
"(",
"!",
"isConstructorChange",
"&&",
"returnTypeExists",
")",
"{",
"rewriteRequiredNode",
"(",
"node",
",",
"property",
")",
";",
"ensureSpaceAfterReplace",
"(",
"node",
",",
"property",
")",
";",
"return",
";",
"}",
"ASTNode",
"newReturnType",
"=",
"(",
"ASTNode",
")",
"getNewValue",
"(",
"node",
",",
"property",
")",
";",
"if",
"(",
"isConstructorChange",
"||",
"!",
"returnTypeExists",
"&&",
"newReturnType",
"!=",
"originalReturnType",
")",
"{",
"ASTNode",
"originalMethodName",
"=",
"(",
"ASTNode",
")",
"getOriginalValue",
"(",
"node",
",",
"MethodDeclaration",
".",
"NAME_PROPERTY",
")",
";",
"int",
"nextStart",
"=",
"originalMethodName",
".",
"getStartPosition",
"(",
")",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"node",
",",
"property",
")",
";",
"if",
"(",
"isConstructor",
"||",
"!",
"returnTypeExists",
")",
"{",
"doTextInsert",
"(",
"nextStart",
",",
"newReturnType",
",",
"getIndent",
"(",
"nextStart",
")",
",",
"true",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"nextStart",
",",
"\"",
"\"",
",",
"editGroup",
")",
";",
"}",
"else",
"{",
"int",
"offset",
"=",
"getExtendedOffset",
"(",
"originalReturnType",
")",
";",
"doTextRemoveAndVisit",
"(",
"offset",
",",
"nextStart",
"-",
"offset",
",",
"originalReturnType",
",",
"editGroup",
")",
";",
"}",
"}",
"}",
"public",
"boolean",
"visit",
"(",
"MethodDeclaration",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteJavadoc",
"(",
"node",
",",
"MethodDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"rewriteModifiers",
"(",
"node",
",",
"MethodDeclaration",
".",
"MODIFIERS_PROPERTY",
",",
"pos",
")",
";",
"}",
"else",
"{",
"pos",
"=",
"rewriteModifiers2",
"(",
"node",
",",
"MethodDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"pos",
")",
";",
"pos",
"=",
"rewriteOptionalTypeParameters",
"(",
"node",
",",
"MethodDeclaration",
".",
"TYPE_PARAMETERS_PROPERTY",
",",
"pos",
",",
"\"",
"\"",
",",
"true",
",",
"pos",
"!=",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"}",
"boolean",
"isConstructorChange",
"=",
"isChanged",
"(",
"node",
",",
"MethodDeclaration",
".",
"CONSTRUCTOR_PROPERTY",
")",
";",
"boolean",
"isConstructor",
"=",
"(",
"(",
"Boolean",
")",
"getOriginalValue",
"(",
"node",
",",
"MethodDeclaration",
".",
"CONSTRUCTOR_PROPERTY",
")",
")",
".",
"booleanValue",
"(",
")",
";",
"if",
"(",
"!",
"isConstructor",
"||",
"isConstructorChange",
")",
"{",
"rewriteReturnType",
"(",
"node",
",",
"isConstructor",
",",
"isConstructorChange",
")",
";",
"}",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"MethodDeclaration",
".",
"NAME_PROPERTY",
")",
";",
"try",
"{",
"if",
"(",
"isChanged",
"(",
"node",
",",
"MethodDeclaration",
".",
"PARAMETERS_PROPERTY",
")",
")",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLPAREN",
",",
"pos",
")",
";",
"pos",
"=",
"rewriteNodeList",
"(",
"node",
",",
"MethodDeclaration",
".",
"PARAMETERS_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"}",
"else",
"{",
"pos",
"=",
"doVisit",
"(",
"node",
",",
"MethodDeclaration",
".",
"PARAMETERS_PROPERTY",
",",
"pos",
")",
";",
"}",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameRPAREN",
",",
"pos",
")",
";",
"int",
"extraDims",
"=",
"rewriteExtraDimensions",
"(",
"node",
",",
"MethodDeclaration",
".",
"EXTRA_DIMENSIONS_PROPERTY",
",",
"pos",
")",
";",
"boolean",
"hasExceptionChanges",
"=",
"isChanged",
"(",
"node",
",",
"MethodDeclaration",
".",
"THROWN_EXCEPTIONS_PROPERTY",
")",
";",
"int",
"bodyChangeKind",
"=",
"getChangeKind",
"(",
"node",
",",
"MethodDeclaration",
".",
"BODY_PROPERTY",
")",
";",
"if",
"(",
"(",
"extraDims",
">",
"0",
")",
"&&",
"(",
"hasExceptionChanges",
"||",
"bodyChangeKind",
"==",
"RewriteEvent",
".",
"INSERTED",
"||",
"bodyChangeKind",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
")",
"{",
"int",
"dim",
"=",
"(",
"(",
"Integer",
")",
"getOriginalValue",
"(",
"node",
",",
"MethodDeclaration",
".",
"EXTRA_DIMENSIONS_PROPERTY",
")",
")",
".",
"intValue",
"(",
")",
";",
"while",
"(",
"dim",
">",
"0",
")",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameRBRACKET",
",",
"pos",
")",
";",
"dim",
"--",
";",
"}",
"}",
"pos",
"=",
"rewriteNodeList",
"(",
"node",
",",
"MethodDeclaration",
".",
"THROWN_EXCEPTIONS_PROPERTY",
",",
"pos",
",",
"\"",
"throws",
"\"",
",",
"\",",
"\"",
")",
";",
"rewriteMethodBody",
"(",
"node",
",",
"pos",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Block",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"startPos",
";",
"if",
"(",
"isCollapsed",
"(",
"node",
")",
")",
"{",
"startPos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
";",
"}",
"else",
"{",
"startPos",
"=",
"getPosAfterLeftBrace",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"}",
"int",
"startIndent",
"=",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
"+",
"1",
";",
"rewriteParagraphList",
"(",
"node",
",",
"Block",
".",
"STATEMENTS_PROPERTY",
",",
"startPos",
",",
"startIndent",
",",
"0",
",",
"1",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ReturnStatement",
"node",
")",
"{",
"try",
"{",
"this",
".",
"beforeRequiredSpaceIndex",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNamereturn",
",",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"ensureSpaceBeforeReplace",
"(",
"node",
")",
";",
"rewriteNode",
"(",
"node",
",",
"ReturnStatement",
".",
"EXPRESSION_PROPERTY",
",",
"this",
".",
"beforeRequiredSpaceIndex",
",",
"ASTRewriteFormatter",
".",
"SPACE",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AnonymousClassDeclaration",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"startPos",
"=",
"getPosAfterLeftBrace",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"int",
"startIndent",
"=",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
"+",
"1",
";",
"rewriteParagraphList",
"(",
"node",
",",
"AnonymousClassDeclaration",
".",
"BODY_DECLARATIONS_PROPERTY",
",",
"startPos",
",",
"startIndent",
",",
"-",
"1",
",",
"2",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayAccess",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"ArrayAccess",
".",
"ARRAY_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"ArrayAccess",
".",
"INDEX_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayCreation",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"ArrayType",
"arrayType",
"=",
"(",
"ArrayType",
")",
"getOriginalValue",
"(",
"node",
",",
"ArrayCreation",
".",
"TYPE_PROPERTY",
")",
";",
"int",
"nOldBrackets",
"=",
"getDimensions",
"(",
"arrayType",
")",
";",
"int",
"nNewBrackets",
"=",
"nOldBrackets",
";",
"TextEditGroup",
"editGroup",
"=",
"null",
";",
"RewriteEvent",
"typeEvent",
"=",
"getEvent",
"(",
"node",
",",
"ArrayCreation",
".",
"TYPE_PROPERTY",
")",
";",
"if",
"(",
"typeEvent",
"!=",
"null",
"&&",
"typeEvent",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"ArrayType",
"replacingType",
"=",
"(",
"ArrayType",
")",
"typeEvent",
".",
"getNewValue",
"(",
")",
";",
"editGroup",
"=",
"getEditGroup",
"(",
"typeEvent",
")",
";",
"Type",
"newType",
"=",
"replacingType",
".",
"getElementType",
"(",
")",
";",
"Type",
"oldType",
"=",
"getElementType",
"(",
"arrayType",
")",
";",
"if",
"(",
"!",
"newType",
".",
"equals",
"(",
"oldType",
")",
")",
"{",
"SourceRange",
"range",
"=",
"getExtendedRange",
"(",
"oldType",
")",
";",
"int",
"offset",
"=",
"range",
".",
"getStartPosition",
"(",
")",
";",
"int",
"length",
"=",
"range",
".",
"getLength",
"(",
")",
";",
"doTextRemove",
"(",
"offset",
",",
"length",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"newType",
",",
"0",
",",
"false",
",",
"editGroup",
")",
";",
"}",
"nNewBrackets",
"=",
"replacingType",
".",
"getDimensions",
"(",
")",
";",
"}",
"voidVisit",
"(",
"arrayType",
")",
";",
"try",
"{",
"int",
"offset",
"=",
"getScanner",
"(",
")",
".",
"getTokenStartOffset",
"(",
"TerminalTokens",
".",
"TokenNameLBRACKET",
",",
"arrayType",
".",
"getStartPosition",
"(",
")",
")",
";",
"RewriteEvent",
"dimEvent",
"=",
"getEvent",
"(",
"node",
",",
"ArrayCreation",
".",
"DIMENSIONS_PROPERTY",
")",
";",
"boolean",
"hasDimensionChanges",
"=",
"(",
"dimEvent",
"!=",
"null",
"&&",
"dimEvent",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
";",
"if",
"(",
"hasDimensionChanges",
")",
"{",
"RewriteEvent",
"[",
"]",
"events",
"=",
"dimEvent",
".",
"getChildren",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"events",
".",
"length",
";",
"i",
"++",
")",
"{",
"RewriteEvent",
"event",
"=",
"events",
"[",
"i",
"]",
";",
"int",
"changeKind",
"=",
"event",
".",
"getChangeKind",
"(",
")",
";",
"if",
"(",
"changeKind",
"==",
"RewriteEvent",
".",
"INSERTED",
")",
"{",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"\"[\"",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"(",
"ASTNode",
")",
"event",
".",
"getNewValue",
"(",
")",
",",
"0",
",",
"false",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"offset",
",",
"\"]\"",
",",
"editGroup",
")",
";",
"nNewBrackets",
"--",
";",
"}",
"else",
"{",
"ASTNode",
"elem",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"int",
"elemEnd",
"=",
"elem",
".",
"getStartPosition",
"(",
")",
"+",
"elem",
".",
"getLength",
"(",
")",
";",
"int",
"endPos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameRBRACKET",
",",
"elemEnd",
")",
";",
"if",
"(",
"changeKind",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"doTextRemoveAndVisit",
"(",
"offset",
",",
"endPos",
"-",
"offset",
",",
"elem",
",",
"editGroup",
")",
";",
"}",
"else",
"if",
"(",
"changeKind",
"==",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"editGroup",
"=",
"getEditGroup",
"(",
"event",
")",
";",
"SourceRange",
"range",
"=",
"getExtendedRange",
"(",
"elem",
")",
";",
"int",
"elemOffset",
"=",
"range",
".",
"getStartPosition",
"(",
")",
";",
"int",
"elemLength",
"=",
"range",
".",
"getLength",
"(",
")",
";",
"doTextRemoveAndVisit",
"(",
"elemOffset",
",",
"elemLength",
",",
"elem",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"elemOffset",
",",
"(",
"ASTNode",
")",
"event",
".",
"getNewValue",
"(",
")",
",",
"0",
",",
"false",
",",
"editGroup",
")",
";",
"nNewBrackets",
"--",
";",
"}",
"else",
"{",
"voidVisit",
"(",
"elem",
")",
";",
"nNewBrackets",
"--",
";",
"}",
"offset",
"=",
"endPos",
";",
"nOldBrackets",
"--",
";",
"}",
"}",
"}",
"else",
"{",
"offset",
"=",
"doVisit",
"(",
"node",
",",
"ArrayCreation",
".",
"DIMENSIONS_PROPERTY",
",",
"offset",
")",
";",
"}",
"if",
"(",
"nOldBrackets",
"!=",
"nNewBrackets",
")",
"{",
"if",
"(",
"!",
"hasDimensionChanges",
")",
"{",
"offset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameRBRACKET",
",",
"offset",
")",
";",
"}",
"rewriteExtraDimensions",
"(",
"nOldBrackets",
",",
"nNewBrackets",
",",
"offset",
",",
"editGroup",
")",
";",
"}",
"int",
"kind",
"=",
"getChangeKind",
"(",
"node",
",",
"ArrayCreation",
".",
"INITIALIZER_PROPERTY",
")",
";",
"if",
"(",
"kind",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"offset",
"=",
"getScanner",
"(",
")",
".",
"getPreviousTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLBRACE",
",",
"offset",
")",
";",
"}",
"else",
"{",
"offset",
"=",
"node",
".",
"getStartPosition",
"(",
")",
"+",
"node",
".",
"getLength",
"(",
")",
";",
"}",
"rewriteNode",
"(",
"node",
",",
"ArrayCreation",
".",
"INITIALIZER_PROPERTY",
",",
"offset",
",",
"ASTRewriteFormatter",
".",
"SPACE",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"false",
";",
"}",
"private",
"Type",
"getElementType",
"(",
"ArrayType",
"parent",
")",
"{",
"Type",
"t",
"=",
"(",
"Type",
")",
"getOriginalValue",
"(",
"parent",
",",
"ArrayType",
".",
"COMPONENT_TYPE_PROPERTY",
")",
";",
"while",
"(",
"t",
".",
"isArrayType",
"(",
")",
")",
"{",
"t",
"=",
"(",
"Type",
")",
"getOriginalValue",
"(",
"t",
",",
"ArrayType",
".",
"COMPONENT_TYPE_PROPERTY",
")",
";",
"}",
"return",
"t",
";",
"}",
"private",
"int",
"getDimensions",
"(",
"ArrayType",
"parent",
")",
"{",
"Type",
"t",
"=",
"(",
"Type",
")",
"getOriginalValue",
"(",
"parent",
",",
"ArrayType",
".",
"COMPONENT_TYPE_PROPERTY",
")",
";",
"int",
"dimensions",
"=",
"1",
";",
"while",
"(",
"t",
".",
"isArrayType",
"(",
")",
")",
"{",
"dimensions",
"++",
";",
"t",
"=",
"(",
"Type",
")",
"getOriginalValue",
"(",
"t",
",",
"ArrayType",
".",
"COMPONENT_TYPE_PROPERTY",
")",
";",
"}",
"return",
"dimensions",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayInitializer",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"startPos",
"=",
"getPosAfterLeftBrace",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"ArrayInitializer",
".",
"EXPRESSIONS_PROPERTY",
",",
"startPos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayType",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"ArrayType",
".",
"COMPONENT_TYPE_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AssertStatement",
"node",
")",
"{",
"try",
"{",
"this",
".",
"beforeRequiredSpaceIndex",
"=",
"getScanner",
"(",
")",
".",
"getNextEndOffset",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"true",
")",
";",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"ensureSpaceBeforeReplace",
"(",
"node",
")",
";",
"int",
"offset",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"AssertStatement",
".",
"EXPRESSION_PROPERTY",
")",
";",
"rewriteNode",
"(",
"node",
",",
"AssertStatement",
".",
"MESSAGE_PROPERTY",
",",
"offset",
",",
"ASTRewriteFormatter",
".",
"ASSERT_COMMENT",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Assignment",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"Assignment",
".",
"LEFT_HAND_SIDE_PROPERTY",
")",
";",
"rewriteOperation",
"(",
"node",
",",
"Assignment",
".",
"OPERATOR_PROPERTY",
",",
"pos",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"Assignment",
".",
"RIGHT_HAND_SIDE_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"BooleanLiteral",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"Boolean",
"newLiteral",
"=",
"(",
"Boolean",
")",
"getNewValue",
"(",
"node",
",",
"BooleanLiteral",
".",
"BOOLEAN_VALUE_PROPERTY",
")",
";",
"TextEditGroup",
"group",
"=",
"getEditGroup",
"(",
"node",
",",
"BooleanLiteral",
".",
"BOOLEAN_VALUE_PROPERTY",
")",
";",
"doTextReplace",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"node",
".",
"getLength",
"(",
")",
",",
"newLiteral",
".",
"toString",
"(",
")",
",",
"group",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"BreakStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"try",
"{",
"int",
"offset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNamebreak",
",",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"rewriteNode",
"(",
"node",
",",
"BreakStatement",
".",
"LABEL_PROPERTY",
",",
"offset",
",",
"ASTRewriteFormatter",
".",
"SPACE",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"CastExpression",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"CastExpression",
".",
"TYPE_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"CastExpression",
".",
"EXPRESSION_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"CatchClause",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"CatchClause",
".",
"EXCEPTION_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"CatchClause",
".",
"BODY_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"CharacterLiteral",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"String",
"escapedSeq",
"=",
"(",
"String",
")",
"getNewValue",
"(",
"node",
",",
"CharacterLiteral",
".",
"ESCAPED_VALUE_PROPERTY",
")",
";",
"TextEditGroup",
"group",
"=",
"getEditGroup",
"(",
"node",
",",
"CharacterLiteral",
".",
"ESCAPED_VALUE_PROPERTY",
")",
";",
"doTextReplace",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"node",
".",
"getLength",
"(",
")",
",",
"escapedSeq",
",",
"group",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ClassInstanceCreation",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteOptionalQualifier",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"EXPRESSION_PROPERTY",
",",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"NAME_PROPERTY",
")",
";",
"}",
"else",
"{",
"if",
"(",
"isChanged",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"TYPE_ARGUMENTS_PROPERTY",
")",
")",
"{",
"try",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNamenew",
",",
"pos",
")",
";",
"rewriteOptionalTypeParameters",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"TYPE_ARGUMENTS_PROPERTY",
",",
"pos",
",",
"\"",
"\"",
",",
"true",
",",
"true",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"TYPE_ARGUMENTS_PROPERTY",
")",
";",
"}",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"TYPE_PROPERTY",
")",
";",
"}",
"if",
"(",
"isChanged",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"ARGUMENTS_PROPERTY",
")",
")",
"{",
"try",
"{",
"int",
"startpos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLPAREN",
",",
"pos",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"ARGUMENTS_PROPERTY",
",",
"startpos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"ARGUMENTS_PROPERTY",
")",
";",
"}",
"int",
"kind",
"=",
"getChangeKind",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"ANONYMOUS_CLASS_DECLARATION_PROPERTY",
")",
";",
"if",
"(",
"kind",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"try",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getPreviousTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLBRACE",
",",
"pos",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"pos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
"+",
"node",
".",
"getLength",
"(",
")",
";",
"}",
"rewriteNode",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"ANONYMOUS_CLASS_DECLARATION_PROPERTY",
",",
"pos",
",",
"ASTRewriteFormatter",
".",
"SPACE",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ConditionalExpression",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"ConditionalExpression",
".",
"EXPRESSION_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"ConditionalExpression",
".",
"THEN_EXPRESSION_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"ConditionalExpression",
".",
"ELSE_EXPRESSION_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ConstructorInvocation",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"pos",
"=",
"rewriteOptionalTypeParameters",
"(",
"node",
",",
"ConstructorInvocation",
".",
"TYPE_ARGUMENTS_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"false",
",",
"false",
")",
";",
"}",
"try",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLPAREN",
",",
"pos",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"ConstructorInvocation",
".",
"ARGUMENTS_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ContinueStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"try",
"{",
"int",
"offset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNamecontinue",
",",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"rewriteNode",
"(",
"node",
",",
"ContinueStatement",
".",
"LABEL_PROPERTY",
",",
"offset",
",",
"ASTRewriteFormatter",
".",
"SPACE",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"DoStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
";",
"try",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"node",
",",
"DoStatement",
".",
"BODY_PROPERTY",
")",
";",
"if",
"(",
"event",
"!=",
"null",
"&&",
"event",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"int",
"startOffset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNamedo",
",",
"pos",
")",
";",
"ASTNode",
"body",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"int",
"bodyEnd",
"=",
"body",
".",
"getStartPosition",
"(",
")",
"+",
"body",
".",
"getLength",
"(",
")",
";",
"int",
"endPos",
"=",
"getScanner",
"(",
")",
".",
"getTokenStartOffset",
"(",
"TerminalTokens",
".",
"TokenNamewhile",
",",
"bodyEnd",
")",
";",
"rewriteBodyNode",
"(",
"node",
",",
"DoStatement",
".",
"BODY_PROPERTY",
",",
"startOffset",
",",
"endPos",
",",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
",",
"this",
".",
"formatter",
".",
"DO_BLOCK",
")",
";",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"DoStatement",
".",
"BODY_PROPERTY",
")",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"DoStatement",
".",
"EXPRESSION_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EmptyStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"changeNotSupported",
"(",
"node",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ExpressionStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"ExpressionStatement",
".",
"EXPRESSION_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"FieldAccess",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"FieldAccess",
".",
"EXPRESSION_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"FieldAccess",
".",
"NAME_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"FieldDeclaration",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteJavadoc",
"(",
"node",
",",
"FieldDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"rewriteModifiers",
"(",
"node",
",",
"FieldDeclaration",
".",
"MODIFIERS_PROPERTY",
",",
"pos",
")",
";",
"}",
"else",
"{",
"rewriteModifiers2",
"(",
"node",
",",
"FieldDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"pos",
")",
";",
"}",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"FieldDeclaration",
".",
"TYPE_PROPERTY",
")",
";",
"ensureSpaceAfterReplace",
"(",
"node",
",",
"FieldDeclaration",
".",
"TYPE_PROPERTY",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"FieldDeclaration",
".",
"FRAGMENTS_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ForStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"try",
"{",
"int",
"pos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
";",
"if",
"(",
"isChanged",
"(",
"node",
",",
"ForStatement",
".",
"INITIALIZERS_PROPERTY",
")",
")",
"{",
"int",
"startOffset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLPAREN",
",",
"pos",
")",
";",
"pos",
"=",
"rewriteNodeList",
"(",
"node",
",",
"ForStatement",
".",
"INITIALIZERS_PROPERTY",
",",
"startOffset",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"}",
"else",
"{",
"pos",
"=",
"doVisit",
"(",
"node",
",",
"ForStatement",
".",
"INITIALIZERS_PROPERTY",
",",
"pos",
")",
";",
"}",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameSEMICOLON",
",",
"pos",
")",
";",
"pos",
"=",
"rewriteNode",
"(",
"node",
",",
"ForStatement",
".",
"EXPRESSION_PROPERTY",
",",
"pos",
",",
"ASTRewriteFormatter",
".",
"NONE",
")",
";",
"if",
"(",
"isChanged",
"(",
"node",
",",
"ForStatement",
".",
"UPDATERS_PROPERTY",
")",
")",
"{",
"int",
"startOffset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameSEMICOLON",
",",
"pos",
")",
";",
"pos",
"=",
"rewriteNodeList",
"(",
"node",
",",
"ForStatement",
".",
"UPDATERS_PROPERTY",
",",
"startOffset",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"}",
"else",
"{",
"pos",
"=",
"doVisit",
"(",
"node",
",",
"ForStatement",
".",
"UPDATERS_PROPERTY",
",",
"pos",
")",
";",
"}",
"RewriteEvent",
"bodyEvent",
"=",
"getEvent",
"(",
"node",
",",
"ForStatement",
".",
"BODY_PROPERTY",
")",
";",
"if",
"(",
"bodyEvent",
"!=",
"null",
"&&",
"bodyEvent",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"int",
"startOffset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameRPAREN",
",",
"pos",
")",
";",
"rewriteBodyNode",
"(",
"node",
",",
"ForStatement",
".",
"BODY_PROPERTY",
",",
"startOffset",
",",
"-",
"1",
",",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
",",
"this",
".",
"formatter",
".",
"FOR_BLOCK",
")",
";",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"ForStatement",
".",
"BODY_PROPERTY",
")",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"IfStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"IfStatement",
".",
"EXPRESSION_PROPERTY",
")",
";",
"RewriteEvent",
"thenEvent",
"=",
"getEvent",
"(",
"node",
",",
"IfStatement",
".",
"THEN_STATEMENT_PROPERTY",
")",
";",
"int",
"elseChange",
"=",
"getChangeKind",
"(",
"node",
",",
"IfStatement",
".",
"ELSE_STATEMENT_PROPERTY",
")",
";",
"if",
"(",
"thenEvent",
"!=",
"null",
"&&",
"thenEvent",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"try",
"{",
"int",
"tok",
"=",
"getScanner",
"(",
")",
".",
"readNext",
"(",
"pos",
",",
"true",
")",
";",
"pos",
"=",
"(",
"tok",
"==",
"TerminalTokens",
".",
"TokenNameRPAREN",
")",
"?",
"getScanner",
"(",
")",
".",
"getCurrentEndOffset",
"(",
")",
":",
"getScanner",
"(",
")",
".",
"getCurrentStartOffset",
"(",
")",
";",
"int",
"indent",
"=",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"int",
"endPos",
"=",
"-",
"1",
";",
"Object",
"elseStatement",
"=",
"getOriginalValue",
"(",
"node",
",",
"IfStatement",
".",
"ELSE_STATEMENT_PROPERTY",
")",
";",
"if",
"(",
"elseStatement",
"!=",
"null",
")",
"{",
"ASTNode",
"thenStatement",
"=",
"(",
"ASTNode",
")",
"thenEvent",
".",
"getOriginalValue",
"(",
")",
";",
"endPos",
"=",
"getScanner",
"(",
")",
".",
"getTokenStartOffset",
"(",
"TerminalTokens",
".",
"TokenNameelse",
",",
"thenStatement",
".",
"getStartPosition",
"(",
")",
"+",
"thenStatement",
".",
"getLength",
"(",
")",
")",
";",
"}",
"if",
"(",
"elseStatement",
"==",
"null",
"||",
"elseChange",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"pos",
"=",
"rewriteBodyNode",
"(",
"node",
",",
"IfStatement",
".",
"THEN_STATEMENT_PROPERTY",
",",
"pos",
",",
"endPos",
",",
"indent",
",",
"this",
".",
"formatter",
".",
"IF_BLOCK_NO_ELSE",
")",
";",
"}",
"else",
"{",
"pos",
"=",
"rewriteBodyNode",
"(",
"node",
",",
"IfStatement",
".",
"THEN_STATEMENT_PROPERTY",
",",
"pos",
",",
"endPos",
",",
"indent",
",",
"this",
".",
"formatter",
".",
"IF_BLOCK_WITH_ELSE",
")",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"pos",
"=",
"doVisit",
"(",
"node",
",",
"IfStatement",
".",
"THEN_STATEMENT_PROPERTY",
",",
"pos",
")",
";",
"}",
"if",
"(",
"elseChange",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"int",
"indent",
"=",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"Object",
"newThen",
"=",
"getNewValue",
"(",
"node",
",",
"IfStatement",
".",
"THEN_STATEMENT_PROPERTY",
")",
";",
"if",
"(",
"newThen",
"instanceof",
"Block",
")",
"{",
"rewriteBodyNode",
"(",
"node",
",",
"IfStatement",
".",
"ELSE_STATEMENT_PROPERTY",
",",
"pos",
",",
"-",
"1",
",",
"indent",
",",
"this",
".",
"formatter",
".",
"ELSE_AFTER_BLOCK",
")",
";",
"}",
"else",
"{",
"rewriteBodyNode",
"(",
"node",
",",
"IfStatement",
".",
"ELSE_STATEMENT_PROPERTY",
",",
"pos",
",",
"-",
"1",
",",
"indent",
",",
"this",
".",
"formatter",
".",
"ELSE_AFTER_STATEMENT",
")",
";",
"}",
"}",
"else",
"{",
"pos",
"=",
"doVisit",
"(",
"node",
",",
"IfStatement",
".",
"ELSE_STATEMENT_PROPERTY",
",",
"pos",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ImportDeclaration",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"node",
",",
"ImportDeclaration",
".",
"STATIC_PROPERTY",
")",
";",
"if",
"(",
"event",
"!=",
"null",
"&&",
"event",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"try",
"{",
"int",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameimport",
",",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"boolean",
"wasStatic",
"=",
"(",
"(",
"Boolean",
")",
"event",
".",
"getOriginalValue",
"(",
")",
")",
".",
"booleanValue",
"(",
")",
";",
"if",
"(",
"wasStatic",
")",
"{",
"int",
"endPos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNamestatic",
",",
"pos",
")",
";",
"doTextRemove",
"(",
"pos",
",",
"endPos",
"-",
"pos",
",",
"getEditGroup",
"(",
"event",
")",
")",
";",
"}",
"else",
"{",
"doTextInsert",
"(",
"pos",
",",
"\"",
"static\"",
",",
"getEditGroup",
"(",
"event",
")",
")",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"}",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"ImportDeclaration",
".",
"NAME_PROPERTY",
")",
";",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"node",
",",
"ImportDeclaration",
".",
"ON_DEMAND_PROPERTY",
")",
";",
"if",
"(",
"event",
"!=",
"null",
"&&",
"event",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"boolean",
"isOnDemand",
"=",
"(",
"(",
"Boolean",
")",
"event",
".",
"getOriginalValue",
"(",
")",
")",
".",
"booleanValue",
"(",
")",
";",
"if",
"(",
"!",
"isOnDemand",
")",
"{",
"doTextInsert",
"(",
"pos",
",",
"\".*\"",
",",
"getEditGroup",
"(",
"event",
")",
")",
";",
"}",
"else",
"{",
"try",
"{",
"int",
"endPos",
"=",
"getScanner",
"(",
")",
".",
"getTokenStartOffset",
"(",
"TerminalTokens",
".",
"TokenNameSEMICOLON",
",",
"pos",
")",
";",
"doTextRemove",
"(",
"pos",
",",
"endPos",
"-",
"pos",
",",
"getEditGroup",
"(",
"event",
")",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"InfixExpression",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"InfixExpression",
".",
"LEFT_OPERAND_PROPERTY",
")",
";",
"boolean",
"needsNewOperation",
"=",
"isChanged",
"(",
"node",
",",
"InfixExpression",
".",
"OPERATOR_PROPERTY",
")",
";",
"String",
"operation",
"=",
"getNewValue",
"(",
"node",
",",
"InfixExpression",
".",
"OPERATOR_PROPERTY",
")",
".",
"toString",
"(",
")",
";",
"if",
"(",
"needsNewOperation",
")",
"{",
"replaceOperation",
"(",
"pos",
",",
"operation",
",",
"getEditGroup",
"(",
"node",
",",
"InfixExpression",
".",
"OPERATOR_PROPERTY",
")",
")",
";",
"}",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"InfixExpression",
".",
"RIGHT_OPERAND_PROPERTY",
")",
";",
"RewriteEvent",
"event",
"=",
"getEvent",
"(",
"node",
",",
"InfixExpression",
".",
"EXTENDED_OPERANDS_PROPERTY",
")",
";",
"String",
"prefixString",
"=",
"'",
"'",
"+",
"operation",
"+",
"'",
"'",
";",
"if",
"(",
"needsNewOperation",
")",
"{",
"int",
"startPos",
"=",
"pos",
";",
"TextEditGroup",
"editGroup",
"=",
"getEditGroup",
"(",
"node",
",",
"InfixExpression",
".",
"OPERATOR_PROPERTY",
")",
";",
"if",
"(",
"event",
"!=",
"null",
"&&",
"event",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"RewriteEvent",
"[",
"]",
"extendedOperands",
"=",
"event",
".",
"getChildren",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"extendedOperands",
".",
"length",
";",
"i",
"++",
")",
"{",
"RewriteEvent",
"curr",
"=",
"extendedOperands",
"[",
"i",
"]",
";",
"ASTNode",
"elem",
"=",
"(",
"ASTNode",
")",
"curr",
".",
"getOriginalValue",
"(",
")",
";",
"if",
"(",
"elem",
"!=",
"null",
")",
"{",
"if",
"(",
"curr",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"replaceOperation",
"(",
"startPos",
",",
"operation",
",",
"editGroup",
")",
";",
"}",
"startPos",
"=",
"elem",
".",
"getStartPosition",
"(",
")",
"+",
"elem",
".",
"getLength",
"(",
")",
";",
"}",
"}",
"}",
"else",
"{",
"List",
"extendedOperands",
"=",
"(",
"List",
")",
"getOriginalValue",
"(",
"node",
",",
"InfixExpression",
".",
"EXTENDED_OPERANDS_PROPERTY",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"extendedOperands",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"ASTNode",
"elem",
"=",
"(",
"ASTNode",
")",
"extendedOperands",
".",
"get",
"(",
"i",
")",
";",
"replaceOperation",
"(",
"startPos",
",",
"operation",
",",
"editGroup",
")",
";",
"startPos",
"=",
"elem",
".",
"getStartPosition",
"(",
")",
"+",
"elem",
".",
"getLength",
"(",
")",
";",
"}",
"}",
"}",
"rewriteNodeList",
"(",
"node",
",",
"InfixExpression",
".",
"EXTENDED_OPERANDS_PROPERTY",
",",
"pos",
",",
"prefixString",
",",
"prefixString",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Initializer",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteJavadoc",
"(",
"node",
",",
"Initializer",
".",
"JAVADOC_PROPERTY",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"rewriteModifiers",
"(",
"node",
",",
"Initializer",
".",
"MODIFIERS_PROPERTY",
",",
"pos",
")",
";",
"}",
"else",
"{",
"rewriteModifiers2",
"(",
"node",
",",
"Initializer",
".",
"MODIFIERS2_PROPERTY",
",",
"pos",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"Initializer",
".",
"BODY_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"InstanceofExpression",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"InstanceofExpression",
".",
"LEFT_OPERAND_PROPERTY",
")",
";",
"ensureSpaceAfterReplace",
"(",
"node",
",",
"InstanceofExpression",
".",
"LEFT_OPERAND_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"InstanceofExpression",
".",
"RIGHT_OPERAND_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"void",
"ensureSpaceAfterReplace",
"(",
"ASTNode",
"node",
",",
"ChildPropertyDescriptor",
"desc",
")",
"{",
"if",
"(",
"getChangeKind",
"(",
"node",
",",
"desc",
")",
"==",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"int",
"leftOperandEnd",
"=",
"getExtendedEnd",
"(",
"(",
"ASTNode",
")",
"getOriginalValue",
"(",
"node",
",",
"desc",
")",
")",
";",
"try",
"{",
"int",
"offset",
"=",
"getScanner",
"(",
")",
".",
"getNextStartOffset",
"(",
"leftOperandEnd",
",",
"true",
")",
";",
"if",
"(",
"offset",
"==",
"leftOperandEnd",
")",
"{",
"doTextInsert",
"(",
"offset",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"getEditGroup",
"(",
"node",
",",
"desc",
")",
")",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"}",
"public",
"void",
"ensureSpaceBeforeReplace",
"(",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"this",
".",
"beforeRequiredSpaceIndex",
"==",
"-",
"1",
")",
"return",
";",
"List",
"events",
"=",
"this",
".",
"eventStore",
".",
"getChangedPropertieEvents",
"(",
"node",
")",
";",
"for",
"(",
"Iterator",
"iterator",
"=",
"events",
".",
"iterator",
"(",
")",
";",
"iterator",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"RewriteEvent",
"event",
"=",
"(",
"RewriteEvent",
")",
"iterator",
".",
"next",
"(",
")",
";",
"if",
"(",
"event",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"REPLACED",
"&&",
"event",
".",
"getOriginalValue",
"(",
")",
"instanceof",
"ASTNode",
")",
"{",
"if",
"(",
"this",
".",
"beforeRequiredSpaceIndex",
"==",
"getExtendedOffset",
"(",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
")",
")",
"{",
"doTextInsert",
"(",
"this",
".",
"beforeRequiredSpaceIndex",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"getEditGroup",
"(",
"event",
")",
")",
";",
"this",
".",
"beforeRequiredSpaceIndex",
"=",
"-",
"1",
";",
"return",
";",
"}",
"}",
"}",
"if",
"(",
"this",
".",
"beforeRequiredSpaceIndex",
"<",
"getExtendedOffset",
"(",
"node",
")",
")",
"{",
"this",
".",
"beforeRequiredSpaceIndex",
"=",
"-",
"1",
";",
"}",
"}",
"public",
"boolean",
"visit",
"(",
"Javadoc",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"startPos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
"+",
"3",
";",
"String",
"separator",
"=",
"getLineDelimiter",
"(",
")",
"+",
"getIndentAtOffset",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
"+",
"\"",
"*",
"\"",
";",
"rewriteNodeList",
"(",
"node",
",",
"Javadoc",
".",
"TAGS_PROPERTY",
",",
"startPos",
",",
"separator",
",",
"separator",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"LabeledStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"LabeledStatement",
".",
"LABEL_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"LabeledStatement",
".",
"BODY_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodInvocation",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteOptionalQualifier",
"(",
"node",
",",
"MethodInvocation",
".",
"EXPRESSION_PROPERTY",
",",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"pos",
"=",
"rewriteOptionalTypeParameters",
"(",
"node",
",",
"MethodInvocation",
".",
"TYPE_ARGUMENTS_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"false",
",",
"false",
")",
";",
"}",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"MethodInvocation",
".",
"NAME_PROPERTY",
")",
";",
"if",
"(",
"isChanged",
"(",
"node",
",",
"MethodInvocation",
".",
"ARGUMENTS_PROPERTY",
")",
")",
"{",
"try",
"{",
"int",
"startOffset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLPAREN",
",",
"pos",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"MethodInvocation",
".",
"ARGUMENTS_PROPERTY",
",",
"startOffset",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"MethodInvocation",
".",
"ARGUMENTS_PROPERTY",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"NullLiteral",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"changeNotSupported",
"(",
"node",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"NumberLiteral",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"String",
"newLiteral",
"=",
"(",
"String",
")",
"getNewValue",
"(",
"node",
",",
"NumberLiteral",
".",
"TOKEN_PROPERTY",
")",
";",
"TextEditGroup",
"group",
"=",
"getEditGroup",
"(",
"node",
",",
"NumberLiteral",
".",
"TOKEN_PROPERTY",
")",
";",
"doTextReplace",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"node",
".",
"getLength",
"(",
")",
",",
"newLiteral",
",",
"group",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PackageDeclaration",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"int",
"pos",
"=",
"rewriteJavadoc",
"(",
"node",
",",
"PackageDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"rewriteModifiers2",
"(",
"node",
",",
"PackageDeclaration",
".",
"ANNOTATIONS_PROPERTY",
",",
"pos",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"PackageDeclaration",
".",
"NAME_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ParenthesizedExpression",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"ParenthesizedExpression",
".",
"EXPRESSION_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PostfixExpression",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"PostfixExpression",
".",
"OPERAND_PROPERTY",
")",
";",
"rewriteOperation",
"(",
"node",
",",
"PostfixExpression",
".",
"OPERATOR_PROPERTY",
",",
"pos",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PrefixExpression",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteOperation",
"(",
"node",
",",
"PrefixExpression",
".",
"OPERATOR_PROPERTY",
",",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"PrefixExpression",
".",
"OPERAND_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PrimitiveType",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"PrimitiveType",
".",
"Code",
"newCode",
"=",
"(",
"PrimitiveType",
".",
"Code",
")",
"getNewValue",
"(",
"node",
",",
"PrimitiveType",
".",
"PRIMITIVE_TYPE_CODE_PROPERTY",
")",
";",
"TextEditGroup",
"group",
"=",
"getEditGroup",
"(",
"node",
",",
"PrimitiveType",
".",
"PRIMITIVE_TYPE_CODE_PROPERTY",
")",
";",
"doTextReplace",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"node",
".",
"getLength",
"(",
")",
",",
"newCode",
".",
"toString",
"(",
")",
",",
"group",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"QualifiedName",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"QualifiedName",
".",
"QUALIFIER_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"QualifiedName",
".",
"NAME_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SimpleName",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"String",
"newString",
"=",
"(",
"String",
")",
"getNewValue",
"(",
"node",
",",
"SimpleName",
".",
"IDENTIFIER_PROPERTY",
")",
";",
"TextEditGroup",
"group",
"=",
"getEditGroup",
"(",
"node",
",",
"SimpleName",
".",
"IDENTIFIER_PROPERTY",
")",
";",
"doTextReplace",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"node",
".",
"getLength",
"(",
")",
",",
"newString",
",",
"group",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SimpleType",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"SimpleType",
".",
"NAME_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SingleVariableDeclaration",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"rewriteModifiers",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"MODIFIERS_PROPERTY",
",",
"pos",
")",
";",
"}",
"else",
"{",
"rewriteModifiers2",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"pos",
")",
";",
"}",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"TYPE_PROPERTY",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"isChanged",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"VARARGS_PROPERTY",
")",
")",
"{",
"if",
"(",
"getNewValue",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"VARARGS_PROPERTY",
")",
".",
"equals",
"(",
"Boolean",
".",
"TRUE",
")",
")",
"{",
"doTextInsert",
"(",
"pos",
",",
"\"...\"",
",",
"getEditGroup",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"VARARGS_PROPERTY",
")",
")",
";",
"}",
"else",
"{",
"try",
"{",
"int",
"ellipsisEnd",
"=",
"getScanner",
"(",
")",
".",
"getNextEndOffset",
"(",
"pos",
",",
"true",
")",
";",
"doTextRemove",
"(",
"pos",
",",
"ellipsisEnd",
"-",
"pos",
",",
"getEditGroup",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"VARARGS_PROPERTY",
")",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"}",
"if",
"(",
"!",
"node",
".",
"isVarargs",
"(",
")",
")",
"{",
"ensureSpaceAfterReplace",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"TYPE_PROPERTY",
")",
";",
"}",
"}",
"else",
"{",
"ensureSpaceAfterReplace",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"TYPE_PROPERTY",
")",
";",
"}",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"NAME_PROPERTY",
")",
";",
"int",
"extraDims",
"=",
"rewriteExtraDimensions",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"EXTRA_DIMENSIONS_PROPERTY",
",",
"pos",
")",
";",
"if",
"(",
"extraDims",
">",
"0",
")",
"{",
"int",
"kind",
"=",
"getChangeKind",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"INITIALIZER_PROPERTY",
")",
";",
"if",
"(",
"kind",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"try",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getPreviousTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameEQUAL",
",",
"pos",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"pos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
"+",
"node",
".",
"getLength",
"(",
")",
";",
"}",
"}",
"rewriteNode",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"INITIALIZER_PROPERTY",
",",
"pos",
",",
"this",
".",
"formatter",
".",
"VAR_INITIALIZER",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"StringLiteral",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"String",
"escapedSeq",
"=",
"(",
"String",
")",
"getNewValue",
"(",
"node",
",",
"StringLiteral",
".",
"ESCAPED_VALUE_PROPERTY",
")",
";",
"TextEditGroup",
"group",
"=",
"getEditGroup",
"(",
"node",
",",
"StringLiteral",
".",
"ESCAPED_VALUE_PROPERTY",
")",
";",
"doTextReplace",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"node",
".",
"getLength",
"(",
")",
",",
"escapedSeq",
",",
"group",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SuperConstructorInvocation",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteOptionalQualifier",
"(",
"node",
",",
"SuperConstructorInvocation",
".",
"EXPRESSION_PROPERTY",
",",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"pos",
"=",
"rewriteOptionalTypeParameters",
"(",
"node",
",",
"SuperConstructorInvocation",
".",
"TYPE_ARGUMENTS_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"false",
",",
"false",
")",
";",
"}",
"if",
"(",
"isChanged",
"(",
"node",
",",
"SuperConstructorInvocation",
".",
"ARGUMENTS_PROPERTY",
")",
")",
"{",
"try",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLPAREN",
",",
"pos",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"SuperConstructorInvocation",
".",
"ARGUMENTS_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"SuperConstructorInvocation",
".",
"ARGUMENTS_PROPERTY",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SuperFieldAccess",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteOptionalQualifier",
"(",
"node",
",",
"SuperFieldAccess",
".",
"QUALIFIER_PROPERTY",
",",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"SuperFieldAccess",
".",
"NAME_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SuperMethodInvocation",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteOptionalQualifier",
"(",
"node",
",",
"SuperMethodInvocation",
".",
"QUALIFIER_PROPERTY",
",",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"isChanged",
"(",
"node",
",",
"SuperMethodInvocation",
".",
"TYPE_ARGUMENTS_PROPERTY",
")",
")",
"{",
"try",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameDOT",
",",
"pos",
")",
";",
"rewriteOptionalTypeParameters",
"(",
"node",
",",
"SuperMethodInvocation",
".",
"TYPE_ARGUMENTS_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"false",
",",
"false",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"}",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"SuperMethodInvocation",
".",
"NAME_PROPERTY",
")",
";",
"if",
"(",
"isChanged",
"(",
"node",
",",
"SuperMethodInvocation",
".",
"ARGUMENTS_PROPERTY",
")",
")",
"{",
"try",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLPAREN",
",",
"pos",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"SuperMethodInvocation",
".",
"ARGUMENTS_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"SuperMethodInvocation",
".",
"ARGUMENTS_PROPERTY",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SwitchCase",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"SwitchCase",
".",
"EXPRESSION_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"class",
"SwitchListRewriter",
"extends",
"ParagraphListRewriter",
"{",
"private",
"boolean",
"indentSwitchStatementsCompareToCases",
";",
"public",
"SwitchListRewriter",
"(",
"int",
"initialIndent",
")",
"{",
"super",
"(",
"initialIndent",
",",
"0",
")",
";",
"this",
".",
"indentSwitchStatementsCompareToCases",
"=",
"DefaultCodeFormatterConstants",
".",
"TRUE",
".",
"equals",
"(",
"ASTRewriteAnalyzer",
".",
"this",
".",
"options",
".",
"get",
"(",
"DefaultCodeFormatterConstants",
".",
"FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_CASES",
")",
")",
";",
"}",
"protected",
"int",
"getNodeIndent",
"(",
"int",
"nodeIndex",
")",
"{",
"int",
"indent",
"=",
"getInitialIndent",
"(",
")",
";",
"if",
"(",
"this",
".",
"indentSwitchStatementsCompareToCases",
")",
"{",
"RewriteEvent",
"event",
"=",
"this",
".",
"list",
"[",
"nodeIndex",
"]",
";",
"int",
"changeKind",
"=",
"event",
".",
"getChangeKind",
"(",
")",
";",
"ASTNode",
"node",
";",
"if",
"(",
"changeKind",
"==",
"RewriteEvent",
".",
"INSERTED",
"||",
"changeKind",
"==",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getNewValue",
"(",
")",
";",
"}",
"else",
"{",
"node",
"=",
"(",
"ASTNode",
")",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"}",
"if",
"(",
"node",
".",
"getNodeType",
"(",
")",
"!=",
"ASTNode",
".",
"SWITCH_CASE",
")",
"{",
"indent",
"++",
";",
"}",
"}",
"return",
"indent",
";",
"}",
"protected",
"String",
"getSeparatorString",
"(",
"int",
"nodeIndex",
")",
"{",
"int",
"total",
"=",
"this",
".",
"list",
".",
"length",
";",
"int",
"nextNodeIndex",
"=",
"nodeIndex",
"+",
"1",
";",
"while",
"(",
"nextNodeIndex",
"<",
"total",
"&&",
"this",
".",
"list",
"[",
"nextNodeIndex",
"]",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"nextNodeIndex",
"++",
";",
"}",
"if",
"(",
"nextNodeIndex",
"==",
"total",
")",
"{",
"return",
"super",
".",
"getSeparatorString",
"(",
"nodeIndex",
")",
";",
"}",
"return",
"getSeparatorString",
"(",
"nodeIndex",
",",
"nextNodeIndex",
")",
";",
"}",
"protected",
"void",
"updateIndent",
"(",
"int",
"prevMark",
",",
"int",
"originalOffset",
",",
"int",
"nodeIndex",
",",
"TextEditGroup",
"editGroup",
")",
"{",
"if",
"(",
"prevMark",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
"&&",
"prevMark",
"!=",
"RewriteEvent",
".",
"REPLACED",
")",
"return",
";",
"int",
"previousNonRemovedNodeIndex",
"=",
"nodeIndex",
"-",
"1",
";",
"while",
"(",
"previousNonRemovedNodeIndex",
">=",
"0",
"&&",
"this",
".",
"list",
"[",
"previousNonRemovedNodeIndex",
"]",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"previousNonRemovedNodeIndex",
"--",
";",
"}",
"if",
"(",
"previousNonRemovedNodeIndex",
">",
"-",
"1",
")",
"{",
"LineInformation",
"lineInformation",
"=",
"getLineInformation",
"(",
")",
";",
"RewriteEvent",
"prevEvent",
"=",
"this",
".",
"list",
"[",
"previousNonRemovedNodeIndex",
"]",
";",
"int",
"prevKind",
"=",
"prevEvent",
".",
"getChangeKind",
"(",
")",
";",
"if",
"(",
"prevKind",
"==",
"RewriteEvent",
".",
"UNCHANGED",
"||",
"prevKind",
"==",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"ASTNode",
"prevNode",
"=",
"(",
"ASTNode",
")",
"this",
".",
"list",
"[",
"previousNonRemovedNodeIndex",
"]",
".",
"getOriginalValue",
"(",
")",
";",
"int",
"prevEndPosition",
"=",
"prevNode",
".",
"getStartPosition",
"(",
")",
"+",
"prevNode",
".",
"getLength",
"(",
")",
";",
"int",
"prevLine",
"=",
"lineInformation",
".",
"getLineOfOffset",
"(",
"prevEndPosition",
")",
";",
"int",
"line",
"=",
"lineInformation",
".",
"getLineOfOffset",
"(",
"originalOffset",
")",
";",
"if",
"(",
"prevLine",
"==",
"line",
")",
"{",
"return",
";",
"}",
"}",
"}",
"int",
"total",
"=",
"this",
".",
"list",
".",
"length",
";",
"while",
"(",
"nodeIndex",
"<",
"total",
"&&",
"this",
".",
"list",
"[",
"nodeIndex",
"]",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"nodeIndex",
"++",
";",
"}",
"int",
"originalIndent",
"=",
"getIndent",
"(",
"originalOffset",
")",
";",
"int",
"newIndent",
"=",
"getNodeIndent",
"(",
"nodeIndex",
")",
";",
"if",
"(",
"originalIndent",
"!=",
"newIndent",
")",
"{",
"int",
"line",
"=",
"getLineInformation",
"(",
")",
".",
"getLineOfOffset",
"(",
"originalOffset",
")",
";",
"if",
"(",
"line",
">=",
"0",
")",
"{",
"int",
"lineStart",
"=",
"getLineInformation",
"(",
")",
".",
"getLineOffset",
"(",
"line",
")",
";",
"doTextRemove",
"(",
"lineStart",
",",
"originalOffset",
"-",
"lineStart",
",",
"editGroup",
")",
";",
"doTextInsert",
"(",
"lineStart",
",",
"createIndentString",
"(",
"newIndent",
")",
",",
"editGroup",
")",
";",
"}",
"}",
"}",
"}",
"public",
"boolean",
"visit",
"(",
"SwitchStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"SwitchStatement",
".",
"EXPRESSION_PROPERTY",
")",
";",
"ChildListPropertyDescriptor",
"property",
"=",
"SwitchStatement",
".",
"STATEMENTS_PROPERTY",
";",
"if",
"(",
"getChangeKind",
"(",
"node",
",",
"property",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"try",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLBRACE",
",",
"pos",
")",
";",
"int",
"insertIndent",
"=",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"if",
"(",
"DefaultCodeFormatterConstants",
".",
"TRUE",
".",
"equals",
"(",
"this",
".",
"options",
".",
"get",
"(",
"DefaultCodeFormatterConstants",
".",
"FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_SWITCH",
")",
")",
")",
"{",
"insertIndent",
"++",
";",
"}",
"ParagraphListRewriter",
"listRewriter",
"=",
"new",
"SwitchListRewriter",
"(",
"insertIndent",
")",
";",
"StringBuffer",
"leadString",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"leadString",
".",
"append",
"(",
"getLineDelimiter",
"(",
")",
")",
";",
"leadString",
".",
"append",
"(",
"createIndentString",
"(",
"insertIndent",
")",
")",
";",
"listRewriter",
".",
"rewriteList",
"(",
"node",
",",
"property",
",",
"pos",
",",
"leadString",
".",
"toString",
"(",
")",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"SwitchStatement",
".",
"STATEMENTS_PROPERTY",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SynchronizedStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"SynchronizedStatement",
".",
"EXPRESSION_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"SynchronizedStatement",
".",
"BODY_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ThisExpression",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteOptionalQualifier",
"(",
"node",
",",
"ThisExpression",
".",
"QUALIFIER_PROPERTY",
",",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ThrowStatement",
"node",
")",
"{",
"try",
"{",
"this",
".",
"beforeRequiredSpaceIndex",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNamethrow",
",",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"ensureSpaceBeforeReplace",
"(",
"node",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"ThrowStatement",
".",
"EXPRESSION_PROPERTY",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TryStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS4",
")",
"{",
"if",
"(",
"isChanged",
"(",
"node",
",",
"TryStatement",
".",
"RESOURCES_PROPERTY",
")",
")",
"{",
"int",
"indent",
"=",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"String",
"prefix",
"=",
"this",
".",
"formatter",
".",
"TRY_RESOURCES",
".",
"getPrefix",
"(",
"indent",
")",
";",
"String",
"newParen",
"=",
"this",
".",
"formatter",
".",
"TRY_RESOURCES_PAREN",
".",
"getPrefix",
"(",
"indent",
")",
"+",
"\"(\"",
";",
"pos",
"=",
"rewriteNodeList",
"(",
"node",
",",
"TryStatement",
".",
"RESOURCES_PROPERTY",
",",
"getPosAfterTry",
"(",
"pos",
")",
",",
"newParen",
",",
"\")\"",
",",
"\";\"",
"+",
"prefix",
")",
";",
"}",
"else",
"{",
"pos",
"=",
"doVisit",
"(",
"node",
",",
"TryStatement",
".",
"RESOURCES_PROPERTY",
",",
"pos",
")",
";",
"}",
"}",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"TryStatement",
".",
"BODY_PROPERTY",
")",
";",
"if",
"(",
"isChanged",
"(",
"node",
",",
"TryStatement",
".",
"CATCH_CLAUSES_PROPERTY",
")",
")",
"{",
"int",
"indent",
"=",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
";",
"String",
"prefix",
"=",
"this",
".",
"formatter",
".",
"CATCH_BLOCK",
".",
"getPrefix",
"(",
"indent",
")",
";",
"pos",
"=",
"rewriteNodeList",
"(",
"node",
",",
"TryStatement",
".",
"CATCH_CLAUSES_PROPERTY",
",",
"pos",
",",
"prefix",
",",
"prefix",
")",
";",
"}",
"else",
"{",
"pos",
"=",
"doVisit",
"(",
"node",
",",
"TryStatement",
".",
"CATCH_CLAUSES_PROPERTY",
",",
"pos",
")",
";",
"}",
"rewriteNode",
"(",
"node",
",",
"TryStatement",
".",
"FINALLY_PROPERTY",
",",
"pos",
",",
"this",
".",
"formatter",
".",
"FINALLY_BLOCK",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeDeclarationStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"rewriteRequiredNode",
"(",
"node",
",",
"TypeDeclarationStatement",
".",
"TYPE_DECLARATION_PROPERTY",
")",
";",
"}",
"else",
"{",
"rewriteRequiredNode",
"(",
"node",
",",
"TypeDeclarationStatement",
".",
"DECLARATION_PROPERTY",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeLiteral",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"TypeLiteral",
".",
"TYPE_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"UnionType",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
";",
"if",
"(",
"isChanged",
"(",
"node",
",",
"UnionType",
".",
"TYPES_PROPERTY",
")",
")",
"{",
"pos",
"=",
"rewriteNodeList",
"(",
"node",
",",
"UnionType",
".",
"TYPES_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\"",
"|",
"\"",
")",
";",
"}",
"else",
"{",
"pos",
"=",
"doVisit",
"(",
"node",
",",
"UnionType",
".",
"TYPES_PROPERTY",
",",
"pos",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"VariableDeclarationExpression",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"rewriteModifiers",
"(",
"node",
",",
"VariableDeclarationExpression",
".",
"MODIFIERS_PROPERTY",
",",
"pos",
")",
";",
"}",
"else",
"{",
"rewriteModifiers2",
"(",
"node",
",",
"VariableDeclarationExpression",
".",
"MODIFIERS2_PROPERTY",
",",
"pos",
")",
";",
"}",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"VariableDeclarationExpression",
".",
"TYPE_PROPERTY",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"VariableDeclarationExpression",
".",
"FRAGMENTS_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"VariableDeclarationFragment",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"VariableDeclarationFragment",
".",
"NAME_PROPERTY",
")",
";",
"int",
"extraDims",
"=",
"rewriteExtraDimensions",
"(",
"node",
",",
"VariableDeclarationFragment",
".",
"EXTRA_DIMENSIONS_PROPERTY",
",",
"pos",
")",
";",
"if",
"(",
"extraDims",
">",
"0",
")",
"{",
"int",
"kind",
"=",
"getChangeKind",
"(",
"node",
",",
"VariableDeclarationFragment",
".",
"INITIALIZER_PROPERTY",
")",
";",
"if",
"(",
"kind",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"try",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getPreviousTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameEQUAL",
",",
"pos",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"pos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
"+",
"node",
".",
"getLength",
"(",
")",
";",
"}",
"}",
"rewriteNode",
"(",
"node",
",",
"VariableDeclarationFragment",
".",
"INITIALIZER_PROPERTY",
",",
"pos",
",",
"this",
".",
"formatter",
".",
"VAR_INITIALIZER",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"VariableDeclarationStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"rewriteModifiers",
"(",
"node",
",",
"VariableDeclarationStatement",
".",
"MODIFIERS_PROPERTY",
",",
"pos",
")",
";",
"}",
"else",
"{",
"rewriteModifiers2",
"(",
"node",
",",
"VariableDeclarationStatement",
".",
"MODIFIERS2_PROPERTY",
",",
"pos",
")",
";",
"}",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"VariableDeclarationStatement",
".",
"TYPE_PROPERTY",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"VariableDeclarationStatement",
".",
"FRAGMENTS_PROPERTY",
",",
"pos",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"WhileStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"WhileStatement",
".",
"EXPRESSION_PROPERTY",
")",
";",
"try",
"{",
"if",
"(",
"isChanged",
"(",
"node",
",",
"WhileStatement",
".",
"BODY_PROPERTY",
")",
")",
"{",
"int",
"startOffset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameRPAREN",
",",
"pos",
")",
";",
"rewriteBodyNode",
"(",
"node",
",",
"WhileStatement",
".",
"BODY_PROPERTY",
",",
"startOffset",
",",
"-",
"1",
",",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
",",
"this",
".",
"formatter",
".",
"WHILE_BLOCK",
")",
";",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"WhileStatement",
".",
"BODY_PROPERTY",
")",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MemberRef",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteNode",
"(",
"node",
",",
"MemberRef",
".",
"QUALIFIER_PROPERTY",
",",
"node",
".",
"getStartPosition",
"(",
")",
",",
"ASTRewriteFormatter",
".",
"NONE",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"MemberRef",
".",
"NAME_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodRef",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteNode",
"(",
"node",
",",
"MethodRef",
".",
"QUALIFIER_PROPERTY",
",",
"node",
".",
"getStartPosition",
"(",
")",
",",
"ASTRewriteFormatter",
".",
"NONE",
")",
";",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"MethodRef",
".",
"NAME_PROPERTY",
")",
";",
"if",
"(",
"isChanged",
"(",
"node",
",",
"MethodRef",
".",
"PARAMETERS_PROPERTY",
")",
")",
"{",
"try",
"{",
"int",
"startOffset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLPAREN",
",",
"pos",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"MethodRef",
".",
"PARAMETERS_PROPERTY",
",",
"startOffset",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"MethodRef",
".",
"PARAMETERS_PROPERTY",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodRefParameter",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"MethodRefParameter",
".",
"TYPE_PROPERTY",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"isChanged",
"(",
"node",
",",
"MethodRefParameter",
".",
"VARARGS_PROPERTY",
")",
")",
"{",
"if",
"(",
"getNewValue",
"(",
"node",
",",
"MethodRefParameter",
".",
"VARARGS_PROPERTY",
")",
".",
"equals",
"(",
"Boolean",
".",
"TRUE",
")",
")",
"{",
"doTextInsert",
"(",
"pos",
",",
"\"...\"",
",",
"getEditGroup",
"(",
"node",
",",
"MethodRefParameter",
".",
"VARARGS_PROPERTY",
")",
")",
";",
"}",
"else",
"{",
"try",
"{",
"int",
"ellipsisEnd",
"=",
"getScanner",
"(",
")",
".",
"getNextEndOffset",
"(",
"pos",
",",
"true",
")",
";",
"doTextRemove",
"(",
"pos",
",",
"ellipsisEnd",
"-",
"pos",
",",
"getEditGroup",
"(",
"node",
",",
"MethodRefParameter",
".",
"VARARGS_PROPERTY",
")",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"}",
"}",
"rewriteNode",
"(",
"node",
",",
"MethodRefParameter",
".",
"NAME_PROPERTY",
",",
"pos",
",",
"ASTRewriteFormatter",
".",
"SPACE",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TagElement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"changeKind",
"=",
"getChangeKind",
"(",
"node",
",",
"TagElement",
".",
"TAG_NAME_PROPERTY",
")",
";",
"switch",
"(",
"changeKind",
")",
"{",
"case",
"RewriteEvent",
".",
"INSERTED",
":",
"{",
"String",
"newTagName",
"=",
"(",
"String",
")",
"getNewValue",
"(",
"node",
",",
"TagElement",
".",
"TAG_NAME_PROPERTY",
")",
";",
"doTextInsert",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"newTagName",
",",
"getEditGroup",
"(",
"node",
",",
"TagElement",
".",
"TAG_NAME_PROPERTY",
")",
")",
";",
"break",
";",
"}",
"case",
"RewriteEvent",
".",
"REMOVED",
":",
"{",
"doTextRemove",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"findTagNameEnd",
"(",
"node",
")",
"-",
"node",
".",
"getStartPosition",
"(",
")",
",",
"getEditGroup",
"(",
"node",
",",
"TagElement",
".",
"TAG_NAME_PROPERTY",
")",
")",
";",
"break",
";",
"}",
"case",
"RewriteEvent",
".",
"REPLACED",
":",
"{",
"String",
"newTagName",
"=",
"(",
"String",
")",
"getNewValue",
"(",
"node",
",",
"TagElement",
".",
"TAG_NAME_PROPERTY",
")",
";",
"doTextReplace",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"findTagNameEnd",
"(",
"node",
")",
"-",
"node",
".",
"getStartPosition",
"(",
")",
",",
"newTagName",
",",
"getEditGroup",
"(",
"node",
",",
"TagElement",
".",
"TAG_NAME_PROPERTY",
")",
")",
";",
"break",
";",
"}",
"}",
"if",
"(",
"isChanged",
"(",
"node",
",",
"TagElement",
".",
"FRAGMENTS_PROPERTY",
")",
")",
"{",
"int",
"endOffset",
"=",
"findTagNameEnd",
"(",
"node",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"TagElement",
".",
"FRAGMENTS_PROPERTY",
",",
"endOffset",
",",
"\"",
"\"",
",",
"\"",
"\"",
")",
";",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"TagElement",
".",
"FRAGMENTS_PROPERTY",
")",
";",
"}",
"return",
"false",
";",
"}",
"private",
"int",
"findTagNameEnd",
"(",
"TagElement",
"tagNode",
")",
"{",
"if",
"(",
"tagNode",
".",
"getTagName",
"(",
")",
"!=",
"null",
")",
"{",
"char",
"[",
"]",
"cont",
"=",
"getContent",
"(",
")",
";",
"int",
"len",
"=",
"cont",
".",
"length",
";",
"int",
"i",
"=",
"tagNode",
".",
"getStartPosition",
"(",
")",
";",
"while",
"(",
"i",
"<",
"len",
"&&",
"!",
"IndentManipulation",
".",
"isIndentChar",
"(",
"cont",
"[",
"i",
"]",
")",
")",
"{",
"i",
"++",
";",
"}",
"return",
"i",
";",
"}",
"return",
"tagNode",
".",
"getStartPosition",
"(",
")",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TextElement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"String",
"newText",
"=",
"(",
"String",
")",
"getNewValue",
"(",
"node",
",",
"TextElement",
".",
"TEXT_PROPERTY",
")",
";",
"TextEditGroup",
"group",
"=",
"getEditGroup",
"(",
"node",
",",
"TextElement",
".",
"TEXT_PROPERTY",
")",
";",
"doTextReplace",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"node",
".",
"getLength",
"(",
")",
",",
"newText",
",",
"group",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AnnotationTypeDeclaration",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteJavadoc",
"(",
"node",
",",
"AnnotationTypeDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"rewriteModifiers2",
"(",
"node",
",",
"AnnotationTypeDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"pos",
")",
";",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"AnnotationTypeDeclaration",
".",
"NAME_PROPERTY",
")",
";",
"int",
"startIndent",
"=",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
"+",
"1",
";",
"int",
"startPos",
"=",
"getPosAfterLeftBrace",
"(",
"pos",
")",
";",
"rewriteParagraphList",
"(",
"node",
",",
"AnnotationTypeDeclaration",
".",
"BODY_DECLARATIONS_PROPERTY",
",",
"startPos",
",",
"startIndent",
",",
"-",
"1",
",",
"2",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AnnotationTypeMemberDeclaration",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteJavadoc",
"(",
"node",
",",
"AnnotationTypeMemberDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"rewriteModifiers2",
"(",
"node",
",",
"AnnotationTypeMemberDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"pos",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"AnnotationTypeMemberDeclaration",
".",
"TYPE_PROPERTY",
")",
";",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"AnnotationTypeMemberDeclaration",
".",
"NAME_PROPERTY",
")",
";",
"try",
"{",
"int",
"changeKind",
"=",
"getChangeKind",
"(",
"node",
",",
"AnnotationTypeMemberDeclaration",
".",
"DEFAULT_PROPERTY",
")",
";",
"if",
"(",
"changeKind",
"==",
"RewriteEvent",
".",
"INSERTED",
"||",
"changeKind",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameRPAREN",
",",
"pos",
")",
";",
"}",
"rewriteNode",
"(",
"node",
",",
"AnnotationTypeMemberDeclaration",
".",
"DEFAULT_PROPERTY",
",",
"pos",
",",
"this",
".",
"formatter",
".",
"ANNOT_MEMBER_DEFAULT",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EnhancedForStatement",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"EnhancedForStatement",
".",
"PARAMETER_PROPERTY",
")",
";",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"EnhancedForStatement",
".",
"EXPRESSION_PROPERTY",
")",
";",
"RewriteEvent",
"bodyEvent",
"=",
"getEvent",
"(",
"node",
",",
"EnhancedForStatement",
".",
"BODY_PROPERTY",
")",
";",
"if",
"(",
"bodyEvent",
"!=",
"null",
"&&",
"bodyEvent",
".",
"getChangeKind",
"(",
")",
"==",
"RewriteEvent",
".",
"REPLACED",
")",
"{",
"int",
"startOffset",
";",
"try",
"{",
"startOffset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameRPAREN",
",",
"pos",
")",
";",
"rewriteBodyNode",
"(",
"node",
",",
"EnhancedForStatement",
".",
"BODY_PROPERTY",
",",
"startOffset",
",",
"-",
"1",
",",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
",",
"this",
".",
"formatter",
".",
"FOR_BLOCK",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"EnhancedForStatement",
".",
"BODY_PROPERTY",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EnumConstantDeclaration",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteJavadoc",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"rewriteModifiers2",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"pos",
")",
";",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"NAME_PROPERTY",
")",
";",
"RewriteEvent",
"argsEvent",
"=",
"getEvent",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"ARGUMENTS_PROPERTY",
")",
";",
"if",
"(",
"argsEvent",
"!=",
"null",
"&&",
"argsEvent",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"RewriteEvent",
"[",
"]",
"children",
"=",
"argsEvent",
".",
"getChildren",
"(",
")",
";",
"try",
"{",
"int",
"nextTok",
"=",
"getScanner",
"(",
")",
".",
"readNext",
"(",
"pos",
",",
"true",
")",
";",
"boolean",
"hasParents",
"=",
"(",
"nextTok",
"==",
"TerminalTokens",
".",
"TokenNameLPAREN",
")",
";",
"boolean",
"isAllRemoved",
"=",
"hasParents",
"&&",
"isAllOfKind",
"(",
"children",
",",
"RewriteEvent",
".",
"REMOVED",
")",
";",
"String",
"prefix",
"=",
"Util",
".",
"EMPTY_STRING",
";",
"if",
"(",
"!",
"hasParents",
")",
"{",
"prefix",
"=",
"\"(\"",
";",
"}",
"else",
"if",
"(",
"!",
"isAllRemoved",
")",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getCurrentEndOffset",
"(",
")",
";",
"}",
"pos",
"=",
"rewriteNodeList",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"ARGUMENTS_PROPERTY",
",",
"pos",
",",
"prefix",
",",
"\",",
"\"",
")",
";",
"if",
"(",
"!",
"hasParents",
")",
"{",
"doTextInsert",
"(",
"pos",
",",
"\")\"",
",",
"getEditGroup",
"(",
"children",
"[",
"children",
".",
"length",
"-",
"1",
"]",
")",
")",
";",
"}",
"else",
"if",
"(",
"isAllRemoved",
")",
"{",
"int",
"afterClosing",
"=",
"getScanner",
"(",
")",
".",
"getNextEndOffset",
"(",
"pos",
",",
"true",
")",
";",
"doTextRemove",
"(",
"pos",
",",
"afterClosing",
"-",
"pos",
",",
"getEditGroup",
"(",
"children",
"[",
"children",
".",
"length",
"-",
"1",
"]",
")",
")",
";",
"pos",
"=",
"afterClosing",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"pos",
"=",
"doVisit",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"ARGUMENTS_PROPERTY",
",",
"pos",
")",
";",
"}",
"if",
"(",
"isChanged",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"ANONYMOUS_CLASS_DECLARATION_PROPERTY",
")",
")",
"{",
"int",
"kind",
"=",
"getChangeKind",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"ANONYMOUS_CLASS_DECLARATION_PROPERTY",
")",
";",
"if",
"(",
"kind",
"==",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"try",
"{",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getPreviousTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLBRACE",
",",
"pos",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"pos",
"=",
"node",
".",
"getStartPosition",
"(",
")",
"+",
"node",
".",
"getLength",
"(",
")",
";",
"}",
"rewriteNode",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"ANONYMOUS_CLASS_DECLARATION_PROPERTY",
",",
"pos",
",",
"ASTRewriteFormatter",
".",
"SPACE",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EnumDeclaration",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteJavadoc",
"(",
"node",
",",
"EnumDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"rewriteModifiers2",
"(",
"node",
",",
"EnumDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"pos",
")",
";",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"EnumDeclaration",
".",
"NAME_PROPERTY",
")",
";",
"pos",
"=",
"rewriteNodeList",
"(",
"node",
",",
"EnumDeclaration",
".",
"SUPER_INTERFACE_TYPES_PROPERTY",
",",
"pos",
",",
"\"",
"implements",
"\"",
",",
"\",",
"\"",
")",
";",
"pos",
"=",
"getPosAfterLeftBrace",
"(",
"pos",
")",
";",
"String",
"leadString",
"=",
"Util",
".",
"EMPTY_STRING",
";",
"RewriteEvent",
"constEvent",
"=",
"getEvent",
"(",
"node",
",",
"EnumDeclaration",
".",
"ENUM_CONSTANTS_PROPERTY",
")",
";",
"if",
"(",
"constEvent",
"!=",
"null",
"&&",
"constEvent",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"RewriteEvent",
"[",
"]",
"events",
"=",
"constEvent",
".",
"getChildren",
"(",
")",
";",
"if",
"(",
"isAllOfKind",
"(",
"events",
",",
"RewriteEvent",
".",
"INSERTED",
")",
")",
"{",
"leadString",
"=",
"this",
".",
"formatter",
".",
"FIRST_ENUM_CONST",
".",
"getPrefix",
"(",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
")",
";",
"}",
"}",
"pos",
"=",
"rewriteNodeList",
"(",
"node",
",",
"EnumDeclaration",
".",
"ENUM_CONSTANTS_PROPERTY",
",",
"pos",
",",
"leadString",
",",
"\",",
"\"",
")",
";",
"RewriteEvent",
"bodyEvent",
"=",
"getEvent",
"(",
"node",
",",
"EnumDeclaration",
".",
"BODY_DECLARATIONS_PROPERTY",
")",
";",
"int",
"indent",
"=",
"0",
";",
"if",
"(",
"bodyEvent",
"!=",
"null",
"&&",
"bodyEvent",
".",
"getChangeKind",
"(",
")",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"boolean",
"hasConstants",
"=",
"!",
"(",
"(",
"List",
")",
"getNewValue",
"(",
"node",
",",
"EnumDeclaration",
".",
"ENUM_CONSTANTS_PROPERTY",
")",
")",
".",
"isEmpty",
"(",
")",
";",
"RewriteEvent",
"[",
"]",
"children",
"=",
"bodyEvent",
".",
"getChildren",
"(",
")",
";",
"try",
"{",
"if",
"(",
"hasConstants",
")",
"{",
"indent",
"=",
"getIndent",
"(",
"pos",
")",
";",
"}",
"else",
"{",
"indent",
"=",
"getIndent",
"(",
"node",
".",
"getStartPosition",
"(",
")",
")",
"+",
"1",
";",
"}",
"int",
"token",
"=",
"getScanner",
"(",
")",
".",
"readNext",
"(",
"pos",
",",
"true",
")",
";",
"boolean",
"hasSemicolon",
"=",
"token",
"==",
"TerminalTokens",
".",
"TokenNameSEMICOLON",
";",
"if",
"(",
"!",
"hasSemicolon",
"&&",
"isAllOfKind",
"(",
"children",
",",
"RewriteEvent",
".",
"INSERTED",
")",
")",
"{",
"if",
"(",
"!",
"hasConstants",
")",
"{",
"String",
"str",
"=",
"this",
".",
"formatter",
".",
"FIRST_ENUM_CONST",
".",
"getPrefix",
"(",
"indent",
"-",
"1",
")",
";",
"doTextInsert",
"(",
"pos",
",",
"str",
",",
"getEditGroup",
"(",
"children",
"[",
"0",
"]",
")",
")",
";",
"}",
"if",
"(",
"token",
"==",
"TerminalTokens",
".",
"TokenNameCOMMA",
")",
"{",
"int",
"endPos",
"=",
"getScanner",
"(",
")",
".",
"getCurrentEndOffset",
"(",
")",
";",
"int",
"nextToken",
"=",
"getScanner",
"(",
")",
".",
"readNext",
"(",
"endPos",
",",
"true",
")",
";",
"if",
"(",
"nextToken",
"!=",
"TerminalTokens",
".",
"TokenNameSEMICOLON",
")",
"{",
"doTextInsert",
"(",
"endPos",
",",
"\";\"",
",",
"getEditGroup",
"(",
"children",
"[",
"0",
"]",
")",
")",
";",
"}",
"else",
"{",
"endPos",
"=",
"getScanner",
"(",
")",
".",
"getCurrentEndOffset",
"(",
")",
";",
"if",
"(",
"isAllOfKind",
"(",
"children",
",",
"RewriteEvent",
".",
"REMOVED",
")",
")",
"{",
"doTextRemove",
"(",
"pos",
",",
"endPos",
"-",
"pos",
",",
"getEditGroup",
"(",
"children",
"[",
"0",
"]",
")",
")",
";",
"}",
"}",
"pos",
"=",
"endPos",
";",
"}",
"else",
"{",
"doTextInsert",
"(",
"pos",
",",
"\";\"",
",",
"getEditGroup",
"(",
"children",
"[",
"0",
"]",
")",
")",
";",
"}",
"}",
"else",
"if",
"(",
"hasSemicolon",
")",
"{",
"int",
"endPos",
"=",
"getScanner",
"(",
")",
".",
"getCurrentEndOffset",
"(",
")",
";",
"if",
"(",
"isAllOfKind",
"(",
"children",
",",
"RewriteEvent",
".",
"REMOVED",
")",
")",
"{",
"doTextRemove",
"(",
"pos",
",",
"endPos",
"-",
"pos",
",",
"getEditGroup",
"(",
"children",
"[",
"0",
"]",
")",
")",
";",
"}",
"pos",
"=",
"endPos",
";",
"}",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"rewriteParagraphList",
"(",
"node",
",",
"EnumDeclaration",
".",
"BODY_DECLARATIONS_PROPERTY",
",",
"pos",
",",
"indent",
",",
"-",
"1",
",",
"2",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MarkerAnnotation",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"MarkerAnnotation",
".",
"TYPE_NAME_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MemberValuePair",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"MemberValuePair",
".",
"NAME_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"MemberValuePair",
".",
"VALUE_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Modifier",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"String",
"newText",
"=",
"getNewValue",
"(",
"node",
",",
"Modifier",
".",
"KEYWORD_PROPERTY",
")",
".",
"toString",
"(",
")",
";",
"TextEditGroup",
"group",
"=",
"getEditGroup",
"(",
"node",
",",
"Modifier",
".",
"KEYWORD_PROPERTY",
")",
";",
"doTextReplace",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"node",
".",
"getLength",
"(",
")",
",",
"newText",
",",
"group",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"NormalAnnotation",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"NormalAnnotation",
".",
"TYPE_NAME_PROPERTY",
")",
";",
"if",
"(",
"isChanged",
"(",
"node",
",",
"NormalAnnotation",
".",
"VALUES_PROPERTY",
")",
")",
"{",
"try",
"{",
"int",
"startOffset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLPAREN",
",",
"pos",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"NormalAnnotation",
".",
"VALUES_PROPERTY",
",",
"startOffset",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"NormalAnnotation",
".",
"VALUES_PROPERTY",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ParameterizedType",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"ParameterizedType",
".",
"TYPE_PROPERTY",
")",
";",
"if",
"(",
"isChanged",
"(",
"node",
",",
"ParameterizedType",
".",
"TYPE_ARGUMENTS_PROPERTY",
")",
")",
"{",
"try",
"{",
"int",
"startOffset",
"=",
"getScanner",
"(",
")",
".",
"getTokenEndOffset",
"(",
"TerminalTokens",
".",
"TokenNameLESS",
",",
"pos",
")",
";",
"rewriteNodeList",
"(",
"node",
",",
"ParameterizedType",
".",
"TYPE_ARGUMENTS_PROPERTY",
",",
"startOffset",
",",
"Util",
".",
"EMPTY_STRING",
",",
"\",",
"\"",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"ParameterizedType",
".",
"TYPE_ARGUMENTS_PROPERTY",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"QualifiedType",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"QualifiedType",
".",
"QUALIFIER_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"QualifiedType",
".",
"NAME_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SingleMemberAnnotation",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"rewriteRequiredNode",
"(",
"node",
",",
"SingleMemberAnnotation",
".",
"TYPE_NAME_PROPERTY",
")",
";",
"rewriteRequiredNode",
"(",
"node",
",",
"SingleMemberAnnotation",
".",
"VALUE_PROPERTY",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeParameter",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"int",
"pos",
"=",
"rewriteRequiredNode",
"(",
"node",
",",
"TypeParameter",
".",
"NAME_PROPERTY",
")",
";",
"if",
"(",
"isChanged",
"(",
"node",
",",
"TypeParameter",
".",
"TYPE_BOUNDS_PROPERTY",
")",
")",
"{",
"rewriteNodeList",
"(",
"node",
",",
"TypeParameter",
".",
"TYPE_BOUNDS_PROPERTY",
",",
"pos",
",",
"\"",
"extends",
"\"",
",",
"\"",
"&",
"\"",
")",
";",
"}",
"else",
"{",
"voidVisit",
"(",
"node",
",",
"TypeParameter",
".",
"TYPE_BOUNDS_PROPERTY",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"WildcardType",
"node",
")",
"{",
"if",
"(",
"!",
"hasChildrenChanges",
"(",
"node",
")",
")",
"{",
"return",
"doVisitUnchangedChildren",
"(",
"node",
")",
";",
"}",
"try",
"{",
"int",
"pos",
"=",
"getScanner",
"(",
")",
".",
"getNextEndOffset",
"(",
"node",
".",
"getStartPosition",
"(",
")",
",",
"true",
")",
";",
"Prefix",
"prefix",
";",
"if",
"(",
"Boolean",
".",
"TRUE",
".",
"equals",
"(",
"getNewValue",
"(",
"node",
",",
"WildcardType",
".",
"UPPER_BOUND_PROPERTY",
")",
")",
")",
"{",
"prefix",
"=",
"this",
".",
"formatter",
".",
"WILDCARD_EXTENDS",
";",
"}",
"else",
"{",
"prefix",
"=",
"this",
".",
"formatter",
".",
"WILDCARD_SUPER",
";",
"}",
"int",
"boundKindChange",
"=",
"getChangeKind",
"(",
"node",
",",
"WildcardType",
".",
"UPPER_BOUND_PROPERTY",
")",
";",
"if",
"(",
"boundKindChange",
"!=",
"RewriteEvent",
".",
"UNCHANGED",
")",
"{",
"int",
"boundTypeChange",
"=",
"getChangeKind",
"(",
"node",
",",
"WildcardType",
".",
"BOUND_PROPERTY",
")",
";",
"if",
"(",
"boundTypeChange",
"!=",
"RewriteEvent",
".",
"INSERTED",
"&&",
"boundTypeChange",
"!=",
"RewriteEvent",
".",
"REMOVED",
")",
"{",
"ASTNode",
"type",
"=",
"(",
"ASTNode",
")",
"getOriginalValue",
"(",
"node",
",",
"WildcardType",
".",
"BOUND_PROPERTY",
")",
";",
"String",
"str",
"=",
"prefix",
".",
"getPrefix",
"(",
"0",
")",
";",
"doTextReplace",
"(",
"pos",
",",
"type",
".",
"getStartPosition",
"(",
")",
"-",
"pos",
",",
"str",
",",
"getEditGroup",
"(",
"node",
",",
"WildcardType",
".",
"BOUND_PROPERTY",
")",
")",
";",
"}",
"}",
"rewriteNode",
"(",
"node",
",",
"WildcardType",
".",
"BOUND_PROPERTY",
",",
"pos",
",",
"prefix",
")",
";",
"}",
"catch",
"(",
"CoreException",
"e",
")",
"{",
"handleException",
"(",
"e",
")",
";",
"}",
"return",
"false",
";",
"}",
"final",
"void",
"handleException",
"(",
"Throwable",
"e",
")",
"{",
"IllegalArgumentException",
"runtimeException",
"=",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"runtimeException",
".",
"initCause",
"(",
"e",
")",
";",
"throw",
"runtimeException",
";",
"}",
"}",
"</s>"
] |
4,349 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"CoreException",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IStatus",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"Status",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaCore",
";",
"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",
"TokenScanner",
"{",
"public",
"static",
"final",
"int",
"END_OF_FILE",
"=",
"20001",
";",
"public",
"static",
"final",
"int",
"LEXICAL_ERROR",
"=",
"20002",
";",
"public",
"static",
"final",
"int",
"DOCUMENT_ERROR",
"=",
"20003",
";",
"private",
"final",
"Scanner",
"scanner",
";",
"private",
"final",
"int",
"endPosition",
";",
"public",
"TokenScanner",
"(",
"Scanner",
"scanner",
")",
"{",
"this",
".",
"scanner",
"=",
"scanner",
";",
"this",
".",
"endPosition",
"=",
"this",
".",
"scanner",
".",
"getSource",
"(",
")",
".",
"length",
"-",
"1",
";",
"}",
"public",
"Scanner",
"getScanner",
"(",
")",
"{",
"return",
"this",
".",
"scanner",
";",
"}",
"public",
"void",
"setOffset",
"(",
"int",
"offset",
")",
"{",
"this",
".",
"scanner",
".",
"resetTo",
"(",
"offset",
",",
"this",
".",
"endPosition",
")",
";",
"}",
"public",
"int",
"getCurrentEndOffset",
"(",
")",
"{",
"return",
"this",
".",
"scanner",
".",
"getCurrentTokenEndPosition",
"(",
")",
"+",
"1",
";",
"}",
"public",
"int",
"getCurrentStartOffset",
"(",
")",
"{",
"return",
"this",
".",
"scanner",
".",
"getCurrentTokenStartPosition",
"(",
")",
";",
"}",
"public",
"int",
"getCurrentLength",
"(",
")",
"{",
"return",
"getCurrentEndOffset",
"(",
")",
"-",
"getCurrentStartOffset",
"(",
")",
";",
"}",
"public",
"int",
"readNext",
"(",
"boolean",
"ignoreComments",
")",
"throws",
"CoreException",
"{",
"int",
"curr",
"=",
"0",
";",
"do",
"{",
"try",
"{",
"curr",
"=",
"this",
".",
"scanner",
".",
"getNextToken",
"(",
")",
";",
"if",
"(",
"curr",
"==",
"TerminalTokens",
".",
"TokenNameEOF",
")",
"{",
"throw",
"new",
"CoreException",
"(",
"createError",
"(",
"END_OF_FILE",
",",
"\"End",
"Of",
"File\"",
",",
"null",
")",
")",
";",
"}",
"}",
"catch",
"(",
"InvalidInputException",
"e",
")",
"{",
"throw",
"new",
"CoreException",
"(",
"createError",
"(",
"LEXICAL_ERROR",
",",
"e",
".",
"getMessage",
"(",
")",
",",
"e",
")",
")",
";",
"}",
"}",
"while",
"(",
"ignoreComments",
"&&",
"isComment",
"(",
"curr",
")",
")",
";",
"return",
"curr",
";",
"}",
"public",
"int",
"readNext",
"(",
"int",
"offset",
",",
"boolean",
"ignoreComments",
")",
"throws",
"CoreException",
"{",
"setOffset",
"(",
"offset",
")",
";",
"return",
"readNext",
"(",
"ignoreComments",
")",
";",
"}",
"public",
"int",
"getNextStartOffset",
"(",
"int",
"offset",
",",
"boolean",
"ignoreComments",
")",
"throws",
"CoreException",
"{",
"readNext",
"(",
"offset",
",",
"ignoreComments",
")",
";",
"return",
"getCurrentStartOffset",
"(",
")",
";",
"}",
"public",
"int",
"getNextEndOffset",
"(",
"int",
"offset",
",",
"boolean",
"ignoreComments",
")",
"throws",
"CoreException",
"{",
"readNext",
"(",
"offset",
",",
"ignoreComments",
")",
";",
"return",
"getCurrentEndOffset",
"(",
")",
";",
"}",
"public",
"void",
"readToToken",
"(",
"int",
"tok",
")",
"throws",
"CoreException",
"{",
"int",
"curr",
"=",
"0",
";",
"do",
"{",
"curr",
"=",
"readNext",
"(",
"false",
")",
";",
"}",
"while",
"(",
"curr",
"!=",
"tok",
")",
";",
"}",
"public",
"void",
"readToToken",
"(",
"int",
"tok",
",",
"int",
"offset",
")",
"throws",
"CoreException",
"{",
"setOffset",
"(",
"offset",
")",
";",
"readToToken",
"(",
"tok",
")",
";",
"}",
"public",
"int",
"getTokenStartOffset",
"(",
"int",
"token",
",",
"int",
"startOffset",
")",
"throws",
"CoreException",
"{",
"readToToken",
"(",
"token",
",",
"startOffset",
")",
";",
"return",
"getCurrentStartOffset",
"(",
")",
";",
"}",
"public",
"int",
"getTokenEndOffset",
"(",
"int",
"token",
",",
"int",
"startOffset",
")",
"throws",
"CoreException",
"{",
"readToToken",
"(",
"token",
",",
"startOffset",
")",
";",
"return",
"getCurrentEndOffset",
"(",
")",
";",
"}",
"public",
"int",
"getPreviousTokenEndOffset",
"(",
"int",
"token",
",",
"int",
"startOffset",
")",
"throws",
"CoreException",
"{",
"setOffset",
"(",
"startOffset",
")",
";",
"int",
"res",
"=",
"startOffset",
";",
"int",
"curr",
"=",
"readNext",
"(",
"false",
")",
";",
"while",
"(",
"curr",
"!=",
"token",
")",
"{",
"res",
"=",
"getCurrentEndOffset",
"(",
")",
";",
"curr",
"=",
"readNext",
"(",
"false",
")",
";",
"}",
"return",
"res",
";",
"}",
"public",
"static",
"boolean",
"isComment",
"(",
"int",
"token",
")",
"{",
"return",
"token",
"==",
"TerminalTokens",
".",
"TokenNameCOMMENT_BLOCK",
"||",
"token",
"==",
"TerminalTokens",
".",
"TokenNameCOMMENT_JAVADOC",
"||",
"token",
"==",
"TerminalTokens",
".",
"TokenNameCOMMENT_LINE",
";",
"}",
"public",
"static",
"boolean",
"isModifier",
"(",
"int",
"token",
")",
"{",
"switch",
"(",
"token",
")",
"{",
"case",
"TerminalTokens",
".",
"TokenNamepublic",
":",
"case",
"TerminalTokens",
".",
"TokenNameprotected",
":",
"case",
"TerminalTokens",
".",
"TokenNameprivate",
":",
"case",
"TerminalTokens",
".",
"TokenNamestatic",
":",
"case",
"TerminalTokens",
".",
"TokenNamefinal",
":",
"case",
"TerminalTokens",
".",
"TokenNameabstract",
":",
"case",
"TerminalTokens",
".",
"TokenNamenative",
":",
"case",
"TerminalTokens",
".",
"TokenNamevolatile",
":",
"case",
"TerminalTokens",
".",
"TokenNamestrictfp",
":",
"case",
"TerminalTokens",
".",
"TokenNametransient",
":",
"case",
"TerminalTokens",
".",
"TokenNamesynchronized",
":",
"return",
"true",
";",
"default",
":",
"return",
"false",
";",
"}",
"}",
"public",
"static",
"IStatus",
"createError",
"(",
"int",
"code",
",",
"String",
"message",
",",
"Throwable",
"throwable",
")",
"{",
"return",
"new",
"Status",
"(",
"IStatus",
".",
"ERROR",
",",
"JavaCore",
".",
"PLUGIN_ID",
",",
"code",
",",
"message",
",",
"throwable",
")",
";",
"}",
"}",
"</s>"
] |
4,350 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTNode",
";",
"public",
"class",
"ListRewriteEvent",
"extends",
"RewriteEvent",
"{",
"public",
"final",
"static",
"int",
"NEW",
"=",
"1",
";",
"public",
"final",
"static",
"int",
"OLD",
"=",
"2",
";",
"public",
"final",
"static",
"int",
"BOTH",
"=",
"NEW",
"|",
"OLD",
";",
"private",
"List",
"originalNodes",
";",
"private",
"List",
"listEntries",
";",
"public",
"ListRewriteEvent",
"(",
"List",
"originalNodes",
")",
"{",
"this",
".",
"originalNodes",
"=",
"new",
"ArrayList",
"(",
"originalNodes",
")",
";",
"}",
"public",
"ListRewriteEvent",
"(",
"RewriteEvent",
"[",
"]",
"children",
")",
"{",
"this",
".",
"listEntries",
"=",
"new",
"ArrayList",
"(",
"children",
".",
"length",
"*",
"2",
")",
";",
"this",
".",
"originalNodes",
"=",
"new",
"ArrayList",
"(",
"children",
".",
"length",
"*",
"2",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"children",
".",
"length",
";",
"i",
"++",
")",
"{",
"RewriteEvent",
"curr",
"=",
"children",
"[",
"i",
"]",
";",
"this",
".",
"listEntries",
".",
"add",
"(",
"curr",
")",
";",
"if",
"(",
"curr",
".",
"getOriginalValue",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"originalNodes",
".",
"add",
"(",
"curr",
".",
"getOriginalValue",
"(",
")",
")",
";",
"}",
"}",
"}",
"private",
"List",
"getEntries",
"(",
")",
"{",
"if",
"(",
"this",
".",
"listEntries",
"==",
"null",
")",
"{",
"int",
"nNodes",
"=",
"this",
".",
"originalNodes",
".",
"size",
"(",
")",
";",
"this",
".",
"listEntries",
"=",
"new",
"ArrayList",
"(",
"nNodes",
"*",
"2",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nNodes",
";",
"i",
"++",
")",
"{",
"ASTNode",
"node",
"=",
"(",
"ASTNode",
")",
"this",
".",
"originalNodes",
".",
"get",
"(",
"i",
")",
";",
"this",
".",
"listEntries",
".",
"add",
"(",
"new",
"NodeRewriteEvent",
"(",
"node",
",",
"node",
")",
")",
";",
"}",
"}",
"return",
"this",
".",
"listEntries",
";",
"}",
"public",
"int",
"getChangeKind",
"(",
")",
"{",
"if",
"(",
"this",
".",
"listEntries",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"listEntries",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"RewriteEvent",
"curr",
"=",
"(",
"RewriteEvent",
")",
"this",
".",
"listEntries",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"curr",
".",
"getChangeKind",
"(",
")",
"!=",
"UNCHANGED",
")",
"{",
"return",
"CHILDREN_CHANGED",
";",
"}",
"}",
"}",
"return",
"UNCHANGED",
";",
"}",
"public",
"boolean",
"isListRewrite",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"RewriteEvent",
"[",
"]",
"getChildren",
"(",
")",
"{",
"List",
"entries",
"=",
"getEntries",
"(",
")",
";",
"return",
"(",
"RewriteEvent",
"[",
"]",
")",
"entries",
".",
"toArray",
"(",
"new",
"RewriteEvent",
"[",
"entries",
".",
"size",
"(",
")",
"]",
")",
";",
"}",
"public",
"Object",
"getOriginalValue",
"(",
")",
"{",
"return",
"this",
".",
"originalNodes",
";",
"}",
"public",
"Object",
"getNewValue",
"(",
")",
"{",
"List",
"entries",
"=",
"getEntries",
"(",
")",
";",
"ArrayList",
"res",
"=",
"new",
"ArrayList",
"(",
"entries",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"entries",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"RewriteEvent",
"curr",
"=",
"(",
"RewriteEvent",
")",
"entries",
".",
"get",
"(",
"i",
")",
";",
"Object",
"newVal",
"=",
"curr",
".",
"getNewValue",
"(",
")",
";",
"if",
"(",
"newVal",
"!=",
"null",
")",
"{",
"res",
".",
"add",
"(",
"newVal",
")",
";",
"}",
"}",
"return",
"res",
";",
"}",
"public",
"RewriteEvent",
"removeEntry",
"(",
"ASTNode",
"originalEntry",
")",
"{",
"return",
"replaceEntry",
"(",
"originalEntry",
",",
"null",
")",
";",
"}",
"public",
"RewriteEvent",
"replaceEntry",
"(",
"ASTNode",
"entry",
",",
"ASTNode",
"newEntry",
")",
"{",
"if",
"(",
"entry",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"List",
"entries",
"=",
"getEntries",
"(",
")",
";",
"int",
"nEntries",
"=",
"entries",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nEntries",
";",
"i",
"++",
")",
"{",
"NodeRewriteEvent",
"curr",
"=",
"(",
"NodeRewriteEvent",
")",
"entries",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"curr",
".",
"getOriginalValue",
"(",
")",
"==",
"entry",
"||",
"curr",
".",
"getNewValue",
"(",
")",
"==",
"entry",
")",
"{",
"curr",
".",
"setNewValue",
"(",
"newEntry",
")",
";",
"if",
"(",
"curr",
".",
"getNewValue",
"(",
")",
"==",
"null",
"&&",
"curr",
".",
"getOriginalValue",
"(",
")",
"==",
"null",
")",
"{",
"entries",
".",
"remove",
"(",
"i",
")",
";",
"return",
"null",
";",
"}",
"return",
"curr",
";",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"void",
"revertChange",
"(",
"NodeRewriteEvent",
"event",
")",
"{",
"Object",
"originalValue",
"=",
"event",
".",
"getOriginalValue",
"(",
")",
";",
"if",
"(",
"originalValue",
"==",
"null",
")",
"{",
"List",
"entries",
"=",
"getEntries",
"(",
")",
";",
"entries",
".",
"remove",
"(",
"event",
")",
";",
"}",
"else",
"{",
"event",
".",
"setNewValue",
"(",
"originalValue",
")",
";",
"}",
"}",
"public",
"int",
"getIndex",
"(",
"ASTNode",
"node",
",",
"int",
"kind",
")",
"{",
"List",
"entries",
"=",
"getEntries",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"entries",
".",
"size",
"(",
")",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"RewriteEvent",
"curr",
"=",
"(",
"RewriteEvent",
")",
"entries",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"(",
"(",
"kind",
"&",
"OLD",
")",
"!=",
"0",
")",
"&&",
"(",
"curr",
".",
"getOriginalValue",
"(",
")",
"==",
"node",
")",
")",
"{",
"return",
"i",
";",
"}",
"if",
"(",
"(",
"(",
"kind",
"&",
"NEW",
")",
"!=",
"0",
")",
"&&",
"(",
"curr",
".",
"getNewValue",
"(",
")",
"==",
"node",
")",
")",
"{",
"return",
"i",
";",
"}",
"}",
"return",
"-",
"1",
";",
"}",
"public",
"RewriteEvent",
"insert",
"(",
"ASTNode",
"insertedNode",
",",
"int",
"insertIndex",
")",
"{",
"NodeRewriteEvent",
"change",
"=",
"new",
"NodeRewriteEvent",
"(",
"null",
",",
"insertedNode",
")",
";",
"if",
"(",
"insertIndex",
"!=",
"-",
"1",
")",
"{",
"getEntries",
"(",
")",
".",
"add",
"(",
"insertIndex",
",",
"change",
")",
";",
"}",
"else",
"{",
"getEntries",
"(",
")",
".",
"add",
"(",
"change",
")",
";",
"}",
"return",
"change",
";",
"}",
"public",
"void",
"setNewValue",
"(",
"ASTNode",
"newValue",
",",
"int",
"insertIndex",
")",
"{",
"NodeRewriteEvent",
"curr",
"=",
"(",
"NodeRewriteEvent",
")",
"getEntries",
"(",
")",
".",
"get",
"(",
"insertIndex",
")",
";",
"curr",
".",
"setNewValue",
"(",
"newValue",
")",
";",
"}",
"public",
"int",
"getChangeKind",
"(",
"int",
"index",
")",
"{",
"return",
"(",
"(",
"NodeRewriteEvent",
")",
"getEntries",
"(",
")",
".",
"get",
"(",
"index",
")",
")",
".",
"getChangeKind",
"(",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buf",
".",
"append",
"(",
"\"\"",
")",
";",
"RewriteEvent",
"[",
"]",
"events",
"=",
"getChildren",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"events",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
"!=",
"0",
")",
"{",
"buf",
".",
"append",
"(",
"\"nt\"",
")",
";",
"}",
"buf",
".",
"append",
"(",
"events",
"[",
"i",
"]",
")",
";",
"}",
"buf",
".",
"append",
"(",
"\"n]\"",
")",
";",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,351 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"import",
"java",
".",
"util",
".",
"HashSet",
";",
"import",
"java",
".",
"util",
".",
"IdentityHashMap",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"AST",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Block",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"FieldDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Modifier",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ParameterizedType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"TryStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"VariableDeclarationExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"VariableDeclarationStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"RewriteEventStore",
".",
"CopySourceInfo",
";",
"public",
"final",
"class",
"NodeInfoStore",
"{",
"private",
"AST",
"ast",
";",
"private",
"Map",
"placeholderNodes",
";",
"private",
"Set",
"collapsedNodes",
";",
"public",
"NodeInfoStore",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
")",
";",
"this",
".",
"ast",
"=",
"ast",
";",
"this",
".",
"placeholderNodes",
"=",
"null",
";",
"this",
".",
"collapsedNodes",
"=",
"null",
";",
"}",
"public",
"final",
"void",
"markAsStringPlaceholder",
"(",
"ASTNode",
"placeholder",
",",
"String",
"code",
")",
"{",
"StringPlaceholderData",
"data",
"=",
"new",
"StringPlaceholderData",
"(",
")",
";",
"data",
".",
"code",
"=",
"code",
";",
"setPlaceholderData",
"(",
"placeholder",
",",
"data",
")",
";",
"}",
"public",
"final",
"void",
"markAsCopyTarget",
"(",
"ASTNode",
"target",
",",
"CopySourceInfo",
"copySource",
")",
"{",
"CopyPlaceholderData",
"data",
"=",
"new",
"CopyPlaceholderData",
"(",
")",
";",
"data",
".",
"copySource",
"=",
"copySource",
";",
"setPlaceholderData",
"(",
"target",
",",
"data",
")",
";",
"}",
"public",
"final",
"ASTNode",
"newPlaceholderNode",
"(",
"int",
"nodeType",
")",
"{",
"try",
"{",
"ASTNode",
"node",
"=",
"this",
".",
"ast",
".",
"createInstance",
"(",
"nodeType",
")",
";",
"switch",
"(",
"node",
".",
"getNodeType",
"(",
")",
")",
"{",
"case",
"ASTNode",
".",
"FIELD_DECLARATION",
":",
"(",
"(",
"FieldDeclaration",
")",
"node",
")",
".",
"fragments",
"(",
")",
".",
"add",
"(",
"this",
".",
"ast",
".",
"newVariableDeclarationFragment",
"(",
")",
")",
";",
"break",
";",
"case",
"ASTNode",
".",
"MODIFIER",
":",
"(",
"(",
"Modifier",
")",
"node",
")",
".",
"setKeyword",
"(",
"Modifier",
".",
"ModifierKeyword",
".",
"ABSTRACT_KEYWORD",
")",
";",
"break",
";",
"case",
"ASTNode",
".",
"TRY_STATEMENT",
":",
"(",
"(",
"TryStatement",
")",
"node",
")",
".",
"setFinally",
"(",
"this",
".",
"ast",
".",
"newBlock",
"(",
")",
")",
";",
"break",
";",
"case",
"ASTNode",
".",
"VARIABLE_DECLARATION_EXPRESSION",
":",
"(",
"(",
"VariableDeclarationExpression",
")",
"node",
")",
".",
"fragments",
"(",
")",
".",
"add",
"(",
"this",
".",
"ast",
".",
"newVariableDeclarationFragment",
"(",
")",
")",
";",
"break",
";",
"case",
"ASTNode",
".",
"VARIABLE_DECLARATION_STATEMENT",
":",
"(",
"(",
"VariableDeclarationStatement",
")",
"node",
")",
".",
"fragments",
"(",
")",
".",
"add",
"(",
"this",
".",
"ast",
".",
"newVariableDeclarationFragment",
"(",
")",
")",
";",
"break",
";",
"case",
"ASTNode",
".",
"PARAMETERIZED_TYPE",
":",
"(",
"(",
"ParameterizedType",
")",
"node",
")",
".",
"typeArguments",
"(",
")",
".",
"add",
"(",
"this",
".",
"ast",
".",
"newWildcardType",
"(",
")",
")",
";",
"break",
";",
"}",
"return",
"node",
";",
"}",
"catch",
"(",
"IllegalArgumentException",
"e",
")",
"{",
"return",
"null",
";",
"}",
"}",
"public",
"Block",
"createCollapsePlaceholder",
"(",
")",
"{",
"Block",
"placeHolder",
"=",
"this",
".",
"ast",
".",
"newBlock",
"(",
")",
";",
"if",
"(",
"this",
".",
"collapsedNodes",
"==",
"null",
")",
"{",
"this",
".",
"collapsedNodes",
"=",
"new",
"HashSet",
"(",
")",
";",
"}",
"this",
".",
"collapsedNodes",
".",
"add",
"(",
"placeHolder",
")",
";",
"return",
"placeHolder",
";",
"}",
"public",
"boolean",
"isCollapsed",
"(",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"this",
".",
"collapsedNodes",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"collapsedNodes",
".",
"contains",
"(",
"node",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"Object",
"getPlaceholderData",
"(",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"this",
".",
"placeholderNodes",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"placeholderNodes",
".",
"get",
"(",
"node",
")",
";",
"}",
"return",
"null",
";",
"}",
"private",
"void",
"setPlaceholderData",
"(",
"ASTNode",
"node",
",",
"PlaceholderData",
"data",
")",
"{",
"if",
"(",
"this",
".",
"placeholderNodes",
"==",
"null",
")",
"{",
"this",
".",
"placeholderNodes",
"=",
"new",
"IdentityHashMap",
"(",
")",
";",
"}",
"this",
".",
"placeholderNodes",
".",
"put",
"(",
"node",
",",
"data",
")",
";",
"}",
"static",
"class",
"PlaceholderData",
"{",
"}",
"protected",
"static",
"final",
"class",
"CopyPlaceholderData",
"extends",
"PlaceholderData",
"{",
"public",
"CopySourceInfo",
"copySource",
";",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"\"",
"+",
"this",
".",
"copySource",
"+",
"\"]\"",
";",
"}",
"}",
"protected",
"static",
"final",
"class",
"StringPlaceholderData",
"extends",
"PlaceholderData",
"{",
"public",
"String",
"code",
";",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"\"\"",
"+",
"this",
".",
"code",
"+",
"\"]\"",
";",
"}",
"}",
"public",
"void",
"clear",
"(",
")",
"{",
"this",
".",
"placeholderNodes",
"=",
"null",
";",
"this",
".",
"collapsedNodes",
"=",
"null",
";",
"}",
"}",
"</s>"
] |
4,352 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"formatter",
".",
"IndentManipulation",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"ISourceModifier",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"ReplaceEdit",
";",
"public",
"class",
"SourceModifier",
"implements",
"ISourceModifier",
"{",
"private",
"final",
"String",
"destinationIndent",
";",
"private",
"final",
"int",
"sourceIndentLevel",
";",
"private",
"final",
"int",
"tabWidth",
";",
"private",
"final",
"int",
"indentWidth",
";",
"public",
"SourceModifier",
"(",
"int",
"sourceIndentLevel",
",",
"String",
"destinationIndent",
",",
"int",
"tabWidth",
",",
"int",
"indentWidth",
")",
"{",
"this",
".",
"destinationIndent",
"=",
"destinationIndent",
";",
"this",
".",
"sourceIndentLevel",
"=",
"sourceIndentLevel",
";",
"this",
".",
"tabWidth",
"=",
"tabWidth",
";",
"this",
".",
"indentWidth",
"=",
"indentWidth",
";",
"}",
"public",
"ISourceModifier",
"copy",
"(",
")",
"{",
"return",
"this",
";",
"}",
"public",
"ReplaceEdit",
"[",
"]",
"getModifications",
"(",
"String",
"source",
")",
"{",
"List",
"result",
"=",
"new",
"ArrayList",
"(",
")",
";",
"int",
"destIndentLevel",
"=",
"IndentManipulation",
".",
"measureIndentUnits",
"(",
"this",
".",
"destinationIndent",
",",
"this",
".",
"tabWidth",
",",
"this",
".",
"indentWidth",
")",
";",
"if",
"(",
"destIndentLevel",
"==",
"this",
".",
"sourceIndentLevel",
")",
"{",
"return",
"(",
"ReplaceEdit",
"[",
"]",
")",
"result",
".",
"toArray",
"(",
"new",
"ReplaceEdit",
"[",
"result",
".",
"size",
"(",
")",
"]",
")",
";",
"}",
"return",
"IndentManipulation",
".",
"getChangeIndentEdits",
"(",
"source",
",",
"this",
".",
"sourceIndentLevel",
",",
"this",
".",
"tabWidth",
",",
"this",
".",
"indentWidth",
",",
"this",
".",
"destinationIndent",
")",
";",
"}",
"}",
"</s>"
] |
4,353 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"public",
"abstract",
"class",
"RewriteEvent",
"{",
"public",
"static",
"final",
"int",
"INSERTED",
"=",
"1",
";",
"public",
"static",
"final",
"int",
"REMOVED",
"=",
"2",
";",
"public",
"static",
"final",
"int",
"REPLACED",
"=",
"4",
";",
"public",
"static",
"final",
"int",
"CHILDREN_CHANGED",
"=",
"8",
";",
"public",
"static",
"final",
"int",
"UNCHANGED",
"=",
"0",
";",
"public",
"abstract",
"int",
"getChangeKind",
"(",
")",
";",
"public",
"abstract",
"boolean",
"isListRewrite",
"(",
")",
";",
"public",
"abstract",
"Object",
"getOriginalValue",
"(",
")",
";",
"public",
"abstract",
"Object",
"getNewValue",
"(",
")",
";",
"public",
"abstract",
"RewriteEvent",
"[",
"]",
"getChildren",
"(",
")",
";",
"}",
"</s>"
] |
4,354 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"TextEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"TextEditGroup",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"rewrite",
".",
"ITrackedNodePosition",
";",
"import",
"org",
".",
"eclipse",
".",
"jface",
".",
"text",
".",
"IRegion",
";",
"public",
"class",
"TrackedNodePosition",
"implements",
"ITrackedNodePosition",
"{",
"private",
"final",
"TextEditGroup",
"group",
";",
"private",
"final",
"ASTNode",
"node",
";",
"public",
"TrackedNodePosition",
"(",
"TextEditGroup",
"group",
",",
"ASTNode",
"node",
")",
"{",
"this",
".",
"group",
"=",
"group",
";",
"this",
".",
"node",
"=",
"node",
";",
"}",
"public",
"int",
"getStartPosition",
"(",
")",
"{",
"if",
"(",
"this",
".",
"group",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"this",
".",
"node",
".",
"getStartPosition",
"(",
")",
";",
"}",
"IRegion",
"coverage",
"=",
"TextEdit",
".",
"getCoverage",
"(",
"this",
".",
"group",
".",
"getTextEdits",
"(",
")",
")",
";",
"if",
"(",
"coverage",
"==",
"null",
")",
"{",
"return",
"this",
".",
"node",
".",
"getStartPosition",
"(",
")",
";",
"}",
"return",
"coverage",
".",
"getOffset",
"(",
")",
";",
"}",
"public",
"int",
"getLength",
"(",
")",
"{",
"if",
"(",
"this",
".",
"group",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"this",
".",
"node",
".",
"getLength",
"(",
")",
";",
"}",
"IRegion",
"coverage",
"=",
"TextEdit",
".",
"getCoverage",
"(",
"this",
".",
"group",
".",
"getTextEdits",
"(",
")",
")",
";",
"if",
"(",
"coverage",
"==",
"null",
")",
"{",
"return",
"this",
".",
"node",
".",
"getLength",
"(",
")",
";",
"}",
"return",
"coverage",
".",
"getLength",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,355 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Collection",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"Assert",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaCore",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ToolFactory",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Annotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Block",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"BodyDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Expression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Statement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"formatter",
".",
"CodeFormatter",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"formatter",
".",
"DefaultCodeFormatterConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"formatter",
".",
"IndentManipulation",
";",
"import",
"org",
".",
"eclipse",
".",
"jface",
".",
"text",
".",
"BadLocationException",
";",
"import",
"org",
".",
"eclipse",
".",
"jface",
".",
"text",
".",
"BadPositionCategoryException",
";",
"import",
"org",
".",
"eclipse",
".",
"jface",
".",
"text",
".",
"DefaultPositionUpdater",
";",
"import",
"org",
".",
"eclipse",
".",
"jface",
".",
"text",
".",
"Document",
";",
"import",
"org",
".",
"eclipse",
".",
"jface",
".",
"text",
".",
"Position",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"DeleteEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"InsertEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"MultiTextEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"ReplaceEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"TextEdit",
";",
"final",
"class",
"ASTRewriteFormatter",
"{",
"public",
"static",
"class",
"NodeMarker",
"extends",
"Position",
"{",
"public",
"Object",
"data",
";",
"}",
"private",
"class",
"ExtendedFlattener",
"extends",
"ASTRewriteFlattener",
"{",
"private",
"ArrayList",
"positions",
";",
"public",
"ExtendedFlattener",
"(",
"RewriteEventStore",
"store",
")",
"{",
"super",
"(",
"store",
")",
";",
"this",
".",
"positions",
"=",
"new",
"ArrayList",
"(",
")",
";",
"}",
"public",
"void",
"preVisit",
"(",
"ASTNode",
"node",
")",
"{",
"Object",
"trackData",
"=",
"getEventStore",
"(",
")",
".",
"getTrackedNodeData",
"(",
"node",
")",
";",
"if",
"(",
"trackData",
"!=",
"null",
")",
"{",
"addMarker",
"(",
"trackData",
",",
"this",
".",
"result",
".",
"length",
"(",
")",
",",
"0",
")",
";",
"}",
"Object",
"placeholderData",
"=",
"getPlaceholders",
"(",
")",
".",
"getPlaceholderData",
"(",
"node",
")",
";",
"if",
"(",
"placeholderData",
"!=",
"null",
")",
"{",
"addMarker",
"(",
"placeholderData",
",",
"this",
".",
"result",
".",
"length",
"(",
")",
",",
"0",
")",
";",
"}",
"}",
"public",
"void",
"postVisit",
"(",
"ASTNode",
"node",
")",
"{",
"Object",
"placeholderData",
"=",
"getPlaceholders",
"(",
")",
".",
"getPlaceholderData",
"(",
"node",
")",
";",
"if",
"(",
"placeholderData",
"!=",
"null",
")",
"{",
"fixupLength",
"(",
"placeholderData",
",",
"this",
".",
"result",
".",
"length",
"(",
")",
")",
";",
"}",
"Object",
"trackData",
"=",
"getEventStore",
"(",
")",
".",
"getTrackedNodeData",
"(",
"node",
")",
";",
"if",
"(",
"trackData",
"!=",
"null",
")",
"{",
"fixupLength",
"(",
"trackData",
",",
"this",
".",
"result",
".",
"length",
"(",
")",
")",
";",
"}",
"}",
"public",
"boolean",
"visit",
"(",
"Block",
"node",
")",
"{",
"if",
"(",
"getPlaceholders",
"(",
")",
".",
"isCollapsed",
"(",
"node",
")",
")",
"{",
"visitList",
"(",
"node",
",",
"Block",
".",
"STATEMENTS_PROPERTY",
",",
"null",
")",
";",
"return",
"false",
";",
"}",
"return",
"super",
".",
"visit",
"(",
"node",
")",
";",
"}",
"private",
"NodeMarker",
"addMarker",
"(",
"Object",
"annotation",
",",
"int",
"startOffset",
",",
"int",
"length",
")",
"{",
"NodeMarker",
"marker",
"=",
"new",
"NodeMarker",
"(",
")",
";",
"marker",
".",
"offset",
"=",
"startOffset",
";",
"marker",
".",
"length",
"=",
"length",
";",
"marker",
".",
"data",
"=",
"annotation",
";",
"this",
".",
"positions",
".",
"add",
"(",
"marker",
")",
";",
"return",
"marker",
";",
"}",
"private",
"void",
"fixupLength",
"(",
"Object",
"data",
",",
"int",
"endOffset",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"this",
".",
"positions",
".",
"size",
"(",
")",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"NodeMarker",
"marker",
"=",
"(",
"NodeMarker",
")",
"this",
".",
"positions",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"marker",
".",
"data",
"==",
"data",
")",
"{",
"marker",
".",
"length",
"=",
"endOffset",
"-",
"marker",
".",
"offset",
";",
"return",
";",
"}",
"}",
"}",
"public",
"NodeMarker",
"[",
"]",
"getMarkers",
"(",
")",
"{",
"return",
"(",
"NodeMarker",
"[",
"]",
")",
"this",
".",
"positions",
".",
"toArray",
"(",
"new",
"NodeMarker",
"[",
"this",
".",
"positions",
".",
"size",
"(",
")",
"]",
")",
";",
"}",
"}",
"private",
"final",
"String",
"lineDelimiter",
";",
"private",
"final",
"int",
"tabWidth",
";",
"private",
"final",
"int",
"indentWidth",
";",
"private",
"final",
"NodeInfoStore",
"placeholders",
";",
"private",
"final",
"RewriteEventStore",
"eventStore",
";",
"private",
"final",
"Map",
"options",
";",
"public",
"ASTRewriteFormatter",
"(",
"NodeInfoStore",
"placeholders",
",",
"RewriteEventStore",
"eventStore",
",",
"Map",
"options",
",",
"String",
"lineDelimiter",
")",
"{",
"this",
".",
"placeholders",
"=",
"placeholders",
";",
"this",
".",
"eventStore",
"=",
"eventStore",
";",
"this",
".",
"options",
"=",
"options",
"==",
"null",
"?",
"JavaCore",
".",
"getOptions",
"(",
")",
":",
"(",
"Map",
")",
"new",
"HashMap",
"(",
"options",
")",
";",
"this",
".",
"options",
".",
"put",
"(",
"DefaultCodeFormatterConstants",
".",
"FORMATTER_ALIGNMENT_FOR_RESOURCES_IN_TRY",
",",
"DefaultCodeFormatterConstants",
".",
"createAlignmentValue",
"(",
"true",
",",
"DefaultCodeFormatterConstants",
".",
"WRAP_NEXT_PER_LINE",
",",
"DefaultCodeFormatterConstants",
".",
"INDENT_DEFAULT",
")",
")",
";",
"this",
".",
"lineDelimiter",
"=",
"lineDelimiter",
";",
"this",
".",
"tabWidth",
"=",
"IndentManipulation",
".",
"getTabWidth",
"(",
"options",
")",
";",
"this",
".",
"indentWidth",
"=",
"IndentManipulation",
".",
"getIndentWidth",
"(",
"options",
")",
";",
"}",
"public",
"NodeInfoStore",
"getPlaceholders",
"(",
")",
"{",
"return",
"this",
".",
"placeholders",
";",
"}",
"public",
"RewriteEventStore",
"getEventStore",
"(",
")",
"{",
"return",
"this",
".",
"eventStore",
";",
"}",
"public",
"int",
"getTabWidth",
"(",
")",
"{",
"return",
"this",
".",
"tabWidth",
";",
"}",
"public",
"int",
"getIndentWidth",
"(",
")",
"{",
"return",
"this",
".",
"indentWidth",
";",
"}",
"public",
"String",
"getLineDelimiter",
"(",
")",
"{",
"return",
"this",
".",
"lineDelimiter",
";",
"}",
"public",
"String",
"getFormattedResult",
"(",
"ASTNode",
"node",
",",
"int",
"initialIndentationLevel",
",",
"Collection",
"resultingMarkers",
")",
"{",
"ExtendedFlattener",
"flattener",
"=",
"new",
"ExtendedFlattener",
"(",
"this",
".",
"eventStore",
")",
";",
"node",
".",
"accept",
"(",
"flattener",
")",
";",
"NodeMarker",
"[",
"]",
"markers",
"=",
"flattener",
".",
"getMarkers",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"markers",
".",
"length",
";",
"i",
"++",
")",
"{",
"resultingMarkers",
".",
"add",
"(",
"markers",
"[",
"i",
"]",
")",
";",
"}",
"String",
"unformatted",
"=",
"flattener",
".",
"getResult",
"(",
")",
";",
"TextEdit",
"edit",
"=",
"formatNode",
"(",
"node",
",",
"unformatted",
",",
"initialIndentationLevel",
")",
";",
"if",
"(",
"edit",
"==",
"null",
")",
"{",
"if",
"(",
"initialIndentationLevel",
">",
"0",
")",
"{",
"String",
"indentString",
"=",
"createIndentString",
"(",
"initialIndentationLevel",
")",
";",
"ReplaceEdit",
"[",
"]",
"edits",
"=",
"IndentManipulation",
".",
"getChangeIndentEdits",
"(",
"unformatted",
",",
"0",
",",
"this",
".",
"tabWidth",
",",
"this",
".",
"indentWidth",
",",
"indentString",
")",
";",
"edit",
"=",
"new",
"MultiTextEdit",
"(",
")",
";",
"edit",
".",
"addChild",
"(",
"new",
"InsertEdit",
"(",
"0",
",",
"indentString",
")",
")",
";",
"edit",
".",
"addChildren",
"(",
"edits",
")",
";",
"}",
"else",
"{",
"return",
"unformatted",
";",
"}",
"}",
"return",
"evaluateFormatterEdit",
"(",
"unformatted",
",",
"edit",
",",
"markers",
")",
";",
"}",
"public",
"String",
"createIndentString",
"(",
"int",
"indentationUnits",
")",
"{",
"return",
"ToolFactory",
".",
"createCodeFormatter",
"(",
"this",
".",
"options",
")",
".",
"createIndentationString",
"(",
"indentationUnits",
")",
";",
"}",
"public",
"String",
"getIndentString",
"(",
"String",
"currentLine",
")",
"{",
"return",
"IndentManipulation",
".",
"extractIndentString",
"(",
"currentLine",
",",
"this",
".",
"tabWidth",
",",
"this",
".",
"indentWidth",
")",
";",
"}",
"public",
"String",
"changeIndent",
"(",
"String",
"code",
",",
"int",
"codeIndentLevel",
",",
"String",
"newIndent",
")",
"{",
"return",
"IndentManipulation",
".",
"changeIndent",
"(",
"code",
",",
"codeIndentLevel",
",",
"this",
".",
"tabWidth",
",",
"this",
".",
"indentWidth",
",",
"newIndent",
",",
"this",
".",
"lineDelimiter",
")",
";",
"}",
"public",
"int",
"computeIndentUnits",
"(",
"String",
"line",
")",
"{",
"return",
"IndentManipulation",
".",
"measureIndentUnits",
"(",
"line",
",",
"this",
".",
"tabWidth",
",",
"this",
".",
"indentWidth",
")",
";",
"}",
"public",
"static",
"String",
"evaluateFormatterEdit",
"(",
"String",
"string",
",",
"TextEdit",
"edit",
",",
"Position",
"[",
"]",
"positions",
")",
"{",
"try",
"{",
"Document",
"doc",
"=",
"createDocument",
"(",
"string",
",",
"positions",
")",
";",
"edit",
".",
"apply",
"(",
"doc",
",",
"0",
")",
";",
"if",
"(",
"positions",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"positions",
".",
"length",
";",
"i",
"++",
")",
"{",
"Assert",
".",
"isTrue",
"(",
"!",
"positions",
"[",
"i",
"]",
".",
"isDeleted",
",",
"\"\"",
")",
";",
"}",
"}",
"return",
"doc",
".",
"get",
"(",
")",
";",
"}",
"catch",
"(",
"BadLocationException",
"e",
")",
"{",
"Assert",
".",
"isTrue",
"(",
"false",
",",
"\"\"",
"+",
"e",
".",
"getMessage",
"(",
")",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"TextEdit",
"formatString",
"(",
"int",
"kind",
",",
"String",
"string",
",",
"int",
"offset",
",",
"int",
"length",
",",
"int",
"indentationLevel",
")",
"{",
"return",
"ToolFactory",
".",
"createCodeFormatter",
"(",
"this",
".",
"options",
")",
".",
"format",
"(",
"kind",
",",
"string",
",",
"offset",
",",
"length",
",",
"indentationLevel",
",",
"this",
".",
"lineDelimiter",
")",
";",
"}",
"private",
"TextEdit",
"formatNode",
"(",
"ASTNode",
"node",
",",
"String",
"str",
",",
"int",
"indentationLevel",
")",
"{",
"int",
"code",
";",
"String",
"prefix",
"=",
"\"\"",
";",
"String",
"suffix",
"=",
"\"\"",
";",
"if",
"(",
"node",
"instanceof",
"Statement",
")",
"{",
"code",
"=",
"CodeFormatter",
".",
"K_STATEMENTS",
";",
"if",
"(",
"node",
".",
"getNodeType",
"(",
")",
"==",
"ASTNode",
".",
"SWITCH_CASE",
")",
"{",
"prefix",
"=",
"\"switch(1)",
"{\"",
";",
"suffix",
"=",
"\"}\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_STATEMENTS",
";",
"}",
"}",
"else",
"if",
"(",
"node",
"instanceof",
"Expression",
"&&",
"node",
".",
"getNodeType",
"(",
")",
"!=",
"ASTNode",
".",
"VARIABLE_DECLARATION_EXPRESSION",
")",
"{",
"if",
"(",
"node",
"instanceof",
"Annotation",
")",
"{",
"suffix",
"=",
"\"nclass",
"A",
"{}\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_COMPILATION_UNIT",
";",
"}",
"else",
"{",
"code",
"=",
"CodeFormatter",
".",
"K_EXPRESSION",
";",
"}",
"}",
"else",
"if",
"(",
"node",
"instanceof",
"BodyDeclaration",
")",
"{",
"code",
"=",
"CodeFormatter",
".",
"K_CLASS_BODY_DECLARATIONS",
";",
"}",
"else",
"{",
"switch",
"(",
"node",
".",
"getNodeType",
"(",
")",
")",
"{",
"case",
"ASTNode",
".",
"ARRAY_TYPE",
":",
"case",
"ASTNode",
".",
"PARAMETERIZED_TYPE",
":",
"case",
"ASTNode",
".",
"PRIMITIVE_TYPE",
":",
"case",
"ASTNode",
".",
"QUALIFIED_TYPE",
":",
"case",
"ASTNode",
".",
"SIMPLE_TYPE",
":",
"suffix",
"=",
"\"",
"x;\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_CLASS_BODY_DECLARATIONS",
";",
"break",
";",
"case",
"ASTNode",
".",
"WILDCARD_TYPE",
":",
"prefix",
"=",
"\"A<\"",
";",
"suffix",
"=",
"\">",
"x;\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_CLASS_BODY_DECLARATIONS",
";",
"break",
";",
"case",
"ASTNode",
".",
"COMPILATION_UNIT",
":",
"code",
"=",
"CodeFormatter",
".",
"K_COMPILATION_UNIT",
";",
"break",
";",
"case",
"ASTNode",
".",
"VARIABLE_DECLARATION_EXPRESSION",
":",
"case",
"ASTNode",
".",
"SINGLE_VARIABLE_DECLARATION",
":",
"suffix",
"=",
"\";\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_STATEMENTS",
";",
"break",
";",
"case",
"ASTNode",
".",
"VARIABLE_DECLARATION_FRAGMENT",
":",
"prefix",
"=",
"\"A",
"\"",
";",
"suffix",
"=",
"\";\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_STATEMENTS",
";",
"break",
";",
"case",
"ASTNode",
".",
"PACKAGE_DECLARATION",
":",
"case",
"ASTNode",
".",
"IMPORT_DECLARATION",
":",
"suffix",
"=",
"\"nclass",
"A",
"{}\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_COMPILATION_UNIT",
";",
"break",
";",
"case",
"ASTNode",
".",
"JAVADOC",
":",
"suffix",
"=",
"\"nclass",
"A",
"{}\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_COMPILATION_UNIT",
";",
"break",
";",
"case",
"ASTNode",
".",
"CATCH_CLAUSE",
":",
"prefix",
"=",
"\"try",
"{}\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_STATEMENTS",
";",
"break",
";",
"case",
"ASTNode",
".",
"ANONYMOUS_CLASS_DECLARATION",
":",
"prefix",
"=",
"\"new",
"A()\"",
";",
"suffix",
"=",
"\";\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_STATEMENTS",
";",
"break",
";",
"case",
"ASTNode",
".",
"MEMBER_VALUE_PAIR",
":",
"prefix",
"=",
"\"@Author(\"",
";",
"suffix",
"=",
"\")",
"class",
"x",
"{}\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_COMPILATION_UNIT",
";",
"break",
";",
"case",
"ASTNode",
".",
"MODIFIER",
":",
"suffix",
"=",
"\"",
"class",
"x",
"{}\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_COMPILATION_UNIT",
";",
"break",
";",
"case",
"ASTNode",
".",
"TYPE_PARAMETER",
":",
"prefix",
"=",
"\"class",
"X<\"",
";",
"suffix",
"=",
"\">",
"{}\"",
";",
"code",
"=",
"CodeFormatter",
".",
"K_COMPILATION_UNIT",
";",
"break",
";",
"case",
"ASTNode",
".",
"MEMBER_REF",
":",
"case",
"ASTNode",
".",
"METHOD_REF",
":",
"case",
"ASTNode",
".",
"METHOD_REF_PARAMETER",
":",
"case",
"ASTNode",
".",
"TAG_ELEMENT",
":",
"case",
"ASTNode",
".",
"TEXT_ELEMENT",
":",
"return",
"null",
";",
"default",
":",
"return",
"null",
";",
"}",
"}",
"String",
"concatStr",
"=",
"prefix",
"+",
"str",
"+",
"suffix",
";",
"TextEdit",
"edit",
"=",
"formatString",
"(",
"code",
",",
"concatStr",
",",
"prefix",
".",
"length",
"(",
")",
",",
"str",
".",
"length",
"(",
")",
",",
"indentationLevel",
")",
";",
"if",
"(",
"prefix",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"edit",
"=",
"shifEdit",
"(",
"edit",
",",
"prefix",
".",
"length",
"(",
")",
")",
";",
"}",
"return",
"edit",
";",
"}",
"private",
"static",
"TextEdit",
"shifEdit",
"(",
"TextEdit",
"oldEdit",
",",
"int",
"diff",
")",
"{",
"TextEdit",
"newEdit",
";",
"if",
"(",
"oldEdit",
"instanceof",
"ReplaceEdit",
")",
"{",
"ReplaceEdit",
"edit",
"=",
"(",
"ReplaceEdit",
")",
"oldEdit",
";",
"newEdit",
"=",
"new",
"ReplaceEdit",
"(",
"edit",
".",
"getOffset",
"(",
")",
"-",
"diff",
",",
"edit",
".",
"getLength",
"(",
")",
",",
"edit",
".",
"getText",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"oldEdit",
"instanceof",
"InsertEdit",
")",
"{",
"InsertEdit",
"edit",
"=",
"(",
"InsertEdit",
")",
"oldEdit",
";",
"newEdit",
"=",
"new",
"InsertEdit",
"(",
"edit",
".",
"getOffset",
"(",
")",
"-",
"diff",
",",
"edit",
".",
"getText",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"oldEdit",
"instanceof",
"DeleteEdit",
")",
"{",
"DeleteEdit",
"edit",
"=",
"(",
"DeleteEdit",
")",
"oldEdit",
";",
"newEdit",
"=",
"new",
"DeleteEdit",
"(",
"edit",
".",
"getOffset",
"(",
")",
"-",
"diff",
",",
"edit",
".",
"getLength",
"(",
")",
")",
";",
"}",
"else",
"if",
"(",
"oldEdit",
"instanceof",
"MultiTextEdit",
")",
"{",
"newEdit",
"=",
"new",
"MultiTextEdit",
"(",
")",
";",
"}",
"else",
"{",
"return",
"null",
";",
"}",
"TextEdit",
"[",
"]",
"children",
"=",
"oldEdit",
".",
"getChildren",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"children",
".",
"length",
";",
"i",
"++",
")",
"{",
"TextEdit",
"shifted",
"=",
"shifEdit",
"(",
"children",
"[",
"i",
"]",
",",
"diff",
")",
";",
"if",
"(",
"shifted",
"!=",
"null",
")",
"{",
"newEdit",
".",
"addChild",
"(",
"shifted",
")",
";",
"}",
"}",
"return",
"newEdit",
";",
"}",
"private",
"static",
"Document",
"createDocument",
"(",
"String",
"string",
",",
"Position",
"[",
"]",
"positions",
")",
"throws",
"IllegalArgumentException",
"{",
"Document",
"doc",
"=",
"new",
"Document",
"(",
"string",
")",
";",
"try",
"{",
"if",
"(",
"positions",
"!=",
"null",
")",
"{",
"final",
"String",
"POS_CATEGORY",
"=",
"\"myCategory\"",
";",
"doc",
".",
"addPositionCategory",
"(",
"POS_CATEGORY",
")",
";",
"doc",
".",
"addPositionUpdater",
"(",
"new",
"DefaultPositionUpdater",
"(",
"POS_CATEGORY",
")",
"{",
"protected",
"boolean",
"notDeleted",
"(",
")",
"{",
"int",
"start",
"=",
"this",
".",
"fOffset",
";",
"int",
"end",
"=",
"start",
"+",
"this",
".",
"fLength",
";",
"if",
"(",
"start",
"<",
"this",
".",
"fPosition",
".",
"offset",
"&&",
"(",
"this",
".",
"fPosition",
".",
"offset",
"+",
"this",
".",
"fPosition",
".",
"length",
"<",
"end",
")",
")",
"{",
"this",
".",
"fPosition",
".",
"offset",
"=",
"end",
";",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"}",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"positions",
".",
"length",
";",
"i",
"++",
")",
"{",
"try",
"{",
"doc",
".",
"addPosition",
"(",
"POS_CATEGORY",
",",
"positions",
"[",
"i",
"]",
")",
";",
"}",
"catch",
"(",
"BadLocationException",
"e",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
"+",
"positions",
"[",
"i",
"]",
".",
"offset",
"+",
"\",",
"length:",
"\"",
"+",
"positions",
"[",
"i",
"]",
".",
"length",
"+",
"\"\"",
"+",
"string",
".",
"length",
"(",
")",
")",
";",
"}",
"}",
"}",
"}",
"catch",
"(",
"BadPositionCategoryException",
"cannotHappen",
")",
"{",
"}",
"return",
"doc",
";",
"}",
"public",
"static",
"interface",
"Prefix",
"{",
"String",
"getPrefix",
"(",
"int",
"indent",
")",
";",
"}",
"public",
"static",
"interface",
"BlockContext",
"{",
"String",
"[",
"]",
"getPrefixAndSuffix",
"(",
"int",
"indent",
",",
"ASTNode",
"node",
",",
"RewriteEventStore",
"events",
")",
";",
"}",
"public",
"static",
"class",
"ConstPrefix",
"implements",
"Prefix",
"{",
"private",
"String",
"prefix",
";",
"public",
"ConstPrefix",
"(",
"String",
"prefix",
")",
"{",
"this",
".",
"prefix",
"=",
"prefix",
";",
"}",
"public",
"String",
"getPrefix",
"(",
"int",
"indent",
")",
"{",
"return",
"this",
".",
"prefix",
";",
"}",
"}",
"private",
"class",
"FormattingPrefix",
"implements",
"Prefix",
"{",
"private",
"int",
"kind",
";",
"private",
"String",
"string",
";",
"private",
"int",
"start",
";",
"private",
"int",
"length",
";",
"public",
"FormattingPrefix",
"(",
"String",
"string",
",",
"String",
"sub",
",",
"int",
"kind",
")",
"{",
"this",
".",
"start",
"=",
"string",
".",
"indexOf",
"(",
"sub",
")",
";",
"this",
".",
"length",
"=",
"sub",
".",
"length",
"(",
")",
";",
"this",
".",
"string",
"=",
"string",
";",
"this",
".",
"kind",
"=",
"kind",
";",
"}",
"public",
"String",
"getPrefix",
"(",
"int",
"indent",
")",
"{",
"Position",
"pos",
"=",
"new",
"Position",
"(",
"this",
".",
"start",
",",
"this",
".",
"length",
")",
";",
"String",
"str",
"=",
"this",
".",
"string",
";",
"TextEdit",
"res",
"=",
"formatString",
"(",
"this",
".",
"kind",
",",
"str",
",",
"0",
",",
"str",
".",
"length",
"(",
")",
",",
"indent",
")",
";",
"if",
"(",
"res",
"!=",
"null",
")",
"{",
"str",
"=",
"evaluateFormatterEdit",
"(",
"str",
",",
"res",
",",
"new",
"Position",
"[",
"]",
"{",
"pos",
"}",
")",
";",
"}",
"return",
"str",
".",
"substring",
"(",
"pos",
".",
"offset",
"+",
"1",
",",
"pos",
".",
"offset",
"+",
"pos",
".",
"length",
"-",
"1",
")",
";",
"}",
"}",
"private",
"class",
"BlockFormattingPrefix",
"implements",
"BlockContext",
"{",
"private",
"String",
"prefix",
";",
"private",
"int",
"start",
";",
"public",
"BlockFormattingPrefix",
"(",
"String",
"prefix",
",",
"int",
"start",
")",
"{",
"this",
".",
"start",
"=",
"start",
";",
"this",
".",
"prefix",
"=",
"prefix",
";",
"}",
"public",
"String",
"[",
"]",
"getPrefixAndSuffix",
"(",
"int",
"indent",
",",
"ASTNode",
"node",
",",
"RewriteEventStore",
"events",
")",
"{",
"String",
"nodeString",
"=",
"ASTRewriteFlattener",
".",
"asString",
"(",
"node",
",",
"events",
")",
";",
"String",
"str",
"=",
"this",
".",
"prefix",
"+",
"nodeString",
";",
"Position",
"pos",
"=",
"new",
"Position",
"(",
"this",
".",
"start",
",",
"this",
".",
"prefix",
".",
"length",
"(",
")",
"+",
"1",
"-",
"this",
".",
"start",
")",
";",
"TextEdit",
"res",
"=",
"formatString",
"(",
"CodeFormatter",
".",
"K_STATEMENTS",
",",
"str",
",",
"0",
",",
"str",
".",
"length",
"(",
")",
",",
"indent",
")",
";",
"if",
"(",
"res",
"!=",
"null",
")",
"{",
"str",
"=",
"evaluateFormatterEdit",
"(",
"str",
",",
"res",
",",
"new",
"Position",
"[",
"]",
"{",
"pos",
"}",
")",
";",
"}",
"return",
"new",
"String",
"[",
"]",
"{",
"str",
".",
"substring",
"(",
"pos",
".",
"offset",
"+",
"1",
",",
"pos",
".",
"offset",
"+",
"pos",
".",
"length",
"-",
"1",
")",
",",
"\"\"",
"}",
";",
"}",
"}",
"private",
"class",
"BlockFormattingPrefixSuffix",
"implements",
"BlockContext",
"{",
"private",
"String",
"prefix",
";",
"private",
"String",
"suffix",
";",
"private",
"int",
"start",
";",
"public",
"BlockFormattingPrefixSuffix",
"(",
"String",
"prefix",
",",
"String",
"suffix",
",",
"int",
"start",
")",
"{",
"this",
".",
"start",
"=",
"start",
";",
"this",
".",
"suffix",
"=",
"suffix",
";",
"this",
".",
"prefix",
"=",
"prefix",
";",
"}",
"public",
"String",
"[",
"]",
"getPrefixAndSuffix",
"(",
"int",
"indent",
",",
"ASTNode",
"node",
",",
"RewriteEventStore",
"events",
")",
"{",
"String",
"nodeString",
"=",
"ASTRewriteFlattener",
".",
"asString",
"(",
"node",
",",
"events",
")",
";",
"int",
"nodeStart",
"=",
"this",
".",
"prefix",
".",
"length",
"(",
")",
";",
"int",
"nodeEnd",
"=",
"nodeStart",
"+",
"nodeString",
".",
"length",
"(",
")",
"-",
"1",
";",
"String",
"str",
"=",
"this",
".",
"prefix",
"+",
"nodeString",
"+",
"this",
".",
"suffix",
";",
"Position",
"pos1",
"=",
"new",
"Position",
"(",
"this",
".",
"start",
",",
"nodeStart",
"+",
"1",
"-",
"this",
".",
"start",
")",
";",
"Position",
"pos2",
"=",
"new",
"Position",
"(",
"nodeEnd",
",",
"2",
")",
";",
"TextEdit",
"res",
"=",
"formatString",
"(",
"CodeFormatter",
".",
"K_STATEMENTS",
",",
"str",
",",
"0",
",",
"str",
".",
"length",
"(",
")",
",",
"indent",
")",
";",
"if",
"(",
"res",
"!=",
"null",
")",
"{",
"str",
"=",
"evaluateFormatterEdit",
"(",
"str",
",",
"res",
",",
"new",
"Position",
"[",
"]",
"{",
"pos1",
",",
"pos2",
"}",
")",
";",
"}",
"return",
"new",
"String",
"[",
"]",
"{",
"str",
".",
"substring",
"(",
"pos1",
".",
"offset",
"+",
"1",
",",
"pos1",
".",
"offset",
"+",
"pos1",
".",
"length",
"-",
"1",
")",
",",
"str",
".",
"substring",
"(",
"pos2",
".",
"offset",
"+",
"1",
",",
"pos2",
".",
"offset",
"+",
"pos2",
".",
"length",
"-",
"1",
")",
"}",
";",
"}",
"}",
"public",
"final",
"static",
"Prefix",
"NONE",
"=",
"new",
"ConstPrefix",
"(",
"\"\"",
")",
";",
"public",
"final",
"static",
"Prefix",
"SPACE",
"=",
"new",
"ConstPrefix",
"(",
"\"",
"\"",
")",
";",
"public",
"final",
"static",
"Prefix",
"ASSERT_COMMENT",
"=",
"new",
"ConstPrefix",
"(",
"\"",
":",
"\"",
")",
";",
"public",
"final",
"Prefix",
"VAR_INITIALIZER",
"=",
"new",
"FormattingPrefix",
"(",
"\"A",
"a={};\"",
",",
"\"a={\"",
",",
"CodeFormatter",
".",
"K_STATEMENTS",
")",
";",
"public",
"final",
"Prefix",
"METHOD_BODY",
"=",
"new",
"FormattingPrefix",
"(",
"\"void",
"a()",
"{}\"",
",",
"\")",
"{\"",
",",
"CodeFormatter",
".",
"K_CLASS_BODY_DECLARATIONS",
")",
";",
"public",
"final",
"Prefix",
"FINALLY_BLOCK",
"=",
"new",
"FormattingPrefix",
"(",
"\"\"",
",",
"\"}",
"finally",
"{\"",
",",
"CodeFormatter",
".",
"K_STATEMENTS",
")",
";",
"public",
"final",
"Prefix",
"CATCH_BLOCK",
"=",
"new",
"FormattingPrefix",
"(",
"\"\"",
",",
"\"}",
"c\"",
",",
"CodeFormatter",
".",
"K_STATEMENTS",
")",
";",
"public",
"final",
"Prefix",
"ANNOT_MEMBER_DEFAULT",
"=",
"new",
"FormattingPrefix",
"(",
"\"\"",
",",
"\")",
"default",
"1\"",
",",
"CodeFormatter",
".",
"K_CLASS_BODY_DECLARATIONS",
")",
";",
"public",
"final",
"Prefix",
"ENUM_BODY_START",
"=",
"new",
"FormattingPrefix",
"(",
"\"\"",
",",
"\"){v\"",
",",
"CodeFormatter",
".",
"K_COMPILATION_UNIT",
")",
";",
"public",
"final",
"Prefix",
"ENUM_BODY_END",
"=",
"new",
"FormattingPrefix",
"(",
"\"\"",
",",
"\"}},\"",
",",
"CodeFormatter",
".",
"K_COMPILATION_UNIT",
")",
";",
"public",
"final",
"Prefix",
"WILDCARD_EXTENDS",
"=",
"new",
"FormattingPrefix",
"(",
"\"\"",
",",
"\"?",
"extends",
"B\"",
",",
"CodeFormatter",
".",
"K_CLASS_BODY_DECLARATIONS",
")",
";",
"public",
"final",
"Prefix",
"WILDCARD_SUPER",
"=",
"new",
"FormattingPrefix",
"(",
"\"\"",
",",
"\"?",
"super",
"B\"",
",",
"CodeFormatter",
".",
"K_CLASS_BODY_DECLARATIONS",
")",
";",
"public",
"final",
"Prefix",
"FIRST_ENUM_CONST",
"=",
"new",
"FormattingPrefix",
"(",
"\"enum",
"E",
"{",
"X;}\"",
",",
"\"{",
"X\"",
",",
"CodeFormatter",
".",
"K_COMPILATION_UNIT",
")",
";",
"public",
"final",
"Prefix",
"ANNOTATION_SEPARATION",
"=",
"new",
"FormattingPrefix",
"(",
"\"\"",
",",
"\"A",
"@\"",
",",
"CodeFormatter",
".",
"K_COMPILATION_UNIT",
")",
";",
"public",
"final",
"Prefix",
"PARAM_ANNOTATION_SEPARATION",
"=",
"new",
"FormattingPrefix",
"(",
"\"\"",
",",
"\"A",
"@\"",
",",
"CodeFormatter",
".",
"K_CLASS_BODY_DECLARATIONS",
")",
";",
"public",
"final",
"Prefix",
"TRY_RESOURCES",
"=",
"new",
"FormattingPrefix",
"(",
"\"\"",
",",
"\";",
"B\"",
",",
"CodeFormatter",
".",
"K_STATEMENTS",
")",
";",
"public",
"final",
"Prefix",
"TRY_RESOURCES_PAREN",
"=",
"new",
"FormattingPrefix",
"(",
"\"\"",
",",
"\"y",
"(\"",
",",
"CodeFormatter",
".",
"K_STATEMENTS",
")",
";",
"public",
"final",
"BlockContext",
"IF_BLOCK_WITH_ELSE",
"=",
"new",
"BlockFormattingPrefixSuffix",
"(",
"\"if",
"(true)\"",
",",
"\"else{}\"",
",",
"8",
")",
";",
"public",
"final",
"BlockContext",
"IF_BLOCK_NO_ELSE",
"=",
"new",
"BlockFormattingPrefix",
"(",
"\"if",
"(true)\"",
",",
"8",
")",
";",
"public",
"final",
"BlockContext",
"ELSE_AFTER_STATEMENT",
"=",
"new",
"BlockFormattingPrefix",
"(",
"\"\"",
",",
"15",
")",
";",
"public",
"final",
"BlockContext",
"ELSE_AFTER_BLOCK",
"=",
"new",
"BlockFormattingPrefix",
"(",
"\"\"",
",",
"11",
")",
";",
"public",
"final",
"BlockContext",
"FOR_BLOCK",
"=",
"new",
"BlockFormattingPrefix",
"(",
"\"for",
"(;;)",
"\"",
",",
"7",
")",
";",
"public",
"final",
"BlockContext",
"WHILE_BLOCK",
"=",
"new",
"BlockFormattingPrefix",
"(",
"\"while",
"(true)\"",
",",
"11",
")",
";",
"public",
"final",
"BlockContext",
"DO_BLOCK",
"=",
"new",
"BlockFormattingPrefixSuffix",
"(",
"\"do",
"\"",
",",
"\"\"",
",",
"1",
")",
";",
"}",
"</s>"
] |
4,356 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"HashSet",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Set",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IProgressMonitor",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"NullProgressMonitor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IBuffer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ICompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"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",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"CompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ImportDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"PackageDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"formatter",
".",
"DefaultCodeFormatterConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"search",
".",
"IJavaSearchConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"search",
".",
"IJavaSearchScope",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"search",
".",
"SearchEngine",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"search",
".",
"TypeNameRequestor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"JavaProject",
";",
"import",
"org",
".",
"eclipse",
".",
"jface",
".",
"text",
".",
"IRegion",
";",
"import",
"org",
".",
"eclipse",
".",
"jface",
".",
"text",
".",
"Region",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"DeleteEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"InsertEdit",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"MultiTextEdit",
";",
"public",
"final",
"class",
"ImportRewriteAnalyzer",
"{",
"private",
"final",
"ICompilationUnit",
"compilationUnit",
";",
"private",
"final",
"ArrayList",
"packageEntries",
";",
"private",
"final",
"List",
"importsCreated",
";",
"private",
"final",
"List",
"staticImportsCreated",
";",
"private",
"final",
"IRegion",
"replaceRange",
";",
"private",
"final",
"int",
"importOnDemandThreshold",
";",
"private",
"final",
"int",
"staticImportOnDemandThreshold",
";",
"private",
"boolean",
"filterImplicitImports",
";",
"private",
"boolean",
"useContextToFilterImplicitImports",
";",
"private",
"boolean",
"findAmbiguousImports",
";",
"private",
"int",
"flags",
"=",
"0",
";",
"private",
"static",
"final",
"int",
"F_NEEDS_LEADING_DELIM",
"=",
"2",
";",
"private",
"static",
"final",
"int",
"F_NEEDS_TRAILING_DELIM",
"=",
"4",
";",
"private",
"static",
"final",
"String",
"JAVA_LANG",
"=",
"\"java.lang\"",
";",
"public",
"ImportRewriteAnalyzer",
"(",
"ICompilationUnit",
"cu",
",",
"CompilationUnit",
"root",
",",
"String",
"[",
"]",
"importOrder",
",",
"int",
"threshold",
",",
"int",
"staticThreshold",
",",
"boolean",
"restoreExistingImports",
",",
"boolean",
"useContextToFilterImplicitImports",
")",
"{",
"this",
".",
"compilationUnit",
"=",
"cu",
";",
"this",
".",
"importOnDemandThreshold",
"=",
"threshold",
";",
"this",
".",
"staticImportOnDemandThreshold",
"=",
"staticThreshold",
";",
"this",
".",
"useContextToFilterImplicitImports",
"=",
"useContextToFilterImplicitImports",
";",
"this",
".",
"filterImplicitImports",
"=",
"true",
";",
"this",
".",
"findAmbiguousImports",
"=",
"true",
";",
"this",
".",
"packageEntries",
"=",
"new",
"ArrayList",
"(",
"20",
")",
";",
"this",
".",
"importsCreated",
"=",
"new",
"ArrayList",
"(",
")",
";",
"this",
".",
"staticImportsCreated",
"=",
"new",
"ArrayList",
"(",
")",
";",
"this",
".",
"flags",
"=",
"0",
";",
"this",
".",
"replaceRange",
"=",
"evaluateReplaceRange",
"(",
"root",
")",
";",
"if",
"(",
"restoreExistingImports",
")",
"{",
"addExistingImports",
"(",
"root",
")",
";",
"}",
"PackageEntry",
"[",
"]",
"order",
"=",
"new",
"PackageEntry",
"[",
"importOrder",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"order",
".",
"length",
";",
"i",
"++",
")",
"{",
"String",
"curr",
"=",
"importOrder",
"[",
"i",
"]",
";",
"if",
"(",
"curr",
".",
"length",
"(",
")",
">",
"0",
"&&",
"curr",
".",
"charAt",
"(",
"0",
")",
"==",
"'#'",
")",
"{",
"curr",
"=",
"curr",
".",
"substring",
"(",
"1",
")",
";",
"order",
"[",
"i",
"]",
"=",
"new",
"PackageEntry",
"(",
"curr",
",",
"curr",
",",
"true",
")",
";",
"}",
"else",
"{",
"order",
"[",
"i",
"]",
"=",
"new",
"PackageEntry",
"(",
"curr",
",",
"curr",
",",
"false",
")",
";",
"}",
"}",
"addPreferenceOrderHolders",
"(",
"order",
")",
";",
"}",
"private",
"int",
"getSpacesBetweenImportGroups",
"(",
")",
"{",
"try",
"{",
"int",
"num",
"=",
"Integer",
".",
"parseInt",
"(",
"this",
".",
"compilationUnit",
".",
"getJavaProject",
"(",
")",
".",
"getOption",
"(",
"DefaultCodeFormatterConstants",
".",
"FORMATTER_BLANK_LINES_BETWEEN_IMPORT_GROUPS",
",",
"true",
")",
")",
";",
"if",
"(",
"num",
">=",
"0",
")",
"return",
"num",
";",
"}",
"catch",
"(",
"NumberFormatException",
"e",
")",
"{",
"}",
"return",
"1",
";",
"}",
"private",
"boolean",
"insertSpaceBeforeSemicolon",
"(",
")",
"{",
"return",
"JavaCore",
".",
"INSERT",
".",
"equals",
"(",
"this",
".",
"compilationUnit",
".",
"getJavaProject",
"(",
")",
".",
"getOption",
"(",
"DefaultCodeFormatterConstants",
".",
"FORMATTER_INSERT_SPACE_BEFORE_SEMICOLON",
",",
"true",
")",
")",
";",
"}",
"private",
"void",
"addPreferenceOrderHolders",
"(",
"PackageEntry",
"[",
"]",
"preferenceOrder",
")",
"{",
"if",
"(",
"this",
".",
"packageEntries",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"preferenceOrder",
".",
"length",
";",
"i",
"++",
")",
"{",
"this",
".",
"packageEntries",
".",
"add",
"(",
"preferenceOrder",
"[",
"i",
"]",
")",
";",
"}",
"}",
"else",
"{",
"PackageEntry",
"[",
"]",
"lastAssigned",
"=",
"new",
"PackageEntry",
"[",
"preferenceOrder",
".",
"length",
"]",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"this",
".",
"packageEntries",
".",
"size",
"(",
")",
";",
"k",
"++",
")",
"{",
"PackageEntry",
"entry",
"=",
"(",
"PackageEntry",
")",
"this",
".",
"packageEntries",
".",
"get",
"(",
"k",
")",
";",
"if",
"(",
"!",
"entry",
".",
"isComment",
"(",
")",
")",
"{",
"String",
"currName",
"=",
"entry",
".",
"getName",
"(",
")",
";",
"int",
"currNameLen",
"=",
"currName",
".",
"length",
"(",
")",
";",
"int",
"bestGroupIndex",
"=",
"-",
"1",
";",
"int",
"bestGroupLen",
"=",
"-",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"preferenceOrder",
".",
"length",
";",
"i",
"++",
")",
"{",
"boolean",
"currPrevStatic",
"=",
"preferenceOrder",
"[",
"i",
"]",
".",
"isStatic",
"(",
")",
";",
"if",
"(",
"currPrevStatic",
"==",
"entry",
".",
"isStatic",
"(",
")",
")",
"{",
"String",
"currPrefEntry",
"=",
"preferenceOrder",
"[",
"i",
"]",
".",
"getName",
"(",
")",
";",
"int",
"currPrefLen",
"=",
"currPrefEntry",
".",
"length",
"(",
")",
";",
"if",
"(",
"currName",
".",
"startsWith",
"(",
"currPrefEntry",
")",
"&&",
"currPrefLen",
">=",
"bestGroupLen",
")",
"{",
"if",
"(",
"currPrefLen",
"==",
"currNameLen",
"||",
"currName",
".",
"charAt",
"(",
"currPrefLen",
")",
"==",
"'.'",
")",
"{",
"if",
"(",
"bestGroupIndex",
"==",
"-",
"1",
"||",
"currPrefLen",
">",
"bestGroupLen",
")",
"{",
"bestGroupLen",
"=",
"currPrefLen",
";",
"bestGroupIndex",
"=",
"i",
";",
"}",
"}",
"}",
"}",
"}",
"if",
"(",
"bestGroupIndex",
"!=",
"-",
"1",
")",
"{",
"entry",
".",
"setGroupID",
"(",
"preferenceOrder",
"[",
"bestGroupIndex",
"]",
".",
"getName",
"(",
")",
")",
";",
"lastAssigned",
"[",
"bestGroupIndex",
"]",
"=",
"entry",
";",
"}",
"}",
"}",
"int",
"currAppendIndex",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"lastAssigned",
".",
"length",
";",
"i",
"++",
")",
"{",
"PackageEntry",
"entry",
"=",
"lastAssigned",
"[",
"i",
"]",
";",
"if",
"(",
"entry",
"==",
"null",
")",
"{",
"PackageEntry",
"newEntry",
"=",
"preferenceOrder",
"[",
"i",
"]",
";",
"if",
"(",
"currAppendIndex",
"==",
"0",
"&&",
"!",
"newEntry",
".",
"isStatic",
"(",
")",
")",
"{",
"currAppendIndex",
"=",
"getIndexAfterStatics",
"(",
")",
";",
"}",
"this",
".",
"packageEntries",
".",
"add",
"(",
"currAppendIndex",
",",
"newEntry",
")",
";",
"currAppendIndex",
"++",
";",
"}",
"else",
"{",
"currAppendIndex",
"=",
"this",
".",
"packageEntries",
".",
"indexOf",
"(",
"entry",
")",
"+",
"1",
";",
"}",
"}",
"}",
"}",
"private",
"String",
"getQualifier",
"(",
"ImportDeclaration",
"decl",
")",
"{",
"String",
"name",
"=",
"decl",
".",
"getName",
"(",
")",
".",
"getFullyQualifiedName",
"(",
")",
";",
"if",
"(",
"decl",
".",
"isOnDemand",
"(",
")",
")",
"{",
"return",
"name",
";",
"}",
"return",
"getQualifier",
"(",
"name",
",",
"decl",
".",
"isStatic",
"(",
")",
")",
";",
"}",
"private",
"String",
"getQualifier",
"(",
"String",
"name",
",",
"boolean",
"isStatic",
")",
"{",
"if",
"(",
"isStatic",
"||",
"!",
"this",
".",
"useContextToFilterImplicitImports",
")",
"{",
"return",
"Signature",
".",
"getQualifier",
"(",
"name",
")",
";",
"}",
"char",
"[",
"]",
"searchedName",
"=",
"name",
".",
"toCharArray",
"(",
")",
";",
"int",
"index",
"=",
"name",
".",
"length",
"(",
")",
";",
"JavaProject",
"project",
"=",
"(",
"JavaProject",
")",
"this",
".",
"compilationUnit",
".",
"getJavaProject",
"(",
")",
";",
"do",
"{",
"String",
"testedName",
"=",
"new",
"String",
"(",
"searchedName",
",",
"0",
",",
"index",
")",
";",
"IJavaElement",
"fragment",
"=",
"null",
";",
"try",
"{",
"fragment",
"=",
"project",
".",
"findPackageFragment",
"(",
"testedName",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"name",
";",
"}",
"if",
"(",
"fragment",
"!=",
"null",
")",
"{",
"return",
"testedName",
";",
"}",
"try",
"{",
"fragment",
"=",
"project",
".",
"findType",
"(",
"testedName",
")",
";",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"name",
";",
"}",
"if",
"(",
"fragment",
"!=",
"null",
")",
"{",
"index",
"=",
"CharOperation",
".",
"lastIndexOf",
"(",
"Signature",
".",
"C_DOT",
",",
"searchedName",
",",
"0",
",",
"index",
"-",
"1",
")",
";",
"}",
"else",
"{",
"index",
"=",
"CharOperation",
".",
"lastIndexOf",
"(",
"Signature",
".",
"C_DOT",
",",
"searchedName",
",",
"0",
",",
"index",
"-",
"1",
")",
";",
"if",
"(",
"Character",
".",
"isLowerCase",
"(",
"searchedName",
"[",
"index",
"+",
"1",
"]",
")",
")",
"{",
"return",
"testedName",
";",
"}",
"}",
"}",
"while",
"(",
"index",
">=",
"0",
")",
";",
"return",
"name",
";",
"}",
"private",
"static",
"String",
"getFullName",
"(",
"ImportDeclaration",
"decl",
")",
"{",
"String",
"name",
"=",
"decl",
".",
"getName",
"(",
")",
".",
"getFullyQualifiedName",
"(",
")",
";",
"return",
"decl",
".",
"isOnDemand",
"(",
")",
"?",
"name",
"+",
"\".*\"",
":",
"name",
";",
"}",
"private",
"void",
"addExistingImports",
"(",
"CompilationUnit",
"root",
")",
"{",
"List",
"decls",
"=",
"root",
".",
"imports",
"(",
")",
";",
"if",
"(",
"decls",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
";",
"}",
"PackageEntry",
"currPackage",
"=",
"null",
";",
"ImportDeclaration",
"curr",
"=",
"(",
"ImportDeclaration",
")",
"decls",
".",
"get",
"(",
"0",
")",
";",
"int",
"currOffset",
"=",
"curr",
".",
"getStartPosition",
"(",
")",
";",
"int",
"currLength",
"=",
"curr",
".",
"getLength",
"(",
")",
";",
"int",
"currEndLine",
"=",
"root",
".",
"getLineNumber",
"(",
"currOffset",
"+",
"currLength",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"decls",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"boolean",
"isStatic",
"=",
"curr",
".",
"isStatic",
"(",
")",
";",
"String",
"name",
"=",
"getFullName",
"(",
"curr",
")",
";",
"String",
"packName",
"=",
"getQualifier",
"(",
"curr",
")",
";",
"if",
"(",
"currPackage",
"==",
"null",
"||",
"currPackage",
".",
"compareTo",
"(",
"packName",
",",
"isStatic",
")",
"!=",
"0",
")",
"{",
"currPackage",
"=",
"new",
"PackageEntry",
"(",
"packName",
",",
"null",
",",
"isStatic",
")",
";",
"this",
".",
"packageEntries",
".",
"add",
"(",
"currPackage",
")",
";",
"}",
"ImportDeclaration",
"next",
"=",
"(",
"ImportDeclaration",
")",
"decls",
".",
"get",
"(",
"i",
")",
";",
"int",
"nextOffset",
"=",
"next",
".",
"getStartPosition",
"(",
")",
";",
"int",
"nextLength",
"=",
"next",
".",
"getLength",
"(",
")",
";",
"int",
"nextOffsetLine",
"=",
"root",
".",
"getLineNumber",
"(",
"nextOffset",
")",
";",
"if",
"(",
"currEndLine",
"<",
"nextOffsetLine",
")",
"{",
"currEndLine",
"++",
";",
"nextOffset",
"=",
"root",
".",
"getPosition",
"(",
"currEndLine",
",",
"0",
")",
";",
"}",
"currPackage",
".",
"add",
"(",
"new",
"ImportDeclEntry",
"(",
"packName",
".",
"length",
"(",
")",
",",
"name",
",",
"isStatic",
",",
"new",
"Region",
"(",
"currOffset",
",",
"nextOffset",
"-",
"currOffset",
")",
")",
")",
";",
"currOffset",
"=",
"nextOffset",
";",
"curr",
"=",
"next",
";",
"if",
"(",
"currEndLine",
"<",
"nextOffsetLine",
")",
"{",
"nextOffset",
"=",
"root",
".",
"getPosition",
"(",
"nextOffsetLine",
",",
"0",
")",
";",
"currPackage",
"=",
"new",
"PackageEntry",
"(",
")",
";",
"this",
".",
"packageEntries",
".",
"add",
"(",
"currPackage",
")",
";",
"currPackage",
".",
"add",
"(",
"new",
"ImportDeclEntry",
"(",
"packName",
".",
"length",
"(",
")",
",",
"null",
",",
"false",
",",
"new",
"Region",
"(",
"currOffset",
",",
"nextOffset",
"-",
"currOffset",
")",
")",
")",
";",
"currOffset",
"=",
"nextOffset",
";",
"}",
"currEndLine",
"=",
"root",
".",
"getLineNumber",
"(",
"nextOffset",
"+",
"nextLength",
")",
";",
"}",
"boolean",
"isStatic",
"=",
"curr",
".",
"isStatic",
"(",
")",
";",
"String",
"name",
"=",
"getFullName",
"(",
"curr",
")",
";",
"String",
"packName",
"=",
"getQualifier",
"(",
"curr",
")",
";",
"if",
"(",
"currPackage",
"==",
"null",
"||",
"currPackage",
".",
"compareTo",
"(",
"packName",
",",
"isStatic",
")",
"!=",
"0",
")",
"{",
"currPackage",
"=",
"new",
"PackageEntry",
"(",
"packName",
",",
"null",
",",
"isStatic",
")",
";",
"this",
".",
"packageEntries",
".",
"add",
"(",
"currPackage",
")",
";",
"}",
"int",
"length",
"=",
"this",
".",
"replaceRange",
".",
"getOffset",
"(",
")",
"+",
"this",
".",
"replaceRange",
".",
"getLength",
"(",
")",
"-",
"curr",
".",
"getStartPosition",
"(",
")",
";",
"currPackage",
".",
"add",
"(",
"new",
"ImportDeclEntry",
"(",
"packName",
".",
"length",
"(",
")",
",",
"name",
",",
"isStatic",
",",
"new",
"Region",
"(",
"curr",
".",
"getStartPosition",
"(",
")",
",",
"length",
")",
")",
")",
";",
"}",
"public",
"void",
"setFilterImplicitImports",
"(",
"boolean",
"filterImplicitImports",
")",
"{",
"this",
".",
"filterImplicitImports",
"=",
"filterImplicitImports",
";",
"}",
"public",
"void",
"setFindAmbiguousImports",
"(",
"boolean",
"findAmbiguousImports",
")",
"{",
"this",
".",
"findAmbiguousImports",
"=",
"findAmbiguousImports",
";",
"}",
"private",
"static",
"class",
"PackageMatcher",
"{",
"private",
"String",
"newName",
";",
"private",
"String",
"bestName",
";",
"private",
"int",
"bestMatchLen",
";",
"public",
"PackageMatcher",
"(",
")",
"{",
"}",
"public",
"void",
"initialize",
"(",
"String",
"newImportName",
",",
"String",
"bestImportName",
")",
"{",
"this",
".",
"newName",
"=",
"newImportName",
";",
"this",
".",
"bestName",
"=",
"bestImportName",
";",
"this",
".",
"bestMatchLen",
"=",
"getCommonPrefixLength",
"(",
"bestImportName",
",",
"newImportName",
")",
";",
"}",
"public",
"boolean",
"isBetterMatch",
"(",
"String",
"currName",
",",
"boolean",
"preferCurr",
")",
"{",
"boolean",
"isBetter",
";",
"int",
"currMatchLen",
"=",
"getCommonPrefixLength",
"(",
"currName",
",",
"this",
".",
"newName",
")",
";",
"int",
"matchDiff",
"=",
"currMatchLen",
"-",
"this",
".",
"bestMatchLen",
";",
"if",
"(",
"matchDiff",
"==",
"0",
")",
"{",
"if",
"(",
"currMatchLen",
"==",
"this",
".",
"newName",
".",
"length",
"(",
")",
"&&",
"currMatchLen",
"==",
"currName",
".",
"length",
"(",
")",
"&&",
"currMatchLen",
"==",
"this",
".",
"bestName",
".",
"length",
"(",
")",
")",
"{",
"isBetter",
"=",
"preferCurr",
";",
"}",
"else",
"{",
"isBetter",
"=",
"sameMatchLenTest",
"(",
"currName",
")",
";",
"}",
"}",
"else",
"{",
"isBetter",
"=",
"(",
"matchDiff",
">",
"0",
")",
";",
"}",
"if",
"(",
"isBetter",
")",
"{",
"this",
".",
"bestName",
"=",
"currName",
";",
"this",
".",
"bestMatchLen",
"=",
"currMatchLen",
";",
"}",
"return",
"isBetter",
";",
"}",
"private",
"boolean",
"sameMatchLenTest",
"(",
"String",
"currName",
")",
"{",
"int",
"matchLen",
"=",
"this",
".",
"bestMatchLen",
";",
"char",
"newChar",
"=",
"getCharAt",
"(",
"this",
".",
"newName",
",",
"matchLen",
")",
";",
"char",
"currChar",
"=",
"getCharAt",
"(",
"currName",
",",
"matchLen",
")",
";",
"char",
"bestChar",
"=",
"getCharAt",
"(",
"this",
".",
"bestName",
",",
"matchLen",
")",
";",
"if",
"(",
"newChar",
"<",
"currChar",
")",
"{",
"if",
"(",
"bestChar",
"<",
"newChar",
")",
"{",
"return",
"(",
"currChar",
"-",
"newChar",
")",
"<",
"(",
"newChar",
"-",
"bestChar",
")",
";",
"}",
"else",
"{",
"if",
"(",
"currChar",
"==",
"bestChar",
")",
"{",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"currChar",
"<",
"bestChar",
";",
"}",
"}",
"}",
"else",
"{",
"if",
"(",
"bestChar",
">",
"newChar",
")",
"{",
"return",
"(",
"newChar",
"-",
"currChar",
")",
"<",
"(",
"bestChar",
"-",
"newChar",
")",
";",
"}",
"else",
"{",
"if",
"(",
"currChar",
"==",
"bestChar",
")",
"{",
"return",
"true",
";",
"}",
"else",
"{",
"return",
"currChar",
">",
"bestChar",
";",
"}",
"}",
"}",
"}",
"}",
"static",
"int",
"getCommonPrefixLength",
"(",
"String",
"s",
",",
"String",
"t",
")",
"{",
"int",
"len",
"=",
"Math",
".",
"min",
"(",
"s",
".",
"length",
"(",
")",
",",
"t",
".",
"length",
"(",
")",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"if",
"(",
"s",
".",
"charAt",
"(",
"i",
")",
"!=",
"t",
".",
"charAt",
"(",
"i",
")",
")",
"{",
"return",
"i",
";",
"}",
"}",
"return",
"len",
";",
"}",
"static",
"char",
"getCharAt",
"(",
"String",
"str",
",",
"int",
"index",
")",
"{",
"if",
"(",
"str",
".",
"length",
"(",
")",
">",
"index",
")",
"{",
"return",
"str",
".",
"charAt",
"(",
"index",
")",
";",
"}",
"return",
"0",
";",
"}",
"private",
"PackageEntry",
"findBestMatch",
"(",
"String",
"newName",
",",
"boolean",
"isStatic",
")",
"{",
"if",
"(",
"this",
".",
"packageEntries",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"String",
"groupId",
"=",
"null",
";",
"int",
"longestPrefix",
"=",
"-",
"1",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"packageEntries",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"PackageEntry",
"curr",
"=",
"(",
"PackageEntry",
")",
"this",
".",
"packageEntries",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"isStatic",
"==",
"curr",
".",
"isStatic",
"(",
")",
")",
"{",
"String",
"currGroup",
"=",
"curr",
".",
"getGroupID",
"(",
")",
";",
"if",
"(",
"currGroup",
"!=",
"null",
"&&",
"newName",
".",
"startsWith",
"(",
"currGroup",
")",
")",
"{",
"int",
"prefixLen",
"=",
"currGroup",
".",
"length",
"(",
")",
";",
"if",
"(",
"prefixLen",
"==",
"newName",
".",
"length",
"(",
")",
")",
"{",
"return",
"curr",
";",
"}",
"if",
"(",
"(",
"newName",
".",
"charAt",
"(",
"prefixLen",
")",
"==",
"'.'",
"||",
"prefixLen",
"==",
"0",
")",
"&&",
"prefixLen",
">",
"longestPrefix",
")",
"{",
"longestPrefix",
"=",
"prefixLen",
";",
"groupId",
"=",
"currGroup",
";",
"}",
"}",
"}",
"}",
"PackageEntry",
"bestMatch",
"=",
"null",
";",
"PackageMatcher",
"matcher",
"=",
"new",
"PackageMatcher",
"(",
")",
";",
"matcher",
".",
"initialize",
"(",
"newName",
",",
"\"\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"packageEntries",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"PackageEntry",
"curr",
"=",
"(",
"PackageEntry",
")",
"this",
".",
"packageEntries",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"!",
"curr",
".",
"isComment",
"(",
")",
"&&",
"curr",
".",
"isStatic",
"(",
")",
"==",
"isStatic",
")",
"{",
"if",
"(",
"groupId",
"==",
"null",
"||",
"groupId",
".",
"equals",
"(",
"curr",
".",
"getGroupID",
"(",
")",
")",
")",
"{",
"boolean",
"preferrCurr",
"=",
"(",
"bestMatch",
"==",
"null",
")",
"||",
"(",
"curr",
".",
"getNumberOfImports",
"(",
")",
">",
"bestMatch",
".",
"getNumberOfImports",
"(",
")",
")",
";",
"if",
"(",
"matcher",
".",
"isBetterMatch",
"(",
"curr",
".",
"getName",
"(",
")",
",",
"preferrCurr",
")",
")",
"{",
"bestMatch",
"=",
"curr",
";",
"}",
"}",
"}",
"}",
"return",
"bestMatch",
";",
"}",
"private",
"boolean",
"isImplicitImport",
"(",
"String",
"qualifier",
")",
"{",
"if",
"(",
"JAVA_LANG",
".",
"equals",
"(",
"qualifier",
")",
")",
"{",
"return",
"true",
";",
"}",
"ICompilationUnit",
"cu",
"=",
"this",
".",
"compilationUnit",
";",
"String",
"packageName",
"=",
"cu",
".",
"getParent",
"(",
")",
".",
"getElementName",
"(",
")",
";",
"if",
"(",
"qualifier",
".",
"equals",
"(",
"packageName",
")",
")",
"{",
"return",
"true",
";",
"}",
"String",
"mainTypeName",
"=",
"JavaCore",
".",
"removeJavaLikeExtension",
"(",
"cu",
".",
"getElementName",
"(",
")",
")",
";",
"if",
"(",
"packageName",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"qualifier",
".",
"equals",
"(",
"mainTypeName",
")",
";",
"}",
"return",
"qualifier",
".",
"equals",
"(",
"packageName",
"+",
"'.'",
"+",
"mainTypeName",
")",
";",
"}",
"public",
"void",
"addImport",
"(",
"String",
"fullTypeName",
",",
"boolean",
"isStatic",
")",
"{",
"String",
"typeContainerName",
"=",
"getQualifier",
"(",
"fullTypeName",
",",
"isStatic",
")",
";",
"ImportDeclEntry",
"decl",
"=",
"new",
"ImportDeclEntry",
"(",
"typeContainerName",
".",
"length",
"(",
")",
",",
"fullTypeName",
",",
"isStatic",
",",
"null",
")",
";",
"sortIn",
"(",
"typeContainerName",
",",
"decl",
",",
"isStatic",
")",
";",
"}",
"public",
"boolean",
"removeImport",
"(",
"String",
"qualifiedName",
",",
"boolean",
"isStatic",
")",
"{",
"String",
"containerName",
"=",
"getQualifier",
"(",
"qualifiedName",
",",
"isStatic",
")",
";",
"int",
"nPackages",
"=",
"this",
".",
"packageEntries",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nPackages",
";",
"i",
"++",
")",
"{",
"PackageEntry",
"entry",
"=",
"(",
"PackageEntry",
")",
"this",
".",
"packageEntries",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"entry",
".",
"compareTo",
"(",
"containerName",
",",
"isStatic",
")",
"==",
"0",
")",
"{",
"if",
"(",
"entry",
".",
"remove",
"(",
"qualifiedName",
",",
"isStatic",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"}",
"return",
"false",
";",
"}",
"private",
"int",
"getIndexAfterStatics",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"packageEntries",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"!",
"(",
"(",
"PackageEntry",
")",
"this",
".",
"packageEntries",
".",
"get",
"(",
"i",
")",
")",
".",
"isStatic",
"(",
")",
")",
"{",
"return",
"i",
";",
"}",
"}",
"return",
"this",
".",
"packageEntries",
".",
"size",
"(",
")",
";",
"}",
"private",
"void",
"sortIn",
"(",
"String",
"typeContainerName",
",",
"ImportDeclEntry",
"decl",
",",
"boolean",
"isStatic",
")",
"{",
"PackageEntry",
"bestMatch",
"=",
"findBestMatch",
"(",
"typeContainerName",
",",
"isStatic",
")",
";",
"if",
"(",
"bestMatch",
"==",
"null",
")",
"{",
"PackageEntry",
"packEntry",
"=",
"new",
"PackageEntry",
"(",
"typeContainerName",
",",
"null",
",",
"isStatic",
")",
";",
"packEntry",
".",
"add",
"(",
"decl",
")",
";",
"int",
"insertPos",
"=",
"packEntry",
".",
"isStatic",
"(",
")",
"?",
"0",
":",
"getIndexAfterStatics",
"(",
")",
";",
"this",
".",
"packageEntries",
".",
"add",
"(",
"insertPos",
",",
"packEntry",
")",
";",
"}",
"else",
"{",
"int",
"cmp",
"=",
"typeContainerName",
".",
"compareTo",
"(",
"bestMatch",
".",
"getName",
"(",
")",
")",
";",
"if",
"(",
"cmp",
"==",
"0",
")",
"{",
"bestMatch",
".",
"sortIn",
"(",
"decl",
")",
";",
"}",
"else",
"{",
"String",
"group",
"=",
"bestMatch",
".",
"getGroupID",
"(",
")",
";",
"if",
"(",
"group",
"!=",
"null",
")",
"{",
"if",
"(",
"!",
"typeContainerName",
".",
"startsWith",
"(",
"group",
")",
")",
"{",
"group",
"=",
"null",
";",
"}",
"}",
"PackageEntry",
"packEntry",
"=",
"new",
"PackageEntry",
"(",
"typeContainerName",
",",
"group",
",",
"isStatic",
")",
";",
"packEntry",
".",
"add",
"(",
"decl",
")",
";",
"int",
"index",
"=",
"this",
".",
"packageEntries",
".",
"indexOf",
"(",
"bestMatch",
")",
";",
"if",
"(",
"cmp",
"<",
"0",
")",
"{",
"this",
".",
"packageEntries",
".",
"add",
"(",
"index",
",",
"packEntry",
")",
";",
"}",
"else",
"{",
"this",
".",
"packageEntries",
".",
"add",
"(",
"index",
"+",
"1",
",",
"packEntry",
")",
";",
"}",
"}",
"}",
"}",
"private",
"IRegion",
"evaluateReplaceRange",
"(",
"CompilationUnit",
"root",
")",
"{",
"List",
"imports",
"=",
"root",
".",
"imports",
"(",
")",
";",
"if",
"(",
"!",
"imports",
".",
"isEmpty",
"(",
")",
")",
"{",
"ImportDeclaration",
"first",
"=",
"(",
"ImportDeclaration",
")",
"imports",
".",
"get",
"(",
"0",
")",
";",
"ImportDeclaration",
"last",
"=",
"(",
"ImportDeclaration",
")",
"imports",
".",
"get",
"(",
"imports",
".",
"size",
"(",
")",
"-",
"1",
")",
";",
"int",
"startPos",
"=",
"first",
".",
"getStartPosition",
"(",
")",
";",
"int",
"endPos",
"=",
"root",
".",
"getExtendedStartPosition",
"(",
"last",
")",
"+",
"root",
".",
"getExtendedLength",
"(",
"last",
")",
";",
"int",
"endLine",
"=",
"root",
".",
"getLineNumber",
"(",
"endPos",
")",
";",
"if",
"(",
"endLine",
">",
"0",
")",
"{",
"int",
"nextLinePos",
"=",
"root",
".",
"getPosition",
"(",
"endLine",
"+",
"1",
",",
"0",
")",
";",
"if",
"(",
"nextLinePos",
">=",
"0",
")",
"{",
"int",
"firstTypePos",
"=",
"getFirstTypeBeginPos",
"(",
"root",
")",
";",
"if",
"(",
"firstTypePos",
"!=",
"-",
"1",
"&&",
"firstTypePos",
"<",
"nextLinePos",
")",
"{",
"endPos",
"=",
"firstTypePos",
";",
"}",
"else",
"{",
"endPos",
"=",
"nextLinePos",
";",
"}",
"}",
"}",
"return",
"new",
"Region",
"(",
"startPos",
",",
"endPos",
"-",
"startPos",
")",
";",
"}",
"else",
"{",
"int",
"start",
"=",
"getPackageStatementEndPos",
"(",
"root",
")",
";",
"return",
"new",
"Region",
"(",
"start",
",",
"0",
")",
";",
"}",
"}",
"public",
"MultiTextEdit",
"getResultingEdits",
"(",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"if",
"(",
"monitor",
"==",
"null",
")",
"{",
"monitor",
"=",
"new",
"NullProgressMonitor",
"(",
")",
";",
"}",
"try",
"{",
"int",
"importsStart",
"=",
"this",
".",
"replaceRange",
".",
"getOffset",
"(",
")",
";",
"int",
"importsLen",
"=",
"this",
".",
"replaceRange",
".",
"getLength",
"(",
")",
";",
"String",
"lineDelim",
"=",
"this",
".",
"compilationUnit",
".",
"findRecommendedLineSeparator",
"(",
")",
";",
"IBuffer",
"buffer",
"=",
"this",
".",
"compilationUnit",
".",
"getBuffer",
"(",
")",
";",
"int",
"currPos",
"=",
"importsStart",
";",
"MultiTextEdit",
"resEdit",
"=",
"new",
"MultiTextEdit",
"(",
")",
";",
"if",
"(",
"(",
"this",
".",
"flags",
"&",
"F_NEEDS_LEADING_DELIM",
")",
"!=",
"0",
")",
"{",
"resEdit",
".",
"addChild",
"(",
"new",
"InsertEdit",
"(",
"currPos",
",",
"lineDelim",
")",
")",
";",
"}",
"PackageEntry",
"lastPackage",
"=",
"null",
";",
"Set",
"onDemandConflicts",
"=",
"null",
";",
"if",
"(",
"this",
".",
"findAmbiguousImports",
")",
"{",
"onDemandConflicts",
"=",
"evaluateStarImportConflicts",
"(",
"monitor",
")",
";",
"}",
"int",
"spacesBetweenGroups",
"=",
"getSpacesBetweenImportGroups",
"(",
")",
";",
"ArrayList",
"stringsToInsert",
"=",
"new",
"ArrayList",
"(",
")",
";",
"int",
"nPackageEntries",
"=",
"this",
".",
"packageEntries",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nPackageEntries",
";",
"i",
"++",
")",
"{",
"PackageEntry",
"pack",
"=",
"(",
"PackageEntry",
")",
"this",
".",
"packageEntries",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"this",
".",
"filterImplicitImports",
"&&",
"!",
"pack",
".",
"isStatic",
"(",
")",
"&&",
"isImplicitImport",
"(",
"pack",
".",
"getName",
"(",
")",
")",
")",
"{",
"pack",
".",
"filterImplicitImports",
"(",
"this",
".",
"useContextToFilterImplicitImports",
")",
";",
"}",
"int",
"nImports",
"=",
"pack",
".",
"getNumberOfImports",
"(",
")",
";",
"if",
"(",
"nImports",
"==",
"0",
")",
"{",
"continue",
";",
"}",
"if",
"(",
"spacesBetweenGroups",
">",
"0",
")",
"{",
"if",
"(",
"lastPackage",
"!=",
"null",
"&&",
"!",
"pack",
".",
"isComment",
"(",
")",
"&&",
"!",
"pack",
".",
"isSameGroup",
"(",
"lastPackage",
")",
")",
"{",
"ImportDeclEntry",
"last",
"=",
"lastPackage",
".",
"getImportAt",
"(",
"lastPackage",
".",
"getNumberOfImports",
"(",
")",
"-",
"1",
")",
";",
"ImportDeclEntry",
"first",
"=",
"pack",
".",
"getImportAt",
"(",
"0",
")",
";",
"if",
"(",
"!",
"lastPackage",
".",
"isComment",
"(",
")",
"&&",
"(",
"last",
".",
"isNew",
"(",
")",
"||",
"first",
".",
"isNew",
"(",
")",
")",
")",
"{",
"for",
"(",
"int",
"k",
"=",
"spacesBetweenGroups",
";",
"k",
">",
"0",
";",
"k",
"--",
")",
"{",
"stringsToInsert",
".",
"add",
"(",
"lineDelim",
")",
";",
"}",
"}",
"}",
"}",
"lastPackage",
"=",
"pack",
";",
"boolean",
"isStatic",
"=",
"pack",
".",
"isStatic",
"(",
")",
";",
"int",
"threshold",
"=",
"isStatic",
"?",
"this",
".",
"staticImportOnDemandThreshold",
":",
"this",
".",
"importOnDemandThreshold",
";",
"boolean",
"doStarImport",
"=",
"pack",
".",
"hasStarImport",
"(",
"threshold",
",",
"onDemandConflicts",
")",
";",
"if",
"(",
"doStarImport",
"&&",
"(",
"pack",
".",
"find",
"(",
"\"*\"",
")",
"==",
"null",
")",
")",
"{",
"String",
"[",
"]",
"imports",
"=",
"getNewImportStrings",
"(",
"pack",
",",
"isStatic",
",",
"lineDelim",
")",
";",
"for",
"(",
"int",
"j",
"=",
"0",
",",
"max",
"=",
"imports",
".",
"length",
";",
"j",
"<",
"max",
";",
"j",
"++",
")",
"{",
"stringsToInsert",
".",
"add",
"(",
"imports",
"[",
"j",
"]",
")",
";",
"}",
"}",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"nImports",
";",
"k",
"++",
")",
"{",
"ImportDeclEntry",
"currDecl",
"=",
"pack",
".",
"getImportAt",
"(",
"k",
")",
";",
"IRegion",
"region",
"=",
"currDecl",
".",
"getSourceRange",
"(",
")",
";",
"if",
"(",
"region",
"==",
"null",
")",
"{",
"if",
"(",
"!",
"doStarImport",
"||",
"currDecl",
".",
"isOnDemand",
"(",
")",
"||",
"(",
"onDemandConflicts",
"!=",
"null",
"&&",
"onDemandConflicts",
".",
"contains",
"(",
"currDecl",
".",
"getSimpleName",
"(",
")",
")",
")",
")",
"{",
"String",
"str",
"=",
"getNewImportString",
"(",
"currDecl",
".",
"getElementName",
"(",
")",
",",
"isStatic",
",",
"lineDelim",
")",
";",
"stringsToInsert",
".",
"add",
"(",
"str",
")",
";",
"}",
"else",
"if",
"(",
"doStarImport",
"&&",
"!",
"currDecl",
".",
"isOnDemand",
"(",
")",
")",
"{",
"String",
"simpleName",
"=",
"currDecl",
".",
"getTypeQualifiedName",
"(",
")",
";",
"if",
"(",
"simpleName",
".",
"indexOf",
"(",
"'.'",
")",
"!=",
"-",
"1",
")",
"{",
"String",
"str",
"=",
"getNewImportString",
"(",
"currDecl",
".",
"getElementName",
"(",
")",
",",
"isStatic",
",",
"lineDelim",
")",
";",
"if",
"(",
"stringsToInsert",
".",
"indexOf",
"(",
"str",
")",
"==",
"-",
"1",
")",
"{",
"stringsToInsert",
".",
"add",
"(",
"str",
")",
";",
"}",
"}",
"}",
"}",
"else",
"if",
"(",
"!",
"doStarImport",
"||",
"currDecl",
".",
"isOnDemand",
"(",
")",
"||",
"onDemandConflicts",
"==",
"null",
"||",
"onDemandConflicts",
".",
"contains",
"(",
"currDecl",
".",
"getSimpleName",
"(",
")",
")",
")",
"{",
"int",
"offset",
"=",
"region",
".",
"getOffset",
"(",
")",
";",
"removeAndInsertNew",
"(",
"buffer",
",",
"currPos",
",",
"offset",
",",
"stringsToInsert",
",",
"resEdit",
")",
";",
"stringsToInsert",
".",
"clear",
"(",
")",
";",
"currPos",
"=",
"offset",
"+",
"region",
".",
"getLength",
"(",
")",
";",
"}",
"else",
"if",
"(",
"doStarImport",
"&&",
"!",
"currDecl",
".",
"isOnDemand",
"(",
")",
")",
"{",
"String",
"simpleName",
"=",
"currDecl",
".",
"getTypeQualifiedName",
"(",
")",
";",
"if",
"(",
"simpleName",
".",
"indexOf",
"(",
"'.'",
")",
"!=",
"-",
"1",
")",
"{",
"String",
"str",
"=",
"getNewImportString",
"(",
"currDecl",
".",
"getElementName",
"(",
")",
",",
"isStatic",
",",
"lineDelim",
")",
";",
"if",
"(",
"stringsToInsert",
".",
"indexOf",
"(",
"str",
")",
"==",
"-",
"1",
")",
"{",
"stringsToInsert",
".",
"add",
"(",
"str",
")",
";",
"}",
"}",
"}",
"}",
"}",
"int",
"end",
"=",
"importsStart",
"+",
"importsLen",
";",
"removeAndInsertNew",
"(",
"buffer",
",",
"currPos",
",",
"end",
",",
"stringsToInsert",
",",
"resEdit",
")",
";",
"if",
"(",
"importsLen",
"==",
"0",
")",
"{",
"if",
"(",
"!",
"this",
".",
"importsCreated",
".",
"isEmpty",
"(",
")",
"||",
"!",
"this",
".",
"staticImportsCreated",
".",
"isEmpty",
"(",
")",
")",
"{",
"if",
"(",
"(",
"this",
".",
"flags",
"&",
"F_NEEDS_TRAILING_DELIM",
")",
"!=",
"0",
")",
"{",
"resEdit",
".",
"addChild",
"(",
"new",
"InsertEdit",
"(",
"currPos",
",",
"lineDelim",
")",
")",
";",
"}",
"}",
"else",
"{",
"return",
"new",
"MultiTextEdit",
"(",
")",
";",
"}",
"}",
"return",
"resEdit",
";",
"}",
"finally",
"{",
"monitor",
".",
"done",
"(",
")",
";",
"}",
"}",
"private",
"void",
"removeAndInsertNew",
"(",
"IBuffer",
"buffer",
",",
"int",
"contentOffset",
",",
"int",
"contentEnd",
",",
"ArrayList",
"stringsToInsert",
",",
"MultiTextEdit",
"resEdit",
")",
"{",
"int",
"pos",
"=",
"contentOffset",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"stringsToInsert",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"String",
"curr",
"=",
"(",
"String",
")",
"stringsToInsert",
".",
"get",
"(",
"i",
")",
";",
"int",
"idx",
"=",
"findInBuffer",
"(",
"buffer",
",",
"curr",
",",
"pos",
",",
"contentEnd",
")",
";",
"if",
"(",
"idx",
"!=",
"-",
"1",
")",
"{",
"if",
"(",
"idx",
"!=",
"pos",
")",
"{",
"resEdit",
".",
"addChild",
"(",
"new",
"DeleteEdit",
"(",
"pos",
",",
"idx",
"-",
"pos",
")",
")",
";",
"}",
"pos",
"=",
"idx",
"+",
"curr",
".",
"length",
"(",
")",
";",
"}",
"else",
"{",
"resEdit",
".",
"addChild",
"(",
"new",
"InsertEdit",
"(",
"pos",
",",
"curr",
")",
")",
";",
"}",
"}",
"if",
"(",
"pos",
"<",
"contentEnd",
")",
"{",
"resEdit",
".",
"addChild",
"(",
"new",
"DeleteEdit",
"(",
"pos",
",",
"contentEnd",
"-",
"pos",
")",
")",
";",
"}",
"}",
"private",
"int",
"findInBuffer",
"(",
"IBuffer",
"buffer",
",",
"String",
"str",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"int",
"pos",
"=",
"start",
";",
"int",
"len",
"=",
"str",
".",
"length",
"(",
")",
";",
"if",
"(",
"pos",
"+",
"len",
">",
"end",
"||",
"str",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"-",
"1",
";",
"}",
"char",
"first",
"=",
"str",
".",
"charAt",
"(",
"0",
")",
";",
"int",
"step",
"=",
"str",
".",
"indexOf",
"(",
"first",
",",
"1",
")",
";",
"if",
"(",
"step",
"==",
"-",
"1",
")",
"{",
"step",
"=",
"len",
";",
"}",
"while",
"(",
"pos",
"+",
"len",
"<=",
"end",
")",
"{",
"if",
"(",
"buffer",
".",
"getChar",
"(",
"pos",
")",
"==",
"first",
")",
"{",
"int",
"k",
"=",
"1",
";",
"while",
"(",
"k",
"<",
"len",
"&&",
"buffer",
".",
"getChar",
"(",
"pos",
"+",
"k",
")",
"==",
"str",
".",
"charAt",
"(",
"k",
")",
")",
"{",
"k",
"++",
";",
"}",
"if",
"(",
"k",
"==",
"len",
")",
"{",
"return",
"pos",
";",
"}",
"if",
"(",
"k",
"<",
"step",
")",
"{",
"pos",
"+=",
"k",
";",
"}",
"else",
"{",
"pos",
"+=",
"step",
";",
"}",
"}",
"else",
"{",
"pos",
"++",
";",
"}",
"}",
"return",
"-",
"1",
";",
"}",
"private",
"Set",
"evaluateStarImportConflicts",
"(",
"IProgressMonitor",
"monitor",
")",
"throws",
"JavaModelException",
"{",
"final",
"HashSet",
"onDemandConflicts",
"=",
"new",
"HashSet",
"(",
")",
";",
"IJavaSearchScope",
"scope",
"=",
"SearchEngine",
".",
"createJavaSearchScope",
"(",
"new",
"IJavaElement",
"[",
"]",
"{",
"this",
".",
"compilationUnit",
".",
"getJavaProject",
"(",
")",
"}",
")",
";",
"ArrayList",
"starImportPackages",
"=",
"new",
"ArrayList",
"(",
")",
";",
"ArrayList",
"simpleTypeNames",
"=",
"new",
"ArrayList",
"(",
")",
";",
"int",
"nPackageEntries",
"=",
"this",
".",
"packageEntries",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nPackageEntries",
";",
"i",
"++",
")",
"{",
"PackageEntry",
"pack",
"=",
"(",
"PackageEntry",
")",
"this",
".",
"packageEntries",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"!",
"pack",
".",
"isStatic",
"(",
")",
"&&",
"pack",
".",
"hasStarImport",
"(",
"this",
".",
"importOnDemandThreshold",
",",
"null",
")",
")",
"{",
"starImportPackages",
".",
"add",
"(",
"pack",
".",
"getName",
"(",
")",
".",
"toCharArray",
"(",
")",
")",
";",
"for",
"(",
"int",
"k",
"=",
"0",
";",
"k",
"<",
"pack",
".",
"getNumberOfImports",
"(",
")",
";",
"k",
"++",
")",
"{",
"ImportDeclEntry",
"curr",
"=",
"pack",
".",
"getImportAt",
"(",
"k",
")",
";",
"if",
"(",
"!",
"curr",
".",
"isOnDemand",
"(",
")",
"&&",
"!",
"curr",
".",
"isComment",
"(",
")",
")",
"{",
"simpleTypeNames",
".",
"add",
"(",
"curr",
".",
"getSimpleName",
"(",
")",
".",
"toCharArray",
"(",
")",
")",
";",
"}",
"}",
"}",
"}",
"if",
"(",
"starImportPackages",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"starImportPackages",
".",
"add",
"(",
"this",
".",
"compilationUnit",
".",
"getParent",
"(",
")",
".",
"getElementName",
"(",
")",
".",
"toCharArray",
"(",
")",
")",
";",
"starImportPackages",
".",
"add",
"(",
"JAVA_LANG",
".",
"toCharArray",
"(",
")",
")",
";",
"char",
"[",
"]",
"[",
"]",
"allPackages",
"=",
"(",
"char",
"[",
"]",
"[",
"]",
")",
"starImportPackages",
".",
"toArray",
"(",
"new",
"char",
"[",
"starImportPackages",
".",
"size",
"(",
")",
"]",
"[",
"]",
")",
";",
"char",
"[",
"]",
"[",
"]",
"allTypes",
"=",
"(",
"char",
"[",
"]",
"[",
"]",
")",
"simpleTypeNames",
".",
"toArray",
"(",
"new",
"char",
"[",
"simpleTypeNames",
".",
"size",
"(",
")",
"]",
"[",
"]",
")",
";",
"TypeNameRequestor",
"requestor",
"=",
"new",
"TypeNameRequestor",
"(",
")",
"{",
"HashMap",
"foundTypes",
"=",
"new",
"HashMap",
"(",
")",
";",
"private",
"String",
"getTypeContainerName",
"(",
"char",
"[",
"]",
"packageName",
",",
"char",
"[",
"]",
"[",
"]",
"enclosingTypeNames",
")",
"{",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buf",
".",
"append",
"(",
"packageName",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"enclosingTypeNames",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"buf",
".",
"length",
"(",
")",
">",
"0",
")",
"buf",
".",
"append",
"(",
"'.'",
")",
";",
"buf",
".",
"append",
"(",
"enclosingTypeNames",
"[",
"i",
"]",
")",
";",
"}",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}",
"public",
"void",
"acceptType",
"(",
"int",
"modifiers",
",",
"char",
"[",
"]",
"packageName",
",",
"char",
"[",
"]",
"simpleTypeName",
",",
"char",
"[",
"]",
"[",
"]",
"enclosingTypeNames",
",",
"String",
"path",
")",
"{",
"String",
"name",
"=",
"new",
"String",
"(",
"simpleTypeName",
")",
";",
"String",
"containerName",
"=",
"getTypeContainerName",
"(",
"packageName",
",",
"enclosingTypeNames",
")",
";",
"String",
"oldContainer",
"=",
"(",
"String",
")",
"this",
".",
"foundTypes",
".",
"put",
"(",
"name",
",",
"containerName",
")",
";",
"if",
"(",
"oldContainer",
"!=",
"null",
"&&",
"!",
"oldContainer",
".",
"equals",
"(",
"containerName",
")",
")",
"{",
"onDemandConflicts",
".",
"add",
"(",
"name",
")",
";",
"}",
"}",
"}",
";",
"new",
"SearchEngine",
"(",
")",
".",
"searchAllTypeNames",
"(",
"allPackages",
",",
"allTypes",
",",
"scope",
",",
"requestor",
",",
"IJavaSearchConstants",
".",
"WAIT_UNTIL_READY_TO_SEARCH",
",",
"monitor",
")",
";",
"return",
"onDemandConflicts",
";",
"}",
"private",
"String",
"getNewImportString",
"(",
"String",
"importName",
",",
"boolean",
"isStatic",
",",
"String",
"lineDelim",
")",
"{",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buf",
".",
"append",
"(",
"\"import",
"\"",
")",
";",
"if",
"(",
"isStatic",
")",
"{",
"buf",
".",
"append",
"(",
"\"static",
"\"",
")",
";",
"}",
"buf",
".",
"append",
"(",
"importName",
")",
";",
"if",
"(",
"insertSpaceBeforeSemicolon",
"(",
")",
")",
"buf",
".",
"append",
"(",
"'",
"'",
")",
";",
"buf",
".",
"append",
"(",
"';'",
")",
";",
"buf",
".",
"append",
"(",
"lineDelim",
")",
";",
"if",
"(",
"isStatic",
")",
"{",
"this",
".",
"staticImportsCreated",
".",
"add",
"(",
"importName",
")",
";",
"}",
"else",
"{",
"this",
".",
"importsCreated",
".",
"add",
"(",
"importName",
")",
";",
"}",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}",
"private",
"String",
"[",
"]",
"getNewImportStrings",
"(",
"PackageEntry",
"packageEntry",
",",
"boolean",
"isStatic",
",",
"String",
"lineDelim",
")",
"{",
"boolean",
"isStarImportAdded",
"=",
"false",
";",
"List",
"allImports",
"=",
"new",
"ArrayList",
"(",
")",
";",
"int",
"nImports",
"=",
"packageEntry",
".",
"getNumberOfImports",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nImports",
";",
"i",
"++",
")",
"{",
"ImportDeclEntry",
"curr",
"=",
"packageEntry",
".",
"getImportAt",
"(",
"i",
")",
";",
"String",
"simpleName",
"=",
"curr",
".",
"getTypeQualifiedName",
"(",
")",
";",
"if",
"(",
"simpleName",
".",
"indexOf",
"(",
"'.'",
")",
"!=",
"-",
"1",
")",
"{",
"allImports",
".",
"add",
"(",
"getNewImportString",
"(",
"curr",
".",
"getElementName",
"(",
")",
",",
"isStatic",
",",
"lineDelim",
")",
")",
";",
"}",
"else",
"if",
"(",
"!",
"isStarImportAdded",
")",
"{",
"String",
"starImportString",
"=",
"packageEntry",
".",
"getName",
"(",
")",
"+",
"\".*\"",
";",
"allImports",
".",
"add",
"(",
"getNewImportString",
"(",
"starImportString",
",",
"isStatic",
",",
"lineDelim",
")",
")",
";",
"isStarImportAdded",
"=",
"true",
";",
"}",
"}",
"return",
"(",
"String",
"[",
"]",
")",
"allImports",
".",
"toArray",
"(",
"new",
"String",
"[",
"allImports",
".",
"size",
"(",
")",
"]",
")",
";",
"}",
"private",
"static",
"int",
"getFirstTypeBeginPos",
"(",
"CompilationUnit",
"root",
")",
"{",
"List",
"types",
"=",
"root",
".",
"types",
"(",
")",
";",
"if",
"(",
"!",
"types",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"root",
".",
"getExtendedStartPosition",
"(",
"(",
"(",
"ASTNode",
")",
"types",
".",
"get",
"(",
"0",
")",
")",
")",
";",
"}",
"return",
"-",
"1",
";",
"}",
"private",
"int",
"getPackageStatementEndPos",
"(",
"CompilationUnit",
"root",
")",
"{",
"PackageDeclaration",
"packDecl",
"=",
"root",
".",
"getPackage",
"(",
")",
";",
"if",
"(",
"packDecl",
"!=",
"null",
")",
"{",
"int",
"afterPackageStatementPos",
"=",
"-",
"1",
";",
"int",
"lineNumber",
"=",
"root",
".",
"getLineNumber",
"(",
"packDecl",
".",
"getStartPosition",
"(",
")",
"+",
"packDecl",
".",
"getLength",
"(",
")",
")",
";",
"if",
"(",
"lineNumber",
">=",
"0",
")",
"{",
"int",
"lineAfterPackage",
"=",
"lineNumber",
"+",
"1",
";",
"afterPackageStatementPos",
"=",
"root",
".",
"getPosition",
"(",
"lineAfterPackage",
",",
"0",
")",
";",
"}",
"if",
"(",
"afterPackageStatementPos",
"<",
"0",
")",
"{",
"this",
".",
"flags",
"|=",
"F_NEEDS_LEADING_DELIM",
";",
"return",
"packDecl",
".",
"getStartPosition",
"(",
")",
"+",
"packDecl",
".",
"getLength",
"(",
")",
";",
"}",
"int",
"firstTypePos",
"=",
"getFirstTypeBeginPos",
"(",
"root",
")",
";",
"if",
"(",
"firstTypePos",
"!=",
"-",
"1",
"&&",
"firstTypePos",
"<=",
"afterPackageStatementPos",
")",
"{",
"this",
".",
"flags",
"|=",
"F_NEEDS_TRAILING_DELIM",
";",
"if",
"(",
"firstTypePos",
"==",
"afterPackageStatementPos",
")",
"{",
"this",
".",
"flags",
"|=",
"F_NEEDS_LEADING_DELIM",
";",
"}",
"return",
"firstTypePos",
";",
"}",
"this",
".",
"flags",
"|=",
"F_NEEDS_LEADING_DELIM",
";",
"return",
"afterPackageStatementPos",
";",
"}",
"this",
".",
"flags",
"|=",
"F_NEEDS_TRAILING_DELIM",
";",
"return",
"0",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"int",
"nPackages",
"=",
"this",
".",
"packageEntries",
".",
"size",
"(",
")",
";",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
"\"\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nPackages",
";",
"i",
"++",
")",
"{",
"PackageEntry",
"entry",
"=",
"(",
"PackageEntry",
")",
"this",
".",
"packageEntries",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"entry",
".",
"isStatic",
"(",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"static",
"\"",
")",
";",
"}",
"buf",
".",
"append",
"(",
"entry",
".",
"toString",
"(",
")",
")",
";",
"}",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}",
"private",
"static",
"final",
"class",
"ImportDeclEntry",
"{",
"private",
"String",
"elementName",
";",
"private",
"IRegion",
"sourceRange",
";",
"private",
"final",
"boolean",
"isStatic",
";",
"private",
"int",
"containerNameLength",
";",
"public",
"ImportDeclEntry",
"(",
"int",
"containerNameLength",
",",
"String",
"elementName",
",",
"boolean",
"isStatic",
",",
"IRegion",
"sourceRange",
")",
"{",
"this",
".",
"elementName",
"=",
"elementName",
";",
"this",
".",
"sourceRange",
"=",
"sourceRange",
";",
"this",
".",
"isStatic",
"=",
"isStatic",
";",
"this",
".",
"containerNameLength",
"=",
"containerNameLength",
";",
"}",
"public",
"String",
"getElementName",
"(",
")",
"{",
"return",
"this",
".",
"elementName",
";",
"}",
"public",
"int",
"compareTo",
"(",
"String",
"fullName",
",",
"boolean",
"isStaticImport",
")",
"{",
"int",
"cmp",
"=",
"this",
".",
"elementName",
".",
"compareTo",
"(",
"fullName",
")",
";",
"if",
"(",
"cmp",
"==",
"0",
")",
"{",
"if",
"(",
"this",
".",
"isStatic",
"==",
"isStaticImport",
")",
"{",
"return",
"0",
";",
"}",
"return",
"this",
".",
"isStatic",
"?",
"-",
"1",
":",
"1",
";",
"}",
"return",
"cmp",
";",
"}",
"public",
"String",
"getSimpleName",
"(",
")",
"{",
"return",
"Signature",
".",
"getSimpleName",
"(",
"this",
".",
"elementName",
")",
";",
"}",
"public",
"String",
"getTypeQualifiedName",
"(",
")",
"{",
"return",
"this",
".",
"elementName",
".",
"substring",
"(",
"this",
".",
"containerNameLength",
"+",
"1",
")",
";",
"}",
"public",
"boolean",
"isOnDemand",
"(",
")",
"{",
"return",
"this",
".",
"elementName",
"!=",
"null",
"&&",
"this",
".",
"elementName",
".",
"endsWith",
"(",
"\".*\"",
")",
";",
"}",
"public",
"boolean",
"isStatic",
"(",
")",
"{",
"return",
"this",
".",
"isStatic",
";",
"}",
"public",
"boolean",
"isNew",
"(",
")",
"{",
"return",
"this",
".",
"sourceRange",
"==",
"null",
";",
"}",
"public",
"boolean",
"isComment",
"(",
")",
"{",
"return",
"this",
".",
"elementName",
"==",
"null",
";",
"}",
"public",
"IRegion",
"getSourceRange",
"(",
")",
"{",
"return",
"this",
".",
"sourceRange",
";",
"}",
"}",
"private",
"final",
"static",
"class",
"PackageEntry",
"{",
"private",
"String",
"name",
";",
"private",
"ArrayList",
"importEntries",
";",
"private",
"String",
"group",
";",
"private",
"boolean",
"isStatic",
";",
"public",
"PackageEntry",
"(",
")",
"{",
"this",
"(",
"\"!\"",
",",
"null",
",",
"false",
")",
";",
"}",
"public",
"PackageEntry",
"(",
"String",
"name",
",",
"String",
"group",
",",
"boolean",
"isStatic",
")",
"{",
"this",
".",
"name",
"=",
"name",
";",
"this",
".",
"importEntries",
"=",
"new",
"ArrayList",
"(",
"5",
")",
";",
"this",
".",
"group",
"=",
"group",
";",
"this",
".",
"isStatic",
"=",
"isStatic",
";",
"}",
"public",
"boolean",
"isStatic",
"(",
")",
"{",
"return",
"this",
".",
"isStatic",
";",
"}",
"public",
"int",
"compareTo",
"(",
"String",
"otherName",
",",
"boolean",
"isOtherStatic",
")",
"{",
"int",
"cmp",
"=",
"this",
".",
"name",
".",
"compareTo",
"(",
"otherName",
")",
";",
"if",
"(",
"cmp",
"==",
"0",
")",
"{",
"if",
"(",
"this",
".",
"isStatic",
"==",
"isOtherStatic",
")",
"{",
"return",
"0",
";",
"}",
"return",
"this",
".",
"isStatic",
"?",
"-",
"1",
":",
"1",
";",
"}",
"return",
"cmp",
";",
"}",
"public",
"void",
"sortIn",
"(",
"ImportDeclEntry",
"imp",
")",
"{",
"String",
"fullImportName",
"=",
"imp",
".",
"getElementName",
"(",
")",
";",
"int",
"insertPosition",
"=",
"-",
"1",
";",
"int",
"nInports",
"=",
"this",
".",
"importEntries",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nInports",
";",
"i",
"++",
")",
"{",
"ImportDeclEntry",
"curr",
"=",
"getImportAt",
"(",
"i",
")",
";",
"if",
"(",
"!",
"curr",
".",
"isComment",
"(",
")",
")",
"{",
"int",
"cmp",
"=",
"curr",
".",
"compareTo",
"(",
"fullImportName",
",",
"imp",
".",
"isStatic",
"(",
")",
")",
";",
"if",
"(",
"cmp",
"==",
"0",
")",
"{",
"return",
";",
"}",
"else",
"if",
"(",
"cmp",
">",
"0",
"&&",
"insertPosition",
"==",
"-",
"1",
")",
"{",
"insertPosition",
"=",
"i",
";",
"}",
"}",
"}",
"if",
"(",
"insertPosition",
"==",
"-",
"1",
")",
"{",
"this",
".",
"importEntries",
".",
"add",
"(",
"imp",
")",
";",
"}",
"else",
"{",
"this",
".",
"importEntries",
".",
"add",
"(",
"insertPosition",
",",
"imp",
")",
";",
"}",
"}",
"public",
"void",
"add",
"(",
"ImportDeclEntry",
"imp",
")",
"{",
"this",
".",
"importEntries",
".",
"add",
"(",
"imp",
")",
";",
"}",
"public",
"ImportDeclEntry",
"find",
"(",
"String",
"simpleName",
")",
"{",
"int",
"nInports",
"=",
"this",
".",
"importEntries",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nInports",
";",
"i",
"++",
")",
"{",
"ImportDeclEntry",
"curr",
"=",
"getImportAt",
"(",
"i",
")",
";",
"if",
"(",
"!",
"curr",
".",
"isComment",
"(",
")",
")",
"{",
"String",
"currName",
"=",
"curr",
".",
"getElementName",
"(",
")",
";",
"if",
"(",
"currName",
".",
"endsWith",
"(",
"simpleName",
")",
")",
"{",
"int",
"dotPos",
"=",
"currName",
".",
"length",
"(",
")",
"-",
"simpleName",
".",
"length",
"(",
")",
"-",
"1",
";",
"if",
"(",
"(",
"dotPos",
"==",
"-",
"1",
")",
"||",
"(",
"dotPos",
">",
"0",
"&&",
"currName",
".",
"charAt",
"(",
"dotPos",
")",
"==",
"'.'",
")",
")",
"{",
"return",
"curr",
";",
"}",
"}",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"boolean",
"remove",
"(",
"String",
"fullName",
",",
"boolean",
"isStaticImport",
")",
"{",
"int",
"nInports",
"=",
"this",
".",
"importEntries",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nInports",
";",
"i",
"++",
")",
"{",
"ImportDeclEntry",
"curr",
"=",
"getImportAt",
"(",
"i",
")",
";",
"if",
"(",
"!",
"curr",
".",
"isComment",
"(",
")",
"&&",
"curr",
".",
"compareTo",
"(",
"fullName",
",",
"isStaticImport",
")",
"==",
"0",
")",
"{",
"this",
".",
"importEntries",
".",
"remove",
"(",
"i",
")",
";",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"void",
"filterImplicitImports",
"(",
"boolean",
"useContextToFilterImplicitImports",
")",
"{",
"int",
"nInports",
"=",
"this",
".",
"importEntries",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"nInports",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"ImportDeclEntry",
"curr",
"=",
"getImportAt",
"(",
"i",
")",
";",
"if",
"(",
"curr",
".",
"isNew",
"(",
")",
")",
"{",
"if",
"(",
"!",
"useContextToFilterImplicitImports",
")",
"{",
"this",
".",
"importEntries",
".",
"remove",
"(",
"i",
")",
";",
"}",
"else",
"{",
"String",
"elementName",
"=",
"curr",
".",
"getElementName",
"(",
")",
";",
"int",
"lastIndexOf",
"=",
"elementName",
".",
"lastIndexOf",
"(",
"'.'",
")",
";",
"boolean",
"internalClassImport",
"=",
"lastIndexOf",
">",
"getName",
"(",
")",
".",
"length",
"(",
")",
";",
"if",
"(",
"!",
"internalClassImport",
")",
"{",
"this",
".",
"importEntries",
".",
"remove",
"(",
"i",
")",
";",
"}",
"}",
"}",
"}",
"}",
"public",
"ImportDeclEntry",
"getImportAt",
"(",
"int",
"index",
")",
"{",
"return",
"(",
"ImportDeclEntry",
")",
"this",
".",
"importEntries",
".",
"get",
"(",
"index",
")",
";",
"}",
"public",
"boolean",
"hasStarImport",
"(",
"int",
"threshold",
",",
"Set",
"explicitImports",
")",
"{",
"if",
"(",
"isComment",
"(",
")",
"||",
"isDefaultPackage",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"int",
"nImports",
"=",
"getNumberOfImports",
"(",
")",
";",
"int",
"count",
"=",
"0",
";",
"boolean",
"containsNew",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nImports",
";",
"i",
"++",
")",
"{",
"ImportDeclEntry",
"curr",
"=",
"getImportAt",
"(",
"i",
")",
";",
"if",
"(",
"curr",
".",
"isOnDemand",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"!",
"curr",
".",
"isComment",
"(",
")",
")",
"{",
"count",
"++",
";",
"boolean",
"isExplicit",
"=",
"!",
"curr",
".",
"isStatic",
"(",
")",
"&&",
"(",
"explicitImports",
"!=",
"null",
")",
"&&",
"explicitImports",
".",
"contains",
"(",
"curr",
".",
"getSimpleName",
"(",
")",
")",
";",
"containsNew",
"|=",
"curr",
".",
"isNew",
"(",
")",
"&&",
"!",
"isExplicit",
";",
"}",
"}",
"return",
"(",
"count",
">=",
"threshold",
")",
"&&",
"containsNew",
";",
"}",
"public",
"int",
"getNumberOfImports",
"(",
")",
"{",
"return",
"this",
".",
"importEntries",
".",
"size",
"(",
")",
";",
"}",
"public",
"String",
"getName",
"(",
")",
"{",
"return",
"this",
".",
"name",
";",
"}",
"public",
"String",
"getGroupID",
"(",
")",
"{",
"return",
"this",
".",
"group",
";",
"}",
"public",
"void",
"setGroupID",
"(",
"String",
"groupID",
")",
"{",
"this",
".",
"group",
"=",
"groupID",
";",
"}",
"public",
"boolean",
"isSameGroup",
"(",
"PackageEntry",
"other",
")",
"{",
"if",
"(",
"this",
".",
"group",
"==",
"null",
")",
"{",
"return",
"other",
".",
"getGroupID",
"(",
")",
"==",
"null",
";",
"}",
"else",
"{",
"return",
"this",
".",
"group",
".",
"equals",
"(",
"other",
".",
"getGroupID",
"(",
")",
")",
"&&",
"(",
"this",
".",
"isStatic",
"==",
"other",
".",
"isStatic",
"(",
")",
")",
";",
"}",
"}",
"public",
"boolean",
"isComment",
"(",
")",
"{",
"return",
"\"!\"",
".",
"equals",
"(",
"this",
".",
"name",
")",
";",
"}",
"public",
"boolean",
"isDefaultPackage",
"(",
")",
"{",
"return",
"this",
".",
"name",
".",
"length",
"(",
")",
"==",
"0",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"isComment",
"(",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"commentn\"",
")",
";",
"}",
"else",
"{",
"buf",
".",
"append",
"(",
"this",
".",
"name",
")",
";",
"buf",
".",
"append",
"(",
"\",",
"groupId:",
"\"",
")",
";",
"buf",
".",
"append",
"(",
"this",
".",
"group",
")",
";",
"buf",
".",
"append",
"(",
"\"n\"",
")",
";",
"int",
"nImports",
"=",
"getNumberOfImports",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nImports",
";",
"i",
"++",
")",
"{",
"ImportDeclEntry",
"curr",
"=",
"getImportAt",
"(",
"i",
")",
";",
"buf",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"if",
"(",
"curr",
".",
"isStatic",
"(",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"static",
"\"",
")",
";",
"}",
"buf",
".",
"append",
"(",
"curr",
".",
"getTypeQualifiedName",
"(",
")",
")",
";",
"if",
"(",
"curr",
".",
"isNew",
"(",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"",
"(new)\"",
")",
";",
"}",
"buf",
".",
"append",
"(",
"\"n\"",
")",
";",
"}",
"}",
"return",
"buf",
".",
"toString",
"(",
")",
";",
"}",
"}",
"public",
"String",
"[",
"]",
"getCreatedImports",
"(",
")",
"{",
"return",
"(",
"String",
"[",
"]",
")",
"this",
".",
"importsCreated",
".",
"toArray",
"(",
"new",
"String",
"[",
"this",
".",
"importsCreated",
".",
"size",
"(",
")",
"]",
")",
";",
"}",
"public",
"String",
"[",
"]",
"getCreatedStaticImports",
"(",
")",
"{",
"return",
"(",
"String",
"[",
"]",
")",
"this",
".",
"staticImportsCreated",
".",
"toArray",
"(",
"new",
"String",
"[",
"this",
".",
"staticImportsCreated",
".",
"size",
"(",
")",
"]",
")",
";",
"}",
"}",
"</s>"
] |
4,357 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"import",
"java",
".",
"util",
".",
"Arrays",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"LineComment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"formatter",
".",
"IndentManipulation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"LineCommentEndOffsets",
"{",
"private",
"int",
"[",
"]",
"offsets",
";",
"private",
"final",
"List",
"commentList",
";",
"public",
"LineCommentEndOffsets",
"(",
"List",
"commentList",
")",
"{",
"this",
".",
"commentList",
"=",
"commentList",
";",
"this",
".",
"offsets",
"=",
"null",
";",
"}",
"private",
"int",
"[",
"]",
"getOffsets",
"(",
")",
"{",
"if",
"(",
"this",
".",
"offsets",
"==",
"null",
")",
"{",
"if",
"(",
"this",
".",
"commentList",
"!=",
"null",
")",
"{",
"int",
"nComments",
"=",
"this",
".",
"commentList",
".",
"size",
"(",
")",
";",
"int",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"nComments",
";",
"i",
"++",
")",
"{",
"Object",
"curr",
"=",
"this",
".",
"commentList",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"curr",
"instanceof",
"LineComment",
")",
"{",
"count",
"++",
";",
"}",
"}",
"this",
".",
"offsets",
"=",
"new",
"int",
"[",
"count",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"k",
"=",
"0",
";",
"i",
"<",
"nComments",
";",
"i",
"++",
")",
"{",
"Object",
"curr",
"=",
"this",
".",
"commentList",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"curr",
"instanceof",
"LineComment",
")",
"{",
"LineComment",
"comment",
"=",
"(",
"LineComment",
")",
"curr",
";",
"this",
".",
"offsets",
"[",
"k",
"++",
"]",
"=",
"comment",
".",
"getStartPosition",
"(",
")",
"+",
"comment",
".",
"getLength",
"(",
")",
";",
"}",
"}",
"}",
"else",
"{",
"this",
".",
"offsets",
"=",
"Util",
".",
"EMPTY_INT_ARRAY",
";",
"}",
"}",
"return",
"this",
".",
"offsets",
";",
"}",
"public",
"boolean",
"isEndOfLineComment",
"(",
"int",
"offset",
")",
"{",
"return",
"offset",
">=",
"0",
"&&",
"Arrays",
".",
"binarySearch",
"(",
"getOffsets",
"(",
")",
",",
"offset",
")",
">=",
"0",
";",
"}",
"public",
"boolean",
"isEndOfLineComment",
"(",
"int",
"offset",
",",
"char",
"[",
"]",
"content",
")",
"{",
"if",
"(",
"offset",
"<",
"0",
"||",
"(",
"offset",
"<",
"content",
".",
"length",
"&&",
"!",
"IndentManipulation",
".",
"isLineDelimiterChar",
"(",
"content",
"[",
"offset",
"]",
")",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"Arrays",
".",
"binarySearch",
"(",
"getOffsets",
"(",
")",
",",
"offset",
")",
">=",
"0",
";",
"}",
"public",
"boolean",
"remove",
"(",
"int",
"offset",
")",
"{",
"int",
"[",
"]",
"offsetArray",
"=",
"getOffsets",
"(",
")",
";",
"int",
"index",
"=",
"Arrays",
".",
"binarySearch",
"(",
"offsetArray",
",",
"offset",
")",
";",
"if",
"(",
"index",
">=",
"0",
")",
"{",
"if",
"(",
"index",
">",
"0",
")",
"{",
"System",
".",
"arraycopy",
"(",
"offsetArray",
",",
"0",
",",
"offsetArray",
",",
"1",
",",
"index",
")",
";",
"}",
"offsetArray",
"[",
"0",
"]",
"=",
"-",
"1",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
4,358 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"rewrite",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"*",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"public",
"class",
"ASTRewriteFlattener",
"extends",
"ASTVisitor",
"{",
"static",
"final",
"int",
"JLS2_INTERNAL",
"=",
"AST",
".",
"JLS2",
";",
"public",
"static",
"String",
"asString",
"(",
"ASTNode",
"node",
",",
"RewriteEventStore",
"store",
")",
"{",
"ASTRewriteFlattener",
"flattener",
"=",
"new",
"ASTRewriteFlattener",
"(",
"store",
")",
";",
"node",
".",
"accept",
"(",
"flattener",
")",
";",
"return",
"flattener",
".",
"getResult",
"(",
")",
";",
"}",
"protected",
"StringBuffer",
"result",
";",
"private",
"RewriteEventStore",
"store",
";",
"public",
"ASTRewriteFlattener",
"(",
"RewriteEventStore",
"store",
")",
"{",
"this",
".",
"store",
"=",
"store",
";",
"this",
".",
"result",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"}",
"public",
"String",
"getResult",
"(",
")",
"{",
"return",
"new",
"String",
"(",
"this",
".",
"result",
".",
"toString",
"(",
")",
")",
";",
"}",
"public",
"void",
"reset",
"(",
")",
"{",
"this",
".",
"result",
".",
"setLength",
"(",
"0",
")",
";",
"}",
"public",
"static",
"void",
"printModifiers",
"(",
"int",
"modifiers",
",",
"StringBuffer",
"buf",
")",
"{",
"if",
"(",
"Modifier",
".",
"isPublic",
"(",
"modifiers",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"public",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isProtected",
"(",
"modifiers",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"protected",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isPrivate",
"(",
"modifiers",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"private",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isStatic",
"(",
"modifiers",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"static",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isAbstract",
"(",
"modifiers",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"abstract",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isFinal",
"(",
"modifiers",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"final",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isSynchronized",
"(",
"modifiers",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isVolatile",
"(",
"modifiers",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"volatile",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isNative",
"(",
"modifiers",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"native",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isStrictfp",
"(",
"modifiers",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"strictfp",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isTransient",
"(",
"modifiers",
")",
")",
"{",
"buf",
".",
"append",
"(",
"\"transient",
"\"",
")",
";",
"}",
"}",
"protected",
"List",
"getChildList",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
")",
"{",
"return",
"(",
"List",
")",
"getAttribute",
"(",
"parent",
",",
"childProperty",
")",
";",
"}",
"protected",
"ASTNode",
"getChildNode",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
")",
"{",
"return",
"(",
"ASTNode",
")",
"getAttribute",
"(",
"parent",
",",
"childProperty",
")",
";",
"}",
"protected",
"int",
"getIntAttribute",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
")",
"{",
"return",
"(",
"(",
"Integer",
")",
"getAttribute",
"(",
"parent",
",",
"childProperty",
")",
")",
".",
"intValue",
"(",
")",
";",
"}",
"protected",
"boolean",
"getBooleanAttribute",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
")",
"{",
"return",
"(",
"(",
"Boolean",
")",
"getAttribute",
"(",
"parent",
",",
"childProperty",
")",
")",
".",
"booleanValue",
"(",
")",
";",
"}",
"protected",
"Object",
"getAttribute",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
")",
"{",
"return",
"this",
".",
"store",
".",
"getNewValue",
"(",
"parent",
",",
"childProperty",
")",
";",
"}",
"protected",
"void",
"visitList",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
",",
"String",
"separator",
")",
"{",
"List",
"list",
"=",
"getChildList",
"(",
"parent",
",",
"childProperty",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"list",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"separator",
"!=",
"null",
"&&",
"i",
">",
"0",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"separator",
")",
";",
"}",
"(",
"(",
"ASTNode",
")",
"list",
".",
"get",
"(",
"i",
")",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"}",
"protected",
"void",
"visitList",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"childProperty",
",",
"String",
"separator",
",",
"String",
"lead",
",",
"String",
"post",
")",
"{",
"List",
"list",
"=",
"getChildList",
"(",
"parent",
",",
"childProperty",
")",
";",
"if",
"(",
"!",
"list",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"lead",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"list",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"separator",
"!=",
"null",
"&&",
"i",
">",
"0",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"separator",
")",
";",
"}",
"(",
"(",
"ASTNode",
")",
"list",
".",
"get",
"(",
"i",
")",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"post",
")",
";",
"}",
"}",
"public",
"boolean",
"visit",
"(",
"AnonymousClassDeclaration",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'{'",
")",
";",
"visitList",
"(",
"node",
",",
"AnonymousClassDeclaration",
".",
"BODY_DECLARATIONS_PROPERTY",
",",
"null",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'}'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayAccess",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"ArrayAccess",
".",
"ARRAY_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'['",
")",
";",
"getChildNode",
"(",
"node",
",",
"ArrayAccess",
".",
"INDEX_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"']'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayCreation",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"new",
"\"",
")",
";",
"ArrayType",
"arrayType",
"=",
"(",
"ArrayType",
")",
"getChildNode",
"(",
"node",
",",
"ArrayCreation",
".",
"TYPE_PROPERTY",
")",
";",
"Type",
"elementType",
"=",
"(",
"Type",
")",
"getChildNode",
"(",
"arrayType",
",",
"ArrayType",
".",
"COMPONENT_TYPE_PROPERTY",
")",
";",
"int",
"dimensions",
"=",
"1",
";",
"while",
"(",
"elementType",
".",
"isArrayType",
"(",
")",
")",
"{",
"dimensions",
"++",
";",
"elementType",
"=",
"(",
"Type",
")",
"getChildNode",
"(",
"elementType",
",",
"ArrayType",
".",
"COMPONENT_TYPE_PROPERTY",
")",
";",
"}",
"elementType",
".",
"accept",
"(",
"this",
")",
";",
"List",
"list",
"=",
"getChildList",
"(",
"node",
",",
"ArrayCreation",
".",
"DIMENSIONS_PROPERTY",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"list",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'['",
")",
";",
"(",
"(",
"ASTNode",
")",
"list",
".",
"get",
"(",
"i",
")",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"']'",
")",
";",
"dimensions",
"--",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"dimensions",
";",
"i",
"++",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"[]\"",
")",
";",
"}",
"ASTNode",
"initializer",
"=",
"getChildNode",
"(",
"node",
",",
"ArrayCreation",
".",
"INITIALIZER_PROPERTY",
")",
";",
"if",
"(",
"initializer",
"!=",
"null",
")",
"{",
"getChildNode",
"(",
"node",
",",
"ArrayCreation",
".",
"INITIALIZER_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayInitializer",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'{'",
")",
";",
"visitList",
"(",
"node",
",",
"ArrayInitializer",
".",
"EXPRESSIONS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'}'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayType",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"ArrayType",
".",
"COMPONENT_TYPE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"\"[]\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AssertStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"assert",
"\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"AssertStatement",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"ASTNode",
"message",
"=",
"getChildNode",
"(",
"node",
",",
"AssertStatement",
".",
"MESSAGE_PROPERTY",
")",
";",
"if",
"(",
"message",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"':'",
")",
";",
"message",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Assignment",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"Assignment",
".",
"LEFT_HAND_SIDE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"getAttribute",
"(",
"node",
",",
"Assignment",
".",
"OPERATOR_PROPERTY",
")",
".",
"toString",
"(",
")",
")",
";",
"getChildNode",
"(",
"node",
",",
"Assignment",
".",
"RIGHT_HAND_SIDE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Block",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'{'",
")",
";",
"visitList",
"(",
"node",
",",
"Block",
".",
"STATEMENTS_PROPERTY",
",",
"null",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'}'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"BooleanLiteral",
"node",
")",
"{",
"if",
"(",
"node",
".",
"booleanValue",
"(",
")",
"==",
"true",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"true\"",
")",
";",
"}",
"else",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"false\"",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"BreakStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"break\"",
")",
";",
"ASTNode",
"label",
"=",
"getChildNode",
"(",
"node",
",",
"BreakStatement",
".",
"LABEL_PROPERTY",
")",
";",
"if",
"(",
"label",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"label",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"CastExpression",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'('",
")",
";",
"getChildNode",
"(",
"node",
",",
"CastExpression",
".",
"TYPE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"getChildNode",
"(",
"node",
",",
"CastExpression",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"CatchClause",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"catch",
"(\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"CatchClause",
".",
"EXCEPTION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"getChildNode",
"(",
"node",
",",
"CatchClause",
".",
"BODY_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"CharacterLiteral",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"getAttribute",
"(",
"node",
",",
"CharacterLiteral",
".",
"ESCAPED_VALUE_PROPERTY",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ClassInstanceCreation",
"node",
")",
"{",
"ASTNode",
"expression",
"=",
"getChildNode",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"EXPRESSION_PROPERTY",
")",
";",
"if",
"(",
"expression",
"!=",
"null",
")",
"{",
"expression",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'.'",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"\"new",
"\"",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"getChildNode",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"else",
"{",
"visitList",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"TYPE_ARGUMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
",",
"String",
".",
"valueOf",
"(",
"'<'",
")",
",",
"String",
".",
"valueOf",
"(",
"'>'",
")",
")",
";",
"getChildNode",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"TYPE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"'('",
")",
";",
"visitList",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"ARGUMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"ASTNode",
"decl",
"=",
"getChildNode",
"(",
"node",
",",
"ClassInstanceCreation",
".",
"ANONYMOUS_CLASS_DECLARATION_PROPERTY",
")",
";",
"if",
"(",
"decl",
"!=",
"null",
")",
"{",
"decl",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"CompilationUnit",
"node",
")",
"{",
"ASTNode",
"pack",
"=",
"getChildNode",
"(",
"node",
",",
"CompilationUnit",
".",
"PACKAGE_PROPERTY",
")",
";",
"if",
"(",
"pack",
"!=",
"null",
")",
"{",
"pack",
".",
"accept",
"(",
"this",
")",
";",
"}",
"visitList",
"(",
"node",
",",
"CompilationUnit",
".",
"IMPORTS_PROPERTY",
",",
"null",
")",
";",
"visitList",
"(",
"node",
",",
"CompilationUnit",
".",
"TYPES_PROPERTY",
",",
"null",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ConditionalExpression",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"ConditionalExpression",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'?'",
")",
";",
"getChildNode",
"(",
"node",
",",
"ConditionalExpression",
".",
"THEN_EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"':'",
")",
";",
"getChildNode",
"(",
"node",
",",
"ConditionalExpression",
".",
"ELSE_EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ConstructorInvocation",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"visitList",
"(",
"node",
",",
"ConstructorInvocation",
".",
"TYPE_ARGUMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
",",
"String",
".",
"valueOf",
"(",
"'<'",
")",
",",
"String",
".",
"valueOf",
"(",
"'>'",
")",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"\"this(\"",
")",
";",
"visitList",
"(",
"node",
",",
"ConstructorInvocation",
".",
"ARGUMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"\");\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ContinueStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"continue\"",
")",
";",
"ASTNode",
"label",
"=",
"getChildNode",
"(",
"node",
",",
"ContinueStatement",
".",
"LABEL_PROPERTY",
")",
";",
"if",
"(",
"label",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"label",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"DoStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"do",
"\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"DoStatement",
".",
"BODY_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"\"",
"while",
"(\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"DoStatement",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"\");\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EmptyStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ExpressionStatement",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"ExpressionStatement",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"FieldAccess",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"FieldAccess",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'.'",
")",
";",
"getChildNode",
"(",
"node",
",",
"FieldAccess",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"FieldDeclaration",
"node",
")",
"{",
"ASTNode",
"javadoc",
"=",
"getChildNode",
"(",
"node",
",",
"FieldDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"if",
"(",
"javadoc",
"!=",
"null",
")",
"{",
"javadoc",
".",
"accept",
"(",
"this",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"printModifiers",
"(",
"getIntAttribute",
"(",
"node",
",",
"FieldDeclaration",
".",
"MODIFIERS_PROPERTY",
")",
",",
"this",
".",
"result",
")",
";",
"}",
"else",
"{",
"visitList",
"(",
"node",
",",
"FieldDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"Util",
".",
"EMPTY_STRING",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
")",
";",
"}",
"getChildNode",
"(",
"node",
",",
"FieldDeclaration",
".",
"TYPE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"visitList",
"(",
"node",
",",
"FieldDeclaration",
".",
"FRAGMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ForStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"for",
"(\"",
")",
";",
"visitList",
"(",
"node",
",",
"ForStatement",
".",
"INITIALIZERS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"ASTNode",
"expression",
"=",
"getChildNode",
"(",
"node",
",",
"ForStatement",
".",
"EXPRESSION_PROPERTY",
")",
";",
"if",
"(",
"expression",
"!=",
"null",
")",
"{",
"expression",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"visitList",
"(",
"node",
",",
"ForStatement",
".",
"UPDATERS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"getChildNode",
"(",
"node",
",",
"ForStatement",
".",
"BODY_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"IfStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"if",
"(\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"IfStatement",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"getChildNode",
"(",
"node",
",",
"IfStatement",
".",
"THEN_STATEMENT_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"ASTNode",
"elseStatement",
"=",
"getChildNode",
"(",
"node",
",",
"IfStatement",
".",
"ELSE_STATEMENT_PROPERTY",
")",
";",
"if",
"(",
"elseStatement",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"",
"else",
"\"",
")",
";",
"elseStatement",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ImportDeclaration",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"import",
"\"",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"getBooleanAttribute",
"(",
"node",
",",
"ImportDeclaration",
".",
"STATIC_PROPERTY",
")",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"static",
"\"",
")",
";",
"}",
"}",
"getChildNode",
"(",
"node",
",",
"ImportDeclaration",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"getBooleanAttribute",
"(",
"node",
",",
"ImportDeclaration",
".",
"ON_DEMAND_PROPERTY",
")",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\".*\"",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"InfixExpression",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"InfixExpression",
".",
"LEFT_OPERAND_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"String",
"operator",
"=",
"getAttribute",
"(",
"node",
",",
"InfixExpression",
".",
"OPERATOR_PROPERTY",
")",
".",
"toString",
"(",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"operator",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"getChildNode",
"(",
"node",
",",
"InfixExpression",
".",
"RIGHT_OPERAND_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"List",
"list",
"=",
"getChildList",
"(",
"node",
",",
"InfixExpression",
".",
"EXTENDED_OPERANDS_PROPERTY",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"list",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"operator",
")",
";",
"(",
"(",
"ASTNode",
")",
"list",
".",
"get",
"(",
"i",
")",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"InstanceofExpression",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"InstanceofExpression",
".",
"LEFT_OPERAND_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"\"",
"instanceof",
"\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"InstanceofExpression",
".",
"RIGHT_OPERAND_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Initializer",
"node",
")",
"{",
"ASTNode",
"javadoc",
"=",
"getChildNode",
"(",
"node",
",",
"Initializer",
".",
"JAVADOC_PROPERTY",
")",
";",
"if",
"(",
"javadoc",
"!=",
"null",
")",
"{",
"javadoc",
".",
"accept",
"(",
"this",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"printModifiers",
"(",
"getIntAttribute",
"(",
"node",
",",
"Initializer",
".",
"MODIFIERS_PROPERTY",
")",
",",
"this",
".",
"result",
")",
";",
"}",
"else",
"{",
"visitList",
"(",
"node",
",",
"Initializer",
".",
"MODIFIERS2_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"Util",
".",
"EMPTY_STRING",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
")",
";",
"}",
"getChildNode",
"(",
"node",
",",
"Initializer",
".",
"BODY_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Javadoc",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"/**\"",
")",
";",
"List",
"list",
"=",
"getChildList",
"(",
"node",
",",
"Javadoc",
".",
"TAGS_PROPERTY",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"list",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"n",
"*",
"\"",
")",
";",
"(",
"(",
"ASTNode",
")",
"list",
".",
"get",
"(",
"i",
")",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"\"n",
"*/\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"LabeledStatement",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"LabeledStatement",
".",
"LABEL_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"\":",
"\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"LabeledStatement",
".",
"BODY_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodDeclaration",
"node",
")",
"{",
"ASTNode",
"javadoc",
"=",
"getChildNode",
"(",
"node",
",",
"MethodDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"if",
"(",
"javadoc",
"!=",
"null",
")",
"{",
"javadoc",
".",
"accept",
"(",
"this",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"printModifiers",
"(",
"getIntAttribute",
"(",
"node",
",",
"MethodDeclaration",
".",
"MODIFIERS_PROPERTY",
")",
",",
"this",
".",
"result",
")",
";",
"}",
"else",
"{",
"visitList",
"(",
"node",
",",
"MethodDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"Util",
".",
"EMPTY_STRING",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
")",
";",
"visitList",
"(",
"node",
",",
"MethodDeclaration",
".",
"TYPE_PARAMETERS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
",",
"String",
".",
"valueOf",
"(",
"'<'",
")",
",",
"String",
".",
"valueOf",
"(",
"'>'",
")",
")",
";",
"}",
"if",
"(",
"!",
"getBooleanAttribute",
"(",
"node",
",",
"MethodDeclaration",
".",
"CONSTRUCTOR_PROPERTY",
")",
")",
"{",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"getChildNode",
"(",
"node",
",",
"MethodDeclaration",
".",
"RETURN_TYPE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"else",
"{",
"ASTNode",
"returnType",
"=",
"getChildNode",
"(",
"node",
",",
"MethodDeclaration",
".",
"RETURN_TYPE2_PROPERTY",
")",
";",
"if",
"(",
"returnType",
"!=",
"null",
")",
"{",
"returnType",
".",
"accept",
"(",
"this",
")",
";",
"}",
"else",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"void\"",
")",
";",
"}",
"}",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"}",
"getChildNode",
"(",
"node",
",",
"MethodDeclaration",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'('",
")",
";",
"visitList",
"(",
"node",
",",
"MethodDeclaration",
".",
"PARAMETERS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"int",
"extraDims",
"=",
"getIntAttribute",
"(",
"node",
",",
"MethodDeclaration",
".",
"EXTRA_DIMENSIONS_PROPERTY",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"extraDims",
";",
"i",
"++",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"[]\"",
")",
";",
"}",
"visitList",
"(",
"node",
",",
"MethodDeclaration",
".",
"THROWN_EXCEPTIONS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
",",
"\"",
"throws",
"\"",
",",
"Util",
".",
"EMPTY_STRING",
")",
";",
"ASTNode",
"body",
"=",
"getChildNode",
"(",
"node",
",",
"MethodDeclaration",
".",
"BODY_PROPERTY",
")",
";",
"if",
"(",
"body",
"==",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"}",
"else",
"{",
"body",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodInvocation",
"node",
")",
"{",
"ASTNode",
"expression",
"=",
"getChildNode",
"(",
"node",
",",
"MethodInvocation",
".",
"EXPRESSION_PROPERTY",
")",
";",
"if",
"(",
"expression",
"!=",
"null",
")",
"{",
"expression",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'.'",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"visitList",
"(",
"node",
",",
"MethodInvocation",
".",
"TYPE_ARGUMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
",",
"String",
".",
"valueOf",
"(",
"'<'",
")",
",",
"String",
".",
"valueOf",
"(",
"'>'",
")",
")",
";",
"}",
"getChildNode",
"(",
"node",
",",
"MethodInvocation",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'('",
")",
";",
"visitList",
"(",
"node",
",",
"MethodInvocation",
".",
"ARGUMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"NullLiteral",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"null\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"NumberLiteral",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"getAttribute",
"(",
"node",
",",
"NumberLiteral",
".",
"TOKEN_PROPERTY",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PackageDeclaration",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"ASTNode",
"javadoc",
"=",
"getChildNode",
"(",
"node",
",",
"PackageDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"if",
"(",
"javadoc",
"!=",
"null",
")",
"{",
"javadoc",
".",
"accept",
"(",
"this",
")",
";",
"}",
"visitList",
"(",
"node",
",",
"PackageDeclaration",
".",
"ANNOTATIONS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"\"package",
"\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"PackageDeclaration",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ParenthesizedExpression",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'('",
")",
";",
"getChildNode",
"(",
"node",
",",
"ParenthesizedExpression",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PostfixExpression",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"PostfixExpression",
".",
"OPERAND_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"getAttribute",
"(",
"node",
",",
"PostfixExpression",
".",
"OPERATOR_PROPERTY",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PrefixExpression",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"getAttribute",
"(",
"node",
",",
"PrefixExpression",
".",
"OPERATOR_PROPERTY",
")",
".",
"toString",
"(",
")",
")",
";",
"getChildNode",
"(",
"node",
",",
"PrefixExpression",
".",
"OPERAND_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PrimitiveType",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"getAttribute",
"(",
"node",
",",
"PrimitiveType",
".",
"PRIMITIVE_TYPE_CODE_PROPERTY",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"QualifiedName",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"QualifiedName",
".",
"QUALIFIER_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'.'",
")",
";",
"getChildNode",
"(",
"node",
",",
"QualifiedName",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ReturnStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"return\"",
")",
";",
"ASTNode",
"expression",
"=",
"getChildNode",
"(",
"node",
",",
"ReturnStatement",
".",
"EXPRESSION_PROPERTY",
")",
";",
"if",
"(",
"expression",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"expression",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SimpleName",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"getAttribute",
"(",
"node",
",",
"SimpleName",
".",
"IDENTIFIER_PROPERTY",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SimpleType",
"node",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SingleVariableDeclaration",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"printModifiers",
"(",
"getIntAttribute",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"MODIFIERS_PROPERTY",
")",
",",
"this",
".",
"result",
")",
";",
"}",
"else",
"{",
"visitList",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"Util",
".",
"EMPTY_STRING",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
")",
";",
"}",
"getChildNode",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"TYPE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"getBooleanAttribute",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"VARARGS_PROPERTY",
")",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"...\"",
")",
";",
"}",
"}",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"getChildNode",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"int",
"extraDimensions",
"=",
"getIntAttribute",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"EXTRA_DIMENSIONS_PROPERTY",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"extraDimensions",
";",
"i",
"++",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"[]\"",
")",
";",
"}",
"ASTNode",
"initializer",
"=",
"getChildNode",
"(",
"node",
",",
"SingleVariableDeclaration",
".",
"INITIALIZER_PROPERTY",
")",
";",
"if",
"(",
"initializer",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'='",
")",
";",
"initializer",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"StringLiteral",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"getAttribute",
"(",
"node",
",",
"StringLiteral",
".",
"ESCAPED_VALUE_PROPERTY",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SuperConstructorInvocation",
"node",
")",
"{",
"ASTNode",
"expression",
"=",
"getChildNode",
"(",
"node",
",",
"SuperConstructorInvocation",
".",
"EXPRESSION_PROPERTY",
")",
";",
"if",
"(",
"expression",
"!=",
"null",
")",
"{",
"expression",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'.'",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"visitList",
"(",
"node",
",",
"SuperConstructorInvocation",
".",
"TYPE_ARGUMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
",",
"String",
".",
"valueOf",
"(",
"'<'",
")",
",",
"String",
".",
"valueOf",
"(",
"'>'",
")",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"\"super(\"",
")",
";",
"visitList",
"(",
"node",
",",
"SuperConstructorInvocation",
".",
"ARGUMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"\");\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SuperFieldAccess",
"node",
")",
"{",
"ASTNode",
"qualifier",
"=",
"getChildNode",
"(",
"node",
",",
"SuperFieldAccess",
".",
"QUALIFIER_PROPERTY",
")",
";",
"if",
"(",
"qualifier",
"!=",
"null",
")",
"{",
"qualifier",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'.'",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"\"super.\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"SuperFieldAccess",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SuperMethodInvocation",
"node",
")",
"{",
"ASTNode",
"qualifier",
"=",
"getChildNode",
"(",
"node",
",",
"SuperMethodInvocation",
".",
"QUALIFIER_PROPERTY",
")",
";",
"if",
"(",
"qualifier",
"!=",
"null",
")",
"{",
"qualifier",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'.'",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"\"super.\"",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"visitList",
"(",
"node",
",",
"SuperMethodInvocation",
".",
"TYPE_ARGUMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
",",
"String",
".",
"valueOf",
"(",
"'<'",
")",
",",
"String",
".",
"valueOf",
"(",
"'>'",
")",
")",
";",
"}",
"getChildNode",
"(",
"node",
",",
"SuperMethodInvocation",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'('",
")",
";",
"visitList",
"(",
"node",
",",
"SuperMethodInvocation",
".",
"ARGUMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SwitchCase",
"node",
")",
"{",
"ASTNode",
"expression",
"=",
"getChildNode",
"(",
"node",
",",
"SwitchCase",
".",
"EXPRESSION_PROPERTY",
")",
";",
"if",
"(",
"expression",
"==",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"default\"",
")",
";",
"}",
"else",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"case",
"\"",
")",
";",
"expression",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"':'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SwitchStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"switch",
"(\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"SwitchStatement",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'{'",
")",
";",
"visitList",
"(",
"node",
",",
"SwitchStatement",
".",
"STATEMENTS_PROPERTY",
",",
"null",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'}'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SynchronizedStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"SynchronizedStatement",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"getChildNode",
"(",
"node",
",",
"SynchronizedStatement",
".",
"BODY_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ThisExpression",
"node",
")",
"{",
"ASTNode",
"qualifier",
"=",
"getChildNode",
"(",
"node",
",",
"ThisExpression",
".",
"QUALIFIER_PROPERTY",
")",
";",
"if",
"(",
"qualifier",
"!=",
"null",
")",
"{",
"qualifier",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'.'",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"\"this\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ThrowStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"throw",
"\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"ThrowStatement",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TryStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"try",
"\"",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS4",
")",
"{",
"visitList",
"(",
"node",
",",
"TryStatement",
".",
"RESOURCES_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"';'",
")",
",",
"String",
".",
"valueOf",
"(",
"'('",
")",
",",
"String",
".",
"valueOf",
"(",
"')'",
")",
")",
";",
"}",
"getChildNode",
"(",
"node",
",",
"TryStatement",
".",
"BODY_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"visitList",
"(",
"node",
",",
"TryStatement",
".",
"CATCH_CLAUSES_PROPERTY",
",",
"null",
")",
";",
"ASTNode",
"finallyClause",
"=",
"getChildNode",
"(",
"node",
",",
"TryStatement",
".",
"FINALLY_PROPERTY",
")",
";",
"if",
"(",
"finallyClause",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"",
"finally",
"\"",
")",
";",
"finallyClause",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeDeclaration",
"node",
")",
"{",
"int",
"apiLevel",
"=",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
";",
"ASTNode",
"javadoc",
"=",
"getChildNode",
"(",
"node",
",",
"TypeDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"if",
"(",
"javadoc",
"!=",
"null",
")",
"{",
"javadoc",
".",
"accept",
"(",
"this",
")",
";",
"}",
"if",
"(",
"apiLevel",
"==",
"JLS2_INTERNAL",
")",
"{",
"printModifiers",
"(",
"getIntAttribute",
"(",
"node",
",",
"TypeDeclaration",
".",
"MODIFIERS_PROPERTY",
")",
",",
"this",
".",
"result",
")",
";",
"}",
"else",
"{",
"visitList",
"(",
"node",
",",
"TypeDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"Util",
".",
"EMPTY_STRING",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
")",
";",
"}",
"boolean",
"isInterface",
"=",
"getBooleanAttribute",
"(",
"node",
",",
"TypeDeclaration",
".",
"INTERFACE_PROPERTY",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"isInterface",
"?",
"\"interface",
"\"",
":",
"\"class",
"\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"TypeDeclaration",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"apiLevel",
">=",
"AST",
".",
"JLS3",
")",
"{",
"visitList",
"(",
"node",
",",
"TypeDeclaration",
".",
"TYPE_PARAMETERS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
",",
"String",
".",
"valueOf",
"(",
"'<'",
")",
",",
"String",
".",
"valueOf",
"(",
"'>'",
")",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"ChildPropertyDescriptor",
"superClassProperty",
"=",
"(",
"apiLevel",
"==",
"JLS2_INTERNAL",
")",
"?",
"TypeDeclaration",
".",
"SUPERCLASS_PROPERTY",
":",
"TypeDeclaration",
".",
"SUPERCLASS_TYPE_PROPERTY",
";",
"ASTNode",
"superclass",
"=",
"getChildNode",
"(",
"node",
",",
"superClassProperty",
")",
";",
"if",
"(",
"superclass",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"extends",
"\"",
")",
";",
"superclass",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"}",
"ChildListPropertyDescriptor",
"superInterfaceProperty",
"=",
"(",
"apiLevel",
"==",
"JLS2_INTERNAL",
")",
"?",
"TypeDeclaration",
".",
"SUPER_INTERFACES_PROPERTY",
":",
"TypeDeclaration",
".",
"SUPER_INTERFACE_TYPES_PROPERTY",
";",
"String",
"lead",
"=",
"isInterface",
"?",
"\"extends",
"\"",
":",
"\"implements",
"\"",
";",
"visitList",
"(",
"node",
",",
"superInterfaceProperty",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
",",
"lead",
",",
"Util",
".",
"EMPTY_STRING",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'{'",
")",
";",
"visitList",
"(",
"node",
",",
"TypeDeclaration",
".",
"BODY_DECLARATIONS_PROPERTY",
",",
"null",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'}'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeDeclarationStatement",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"getChildNode",
"(",
"node",
",",
"TypeDeclarationStatement",
".",
"TYPE_DECLARATION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"else",
"{",
"getChildNode",
"(",
"node",
",",
"TypeDeclarationStatement",
".",
"DECLARATION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeLiteral",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"TypeLiteral",
".",
"TYPE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"\".class\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"UnionType",
"node",
")",
"{",
"visitList",
"(",
"node",
",",
"UnionType",
".",
"TYPES_PROPERTY",
",",
"\"",
"|",
"\"",
",",
"Util",
".",
"EMPTY_STRING",
",",
"Util",
".",
"EMPTY_STRING",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"VariableDeclarationExpression",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"printModifiers",
"(",
"getIntAttribute",
"(",
"node",
",",
"VariableDeclarationExpression",
".",
"MODIFIERS_PROPERTY",
")",
",",
"this",
".",
"result",
")",
";",
"}",
"else",
"{",
"visitList",
"(",
"node",
",",
"VariableDeclarationExpression",
".",
"MODIFIERS2_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"Util",
".",
"EMPTY_STRING",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
")",
";",
"}",
"getChildNode",
"(",
"node",
",",
"VariableDeclarationExpression",
".",
"TYPE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"visitList",
"(",
"node",
",",
"VariableDeclarationExpression",
".",
"FRAGMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"VariableDeclarationFragment",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"VariableDeclarationFragment",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"int",
"extraDimensions",
"=",
"getIntAttribute",
"(",
"node",
",",
"VariableDeclarationFragment",
".",
"EXTRA_DIMENSIONS_PROPERTY",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"extraDimensions",
";",
"i",
"++",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"[]\"",
")",
";",
"}",
"ASTNode",
"initializer",
"=",
"getChildNode",
"(",
"node",
",",
"VariableDeclarationFragment",
".",
"INITIALIZER_PROPERTY",
")",
";",
"if",
"(",
"initializer",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'='",
")",
";",
"initializer",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"VariableDeclarationStatement",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2_INTERNAL",
")",
"{",
"printModifiers",
"(",
"getIntAttribute",
"(",
"node",
",",
"VariableDeclarationStatement",
".",
"MODIFIERS_PROPERTY",
")",
",",
"this",
".",
"result",
")",
";",
"}",
"else",
"{",
"visitList",
"(",
"node",
",",
"VariableDeclarationStatement",
".",
"MODIFIERS2_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"Util",
".",
"EMPTY_STRING",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
")",
";",
"}",
"getChildNode",
"(",
"node",
",",
"VariableDeclarationStatement",
".",
"TYPE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"visitList",
"(",
"node",
",",
"VariableDeclarationStatement",
".",
"FRAGMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"WhileStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"while",
"(\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"WhileStatement",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"getChildNode",
"(",
"node",
",",
"WhileStatement",
".",
"BODY_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"BlockComment",
"node",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"LineComment",
"node",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MemberRef",
"node",
")",
"{",
"ASTNode",
"qualifier",
"=",
"getChildNode",
"(",
"node",
",",
"MemberRef",
".",
"QUALIFIER_PROPERTY",
")",
";",
"if",
"(",
"qualifier",
"!=",
"null",
")",
"{",
"qualifier",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"'#'",
")",
";",
"getChildNode",
"(",
"node",
",",
"MemberRef",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodRef",
"node",
")",
"{",
"ASTNode",
"qualifier",
"=",
"getChildNode",
"(",
"node",
",",
"MethodRef",
".",
"QUALIFIER_PROPERTY",
")",
";",
"if",
"(",
"qualifier",
"!=",
"null",
")",
"{",
"qualifier",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"'#'",
")",
";",
"getChildNode",
"(",
"node",
",",
"MethodRef",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'('",
")",
";",
"visitList",
"(",
"node",
",",
"MethodRef",
".",
"PARAMETERS_PROPERTY",
",",
"\",\"",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodRefParameter",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"MethodRefParameter",
".",
"TYPE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"getBooleanAttribute",
"(",
"node",
",",
"MethodRefParameter",
".",
"VARARGS_PROPERTY",
")",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"...\"",
")",
";",
"}",
"}",
"ASTNode",
"name",
"=",
"getChildNode",
"(",
"node",
",",
"MethodRefParameter",
".",
"NAME_PROPERTY",
")",
";",
"if",
"(",
"name",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"name",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TagElement",
"node",
")",
"{",
"Object",
"tagName",
"=",
"getAttribute",
"(",
"node",
",",
"TagElement",
".",
"TAG_NAME_PROPERTY",
")",
";",
"if",
"(",
"tagName",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"(",
"String",
")",
"tagName",
")",
";",
"}",
"List",
"list",
"=",
"getChildList",
"(",
"node",
",",
"TagElement",
".",
"FRAGMENTS_PROPERTY",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"list",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"i",
">",
"0",
"||",
"tagName",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"}",
"ASTNode",
"curr",
"=",
"(",
"ASTNode",
")",
"list",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"curr",
"instanceof",
"TagElement",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'{'",
")",
";",
"curr",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'}'",
")",
";",
"}",
"else",
"{",
"curr",
".",
"accept",
"(",
"this",
")",
";",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TextElement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"getAttribute",
"(",
"node",
",",
"TextElement",
".",
"TEXT_PROPERTY",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AnnotationTypeDeclaration",
"node",
")",
"{",
"ASTNode",
"javadoc",
"=",
"getChildNode",
"(",
"node",
",",
"AnnotationTypeDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"if",
"(",
"javadoc",
"!=",
"null",
")",
"{",
"javadoc",
".",
"accept",
"(",
"this",
")",
";",
"}",
"visitList",
"(",
"node",
",",
"AnnotationTypeDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"Util",
".",
"EMPTY_STRING",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"\"@interface",
"\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"AnnotationTypeDeclaration",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'{'",
")",
";",
"visitList",
"(",
"node",
",",
"AnnotationTypeDeclaration",
".",
"BODY_DECLARATIONS_PROPERTY",
",",
"Util",
".",
"EMPTY_STRING",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'}'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AnnotationTypeMemberDeclaration",
"node",
")",
"{",
"ASTNode",
"javadoc",
"=",
"getChildNode",
"(",
"node",
",",
"AnnotationTypeMemberDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"if",
"(",
"javadoc",
"!=",
"null",
")",
"{",
"javadoc",
".",
"accept",
"(",
"this",
")",
";",
"}",
"visitList",
"(",
"node",
",",
"AnnotationTypeMemberDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"Util",
".",
"EMPTY_STRING",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
")",
";",
"getChildNode",
"(",
"node",
",",
"AnnotationTypeMemberDeclaration",
".",
"TYPE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"getChildNode",
"(",
"node",
",",
"AnnotationTypeMemberDeclaration",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"\"()\"",
")",
";",
"ASTNode",
"def",
"=",
"getChildNode",
"(",
"node",
",",
"AnnotationTypeMemberDeclaration",
".",
"DEFAULT_PROPERTY",
")",
";",
"if",
"(",
"def",
"!=",
"null",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"",
"default",
"\"",
")",
";",
"def",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"result",
".",
"append",
"(",
"';'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EnhancedForStatement",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"for",
"(\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"EnhancedForStatement",
".",
"PARAMETER_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"':'",
")",
";",
"getChildNode",
"(",
"node",
",",
"EnhancedForStatement",
".",
"EXPRESSION_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"getChildNode",
"(",
"node",
",",
"EnhancedForStatement",
".",
"BODY_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EnumConstantDeclaration",
"node",
")",
"{",
"ASTNode",
"javadoc",
"=",
"getChildNode",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"if",
"(",
"javadoc",
"!=",
"null",
")",
"{",
"javadoc",
".",
"accept",
"(",
"this",
")",
";",
"}",
"visitList",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"Util",
".",
"EMPTY_STRING",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
")",
";",
"getChildNode",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"visitList",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"ARGUMENTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
",",
"String",
".",
"valueOf",
"(",
"'('",
")",
",",
"String",
".",
"valueOf",
"(",
"')'",
")",
")",
";",
"ASTNode",
"classDecl",
"=",
"getChildNode",
"(",
"node",
",",
"EnumConstantDeclaration",
".",
"ANONYMOUS_CLASS_DECLARATION_PROPERTY",
")",
";",
"if",
"(",
"classDecl",
"!=",
"null",
")",
"{",
"classDecl",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EnumDeclaration",
"node",
")",
"{",
"ASTNode",
"javadoc",
"=",
"getChildNode",
"(",
"node",
",",
"EnumDeclaration",
".",
"JAVADOC_PROPERTY",
")",
";",
"if",
"(",
"javadoc",
"!=",
"null",
")",
"{",
"javadoc",
".",
"accept",
"(",
"this",
")",
";",
"}",
"visitList",
"(",
"node",
",",
"EnumDeclaration",
".",
"MODIFIERS2_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
",",
"Util",
".",
"EMPTY_STRING",
",",
"String",
".",
"valueOf",
"(",
"'",
"'",
")",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"\"enum",
"\"",
")",
";",
"getChildNode",
"(",
"node",
",",
"EnumDeclaration",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'",
"'",
")",
";",
"visitList",
"(",
"node",
",",
"EnumDeclaration",
".",
"SUPER_INTERFACE_TYPES_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
",",
"\"implements",
"\"",
",",
"Util",
".",
"EMPTY_STRING",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'{'",
")",
";",
"visitList",
"(",
"node",
",",
"EnumDeclaration",
".",
"ENUM_CONSTANTS_PROPERTY",
",",
"String",
".",
"valueOf",
"(",
"','",
")",
",",
"Util",
".",
"EMPTY_STRING",
",",
"Util",
".",
"EMPTY_STRING",
")",
";",
"visitList",
"(",
"node",
",",
"EnumDeclaration",
".",
"BODY_DECLARATIONS_PROPERTY",
",",
"Util",
".",
"EMPTY_STRING",
",",
"String",
".",
"valueOf",
"(",
"';'",
")",
",",
"Util",
".",
"EMPTY_STRING",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'}'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MarkerAnnotation",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'@'",
")",
";",
"getChildNode",
"(",
"node",
",",
"MarkerAnnotation",
".",
"TYPE_NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MemberValuePair",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"MemberValuePair",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'='",
")",
";",
"getChildNode",
"(",
"node",
",",
"MemberValuePair",
".",
"VALUE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Modifier",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"getAttribute",
"(",
"node",
",",
"Modifier",
".",
"KEYWORD_PROPERTY",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"NormalAnnotation",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'@'",
")",
";",
"getChildNode",
"(",
"node",
",",
"NormalAnnotation",
".",
"TYPE_NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'('",
")",
";",
"visitList",
"(",
"node",
",",
"NormalAnnotation",
".",
"VALUES_PROPERTY",
",",
"\",",
"\"",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ParameterizedType",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"ParameterizedType",
".",
"TYPE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'<'",
")",
";",
"visitList",
"(",
"node",
",",
"ParameterizedType",
".",
"TYPE_ARGUMENTS_PROPERTY",
",",
"\",",
"\"",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'>'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"QualifiedType",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"QualifiedType",
".",
"QUALIFIER_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'.'",
")",
";",
"getChildNode",
"(",
"node",
",",
"QualifiedType",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SingleMemberAnnotation",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'@'",
")",
";",
"getChildNode",
"(",
"node",
",",
"SingleMemberAnnotation",
".",
"TYPE_NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"'('",
")",
";",
"getChildNode",
"(",
"node",
",",
"SingleMemberAnnotation",
".",
"VALUE_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"result",
".",
"append",
"(",
"')'",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeParameter",
"node",
")",
"{",
"getChildNode",
"(",
"node",
",",
"TypeParameter",
".",
"NAME_PROPERTY",
")",
".",
"accept",
"(",
"this",
")",
";",
"visitList",
"(",
"node",
",",
"TypeParameter",
".",
"TYPE_BOUNDS_PROPERTY",
",",
"\"",
"&",
"\"",
",",
"\"",
"extends",
"\"",
",",
"Util",
".",
"EMPTY_STRING",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"WildcardType",
"node",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"'?'",
")",
";",
"ASTNode",
"bound",
"=",
"getChildNode",
"(",
"node",
",",
"WildcardType",
".",
"BOUND_PROPERTY",
")",
";",
"if",
"(",
"bound",
"!=",
"null",
")",
"{",
"if",
"(",
"getBooleanAttribute",
"(",
"node",
",",
"WildcardType",
".",
"UPPER_BOUND_PROPERTY",
")",
")",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"",
"extends",
"\"",
")",
";",
"}",
"else",
"{",
"this",
".",
"result",
".",
"append",
"(",
"\"",
"super",
"\"",
")",
";",
"}",
"bound",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
4,359 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"Iterator",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"AST",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTNode",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ASTVisitor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"AbstractTypeDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Annotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"AnnotationTypeDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"AnnotationTypeMemberDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"AnonymousClassDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ArrayAccess",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ArrayCreation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ArrayInitializer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ArrayType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"AssertStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Assignment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Block",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"BlockComment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"BodyDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"BooleanLiteral",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"BreakStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"CastExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"CatchClause",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"CharacterLiteral",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ClassInstanceCreation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"CompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ConditionalExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ConstructorInvocation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ContinueStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"UnionType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"DoStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"EmptyStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"EnhancedForStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"EnumConstantDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"EnumDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Expression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ExpressionStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"FieldAccess",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"FieldDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ForStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"IfStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ImportDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"InfixExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Initializer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"InstanceofExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Javadoc",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"LabeledStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"LineComment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"MarkerAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"MemberRef",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"MemberValuePair",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"MethodDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"MethodInvocation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"MethodRef",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"MethodRefParameter",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Modifier",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Name",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"NormalAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"NullLiteral",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"NumberLiteral",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"PackageDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ParameterizedType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ParenthesizedExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"PostfixExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"PrefixExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"PrimitiveType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"QualifiedName",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"QualifiedType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ReturnStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SimpleName",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SimpleType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SingleMemberAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SingleVariableDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Statement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"StringLiteral",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SuperConstructorInvocation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SuperFieldAccess",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SuperMethodInvocation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SwitchCase",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SwitchStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"SynchronizedStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"TagElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"TextElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ThisExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"ThrowStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"TryStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"Type",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"TypeDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"TypeDeclarationStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"TypeLiteral",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"TypeParameter",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"VariableDeclarationExpression",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"VariableDeclarationFragment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"VariableDeclarationStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"WhileStatement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"WildcardType",
";",
"public",
"class",
"NaiveASTFlattener",
"extends",
"ASTVisitor",
"{",
"private",
"static",
"final",
"int",
"JLS2",
"=",
"AST",
".",
"JLS2",
";",
"protected",
"StringBuffer",
"buffer",
";",
"private",
"int",
"indent",
"=",
"0",
";",
"public",
"NaiveASTFlattener",
"(",
")",
"{",
"this",
".",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"}",
"private",
"Name",
"getName",
"(",
"ClassInstanceCreation",
"node",
")",
"{",
"return",
"node",
".",
"getName",
"(",
")",
";",
"}",
"public",
"String",
"getResult",
"(",
")",
"{",
"return",
"this",
".",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"private",
"Type",
"getReturnType",
"(",
"MethodDeclaration",
"node",
")",
"{",
"return",
"node",
".",
"getReturnType",
"(",
")",
";",
"}",
"private",
"Name",
"getSuperclass",
"(",
"TypeDeclaration",
"node",
")",
"{",
"return",
"node",
".",
"getSuperclass",
"(",
")",
";",
"}",
"private",
"TypeDeclaration",
"getTypeDeclaration",
"(",
"TypeDeclarationStatement",
"node",
")",
"{",
"return",
"node",
".",
"getTypeDeclaration",
"(",
")",
";",
"}",
"void",
"printIndent",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"indent",
";",
"i",
"++",
")",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"}",
"void",
"printModifiers",
"(",
"int",
"modifiers",
")",
"{",
"if",
"(",
"Modifier",
".",
"isPublic",
"(",
"modifiers",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"public",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isProtected",
"(",
"modifiers",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"protected",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isPrivate",
"(",
"modifiers",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"private",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isStatic",
"(",
"modifiers",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"static",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isAbstract",
"(",
"modifiers",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"abstract",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isFinal",
"(",
"modifiers",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"final",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isSynchronized",
"(",
"modifiers",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isVolatile",
"(",
"modifiers",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"volatile",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isNative",
"(",
"modifiers",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"native",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isStrictfp",
"(",
"modifiers",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"strictfp",
"\"",
")",
";",
"}",
"if",
"(",
"Modifier",
".",
"isTransient",
"(",
"modifiers",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"transient",
"\"",
")",
";",
"}",
"}",
"void",
"printModifiers",
"(",
"List",
"ext",
")",
"{",
"for",
"(",
"Iterator",
"it",
"=",
"ext",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"ASTNode",
"p",
"=",
"(",
"ASTNode",
")",
"it",
".",
"next",
"(",
")",
";",
"p",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"}",
"}",
"public",
"void",
"reset",
"(",
")",
"{",
"this",
".",
"buffer",
".",
"setLength",
"(",
"0",
")",
";",
"}",
"private",
"List",
"superInterfaces",
"(",
"TypeDeclaration",
"node",
")",
"{",
"return",
"node",
".",
"superInterfaces",
"(",
")",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AnnotationTypeDeclaration",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getJavadoc",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getJavadoc",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"printIndent",
"(",
")",
";",
"printModifiers",
"(",
"node",
".",
"modifiers",
"(",
")",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"@interface",
"\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"{\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"bodyDeclarations",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"BodyDeclaration",
"d",
"=",
"(",
"BodyDeclaration",
")",
"it",
".",
"next",
"(",
")",
";",
"d",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"}n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AnnotationTypeMemberDeclaration",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getJavadoc",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getJavadoc",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"printIndent",
"(",
")",
";",
"printModifiers",
"(",
"node",
".",
"modifiers",
"(",
")",
")",
";",
"node",
".",
"getType",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"()\"",
")",
";",
"if",
"(",
"node",
".",
"getDefault",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"default",
"\"",
")",
";",
"node",
".",
"getDefault",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AnonymousClassDeclaration",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"{n\"",
")",
";",
"this",
".",
"indent",
"++",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"bodyDeclarations",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"BodyDeclaration",
"b",
"=",
"(",
"BodyDeclaration",
")",
"it",
".",
"next",
"(",
")",
";",
"b",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"indent",
"--",
";",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"}n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayAccess",
"node",
")",
"{",
"node",
".",
"getArray",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"[\"",
")",
";",
"node",
".",
"getIndex",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"]\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayCreation",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"new",
"\"",
")",
";",
"ArrayType",
"at",
"=",
"node",
".",
"getType",
"(",
")",
";",
"int",
"dims",
"=",
"at",
".",
"getDimensions",
"(",
")",
";",
"Type",
"elementType",
"=",
"at",
".",
"getElementType",
"(",
")",
";",
"elementType",
".",
"accept",
"(",
"this",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"dimensions",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"[\"",
")",
";",
"Expression",
"e",
"=",
"(",
"Expression",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"]\"",
")",
";",
"dims",
"--",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"dims",
";",
"i",
"++",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"[]\"",
")",
";",
"}",
"if",
"(",
"node",
".",
"getInitializer",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getInitializer",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayInitializer",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"{\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"expressions",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Expression",
"e",
"=",
"(",
"Expression",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"}\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ArrayType",
"node",
")",
"{",
"node",
".",
"getComponentType",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"[]\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"AssertStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"assert",
"\"",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"node",
".",
"getMessage",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
":",
"\"",
")",
";",
"node",
".",
"getMessage",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Assignment",
"node",
")",
"{",
"node",
".",
"getLeftHandSide",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getOperator",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"node",
".",
"getRightHandSide",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Block",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"{n\"",
")",
";",
"this",
".",
"indent",
"++",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"statements",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Statement",
"s",
"=",
"(",
"Statement",
")",
"it",
".",
"next",
"(",
")",
";",
"s",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"indent",
"--",
";",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"}n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"BlockComment",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"/*",
"*/\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"BooleanLiteral",
"node",
")",
"{",
"if",
"(",
"node",
".",
"booleanValue",
"(",
")",
"==",
"true",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"true\"",
")",
";",
"}",
"else",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"false\"",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"BreakStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"break\"",
")",
";",
"if",
"(",
"node",
".",
"getLabel",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"node",
".",
"getLabel",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"CastExpression",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"node",
".",
"getType",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"CatchClause",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"catch",
"(\"",
")",
";",
"node",
".",
"getException",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\")",
"\"",
")",
";",
"node",
".",
"getBody",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"CharacterLiteral",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getEscapedValue",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ClassInstanceCreation",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getExpression",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\".\"",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"new",
"\"",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2",
")",
"{",
"getName",
"(",
"node",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"!",
"node",
".",
"typeArguments",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"<\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"typeArguments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Type",
"t",
"=",
"(",
"Type",
")",
"it",
".",
"next",
"(",
")",
";",
"t",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\">\"",
")",
";",
"}",
"node",
".",
"getType",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"arguments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Expression",
"e",
"=",
"(",
"Expression",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"if",
"(",
"node",
".",
"getAnonymousClassDeclaration",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getAnonymousClassDeclaration",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"CompilationUnit",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getPackage",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getPackage",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"imports",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"ImportDeclaration",
"d",
"=",
"(",
"ImportDeclaration",
")",
"it",
".",
"next",
"(",
")",
";",
"d",
".",
"accept",
"(",
"this",
")",
";",
"}",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"types",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"AbstractTypeDeclaration",
"d",
"=",
"(",
"AbstractTypeDeclaration",
")",
"it",
".",
"next",
"(",
")",
";",
"d",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ConditionalExpression",
"node",
")",
"{",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"?",
"\"",
")",
";",
"node",
".",
"getThenExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
":",
"\"",
")",
";",
"node",
".",
"getElseExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ConstructorInvocation",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"!",
"node",
".",
"typeArguments",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"<\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"typeArguments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Type",
"t",
"=",
"(",
"Type",
")",
"it",
".",
"next",
"(",
")",
";",
"t",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\">\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"this(\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"arguments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Expression",
"e",
"=",
"(",
"Expression",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\");n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ContinueStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"continue\"",
")",
";",
"if",
"(",
"node",
".",
"getLabel",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"node",
".",
"getLabel",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"DoStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"do",
"\"",
")",
";",
"node",
".",
"getBody",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"while",
"(\"",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\");n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EmptyStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EnhancedForStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"for",
"(\"",
")",
";",
"node",
".",
"getParameter",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
":",
"\"",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\")",
"\"",
")",
";",
"node",
".",
"getBody",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EnumConstantDeclaration",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getJavadoc",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getJavadoc",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"printIndent",
"(",
")",
";",
"printModifiers",
"(",
"node",
".",
"modifiers",
"(",
")",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"!",
"node",
".",
"arguments",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"arguments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Expression",
"e",
"=",
"(",
"Expression",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAnonymousClassDeclaration",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getAnonymousClassDeclaration",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"EnumDeclaration",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getJavadoc",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getJavadoc",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"printIndent",
"(",
")",
";",
"printModifiers",
"(",
"node",
".",
"modifiers",
"(",
")",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"enum",
"\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"if",
"(",
"!",
"node",
".",
"superInterfaceTypes",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"implements",
"\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"superInterfaceTypes",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Type",
"t",
"=",
"(",
"Type",
")",
"it",
".",
"next",
"(",
")",
";",
"t",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"{\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"enumConstants",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"EnumConstantDeclaration",
"d",
"=",
"(",
"EnumConstantDeclaration",
")",
"it",
".",
"next",
"(",
")",
";",
"d",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"}",
"if",
"(",
"!",
"node",
".",
"bodyDeclarations",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\";",
"\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"bodyDeclarations",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"BodyDeclaration",
"d",
"=",
"(",
"BodyDeclaration",
")",
"it",
".",
"next",
"(",
")",
";",
"d",
".",
"accept",
"(",
"this",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"}n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ExpressionStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"FieldAccess",
"node",
")",
"{",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\".\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"FieldDeclaration",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getJavadoc",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getJavadoc",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"printIndent",
"(",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2",
")",
"{",
"printModifiers",
"(",
"node",
".",
"getModifiers",
"(",
")",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"printModifiers",
"(",
"node",
".",
"modifiers",
"(",
")",
")",
";",
"}",
"node",
".",
"getType",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"fragments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"VariableDeclarationFragment",
"f",
"=",
"(",
"VariableDeclarationFragment",
")",
"it",
".",
"next",
"(",
")",
";",
"f",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ForStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"for",
"(\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"initializers",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Expression",
"e",
"=",
"(",
"Expression",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"this",
".",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\";",
"\"",
")",
";",
"if",
"(",
"node",
".",
"getExpression",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\";",
"\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"updaters",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Expression",
"e",
"=",
"(",
"Expression",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"this",
".",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\")",
"\"",
")",
";",
"node",
".",
"getBody",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"IfStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"if",
"(\"",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\")",
"\"",
")",
";",
"node",
".",
"getThenStatement",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"node",
".",
"getElseStatement",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"else",
"\"",
")",
";",
"node",
".",
"getElseStatement",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ImportDeclaration",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"import",
"\"",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"node",
".",
"isStatic",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"static",
"\"",
")",
";",
"}",
"}",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"node",
".",
"isOnDemand",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\".*\"",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"InfixExpression",
"node",
")",
"{",
"node",
".",
"getLeftOperand",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"'",
"'",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getOperator",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"'",
"'",
")",
";",
"node",
".",
"getRightOperand",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"final",
"List",
"extendedOperands",
"=",
"node",
".",
"extendedOperands",
"(",
")",
";",
"if",
"(",
"extendedOperands",
".",
"size",
"(",
")",
"!=",
"0",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"'",
"'",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"extendedOperands",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getOperator",
"(",
")",
".",
"toString",
"(",
")",
")",
".",
"append",
"(",
"'",
"'",
")",
";",
"Expression",
"e",
"=",
"(",
"Expression",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Initializer",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getJavadoc",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getJavadoc",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2",
")",
"{",
"printModifiers",
"(",
"node",
".",
"getModifiers",
"(",
")",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"printModifiers",
"(",
"node",
".",
"modifiers",
"(",
")",
")",
";",
"}",
"node",
".",
"getBody",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"InstanceofExpression",
"node",
")",
"{",
"node",
".",
"getLeftOperand",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"instanceof",
"\"",
")",
";",
"node",
".",
"getRightOperand",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Javadoc",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"/**",
"\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"tags",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"ASTNode",
"e",
"=",
"(",
"ASTNode",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"n",
"*/n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"LabeledStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"node",
".",
"getLabel",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\":",
"\"",
")",
";",
"node",
".",
"getBody",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"LineComment",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"//n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MarkerAnnotation",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"@\"",
")",
";",
"node",
".",
"getTypeName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MemberRef",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getQualifier",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getQualifier",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"#\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MemberValuePair",
"node",
")",
"{",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"=\"",
")",
";",
"node",
".",
"getValue",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodDeclaration",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getJavadoc",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getJavadoc",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"printIndent",
"(",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2",
")",
"{",
"printModifiers",
"(",
"node",
".",
"getModifiers",
"(",
")",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"printModifiers",
"(",
"node",
".",
"modifiers",
"(",
")",
")",
";",
"if",
"(",
"!",
"node",
".",
"typeParameters",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"<\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"typeParameters",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"TypeParameter",
"t",
"=",
"(",
"TypeParameter",
")",
"it",
".",
"next",
"(",
")",
";",
"t",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\">\"",
")",
";",
"}",
"}",
"if",
"(",
"!",
"node",
".",
"isConstructor",
"(",
")",
")",
"{",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2",
")",
"{",
"getReturnType",
"(",
"node",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"else",
"{",
"if",
"(",
"node",
".",
"getReturnType2",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getReturnType2",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"else",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"void\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"}",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"parameters",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"SingleVariableDeclaration",
"v",
"=",
"(",
"SingleVariableDeclaration",
")",
"it",
".",
"next",
"(",
")",
";",
"v",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"node",
".",
"getExtraDimensions",
"(",
")",
";",
"i",
"++",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"[]\"",
")",
";",
"}",
"if",
"(",
"!",
"node",
".",
"thrownExceptions",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"throws",
"\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"thrownExceptions",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Name",
"n",
"=",
"(",
"Name",
")",
"it",
".",
"next",
"(",
")",
";",
"n",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"}",
"if",
"(",
"node",
".",
"getBody",
"(",
")",
"==",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"}",
"else",
"{",
"node",
".",
"getBody",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodInvocation",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getExpression",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\".\"",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"!",
"node",
".",
"typeArguments",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"<\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"typeArguments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Type",
"t",
"=",
"(",
"Type",
")",
"it",
".",
"next",
"(",
")",
";",
"t",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\">\"",
")",
";",
"}",
"}",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"arguments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Expression",
"e",
"=",
"(",
"Expression",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodRef",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getQualifier",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getQualifier",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"#\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"parameters",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"MethodRefParameter",
"e",
"=",
"(",
"MethodRefParameter",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodRefParameter",
"node",
")",
"{",
"node",
".",
"getType",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"node",
".",
"isVarargs",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"...\"",
")",
";",
"}",
"}",
"if",
"(",
"node",
".",
"getName",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Modifier",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getKeyword",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"NormalAnnotation",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"@\"",
")",
";",
"node",
".",
"getTypeName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"values",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"MemberValuePair",
"p",
"=",
"(",
"MemberValuePair",
")",
"it",
".",
"next",
"(",
")",
";",
"p",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"NullLiteral",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"null\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"NumberLiteral",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getToken",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PackageDeclaration",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"node",
".",
"getJavadoc",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getJavadoc",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"annotations",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Annotation",
"p",
"=",
"(",
"Annotation",
")",
"it",
".",
"next",
"(",
")",
";",
"p",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"}",
"}",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"package",
"\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ParameterizedType",
"node",
")",
"{",
"node",
".",
"getType",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"<\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"typeArguments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Type",
"t",
"=",
"(",
"Type",
")",
"it",
".",
"next",
"(",
")",
";",
"t",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\">\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ParenthesizedExpression",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PostfixExpression",
"node",
")",
"{",
"node",
".",
"getOperand",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getOperator",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PrefixExpression",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getOperator",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"node",
".",
"getOperand",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"PrimitiveType",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getPrimitiveTypeCode",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"QualifiedName",
"node",
")",
"{",
"node",
".",
"getQualifier",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\".\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"QualifiedType",
"node",
")",
"{",
"node",
".",
"getQualifier",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\".\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ReturnStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"return\"",
")",
";",
"if",
"(",
"node",
".",
"getExpression",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SimpleName",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getIdentifier",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SimpleType",
"node",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SingleMemberAnnotation",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"@\"",
")",
";",
"node",
".",
"getTypeName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"node",
".",
"getValue",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SingleVariableDeclaration",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2",
")",
"{",
"printModifiers",
"(",
"node",
".",
"getModifiers",
"(",
")",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"printModifiers",
"(",
"node",
".",
"modifiers",
"(",
")",
")",
";",
"}",
"node",
".",
"getType",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"node",
".",
"isVarargs",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"...\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"node",
".",
"getExtraDimensions",
"(",
")",
";",
"i",
"++",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"[]\"",
")",
";",
"}",
"if",
"(",
"node",
".",
"getInitializer",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"=\"",
")",
";",
"node",
".",
"getInitializer",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"StringLiteral",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getEscapedValue",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SuperConstructorInvocation",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"if",
"(",
"node",
".",
"getExpression",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\".\"",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"!",
"node",
".",
"typeArguments",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"<\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"typeArguments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Type",
"t",
"=",
"(",
"Type",
")",
"it",
".",
"next",
"(",
")",
";",
"t",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\">\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"super(\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"arguments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Expression",
"e",
"=",
"(",
"Expression",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\");n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SuperFieldAccess",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getQualifier",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getQualifier",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\".\"",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"super.\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SuperMethodInvocation",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getQualifier",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getQualifier",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\".\"",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"super.\"",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"!",
"node",
".",
"typeArguments",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"<\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"typeArguments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Type",
"t",
"=",
"(",
"Type",
")",
"it",
".",
"next",
"(",
")",
";",
"t",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\">\"",
")",
";",
"}",
"}",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"(\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"arguments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Expression",
"e",
"=",
"(",
"Expression",
")",
"it",
".",
"next",
"(",
")",
";",
"e",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\")\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SwitchCase",
"node",
")",
"{",
"if",
"(",
"node",
".",
"isDefault",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"default",
":n\"",
")",
";",
"}",
"else",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"case",
"\"",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\":n\"",
")",
";",
"}",
"this",
".",
"indent",
"++",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SwitchStatement",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"switch",
"(\"",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\")",
"\"",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"{n\"",
")",
";",
"this",
".",
"indent",
"++",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"statements",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Statement",
"s",
"=",
"(",
"Statement",
")",
"it",
".",
"next",
"(",
")",
";",
"s",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"indent",
"--",
";",
"}",
"this",
".",
"indent",
"--",
";",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"}n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"SynchronizedStatement",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"\"",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\")",
"\"",
")",
";",
"node",
".",
"getBody",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TagElement",
"node",
")",
"{",
"if",
"(",
"node",
".",
"isNested",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"{\"",
")",
";",
"}",
"else",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"n",
"*",
"\"",
")",
";",
"}",
"boolean",
"previousRequiresWhiteSpace",
"=",
"false",
";",
"if",
"(",
"node",
".",
"getTagName",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getTagName",
"(",
")",
")",
";",
"previousRequiresWhiteSpace",
"=",
"true",
";",
"}",
"boolean",
"previousRequiresNewLine",
"=",
"false",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"fragments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"ASTNode",
"e",
"=",
"(",
"ASTNode",
")",
"it",
".",
"next",
"(",
")",
";",
"boolean",
"currentIncludesWhiteSpace",
"=",
"(",
"e",
"instanceof",
"TextElement",
")",
";",
"if",
"(",
"previousRequiresNewLine",
"&&",
"currentIncludesWhiteSpace",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"n",
"*",
"\"",
")",
";",
"}",
"previousRequiresNewLine",
"=",
"currentIncludesWhiteSpace",
";",
"if",
"(",
"previousRequiresWhiteSpace",
"&&",
"!",
"currentIncludesWhiteSpace",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"}",
"e",
".",
"accept",
"(",
"this",
")",
";",
"previousRequiresWhiteSpace",
"=",
"!",
"currentIncludesWhiteSpace",
"&&",
"!",
"(",
"e",
"instanceof",
"TagElement",
")",
";",
"}",
"if",
"(",
"node",
".",
"isNested",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"}\"",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TextElement",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"getText",
"(",
")",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ThisExpression",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getQualifier",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getQualifier",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\".\"",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"this\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ThrowStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"throw",
"\"",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TryStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"try",
"\"",
")",
";",
"List",
"resources",
"=",
"node",
".",
"resources",
"(",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS4",
")",
"{",
"if",
"(",
"!",
"node",
".",
"resources",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"'('",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"resources",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"VariableDeclarationExpression",
"variable",
"=",
"(",
"VariableDeclarationExpression",
")",
"it",
".",
"next",
"(",
")",
";",
"variable",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"';'",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"')'",
")",
";",
"}",
"}",
"node",
".",
"getBody",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"catchClauses",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"CatchClause",
"cc",
"=",
"(",
"CatchClause",
")",
"it",
".",
"next",
"(",
")",
";",
"cc",
".",
"accept",
"(",
"this",
")",
";",
"}",
"if",
"(",
"node",
".",
"getFinally",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"finally",
"\"",
")",
";",
"node",
".",
"getFinally",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeDeclaration",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getJavadoc",
"(",
")",
"!=",
"null",
")",
"{",
"node",
".",
"getJavadoc",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2",
")",
"{",
"printModifiers",
"(",
"node",
".",
"getModifiers",
"(",
")",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"printModifiers",
"(",
"node",
".",
"modifiers",
"(",
")",
")",
";",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"isInterface",
"(",
")",
"?",
"\"interface",
"\"",
":",
"\"class",
"\"",
")",
";",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"!",
"node",
".",
"typeParameters",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"<\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"typeParameters",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"TypeParameter",
"t",
"=",
"(",
"TypeParameter",
")",
"it",
".",
"next",
"(",
")",
";",
"t",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\">\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2",
")",
"{",
"if",
"(",
"getSuperclass",
"(",
"node",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"extends",
"\"",
")",
";",
"getSuperclass",
"(",
"node",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"}",
"if",
"(",
"!",
"superInterfaces",
"(",
"node",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"isInterface",
"(",
")",
"?",
"\"extends",
"\"",
":",
"\"implements",
"\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"superInterfaces",
"(",
"node",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Name",
"n",
"=",
"(",
"Name",
")",
"it",
".",
"next",
"(",
")",
";",
"n",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"}",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"if",
"(",
"node",
".",
"getSuperclassType",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"extends",
"\"",
")",
";",
"node",
".",
"getSuperclassType",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"}",
"if",
"(",
"!",
"node",
".",
"superInterfaceTypes",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"node",
".",
"isInterface",
"(",
")",
"?",
"\"extends",
"\"",
":",
"\"implements",
"\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"superInterfaceTypes",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Type",
"t",
"=",
"(",
"Type",
")",
"it",
".",
"next",
"(",
")",
";",
"t",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\"{n\"",
")",
";",
"this",
".",
"indent",
"++",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"bodyDeclarations",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"BodyDeclaration",
"d",
"=",
"(",
"BodyDeclaration",
")",
"it",
".",
"next",
"(",
")",
";",
"d",
".",
"accept",
"(",
"this",
")",
";",
"}",
"this",
".",
"indent",
"--",
";",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"}n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeDeclarationStatement",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2",
")",
"{",
"getTypeDeclaration",
"(",
"node",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"node",
".",
"getDeclaration",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeLiteral",
"node",
")",
"{",
"node",
".",
"getType",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\".class\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeParameter",
"node",
")",
"{",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"!",
"node",
".",
"typeBounds",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"extends",
"\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"typeBounds",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Type",
"t",
"=",
"(",
"Type",
")",
"it",
".",
"next",
"(",
")",
";",
"t",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"&",
"\"",
")",
";",
"}",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"UnionType",
"node",
")",
"{",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"types",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Type",
"t",
"=",
"(",
"Type",
")",
"it",
".",
"next",
"(",
")",
";",
"t",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"'|'",
")",
";",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"VariableDeclarationExpression",
"node",
")",
"{",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2",
")",
"{",
"printModifiers",
"(",
"node",
".",
"getModifiers",
"(",
")",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"printModifiers",
"(",
"node",
".",
"modifiers",
"(",
")",
")",
";",
"}",
"node",
".",
"getType",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"fragments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"VariableDeclarationFragment",
"f",
"=",
"(",
"VariableDeclarationFragment",
")",
"it",
".",
"next",
"(",
")",
";",
"f",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"VariableDeclarationFragment",
"node",
")",
"{",
"node",
".",
"getName",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"node",
".",
"getExtraDimensions",
"(",
")",
";",
"i",
"++",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"[]\"",
")",
";",
"}",
"if",
"(",
"node",
".",
"getInitializer",
"(",
")",
"!=",
"null",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"=\"",
")",
";",
"node",
".",
"getInitializer",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"VariableDeclarationStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
"==",
"JLS2",
")",
"{",
"printModifiers",
"(",
"node",
".",
"getModifiers",
"(",
")",
")",
";",
"}",
"if",
"(",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
">=",
"AST",
".",
"JLS3",
")",
"{",
"printModifiers",
"(",
"node",
".",
"modifiers",
"(",
")",
")",
";",
"}",
"node",
".",
"getType",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"\"",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"node",
".",
"fragments",
"(",
")",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"VariableDeclarationFragment",
"f",
"=",
"(",
"VariableDeclarationFragment",
")",
"it",
".",
"next",
"(",
")",
";",
"f",
".",
"accept",
"(",
"this",
")",
";",
"if",
"(",
"it",
".",
"hasNext",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\",",
"\"",
")",
";",
"}",
"}",
"this",
".",
"buffer",
".",
"append",
"(",
"\";n\"",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"WhileStatement",
"node",
")",
"{",
"printIndent",
"(",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\"while",
"(\"",
")",
";",
"node",
".",
"getExpression",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"this",
".",
"buffer",
".",
"append",
"(",
"\")",
"\"",
")",
";",
"node",
".",
"getBody",
"(",
")",
".",
"accept",
"(",
"this",
")",
";",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"WildcardType",
"node",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"?\"",
")",
";",
"Type",
"bound",
"=",
"node",
".",
"getBound",
"(",
")",
";",
"if",
"(",
"bound",
"!=",
"null",
")",
"{",
"if",
"(",
"node",
".",
"isUpperBound",
"(",
")",
")",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"extends",
"\"",
")",
";",
"}",
"else",
"{",
"this",
".",
"buffer",
".",
"append",
"(",
"\"",
"super",
"\"",
")",
";",
"}",
"bound",
".",
"accept",
"(",
"this",
")",
";",
"}",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
4,360 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"UnionType",
"extends",
"Type",
"{",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"TYPES_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"UnionType",
".",
"class",
",",
"\"types\"",
",",
"Type",
".",
"class",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"propertyList",
"=",
"new",
"ArrayList",
"(",
"2",
")",
";",
"createPropertyList",
"(",
"UnionType",
".",
"class",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"TYPES_PROPERTY",
",",
"propertyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"propertyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"ASTNode",
".",
"NodeList",
"types",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"TYPES_PROPERTY",
")",
";",
"UnionType",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"unsupportedIn2_3",
"(",
")",
";",
"}",
"final",
"List",
"internalStructuralPropertiesForType",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"propertyDescriptors",
"(",
"apiLevel",
")",
";",
"}",
"final",
"List",
"internalGetChildListProperty",
"(",
"ChildListPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"property",
"==",
"TYPES_PROPERTY",
")",
"{",
"return",
"types",
"(",
")",
";",
"}",
"return",
"super",
".",
"internalGetChildListProperty",
"(",
"property",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"UNION_TYPE",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"UnionType",
"result",
"=",
"new",
"UnionType",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"types",
"(",
")",
".",
"addAll",
"(",
"ASTNode",
".",
"copySubtrees",
"(",
"target",
",",
"types",
"(",
")",
")",
")",
";",
"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",
".",
"types",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"public",
"List",
"types",
"(",
")",
"{",
"return",
"this",
".",
"types",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"BASE_NODE_SIZE",
"+",
"1",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"this",
".",
"types",
".",
"listSize",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,361 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"WorkingCopyOwner",
";",
"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",
".",
"LookupEnvironment",
";",
"class",
"BindingResolver",
"{",
"BindingResolver",
"(",
")",
"{",
"}",
"ASTNode",
"findDeclaringNode",
"(",
"IBinding",
"binding",
")",
"{",
"return",
"null",
";",
"}",
"ASTNode",
"findDeclaringNode",
"(",
"String",
"bindingKey",
")",
"{",
"return",
"null",
";",
"}",
"ASTNode",
"findDeclaringNode",
"(",
"IAnnotationBinding",
"instance",
")",
"{",
"return",
"null",
";",
"}",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ASTNode",
"getCorrespondingNode",
"(",
"ASTNode",
"currentNode",
")",
"{",
"return",
"null",
";",
"}",
"IMethodBinding",
"getMethodBinding",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"MethodBinding",
"methodBinding",
")",
"{",
"return",
"null",
";",
"}",
"IMemberValuePairBinding",
"getMemberValuePairBinding",
"(",
"ElementValuePair",
"valuePair",
")",
"{",
"return",
"null",
";",
"}",
"IPackageBinding",
"getPackageBinding",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"PackageBinding",
"packageBinding",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"getTypeBinding",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"referenceBinding",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"getTypeBinding",
"(",
"VariableDeclaration",
"variableDeclaration",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"getTypeBinding",
"(",
"Type",
"type",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"getTypeBinding",
"(",
"RecoveredTypeBinding",
"recoveredTypeBinding",
",",
"int",
"dimensions",
")",
"{",
"return",
"null",
";",
"}",
"IVariableBinding",
"getVariableBinding",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"VariableBinding",
"binding",
")",
"{",
"return",
"null",
";",
"}",
"public",
"WorkingCopyOwner",
"getWorkingCopyOwner",
"(",
")",
"{",
"return",
"null",
";",
"}",
"IAnnotationBinding",
"getAnnotationInstance",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"AnnotationBinding",
"instance",
")",
"{",
"return",
"null",
";",
"}",
"boolean",
"isResolvedTypeInferredFromExpectedType",
"(",
"MethodInvocation",
"methodInvocation",
")",
"{",
"return",
"false",
";",
"}",
"boolean",
"isResolvedTypeInferredFromExpectedType",
"(",
"SuperMethodInvocation",
"methodInvocation",
")",
"{",
"return",
"false",
";",
"}",
"boolean",
"isResolvedTypeInferredFromExpectedType",
"(",
"ClassInstanceCreation",
"classInstanceCreation",
")",
"{",
"return",
"false",
";",
"}",
"LookupEnvironment",
"lookupEnvironment",
"(",
")",
"{",
"return",
"null",
";",
"}",
"void",
"recordScope",
"(",
"ASTNode",
"astNode",
",",
"BlockScope",
"blockScope",
")",
"{",
"}",
"boolean",
"resolveBoxing",
"(",
"Expression",
"expression",
")",
"{",
"return",
"false",
";",
"}",
"boolean",
"resolveUnboxing",
"(",
"Expression",
"expression",
")",
"{",
"return",
"false",
";",
"}",
"Object",
"resolveConstantExpressionValue",
"(",
"Expression",
"expression",
")",
"{",
"return",
"null",
";",
"}",
"IMethodBinding",
"resolveConstructor",
"(",
"ClassInstanceCreation",
"expression",
")",
"{",
"return",
"null",
";",
"}",
"IMethodBinding",
"resolveConstructor",
"(",
"ConstructorInvocation",
"expression",
")",
"{",
"return",
"null",
";",
"}",
"IMethodBinding",
"resolveConstructor",
"(",
"EnumConstantDeclaration",
"enumConstantDeclaration",
")",
"{",
"return",
"null",
";",
"}",
"IMethodBinding",
"resolveConstructor",
"(",
"SuperConstructorInvocation",
"expression",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"resolveExpressionType",
"(",
"Expression",
"expression",
")",
"{",
"return",
"null",
";",
"}",
"IVariableBinding",
"resolveField",
"(",
"FieldAccess",
"fieldAccess",
")",
"{",
"return",
"null",
";",
"}",
"IVariableBinding",
"resolveField",
"(",
"SuperFieldAccess",
"fieldAccess",
")",
"{",
"return",
"null",
";",
"}",
"IBinding",
"resolveImport",
"(",
"ImportDeclaration",
"importDeclaration",
")",
"{",
"return",
"null",
";",
"}",
"IMethodBinding",
"resolveMember",
"(",
"AnnotationTypeMemberDeclaration",
"member",
")",
"{",
"return",
"null",
";",
"}",
"IMethodBinding",
"resolveMethod",
"(",
"MethodDeclaration",
"method",
")",
"{",
"return",
"null",
";",
"}",
"IMethodBinding",
"resolveMethod",
"(",
"MethodInvocation",
"method",
")",
"{",
"return",
"null",
";",
"}",
"IMethodBinding",
"resolveMethod",
"(",
"SuperMethodInvocation",
"method",
")",
"{",
"return",
"null",
";",
"}",
"IBinding",
"resolveName",
"(",
"Name",
"name",
")",
"{",
"return",
"null",
";",
"}",
"IPackageBinding",
"resolvePackage",
"(",
"PackageDeclaration",
"pkg",
")",
"{",
"return",
"null",
";",
"}",
"IBinding",
"resolveReference",
"(",
"MemberRef",
"ref",
")",
"{",
"return",
"null",
";",
"}",
"IMemberValuePairBinding",
"resolveMemberValuePair",
"(",
"MemberValuePair",
"memberValuePair",
")",
"{",
"return",
"null",
";",
"}",
"IBinding",
"resolveReference",
"(",
"MethodRef",
"ref",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"resolveType",
"(",
"AnnotationTypeDeclaration",
"type",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"resolveType",
"(",
"AnonymousClassDeclaration",
"type",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"resolveType",
"(",
"EnumDeclaration",
"type",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"resolveType",
"(",
"Type",
"type",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"resolveType",
"(",
"TypeDeclaration",
"type",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"resolveTypeParameter",
"(",
"TypeParameter",
"typeParameter",
")",
"{",
"return",
"null",
";",
"}",
"IVariableBinding",
"resolveVariable",
"(",
"EnumConstantDeclaration",
"enumConstant",
")",
"{",
"return",
"null",
";",
"}",
"IVariableBinding",
"resolveVariable",
"(",
"VariableDeclaration",
"variable",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"resolveWellKnownType",
"(",
"String",
"name",
")",
"{",
"return",
"null",
";",
"}",
"IAnnotationBinding",
"resolveAnnotation",
"(",
"Annotation",
"annotation",
")",
"{",
"return",
"null",
";",
"}",
"ITypeBinding",
"resolveArrayType",
"(",
"ITypeBinding",
"typeBinding",
",",
"int",
"dimensions",
")",
"{",
"return",
"null",
";",
"}",
"public",
"CompilationUnitScope",
"scope",
"(",
")",
"{",
"return",
"null",
";",
"}",
"void",
"store",
"(",
"ASTNode",
"newNode",
",",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ASTNode",
"oldASTNode",
")",
"{",
"}",
"void",
"updateKey",
"(",
"ASTNode",
"node",
",",
"ASTNode",
"newNode",
")",
"{",
"}",
"}",
"</s>"
] |
4,362 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"public",
"final",
"class",
"SimplePropertyDescriptor",
"extends",
"StructuralPropertyDescriptor",
"{",
"private",
"final",
"Class",
"valueType",
";",
"private",
"final",
"boolean",
"mandatory",
";",
"SimplePropertyDescriptor",
"(",
"Class",
"nodeClass",
",",
"String",
"propertyId",
",",
"Class",
"valueType",
",",
"boolean",
"mandatory",
")",
"{",
"super",
"(",
"nodeClass",
",",
"propertyId",
")",
";",
"if",
"(",
"valueType",
"==",
"null",
"||",
"ASTNode",
".",
"class",
".",
"isAssignableFrom",
"(",
"valueType",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"this",
".",
"valueType",
"=",
"valueType",
";",
"this",
".",
"mandatory",
"=",
"mandatory",
";",
"}",
"public",
"Class",
"getValueType",
"(",
")",
"{",
"return",
"this",
".",
"valueType",
";",
"}",
"public",
"boolean",
"isMandatory",
"(",
")",
"{",
"return",
"this",
".",
"mandatory",
";",
"}",
"}",
"</s>"
] |
4,363 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Iterator",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"SingleVariableDeclaration",
"extends",
"VariableDeclaration",
"{",
"public",
"static",
"final",
"SimplePropertyDescriptor",
"MODIFIERS_PROPERTY",
"=",
"new",
"SimplePropertyDescriptor",
"(",
"SingleVariableDeclaration",
".",
"class",
",",
"\"modifiers\"",
",",
"int",
".",
"class",
",",
"MANDATORY",
")",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"MODIFIERS2_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"SingleVariableDeclaration",
".",
"class",
",",
"\"modifiers\"",
",",
"IExtendedModifier",
".",
"class",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"NAME_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"SingleVariableDeclaration",
".",
"class",
",",
"\"name\"",
",",
"SimpleName",
".",
"class",
",",
"MANDATORY",
",",
"NO_CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"TYPE_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"SingleVariableDeclaration",
".",
"class",
",",
"\"type\"",
",",
"Type",
".",
"class",
",",
"MANDATORY",
",",
"NO_CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"SimplePropertyDescriptor",
"VARARGS_PROPERTY",
"=",
"new",
"SimplePropertyDescriptor",
"(",
"SingleVariableDeclaration",
".",
"class",
",",
"\"varargs\"",
",",
"boolean",
".",
"class",
",",
"MANDATORY",
")",
";",
"public",
"static",
"final",
"SimplePropertyDescriptor",
"EXTRA_DIMENSIONS_PROPERTY",
"=",
"new",
"SimplePropertyDescriptor",
"(",
"SingleVariableDeclaration",
".",
"class",
",",
"\"\"",
",",
"int",
".",
"class",
",",
"MANDATORY",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"INITIALIZER_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"SingleVariableDeclaration",
".",
"class",
",",
"\"initializer\"",
",",
"Expression",
".",
"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",
"(",
"6",
")",
";",
"createPropertyList",
"(",
"SingleVariableDeclaration",
".",
"class",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"MODIFIERS_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"TYPE_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"NAME_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"EXTRA_DIMENSIONS_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"INITIALIZER_PROPERTY",
",",
"propertyList",
")",
";",
"PROPERTY_DESCRIPTORS_2_0",
"=",
"reapPropertyList",
"(",
"propertyList",
")",
";",
"propertyList",
"=",
"new",
"ArrayList",
"(",
"7",
")",
";",
"createPropertyList",
"(",
"SingleVariableDeclaration",
".",
"class",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"MODIFIERS2_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"TYPE_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"VARARGS_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"NAME_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"EXTRA_DIMENSIONS_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"INITIALIZER_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",
"SimpleName",
"variableName",
"=",
"null",
";",
"private",
"Type",
"type",
"=",
"null",
";",
"private",
"boolean",
"variableArity",
"=",
"false",
";",
"private",
"int",
"extraArrayDimensions",
"=",
"0",
";",
"private",
"Expression",
"optionalInitializer",
"=",
"null",
";",
"SingleVariableDeclaration",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"if",
"(",
"ast",
".",
"apiLevel",
">=",
"AST",
".",
"JLS3",
")",
"{",
"this",
".",
"modifiers",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"MODIFIERS2_PROPERTY",
")",
";",
"}",
"}",
"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",
"==",
"MODIFIERS_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getModifiers",
"(",
")",
";",
"}",
"else",
"{",
"setModifiers",
"(",
"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",
"==",
"VARARGS_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"isVarargs",
"(",
")",
";",
"}",
"else",
"{",
"setVarargs",
"(",
"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",
"(",
"(",
"SimpleName",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"if",
"(",
"property",
"==",
"TYPE_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getType",
"(",
")",
";",
"}",
"else",
"{",
"setType",
"(",
"(",
"Type",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"if",
"(",
"property",
"==",
"INITIALIZER_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getInitializer",
"(",
")",
";",
"}",
"else",
"{",
"setInitializer",
"(",
"(",
"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",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"SINGLE_VARIABLE_DECLARATION",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"SingleVariableDeclaration",
"result",
"=",
"new",
"SingleVariableDeclaration",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"if",
"(",
"this",
".",
"ast",
".",
"apiLevel",
"==",
"AST",
".",
"JLS2_INTERNAL",
")",
"{",
"result",
".",
"setModifiers",
"(",
"getModifiers",
"(",
")",
")",
";",
"}",
"else",
"{",
"result",
".",
"modifiers",
"(",
")",
".",
"addAll",
"(",
"ASTNode",
".",
"copySubtrees",
"(",
"target",
",",
"modifiers",
"(",
")",
")",
")",
";",
"result",
".",
"setVarargs",
"(",
"isVarargs",
"(",
")",
")",
";",
"}",
"result",
".",
"setType",
"(",
"(",
"Type",
")",
"getType",
"(",
")",
".",
"clone",
"(",
"target",
")",
")",
";",
"result",
".",
"setExtraDimensions",
"(",
"getExtraDimensions",
"(",
")",
")",
";",
"result",
".",
"setName",
"(",
"(",
"SimpleName",
")",
"getName",
"(",
")",
".",
"clone",
"(",
"target",
")",
")",
";",
"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",
")",
"{",
"if",
"(",
"this",
".",
"ast",
".",
"apiLevel",
">=",
"AST",
".",
"JLS3",
")",
"{",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"modifiers",
")",
";",
"}",
"acceptChild",
"(",
"visitor",
",",
"getType",
"(",
")",
")",
";",
"acceptChild",
"(",
"visitor",
",",
"getName",
"(",
")",
")",
";",
"acceptChild",
"(",
"visitor",
",",
"getInitializer",
"(",
")",
")",
";",
"}",
"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",
"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",
"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",
"(",
")",
"{",
"if",
"(",
"this",
".",
"modifiers",
"==",
"null",
")",
"{",
"unsupportedIn2",
"(",
")",
";",
"}",
"return",
"this",
".",
"variableArity",
";",
"}",
"public",
"void",
"setVarargs",
"(",
"boolean",
"variableArity",
")",
"{",
"if",
"(",
"this",
".",
"modifiers",
"==",
"null",
")",
"{",
"unsupportedIn2",
"(",
")",
";",
"}",
"preValueChange",
"(",
"VARARGS_PROPERTY",
")",
";",
"this",
".",
"variableArity",
"=",
"variableArity",
";",
"postValueChange",
"(",
"VARARGS_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",
"+",
"7",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"modifiers",
"==",
"null",
"?",
"0",
":",
"this",
".",
"modifiers",
".",
"listSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"type",
"==",
"null",
"?",
"0",
":",
"getType",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"variableName",
"==",
"null",
"?",
"0",
":",
"getName",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"optionalInitializer",
"==",
"null",
"?",
"0",
":",
"getInitializer",
"(",
")",
".",
"treeSize",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
4,364 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"SuperConstructorInvocation",
"extends",
"Statement",
"{",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"EXPRESSION_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"SuperConstructorInvocation",
".",
"class",
",",
"\"expression\"",
",",
"Expression",
".",
"class",
",",
"OPTIONAL",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"TYPE_ARGUMENTS_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"SuperConstructorInvocation",
".",
"class",
",",
"\"\"",
",",
"Type",
".",
"class",
",",
"NO_CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"ARGUMENTS_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"SuperConstructorInvocation",
".",
"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",
"(",
"3",
")",
";",
"createPropertyList",
"(",
"SuperConstructorInvocation",
".",
"class",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"EXPRESSION_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"ARGUMENTS_PROPERTY",
",",
"propertyList",
")",
";",
"PROPERTY_DESCRIPTORS_2_0",
"=",
"reapPropertyList",
"(",
"propertyList",
")",
";",
"propertyList",
"=",
"new",
"ArrayList",
"(",
"4",
")",
";",
"createPropertyList",
"(",
"SuperConstructorInvocation",
".",
"class",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"EXPRESSION_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"TYPE_ARGUMENTS_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",
"Expression",
"optionalExpression",
"=",
"null",
";",
"private",
"ASTNode",
".",
"NodeList",
"typeArguments",
"=",
"null",
";",
"private",
"ASTNode",
".",
"NodeList",
"arguments",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"ARGUMENTS_PROPERTY",
")",
";",
"SuperConstructorInvocation",
"(",
"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",
";",
"}",
"}",
"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_CONSTRUCTOR_INVOCATION",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"SuperConstructorInvocation",
"result",
"=",
"new",
"SuperConstructorInvocation",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"copyLeadingComment",
"(",
"this",
")",
";",
"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",
")",
";",
"}",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"arguments",
")",
";",
"}",
"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",
"List",
"arguments",
"(",
")",
"{",
"return",
"this",
".",
"arguments",
";",
"}",
"public",
"IMethodBinding",
"resolveConstructorBinding",
"(",
")",
"{",
"return",
"this",
".",
"ast",
".",
"getBindingResolver",
"(",
")",
".",
"resolveConstructor",
"(",
"this",
")",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"BASE_NODE_SIZE",
"+",
"3",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"optionalExpression",
"==",
"null",
"?",
"0",
":",
"getExpression",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"typeArguments",
"==",
"null",
"?",
"0",
":",
"this",
".",
"typeArguments",
".",
"listSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"arguments",
"==",
"null",
"?",
"0",
":",
"this",
".",
"arguments",
".",
"listSize",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
4,365 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"public",
"interface",
"IBinding",
"{",
"public",
"static",
"final",
"int",
"PACKAGE",
"=",
"1",
";",
"public",
"static",
"final",
"int",
"TYPE",
"=",
"2",
";",
"public",
"static",
"final",
"int",
"VARIABLE",
"=",
"3",
";",
"public",
"static",
"final",
"int",
"METHOD",
"=",
"4",
";",
"public",
"static",
"final",
"int",
"ANNOTATION",
"=",
"5",
";",
"public",
"static",
"final",
"int",
"MEMBER_VALUE_PAIR",
"=",
"6",
";",
"public",
"IAnnotationBinding",
"[",
"]",
"getAnnotations",
"(",
")",
";",
"public",
"int",
"getKind",
"(",
")",
";",
"public",
"String",
"getName",
"(",
")",
";",
"public",
"int",
"getModifiers",
"(",
")",
";",
"public",
"boolean",
"isDeprecated",
"(",
")",
";",
"public",
"boolean",
"isRecovered",
"(",
")",
";",
"public",
"boolean",
"isSynthetic",
"(",
")",
";",
"public",
"IJavaElement",
"getJavaElement",
"(",
")",
";",
"public",
"String",
"getKey",
"(",
")",
";",
"public",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
";",
"public",
"boolean",
"isEqualTo",
"(",
"IBinding",
"binding",
")",
";",
"public",
"String",
"toString",
"(",
")",
";",
"}",
"</s>"
] |
4,366 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"public",
"final",
"class",
"ChildListPropertyDescriptor",
"extends",
"StructuralPropertyDescriptor",
"{",
"final",
"Class",
"elementType",
";",
"final",
"boolean",
"cycleRisk",
";",
"ChildListPropertyDescriptor",
"(",
"Class",
"nodeClass",
",",
"String",
"propertyId",
",",
"Class",
"elementType",
",",
"boolean",
"cycleRisk",
")",
"{",
"super",
"(",
"nodeClass",
",",
"propertyId",
")",
";",
"if",
"(",
"elementType",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"this",
".",
"elementType",
"=",
"elementType",
";",
"this",
".",
"cycleRisk",
"=",
"cycleRisk",
";",
"}",
"public",
"final",
"Class",
"getElementType",
"(",
")",
"{",
"return",
"this",
".",
"elementType",
";",
"}",
"public",
"final",
"boolean",
"cycleRisk",
"(",
")",
"{",
"return",
"this",
".",
"cycleRisk",
";",
"}",
"}",
"</s>"
] |
4,367 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IProgressMonitor",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"OperationCanceledException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"batch",
".",
"FileSystem",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"NameEnvironmentAnswer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"AbortCompilation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"INameEnvironmentWithProgress",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"NameLookup",
";",
"class",
"NameEnvironmentWithProgress",
"extends",
"FileSystem",
"implements",
"INameEnvironmentWithProgress",
"{",
"IProgressMonitor",
"monitor",
";",
"public",
"NameEnvironmentWithProgress",
"(",
"Classpath",
"[",
"]",
"paths",
",",
"String",
"[",
"]",
"initialFileNames",
",",
"IProgressMonitor",
"monitor",
")",
"{",
"super",
"(",
"paths",
",",
"initialFileNames",
")",
";",
"setMonitor",
"(",
"monitor",
")",
";",
"}",
"private",
"void",
"checkCanceled",
"(",
")",
"{",
"if",
"(",
"this",
".",
"monitor",
"!=",
"null",
"&&",
"this",
".",
"monitor",
".",
"isCanceled",
"(",
")",
")",
"{",
"if",
"(",
"NameLookup",
".",
"VERBOSE",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"Thread",
".",
"currentThread",
"(",
")",
"+",
"\"\"",
")",
";",
"}",
"throw",
"new",
"AbortCompilation",
"(",
"true",
",",
"new",
"OperationCanceledException",
"(",
")",
")",
";",
"}",
"}",
"public",
"NameEnvironmentAnswer",
"findType",
"(",
"char",
"[",
"]",
"typeName",
",",
"char",
"[",
"]",
"[",
"]",
"packageName",
")",
"{",
"checkCanceled",
"(",
")",
";",
"return",
"super",
".",
"findType",
"(",
"typeName",
",",
"packageName",
")",
";",
"}",
"public",
"NameEnvironmentAnswer",
"findType",
"(",
"char",
"[",
"]",
"[",
"]",
"compoundName",
")",
"{",
"checkCanceled",
"(",
")",
";",
"return",
"super",
".",
"findType",
"(",
"compoundName",
")",
";",
"}",
"public",
"boolean",
"isPackage",
"(",
"char",
"[",
"]",
"[",
"]",
"compoundName",
",",
"char",
"[",
"]",
"packageName",
")",
"{",
"checkCanceled",
"(",
")",
";",
"return",
"super",
".",
"isPackage",
"(",
"compoundName",
",",
"packageName",
")",
";",
"}",
"public",
"void",
"setMonitor",
"(",
"IProgressMonitor",
"monitor",
")",
"{",
"this",
".",
"monitor",
"=",
"monitor",
";",
"}",
"}",
"</s>"
] |
4,368 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"BindingResolver",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
".",
"IMethodBinding",
";",
"class",
"DefaultValuePairBinding",
"extends",
"MemberValuePairBinding",
"{",
"private",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"MethodBinding",
"method",
";",
"DefaultValuePairBinding",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"MethodBinding",
"binding",
",",
"BindingResolver",
"resolver",
")",
"{",
"super",
"(",
"null",
",",
"resolver",
")",
";",
"this",
".",
"method",
"=",
"binding",
";",
"this",
".",
"value",
"=",
"MemberValuePairBinding",
".",
"buildDOMValue",
"(",
"binding",
".",
"getDefaultValue",
"(",
")",
",",
"resolver",
")",
";",
"if",
"(",
"binding",
".",
"returnType",
"!=",
"null",
"&&",
"binding",
".",
"returnType",
".",
"isArrayType",
"(",
")",
")",
"{",
"if",
"(",
"!",
"this",
".",
"value",
".",
"getClass",
"(",
")",
".",
"isArray",
"(",
")",
")",
"{",
"this",
".",
"value",
"=",
"new",
"Object",
"[",
"]",
"{",
"this",
".",
"value",
"}",
";",
"}",
"}",
"}",
"public",
"IMethodBinding",
"getMethodBinding",
"(",
")",
"{",
"return",
"this",
".",
"bindingResolver",
".",
"getMethodBinding",
"(",
"this",
".",
"method",
")",
";",
"}",
"public",
"String",
"getName",
"(",
")",
"{",
"return",
"new",
"String",
"(",
"this",
".",
"method",
".",
"selector",
")",
";",
"}",
"public",
"Object",
"getValue",
"(",
")",
"{",
"return",
"this",
".",
"value",
";",
"}",
"public",
"boolean",
"isDefault",
"(",
")",
"{",
"return",
"true",
";",
"}",
"public",
"boolean",
"isDeprecated",
"(",
")",
"{",
"return",
"this",
".",
"method",
".",
"isDeprecated",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,369 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"InstanceofExpression",
"extends",
"Expression",
"{",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"LEFT_OPERAND_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"InstanceofExpression",
".",
"class",
",",
"\"leftOperand\"",
",",
"Expression",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"RIGHT_OPERAND_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"InstanceofExpression",
".",
"class",
",",
"\"rightOperand\"",
",",
"Type",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"properyList",
"=",
"new",
"ArrayList",
"(",
"3",
")",
";",
"createPropertyList",
"(",
"InstanceofExpression",
".",
"class",
",",
"properyList",
")",
";",
"addProperty",
"(",
"LEFT_OPERAND_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"RIGHT_OPERAND_PROPERTY",
",",
"properyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"properyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"Expression",
"leftOperand",
"=",
"null",
";",
"private",
"Type",
"rightOperand",
"=",
"null",
";",
"InstanceofExpression",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"}",
"final",
"List",
"internalStructuralPropertiesForType",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"propertyDescriptors",
"(",
"apiLevel",
")",
";",
"}",
"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",
"(",
"(",
"Type",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"return",
"super",
".",
"internalGetSetChildProperty",
"(",
"property",
",",
"get",
",",
"child",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"INSTANCEOF_EXPRESSION",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"InstanceofExpression",
"result",
"=",
"new",
"InstanceofExpression",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"setLeftOperand",
"(",
"(",
"Expression",
")",
"getLeftOperand",
"(",
")",
".",
"clone",
"(",
"target",
")",
")",
";",
"result",
".",
"setRightOperand",
"(",
"(",
"Type",
")",
"getRightOperand",
"(",
")",
".",
"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",
",",
"getLeftOperand",
"(",
")",
")",
";",
"acceptChild",
"(",
"visitor",
",",
"getRightOperand",
"(",
")",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"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",
"Type",
"getRightOperand",
"(",
")",
"{",
"if",
"(",
"this",
".",
"rightOperand",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"rightOperand",
"==",
"null",
")",
"{",
"preLazyInit",
"(",
")",
";",
"this",
".",
"rightOperand",
"=",
"new",
"SimpleType",
"(",
"this",
".",
"ast",
")",
";",
"postLazyInit",
"(",
"this",
".",
"rightOperand",
",",
"RIGHT_OPERAND_PROPERTY",
")",
";",
"}",
"}",
"}",
"return",
"this",
".",
"rightOperand",
";",
"}",
"public",
"void",
"setRightOperand",
"(",
"Type",
"referenceType",
")",
"{",
"if",
"(",
"referenceType",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"ASTNode",
"oldChild",
"=",
"this",
".",
"rightOperand",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"referenceType",
",",
"RIGHT_OPERAND_PROPERTY",
")",
";",
"this",
".",
"rightOperand",
"=",
"referenceType",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"referenceType",
",",
"RIGHT_OPERAND_PROPERTY",
")",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"BASE_NODE_SIZE",
"+",
"2",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"leftOperand",
"==",
"null",
"?",
"0",
":",
"getLeftOperand",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"rightOperand",
"==",
"null",
"?",
"0",
":",
"getRightOperand",
"(",
")",
".",
"treeSize",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
4,370 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"ForStatement",
"extends",
"Statement",
"{",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"INITIALIZERS_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"ForStatement",
".",
"class",
",",
"\"initializers\"",
",",
"Expression",
".",
"class",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"EXPRESSION_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"ForStatement",
".",
"class",
",",
"\"expression\"",
",",
"Expression",
".",
"class",
",",
"OPTIONAL",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"UPDATERS_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"ForStatement",
".",
"class",
",",
"\"updaters\"",
",",
"Expression",
".",
"class",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"BODY_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"ForStatement",
".",
"class",
",",
"\"body\"",
",",
"Statement",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"properyList",
"=",
"new",
"ArrayList",
"(",
"5",
")",
";",
"createPropertyList",
"(",
"ForStatement",
".",
"class",
",",
"properyList",
")",
";",
"addProperty",
"(",
"INITIALIZERS_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"EXPRESSION_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"UPDATERS_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"BODY_PROPERTY",
",",
"properyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"properyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"ASTNode",
".",
"NodeList",
"initializers",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"INITIALIZERS_PROPERTY",
")",
";",
"private",
"Expression",
"optionalConditionExpression",
"=",
"null",
";",
"private",
"ASTNode",
".",
"NodeList",
"updaters",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"UPDATERS_PROPERTY",
")",
";",
"private",
"Statement",
"body",
"=",
"null",
";",
"ForStatement",
"(",
"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",
"List",
"internalGetChildListProperty",
"(",
"ChildListPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"property",
"==",
"INITIALIZERS_PROPERTY",
")",
"{",
"return",
"initializers",
"(",
")",
";",
"}",
"if",
"(",
"property",
"==",
"UPDATERS_PROPERTY",
")",
"{",
"return",
"updaters",
"(",
")",
";",
"}",
"return",
"super",
".",
"internalGetChildListProperty",
"(",
"property",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"FOR_STATEMENT",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"ForStatement",
"result",
"=",
"new",
"ForStatement",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"copyLeadingComment",
"(",
"this",
")",
";",
"result",
".",
"initializers",
"(",
")",
".",
"addAll",
"(",
"ASTNode",
".",
"copySubtrees",
"(",
"target",
",",
"initializers",
"(",
")",
")",
")",
";",
"result",
".",
"setExpression",
"(",
"(",
"Expression",
")",
"ASTNode",
".",
"copySubtree",
"(",
"target",
",",
"getExpression",
"(",
")",
")",
")",
";",
"result",
".",
"updaters",
"(",
")",
".",
"addAll",
"(",
"ASTNode",
".",
"copySubtrees",
"(",
"target",
",",
"updaters",
"(",
")",
")",
")",
";",
"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",
")",
"{",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"initializers",
")",
";",
"acceptChild",
"(",
"visitor",
",",
"getExpression",
"(",
")",
")",
";",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"updaters",
")",
";",
"acceptChild",
"(",
"visitor",
",",
"getBody",
"(",
")",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"public",
"List",
"initializers",
"(",
")",
"{",
"return",
"this",
".",
"initializers",
";",
"}",
"public",
"Expression",
"getExpression",
"(",
")",
"{",
"return",
"this",
".",
"optionalConditionExpression",
";",
"}",
"public",
"void",
"setExpression",
"(",
"Expression",
"expression",
")",
"{",
"ASTNode",
"oldChild",
"=",
"this",
".",
"optionalConditionExpression",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"EXPRESSION_PROPERTY",
")",
";",
"this",
".",
"optionalConditionExpression",
"=",
"expression",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"EXPRESSION_PROPERTY",
")",
";",
"}",
"public",
"List",
"updaters",
"(",
")",
"{",
"return",
"this",
".",
"updaters",
";",
"}",
"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",
"(",
")",
"+",
"4",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"this",
".",
"initializers",
".",
"listSize",
"(",
")",
"+",
"this",
".",
"updaters",
".",
"listSize",
"(",
")",
"+",
"(",
"this",
".",
"optionalConditionExpression",
"==",
"null",
"?",
"0",
":",
"getExpression",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"body",
"==",
"null",
"?",
"0",
":",
"getBody",
"(",
")",
".",
"treeSize",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
4,371 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"ArrayCreation",
"extends",
"Expression",
"{",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"TYPE_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"ArrayCreation",
".",
"class",
",",
"\"type\"",
",",
"ArrayType",
".",
"class",
",",
"MANDATORY",
",",
"NO_CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"DIMENSIONS_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"ArrayCreation",
".",
"class",
",",
"\"dimensions\"",
",",
"Expression",
".",
"class",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"INITIALIZER_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"ArrayCreation",
".",
"class",
",",
"\"initializer\"",
",",
"ArrayInitializer",
".",
"class",
",",
"OPTIONAL",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"properyList",
"=",
"new",
"ArrayList",
"(",
"4",
")",
";",
"createPropertyList",
"(",
"ArrayCreation",
".",
"class",
",",
"properyList",
")",
";",
"addProperty",
"(",
"TYPE_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"DIMENSIONS_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"INITIALIZER_PROPERTY",
",",
"properyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"properyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"ArrayType",
"arrayType",
"=",
"null",
";",
"private",
"ASTNode",
".",
"NodeList",
"dimensions",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"DIMENSIONS_PROPERTY",
")",
";",
"private",
"ArrayInitializer",
"optionalInitializer",
"=",
"null",
";",
"ArrayCreation",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"}",
"final",
"List",
"internalStructuralPropertiesForType",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"propertyDescriptors",
"(",
"apiLevel",
")",
";",
"}",
"final",
"ASTNode",
"internalGetSetChildProperty",
"(",
"ChildPropertyDescriptor",
"property",
",",
"boolean",
"get",
",",
"ASTNode",
"child",
")",
"{",
"if",
"(",
"property",
"==",
"INITIALIZER_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getInitializer",
"(",
")",
";",
"}",
"else",
"{",
"setInitializer",
"(",
"(",
"ArrayInitializer",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"if",
"(",
"property",
"==",
"TYPE_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getType",
"(",
")",
";",
"}",
"else",
"{",
"setType",
"(",
"(",
"ArrayType",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"return",
"super",
".",
"internalGetSetChildProperty",
"(",
"property",
",",
"get",
",",
"child",
")",
";",
"}",
"final",
"List",
"internalGetChildListProperty",
"(",
"ChildListPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"property",
"==",
"DIMENSIONS_PROPERTY",
")",
"{",
"return",
"dimensions",
"(",
")",
";",
"}",
"return",
"super",
".",
"internalGetChildListProperty",
"(",
"property",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"ARRAY_CREATION",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"ArrayCreation",
"result",
"=",
"new",
"ArrayCreation",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"setType",
"(",
"(",
"ArrayType",
")",
"getType",
"(",
")",
".",
"clone",
"(",
"target",
")",
")",
";",
"result",
".",
"dimensions",
"(",
")",
".",
"addAll",
"(",
"ASTNode",
".",
"copySubtrees",
"(",
"target",
",",
"dimensions",
"(",
")",
")",
")",
";",
"result",
".",
"setInitializer",
"(",
"(",
"ArrayInitializer",
")",
"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",
",",
"getType",
"(",
")",
")",
";",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"dimensions",
")",
";",
"acceptChild",
"(",
"visitor",
",",
"getInitializer",
"(",
")",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"public",
"ArrayType",
"getType",
"(",
")",
"{",
"if",
"(",
"this",
".",
"arrayType",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"arrayType",
"==",
"null",
")",
"{",
"preLazyInit",
"(",
")",
";",
"this",
".",
"arrayType",
"=",
"this",
".",
"ast",
".",
"newArrayType",
"(",
"this",
".",
"ast",
".",
"newPrimitiveType",
"(",
"PrimitiveType",
".",
"INT",
")",
")",
";",
"postLazyInit",
"(",
"this",
".",
"arrayType",
",",
"TYPE_PROPERTY",
")",
";",
"}",
"}",
"}",
"return",
"this",
".",
"arrayType",
";",
"}",
"public",
"void",
"setType",
"(",
"ArrayType",
"type",
")",
"{",
"if",
"(",
"type",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"ASTNode",
"oldChild",
"=",
"this",
".",
"arrayType",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"type",
",",
"TYPE_PROPERTY",
")",
";",
"this",
".",
"arrayType",
"=",
"type",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"type",
",",
"TYPE_PROPERTY",
")",
";",
"}",
"public",
"List",
"dimensions",
"(",
")",
"{",
"return",
"this",
".",
"dimensions",
";",
"}",
"public",
"ArrayInitializer",
"getInitializer",
"(",
")",
"{",
"return",
"this",
".",
"optionalInitializer",
";",
"}",
"public",
"void",
"setInitializer",
"(",
"ArrayInitializer",
"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",
"(",
")",
"{",
"int",
"size",
"=",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"arrayType",
"==",
"null",
"?",
"0",
":",
"getType",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"optionalInitializer",
"==",
"null",
"?",
"0",
":",
"getInitializer",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"this",
".",
"dimensions",
".",
"listSize",
"(",
")",
";",
"return",
"size",
";",
"}",
"}",
"</s>"
] |
4,372 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaCore",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ExtraCompilerModifiers",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"LookupEnvironment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ParameterizedGenericMethodBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"RawTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ReferenceBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeVariableBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"AbortCompilation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"JavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
";",
"class",
"MethodBinding",
"implements",
"IMethodBinding",
"{",
"private",
"static",
"final",
"int",
"VALID_MODIFIERS",
"=",
"Modifier",
".",
"PUBLIC",
"|",
"Modifier",
".",
"PROTECTED",
"|",
"Modifier",
".",
"PRIVATE",
"|",
"Modifier",
".",
"ABSTRACT",
"|",
"Modifier",
".",
"STATIC",
"|",
"Modifier",
".",
"FINAL",
"|",
"Modifier",
".",
"SYNCHRONIZED",
"|",
"Modifier",
".",
"NATIVE",
"|",
"Modifier",
".",
"STRICTFP",
";",
"private",
"static",
"final",
"ITypeBinding",
"[",
"]",
"NO_TYPE_BINDINGS",
"=",
"new",
"ITypeBinding",
"[",
"0",
"]",
";",
"private",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"MethodBinding",
"binding",
";",
"private",
"BindingResolver",
"resolver",
";",
"private",
"ITypeBinding",
"[",
"]",
"parameterTypes",
";",
"private",
"ITypeBinding",
"[",
"]",
"exceptionTypes",
";",
"private",
"String",
"name",
";",
"private",
"ITypeBinding",
"declaringClass",
";",
"private",
"ITypeBinding",
"returnType",
";",
"private",
"String",
"key",
";",
"private",
"ITypeBinding",
"[",
"]",
"typeParameters",
";",
"private",
"ITypeBinding",
"[",
"]",
"typeArguments",
";",
"private",
"IAnnotationBinding",
"[",
"]",
"annotations",
";",
"private",
"IAnnotationBinding",
"[",
"]",
"[",
"]",
"parameterAnnotations",
";",
"MethodBinding",
"(",
"BindingResolver",
"resolver",
",",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"MethodBinding",
"binding",
")",
"{",
"this",
".",
"resolver",
"=",
"resolver",
";",
"this",
".",
"binding",
"=",
"binding",
";",
"}",
"public",
"boolean",
"isAnnotationMember",
"(",
")",
"{",
"return",
"getDeclaringClass",
"(",
")",
".",
"isAnnotation",
"(",
")",
";",
"}",
"public",
"boolean",
"isConstructor",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"isConstructor",
"(",
")",
";",
"}",
"public",
"boolean",
"isDefaultConstructor",
"(",
")",
"{",
"final",
"ReferenceBinding",
"declaringClassBinding",
"=",
"this",
".",
"binding",
".",
"declaringClass",
";",
"if",
"(",
"declaringClassBinding",
".",
"isRawType",
"(",
")",
")",
"{",
"RawTypeBinding",
"rawTypeBinding",
"=",
"(",
"RawTypeBinding",
")",
"declaringClassBinding",
";",
"if",
"(",
"rawTypeBinding",
".",
"genericType",
"(",
")",
".",
"isBinaryBinding",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"(",
"this",
".",
"binding",
".",
"modifiers",
"&",
"ExtraCompilerModifiers",
".",
"AccIsDefaultConstructor",
")",
"!=",
"0",
";",
"}",
"if",
"(",
"declaringClassBinding",
".",
"isBinaryBinding",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"(",
"this",
".",
"binding",
".",
"modifiers",
"&",
"ExtraCompilerModifiers",
".",
"AccIsDefaultConstructor",
")",
"!=",
"0",
";",
"}",
"public",
"String",
"getName",
"(",
")",
"{",
"if",
"(",
"this",
".",
"name",
"==",
"null",
")",
"{",
"if",
"(",
"this",
".",
"binding",
".",
"isConstructor",
"(",
")",
")",
"{",
"this",
".",
"name",
"=",
"getDeclaringClass",
"(",
")",
".",
"getName",
"(",
")",
";",
"}",
"else",
"{",
"this",
".",
"name",
"=",
"new",
"String",
"(",
"this",
".",
"binding",
".",
"selector",
")",
";",
"}",
"}",
"return",
"this",
".",
"name",
";",
"}",
"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",
"ITypeBinding",
"getDeclaringClass",
"(",
")",
"{",
"if",
"(",
"this",
".",
"declaringClass",
"==",
"null",
")",
"{",
"this",
".",
"declaringClass",
"=",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"this",
".",
"binding",
".",
"declaringClass",
")",
";",
"}",
"return",
"this",
".",
"declaringClass",
";",
"}",
"public",
"IAnnotationBinding",
"[",
"]",
"getParameterAnnotations",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"getParameterTypes",
"(",
")",
"==",
"NO_TYPE_BINDINGS",
")",
"{",
"return",
"AnnotationBinding",
".",
"NoAnnotations",
";",
"}",
"if",
"(",
"this",
".",
"parameterAnnotations",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"parameterAnnotations",
"[",
"index",
"]",
";",
"}",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"AnnotationBinding",
"[",
"]",
"[",
"]",
"bindingAnnotations",
"=",
"this",
".",
"binding",
".",
"getParameterAnnotations",
"(",
")",
";",
"if",
"(",
"bindingAnnotations",
"==",
"null",
")",
"return",
"AnnotationBinding",
".",
"NoAnnotations",
";",
"int",
"length",
"=",
"bindingAnnotations",
".",
"length",
";",
"IAnnotationBinding",
"[",
"]",
"[",
"]",
"domAnnotations",
"=",
"new",
"IAnnotationBinding",
"[",
"length",
"]",
"[",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"AnnotationBinding",
"[",
"]",
"paramBindingAnnotations",
"=",
"bindingAnnotations",
"[",
"i",
"]",
";",
"int",
"pLength",
"=",
"paramBindingAnnotations",
".",
"length",
";",
"domAnnotations",
"[",
"i",
"]",
"=",
"new",
"AnnotationBinding",
"[",
"pLength",
"]",
";",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
"pLength",
";",
"j",
"++",
")",
"{",
"IAnnotationBinding",
"domAnnotation",
"=",
"this",
".",
"resolver",
".",
"getAnnotationInstance",
"(",
"paramBindingAnnotations",
"[",
"j",
"]",
")",
";",
"if",
"(",
"domAnnotation",
"==",
"null",
")",
"{",
"domAnnotations",
"[",
"i",
"]",
"=",
"AnnotationBinding",
".",
"NoAnnotations",
";",
"break",
";",
"}",
"domAnnotations",
"[",
"i",
"]",
"[",
"j",
"]",
"=",
"domAnnotation",
";",
"}",
"}",
"this",
".",
"parameterAnnotations",
"=",
"domAnnotations",
";",
"return",
"this",
".",
"parameterAnnotations",
"[",
"index",
"]",
";",
"}",
"public",
"ITypeBinding",
"[",
"]",
"getParameterTypes",
"(",
")",
"{",
"if",
"(",
"this",
".",
"parameterTypes",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"parameterTypes",
";",
"}",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"[",
"]",
"parameters",
"=",
"this",
".",
"binding",
".",
"parameters",
";",
"int",
"length",
"=",
"parameters",
"==",
"null",
"?",
"0",
":",
"parameters",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"{",
"return",
"this",
".",
"parameterTypes",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"else",
"{",
"ITypeBinding",
"[",
"]",
"paramTypes",
"=",
"new",
"ITypeBinding",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"final",
"TypeBinding",
"parameterBinding",
"=",
"parameters",
"[",
"i",
"]",
";",
"if",
"(",
"parameterBinding",
"!=",
"null",
")",
"{",
"ITypeBinding",
"typeBinding",
"=",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"parameterBinding",
")",
";",
"if",
"(",
"typeBinding",
"==",
"null",
")",
"{",
"return",
"this",
".",
"parameterTypes",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"paramTypes",
"[",
"i",
"]",
"=",
"typeBinding",
";",
"}",
"else",
"{",
"StringBuffer",
"message",
"=",
"new",
"StringBuffer",
"(",
"\"\"",
")",
";",
"message",
".",
"append",
"(",
"toString",
"(",
")",
")",
";",
"Util",
".",
"log",
"(",
"new",
"IllegalArgumentException",
"(",
")",
",",
"message",
".",
"toString",
"(",
")",
")",
";",
"return",
"this",
".",
"parameterTypes",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"}",
"return",
"this",
".",
"parameterTypes",
"=",
"paramTypes",
";",
"}",
"}",
"public",
"ITypeBinding",
"getReturnType",
"(",
")",
"{",
"if",
"(",
"this",
".",
"returnType",
"==",
"null",
")",
"{",
"this",
".",
"returnType",
"=",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"this",
".",
"binding",
".",
"returnType",
")",
";",
"}",
"return",
"this",
".",
"returnType",
";",
"}",
"public",
"Object",
"getDefaultValue",
"(",
")",
"{",
"if",
"(",
"isAnnotationMember",
"(",
")",
")",
"return",
"MemberValuePairBinding",
".",
"buildDOMValue",
"(",
"this",
".",
"binding",
".",
"getDefaultValue",
"(",
")",
",",
"this",
".",
"resolver",
")",
";",
"return",
"null",
";",
"}",
"public",
"ITypeBinding",
"[",
"]",
"getExceptionTypes",
"(",
")",
"{",
"if",
"(",
"this",
".",
"exceptionTypes",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"exceptionTypes",
";",
"}",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"[",
"]",
"exceptions",
"=",
"this",
".",
"binding",
".",
"thrownExceptions",
";",
"int",
"length",
"=",
"exceptions",
"==",
"null",
"?",
"0",
":",
"exceptions",
".",
"length",
";",
"if",
"(",
"length",
"==",
"0",
")",
"{",
"return",
"this",
".",
"exceptionTypes",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"ITypeBinding",
"[",
"]",
"exTypes",
"=",
"new",
"ITypeBinding",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"ITypeBinding",
"typeBinding",
"=",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"exceptions",
"[",
"i",
"]",
")",
";",
"if",
"(",
"typeBinding",
"==",
"null",
")",
"{",
"return",
"this",
".",
"exceptionTypes",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"exTypes",
"[",
"i",
"]",
"=",
"typeBinding",
";",
"}",
"return",
"this",
".",
"exceptionTypes",
"=",
"exTypes",
";",
"}",
"public",
"IJavaElement",
"getJavaElement",
"(",
")",
"{",
"JavaElement",
"element",
"=",
"getUnresolvedJavaElement",
"(",
")",
";",
"if",
"(",
"element",
"==",
"null",
")",
"return",
"null",
";",
"return",
"element",
".",
"resolved",
"(",
"this",
".",
"binding",
")",
";",
"}",
"private",
"JavaElement",
"getUnresolvedJavaElement",
"(",
")",
"{",
"if",
"(",
"JavaCore",
".",
"getPlugin",
"(",
")",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"!",
"(",
"this",
".",
"resolver",
"instanceof",
"DefaultBindingResolver",
")",
")",
"return",
"null",
";",
"DefaultBindingResolver",
"defaultBindingResolver",
"=",
"(",
"DefaultBindingResolver",
")",
"this",
".",
"resolver",
";",
"if",
"(",
"!",
"defaultBindingResolver",
".",
"fromJavaProject",
")",
"return",
"null",
";",
"return",
"Util",
".",
"getUnresolvedJavaElement",
"(",
"this",
".",
"binding",
",",
"defaultBindingResolver",
".",
"workingCopyOwner",
",",
"defaultBindingResolver",
".",
"getBindingsToNodesMap",
"(",
")",
")",
";",
"}",
"public",
"int",
"getKind",
"(",
")",
"{",
"return",
"IBinding",
".",
"METHOD",
";",
"}",
"public",
"int",
"getModifiers",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"getAccessFlags",
"(",
")",
"&",
"VALID_MODIFIERS",
";",
"}",
"public",
"boolean",
"isDeprecated",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"isDeprecated",
"(",
")",
";",
"}",
"public",
"boolean",
"isRecovered",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"isSynthetic",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"isSynthetic",
"(",
")",
";",
"}",
"public",
"boolean",
"isVarargs",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"isVarargs",
"(",
")",
";",
"}",
"public",
"String",
"getKey",
"(",
")",
"{",
"if",
"(",
"this",
".",
"key",
"==",
"null",
")",
"{",
"this",
".",
"key",
"=",
"new",
"String",
"(",
"this",
".",
"binding",
".",
"computeUniqueKey",
"(",
")",
")",
";",
"}",
"return",
"this",
".",
"key",
";",
"}",
"public",
"boolean",
"isEqualTo",
"(",
"IBinding",
"other",
")",
"{",
"if",
"(",
"other",
"==",
"this",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"other",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"(",
"other",
"instanceof",
"MethodBinding",
")",
")",
"{",
"return",
"false",
";",
"}",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"MethodBinding",
"otherBinding",
"=",
"(",
"(",
"MethodBinding",
")",
"other",
")",
".",
"binding",
";",
"return",
"BindingComparator",
".",
"isEqual",
"(",
"this",
".",
"binding",
",",
"otherBinding",
")",
";",
"}",
"public",
"ITypeBinding",
"[",
"]",
"getTypeParameters",
"(",
")",
"{",
"if",
"(",
"this",
".",
"typeParameters",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"typeParameters",
";",
"}",
"TypeVariableBinding",
"[",
"]",
"typeVariableBindings",
"=",
"this",
".",
"binding",
".",
"typeVariables",
"(",
")",
";",
"int",
"typeVariableBindingsLength",
"=",
"typeVariableBindings",
"==",
"null",
"?",
"0",
":",
"typeVariableBindings",
".",
"length",
";",
"if",
"(",
"typeVariableBindingsLength",
"==",
"0",
")",
"{",
"return",
"this",
".",
"typeParameters",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"ITypeBinding",
"[",
"]",
"tParameters",
"=",
"new",
"ITypeBinding",
"[",
"typeVariableBindingsLength",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"typeVariableBindingsLength",
";",
"i",
"++",
")",
"{",
"ITypeBinding",
"typeBinding",
"=",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"typeVariableBindings",
"[",
"i",
"]",
")",
";",
"if",
"(",
"typeBinding",
"==",
"null",
")",
"{",
"return",
"this",
".",
"typeParameters",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"tParameters",
"[",
"i",
"]",
"=",
"typeBinding",
";",
"}",
"return",
"this",
".",
"typeParameters",
"=",
"tParameters",
";",
"}",
"public",
"boolean",
"isGenericMethod",
"(",
")",
"{",
"if",
"(",
"this",
".",
"typeParameters",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"typeParameters",
".",
"length",
">",
"0",
";",
"}",
"TypeVariableBinding",
"[",
"]",
"typeVariableBindings",
"=",
"this",
".",
"binding",
".",
"typeVariables",
"(",
")",
";",
"return",
"(",
"typeVariableBindings",
"!=",
"null",
"&&",
"typeVariableBindings",
".",
"length",
">",
"0",
")",
";",
"}",
"public",
"ITypeBinding",
"[",
"]",
"getTypeArguments",
"(",
")",
"{",
"if",
"(",
"this",
".",
"typeArguments",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"typeArguments",
";",
"}",
"if",
"(",
"this",
".",
"binding",
"instanceof",
"ParameterizedGenericMethodBinding",
")",
"{",
"ParameterizedGenericMethodBinding",
"genericMethodBinding",
"=",
"(",
"ParameterizedGenericMethodBinding",
")",
"this",
".",
"binding",
";",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"[",
"]",
"typeArgumentsBindings",
"=",
"genericMethodBinding",
".",
"typeArguments",
";",
"int",
"typeArgumentsLength",
"=",
"typeArgumentsBindings",
"==",
"null",
"?",
"0",
":",
"typeArgumentsBindings",
".",
"length",
";",
"if",
"(",
"typeArgumentsLength",
"!=",
"0",
")",
"{",
"ITypeBinding",
"[",
"]",
"tArguments",
"=",
"new",
"ITypeBinding",
"[",
"typeArgumentsLength",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"typeArgumentsLength",
";",
"i",
"++",
")",
"{",
"ITypeBinding",
"typeBinding",
"=",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"typeArgumentsBindings",
"[",
"i",
"]",
")",
";",
"if",
"(",
"typeBinding",
"==",
"null",
")",
"{",
"return",
"this",
".",
"typeArguments",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"tArguments",
"[",
"i",
"]",
"=",
"typeBinding",
";",
"}",
"return",
"this",
".",
"typeArguments",
"=",
"tArguments",
";",
"}",
"}",
"return",
"this",
".",
"typeArguments",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"public",
"boolean",
"isParameterizedMethod",
"(",
")",
"{",
"return",
"(",
"this",
".",
"binding",
"instanceof",
"ParameterizedGenericMethodBinding",
")",
"&&",
"!",
"(",
"(",
"ParameterizedGenericMethodBinding",
")",
"this",
".",
"binding",
")",
".",
"isRaw",
";",
"}",
"public",
"boolean",
"isRawMethod",
"(",
")",
"{",
"return",
"(",
"this",
".",
"binding",
"instanceof",
"ParameterizedGenericMethodBinding",
")",
"&&",
"(",
"(",
"ParameterizedGenericMethodBinding",
")",
"this",
".",
"binding",
")",
".",
"isRaw",
";",
"}",
"public",
"boolean",
"isSubsignature",
"(",
"IMethodBinding",
"otherMethod",
")",
"{",
"try",
"{",
"LookupEnvironment",
"lookupEnvironment",
"=",
"this",
".",
"resolver",
".",
"lookupEnvironment",
"(",
")",
";",
"return",
"lookupEnvironment",
"!=",
"null",
"&&",
"lookupEnvironment",
".",
"methodVerifier",
"(",
")",
".",
"isMethodSubsignature",
"(",
"this",
".",
"binding",
",",
"(",
"(",
"MethodBinding",
")",
"otherMethod",
")",
".",
"binding",
")",
";",
"}",
"catch",
"(",
"AbortCompilation",
"e",
")",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"IMethodBinding",
"getMethodDeclaration",
"(",
")",
"{",
"return",
"this",
".",
"resolver",
".",
"getMethodBinding",
"(",
"this",
".",
"binding",
".",
"original",
"(",
")",
")",
";",
"}",
"public",
"boolean",
"overrides",
"(",
"IMethodBinding",
"otherMethod",
")",
"{",
"LookupEnvironment",
"lookupEnvironment",
"=",
"this",
".",
"resolver",
".",
"lookupEnvironment",
"(",
")",
";",
"return",
"lookupEnvironment",
"!=",
"null",
"&&",
"lookupEnvironment",
".",
"methodVerifier",
"(",
")",
".",
"doesMethodOverride",
"(",
"this",
".",
"binding",
",",
"(",
"(",
"MethodBinding",
")",
"otherMethod",
")",
".",
"binding",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,373 |
[
"<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",
"Assignment",
"extends",
"Expression",
"{",
"public",
"static",
"class",
"Operator",
"{",
"private",
"String",
"op",
";",
"private",
"Operator",
"(",
"String",
"op",
")",
"{",
"this",
".",
"op",
"=",
"op",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"this",
".",
"op",
";",
"}",
"public",
"static",
"final",
"Operator",
"ASSIGN",
"=",
"new",
"Operator",
"(",
"\"=\"",
")",
";",
"public",
"static",
"final",
"Operator",
"PLUS_ASSIGN",
"=",
"new",
"Operator",
"(",
"\"+=\"",
")",
";",
"public",
"static",
"final",
"Operator",
"MINUS_ASSIGN",
"=",
"new",
"Operator",
"(",
"\"-=\"",
")",
";",
"public",
"static",
"final",
"Operator",
"TIMES_ASSIGN",
"=",
"new",
"Operator",
"(",
"\"*=\"",
")",
";",
"public",
"static",
"final",
"Operator",
"DIVIDE_ASSIGN",
"=",
"new",
"Operator",
"(",
"\"/=\"",
")",
";",
"public",
"static",
"final",
"Operator",
"BIT_AND_ASSIGN",
"=",
"new",
"Operator",
"(",
"\"&=\"",
")",
";",
"public",
"static",
"final",
"Operator",
"BIT_OR_ASSIGN",
"=",
"new",
"Operator",
"(",
"\"|=\"",
")",
";",
"public",
"static",
"final",
"Operator",
"BIT_XOR_ASSIGN",
"=",
"new",
"Operator",
"(",
"\"^=\"",
")",
";",
"public",
"static",
"final",
"Operator",
"REMAINDER_ASSIGN",
"=",
"new",
"Operator",
"(",
"\"%=\"",
")",
";",
"public",
"static",
"final",
"Operator",
"LEFT_SHIFT_ASSIGN",
"=",
"new",
"Operator",
"(",
"\"<<=\"",
")",
";",
"public",
"static",
"final",
"Operator",
"RIGHT_SHIFT_SIGNED_ASSIGN",
"=",
"new",
"Operator",
"(",
"\">>=\"",
")",
";",
"public",
"static",
"final",
"Operator",
"RIGHT_SHIFT_UNSIGNED_ASSIGN",
"=",
"new",
"Operator",
"(",
"\">>>=\"",
")",
";",
"public",
"static",
"Operator",
"toOperator",
"(",
"String",
"token",
")",
"{",
"return",
"(",
"Operator",
")",
"CODES",
".",
"get",
"(",
"token",
")",
";",
"}",
"private",
"static",
"final",
"Map",
"CODES",
";",
"static",
"{",
"CODES",
"=",
"new",
"HashMap",
"(",
"20",
")",
";",
"Operator",
"[",
"]",
"ops",
"=",
"{",
"ASSIGN",
",",
"PLUS_ASSIGN",
",",
"MINUS_ASSIGN",
",",
"TIMES_ASSIGN",
",",
"DIVIDE_ASSIGN",
",",
"BIT_AND_ASSIGN",
",",
"BIT_OR_ASSIGN",
",",
"BIT_XOR_ASSIGN",
",",
"REMAINDER_ASSIGN",
",",
"LEFT_SHIFT_ASSIGN",
",",
"RIGHT_SHIFT_SIGNED_ASSIGN",
",",
"RIGHT_SHIFT_UNSIGNED_ASSIGN",
"}",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ops",
".",
"length",
";",
"i",
"++",
")",
"{",
"CODES",
".",
"put",
"(",
"ops",
"[",
"i",
"]",
".",
"toString",
"(",
")",
",",
"ops",
"[",
"i",
"]",
")",
";",
"}",
"}",
"}",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"LEFT_HAND_SIDE_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"Assignment",
".",
"class",
",",
"\"leftHandSide\"",
",",
"Expression",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"SimplePropertyDescriptor",
"OPERATOR_PROPERTY",
"=",
"new",
"SimplePropertyDescriptor",
"(",
"Assignment",
".",
"class",
",",
"\"operator\"",
",",
"Assignment",
".",
"Operator",
".",
"class",
",",
"MANDATORY",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"RIGHT_HAND_SIDE_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"Assignment",
".",
"class",
",",
"\"\"",
",",
"Expression",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"properyList",
"=",
"new",
"ArrayList",
"(",
"4",
")",
";",
"createPropertyList",
"(",
"Assignment",
".",
"class",
",",
"properyList",
")",
";",
"addProperty",
"(",
"LEFT_HAND_SIDE_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"OPERATOR_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"RIGHT_HAND_SIDE_PROPERTY",
",",
"properyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"properyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"Assignment",
".",
"Operator",
"assignmentOperator",
"=",
"Assignment",
".",
"Operator",
".",
"ASSIGN",
";",
"private",
"Expression",
"leftHandSide",
"=",
"null",
";",
"private",
"Expression",
"rightHandSide",
"=",
"null",
";",
"Assignment",
"(",
"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_HAND_SIDE_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getLeftHandSide",
"(",
")",
";",
"}",
"else",
"{",
"setLeftHandSide",
"(",
"(",
"Expression",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"if",
"(",
"property",
"==",
"RIGHT_HAND_SIDE_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getRightHandSide",
"(",
")",
";",
"}",
"else",
"{",
"setRightHandSide",
"(",
"(",
"Expression",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"return",
"super",
".",
"internalGetSetChildProperty",
"(",
"property",
",",
"get",
",",
"child",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"ASSIGNMENT",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"Assignment",
"result",
"=",
"new",
"Assignment",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"setOperator",
"(",
"getOperator",
"(",
")",
")",
";",
"result",
".",
"setLeftHandSide",
"(",
"(",
"Expression",
")",
"getLeftHandSide",
"(",
")",
".",
"clone",
"(",
"target",
")",
")",
";",
"result",
".",
"setRightHandSide",
"(",
"(",
"Expression",
")",
"getRightHandSide",
"(",
")",
".",
"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",
",",
"getLeftHandSide",
"(",
")",
")",
";",
"acceptChild",
"(",
"visitor",
",",
"getRightHandSide",
"(",
")",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"public",
"Assignment",
".",
"Operator",
"getOperator",
"(",
")",
"{",
"return",
"this",
".",
"assignmentOperator",
";",
"}",
"public",
"void",
"setOperator",
"(",
"Assignment",
".",
"Operator",
"assignmentOperator",
")",
"{",
"if",
"(",
"assignmentOperator",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"preValueChange",
"(",
"OPERATOR_PROPERTY",
")",
";",
"this",
".",
"assignmentOperator",
"=",
"assignmentOperator",
";",
"postValueChange",
"(",
"OPERATOR_PROPERTY",
")",
";",
"}",
"public",
"Expression",
"getLeftHandSide",
"(",
")",
"{",
"if",
"(",
"this",
".",
"leftHandSide",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"leftHandSide",
"==",
"null",
")",
"{",
"preLazyInit",
"(",
")",
";",
"this",
".",
"leftHandSide",
"=",
"new",
"SimpleName",
"(",
"this",
".",
"ast",
")",
";",
"postLazyInit",
"(",
"this",
".",
"leftHandSide",
",",
"LEFT_HAND_SIDE_PROPERTY",
")",
";",
"}",
"}",
"}",
"return",
"this",
".",
"leftHandSide",
";",
"}",
"public",
"void",
"setLeftHandSide",
"(",
"Expression",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"ASTNode",
"oldChild",
"=",
"this",
".",
"leftHandSide",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"LEFT_HAND_SIDE_PROPERTY",
")",
";",
"this",
".",
"leftHandSide",
"=",
"expression",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"LEFT_HAND_SIDE_PROPERTY",
")",
";",
"}",
"public",
"Expression",
"getRightHandSide",
"(",
")",
"{",
"if",
"(",
"this",
".",
"rightHandSide",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"rightHandSide",
"==",
"null",
")",
"{",
"preLazyInit",
"(",
")",
";",
"this",
".",
"rightHandSide",
"=",
"new",
"SimpleName",
"(",
"this",
".",
"ast",
")",
";",
"postLazyInit",
"(",
"this",
".",
"rightHandSide",
",",
"RIGHT_HAND_SIDE_PROPERTY",
")",
";",
"}",
"}",
"}",
"return",
"this",
".",
"rightHandSide",
";",
"}",
"public",
"void",
"setRightHandSide",
"(",
"Expression",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"ASTNode",
"oldChild",
"=",
"this",
".",
"rightHandSide",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"RIGHT_HAND_SIDE_PROPERTY",
")",
";",
"this",
".",
"rightHandSide",
"=",
"expression",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"RIGHT_HAND_SIDE_PROPERTY",
")",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"BASE_NODE_SIZE",
"+",
"3",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"leftHandSide",
"==",
"null",
"?",
"0",
":",
"getLeftHandSide",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"rightHandSide",
"==",
"null",
"?",
"0",
":",
"getRightHandSide",
"(",
")",
".",
"treeSize",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
4,374 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"SynchronizedStatement",
"extends",
"Statement",
"{",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"EXPRESSION_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"SynchronizedStatement",
".",
"class",
",",
"\"expression\"",
",",
"Expression",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"BODY_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"SynchronizedStatement",
".",
"class",
",",
"\"body\"",
",",
"Block",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"propertyList",
"=",
"new",
"ArrayList",
"(",
"3",
")",
";",
"createPropertyList",
"(",
"SynchronizedStatement",
".",
"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",
"Block",
"body",
"=",
"null",
";",
"SynchronizedStatement",
"(",
"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",
"(",
"(",
"Block",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"return",
"super",
".",
"internalGetSetChildProperty",
"(",
"property",
",",
"get",
",",
"child",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"SYNCHRONIZED_STATEMENT",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"SynchronizedStatement",
"result",
"=",
"new",
"SynchronizedStatement",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"copyLeadingComment",
"(",
"this",
")",
";",
"result",
".",
"setExpression",
"(",
"(",
"Expression",
")",
"getExpression",
"(",
")",
".",
"clone",
"(",
"target",
")",
")",
";",
"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",
",",
"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",
"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",
"block",
")",
"{",
"if",
"(",
"block",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"ASTNode",
"oldChild",
"=",
"this",
".",
"body",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"block",
",",
"BODY_PROPERTY",
")",
";",
"this",
".",
"body",
"=",
"block",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"block",
",",
"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,375 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"public",
"abstract",
"class",
"StructuralPropertyDescriptor",
"{",
"private",
"final",
"String",
"propertyId",
";",
"private",
"final",
"Class",
"nodeClass",
";",
"StructuralPropertyDescriptor",
"(",
"Class",
"nodeClass",
",",
"String",
"propertyId",
")",
"{",
"if",
"(",
"nodeClass",
"==",
"null",
"||",
"propertyId",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"this",
".",
"propertyId",
"=",
"propertyId",
";",
"this",
".",
"nodeClass",
"=",
"nodeClass",
";",
"}",
"public",
"final",
"String",
"getId",
"(",
")",
"{",
"return",
"this",
".",
"propertyId",
";",
"}",
"public",
"final",
"Class",
"getNodeClass",
"(",
")",
"{",
"return",
"this",
".",
"nodeClass",
";",
"}",
"public",
"final",
"boolean",
"isSimpleProperty",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"SimplePropertyDescriptor",
")",
";",
"}",
"public",
"final",
"boolean",
"isChildProperty",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"ChildPropertyDescriptor",
")",
";",
"}",
"public",
"final",
"boolean",
"isChildListProperty",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"ChildListPropertyDescriptor",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"b",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"isChildListProperty",
"(",
")",
")",
"{",
"b",
".",
"append",
"(",
"\"ChildList\"",
")",
";",
"}",
"if",
"(",
"isChildProperty",
"(",
")",
")",
"{",
"b",
".",
"append",
"(",
"\"Child\"",
")",
";",
"}",
"if",
"(",
"isSimpleProperty",
"(",
")",
")",
"{",
"b",
".",
"append",
"(",
"\"Simple\"",
")",
";",
"}",
"b",
".",
"append",
"(",
"\"Property[\"",
")",
";",
"if",
"(",
"this",
".",
"nodeClass",
"!=",
"null",
")",
"{",
"b",
".",
"append",
"(",
"this",
".",
"nodeClass",
".",
"getName",
"(",
")",
")",
";",
"}",
"b",
".",
"append",
"(",
"\",\"",
")",
";",
"if",
"(",
"this",
".",
"propertyId",
"!=",
"null",
")",
"{",
"b",
".",
"append",
"(",
"this",
".",
"propertyId",
")",
";",
"}",
"b",
".",
"append",
"(",
"\"]\"",
")",
";",
"return",
"b",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,376 |
[
"<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",
"PrimitiveType",
"extends",
"Type",
"{",
"public",
"static",
"class",
"Code",
"{",
"private",
"String",
"name",
";",
"Code",
"(",
"String",
"name",
")",
"{",
"this",
".",
"name",
"=",
"name",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"this",
".",
"name",
";",
"}",
"}",
"public",
"static",
"final",
"Code",
"INT",
"=",
"new",
"Code",
"(",
"\"int\"",
")",
";",
"public",
"static",
"final",
"Code",
"CHAR",
"=",
"new",
"Code",
"(",
"\"char\"",
")",
";",
"public",
"static",
"final",
"Code",
"BOOLEAN",
"=",
"new",
"Code",
"(",
"\"boolean\"",
")",
";",
"public",
"static",
"final",
"Code",
"SHORT",
"=",
"new",
"Code",
"(",
"\"short\"",
")",
";",
"public",
"static",
"final",
"Code",
"LONG",
"=",
"new",
"Code",
"(",
"\"long\"",
")",
";",
"public",
"static",
"final",
"Code",
"FLOAT",
"=",
"new",
"Code",
"(",
"\"float\"",
")",
";",
"public",
"static",
"final",
"Code",
"DOUBLE",
"=",
"new",
"Code",
"(",
"\"double\"",
")",
";",
"public",
"static",
"final",
"Code",
"BYTE",
"=",
"new",
"Code",
"(",
"\"byte\"",
")",
";",
"public",
"static",
"final",
"Code",
"VOID",
"=",
"new",
"Code",
"(",
"\"void\"",
")",
";",
"private",
"PrimitiveType",
".",
"Code",
"typeCode",
"=",
"INT",
";",
"private",
"static",
"final",
"Map",
"CODES",
";",
"static",
"{",
"CODES",
"=",
"new",
"HashMap",
"(",
"20",
")",
";",
"Code",
"[",
"]",
"ops",
"=",
"{",
"INT",
",",
"BYTE",
",",
"CHAR",
",",
"BOOLEAN",
",",
"SHORT",
",",
"LONG",
",",
"FLOAT",
",",
"DOUBLE",
",",
"VOID",
",",
"}",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ops",
".",
"length",
";",
"i",
"++",
")",
"{",
"CODES",
".",
"put",
"(",
"ops",
"[",
"i",
"]",
".",
"toString",
"(",
")",
",",
"ops",
"[",
"i",
"]",
")",
";",
"}",
"}",
"public",
"static",
"PrimitiveType",
".",
"Code",
"toCode",
"(",
"String",
"token",
")",
"{",
"return",
"(",
"PrimitiveType",
".",
"Code",
")",
"CODES",
".",
"get",
"(",
"token",
")",
";",
"}",
"public",
"static",
"final",
"SimplePropertyDescriptor",
"PRIMITIVE_TYPE_CODE_PROPERTY",
"=",
"new",
"SimplePropertyDescriptor",
"(",
"PrimitiveType",
".",
"class",
",",
"\"\"",
",",
"PrimitiveType",
".",
"Code",
".",
"class",
",",
"MANDATORY",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"propertyList",
"=",
"new",
"ArrayList",
"(",
"2",
")",
";",
"createPropertyList",
"(",
"PrimitiveType",
".",
"class",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"PRIMITIVE_TYPE_CODE_PROPERTY",
",",
"propertyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"propertyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"PrimitiveType",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"}",
"final",
"List",
"internalStructuralPropertiesForType",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"propertyDescriptors",
"(",
"apiLevel",
")",
";",
"}",
"final",
"Object",
"internalGetSetObjectProperty",
"(",
"SimplePropertyDescriptor",
"property",
",",
"boolean",
"get",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"property",
"==",
"PRIMITIVE_TYPE_CODE_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getPrimitiveTypeCode",
"(",
")",
";",
"}",
"else",
"{",
"setPrimitiveTypeCode",
"(",
"(",
"Code",
")",
"value",
")",
";",
"return",
"null",
";",
"}",
"}",
"return",
"super",
".",
"internalGetSetObjectProperty",
"(",
"property",
",",
"get",
",",
"value",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"PRIMITIVE_TYPE",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"PrimitiveType",
"result",
"=",
"new",
"PrimitiveType",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"setPrimitiveTypeCode",
"(",
"getPrimitiveTypeCode",
"(",
")",
")",
";",
"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",
"PrimitiveType",
".",
"Code",
"getPrimitiveTypeCode",
"(",
")",
"{",
"return",
"this",
".",
"typeCode",
";",
"}",
"public",
"void",
"setPrimitiveTypeCode",
"(",
"PrimitiveType",
".",
"Code",
"typeCode",
")",
"{",
"if",
"(",
"typeCode",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"preValueChange",
"(",
"PRIMITIVE_TYPE_CODE_PROPERTY",
")",
";",
"this",
".",
"typeCode",
"=",
"typeCode",
";",
"postValueChange",
"(",
"PRIMITIVE_TYPE_CODE_PROPERTY",
")",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"BASE_NODE_SIZE",
"+",
"1",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,377 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"public",
"abstract",
"class",
"Expression",
"extends",
"ASTNode",
"{",
"Expression",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"}",
"public",
"final",
"Object",
"resolveConstantExpressionValue",
"(",
")",
"{",
"return",
"this",
".",
"ast",
".",
"getBindingResolver",
"(",
")",
".",
"resolveConstantExpressionValue",
"(",
"this",
")",
";",
"}",
"public",
"final",
"ITypeBinding",
"resolveTypeBinding",
"(",
")",
"{",
"return",
"this",
".",
"ast",
".",
"getBindingResolver",
"(",
")",
".",
"resolveExpressionType",
"(",
"this",
")",
";",
"}",
"public",
"final",
"boolean",
"resolveBoxing",
"(",
")",
"{",
"return",
"this",
".",
"ast",
".",
"getBindingResolver",
"(",
")",
".",
"resolveBoxing",
"(",
"this",
")",
";",
"}",
"public",
"final",
"boolean",
"resolveUnboxing",
"(",
")",
"{",
"return",
"this",
".",
"ast",
".",
"getBindingResolver",
"(",
")",
".",
"resolveUnboxing",
"(",
"this",
")",
";",
"}",
"}",
"</s>"
] |
4,378 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"ParameterizedType",
"extends",
"Type",
"{",
"int",
"index",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"TYPE_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"ParameterizedType",
".",
"class",
",",
"\"type\"",
",",
"Type",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"TYPE_ARGUMENTS_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"ParameterizedType",
".",
"class",
",",
"\"\"",
",",
"Type",
".",
"class",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"propertyList",
"=",
"new",
"ArrayList",
"(",
"3",
")",
";",
"createPropertyList",
"(",
"ParameterizedType",
".",
"class",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"TYPE_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"TYPE_ARGUMENTS_PROPERTY",
",",
"propertyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"propertyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"Type",
"type",
"=",
"null",
";",
"private",
"ASTNode",
".",
"NodeList",
"typeArguments",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"TYPE_ARGUMENTS_PROPERTY",
")",
";",
"ParameterizedType",
"(",
"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_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getType",
"(",
")",
";",
"}",
"else",
"{",
"setType",
"(",
"(",
"Type",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"return",
"super",
".",
"internalGetSetChildProperty",
"(",
"property",
",",
"get",
",",
"child",
")",
";",
"}",
"final",
"List",
"internalGetChildListProperty",
"(",
"ChildListPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"property",
"==",
"TYPE_ARGUMENTS_PROPERTY",
")",
"{",
"return",
"typeArguments",
"(",
")",
";",
"}",
"return",
"super",
".",
"internalGetChildListProperty",
"(",
"property",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"PARAMETERIZED_TYPE",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"ParameterizedType",
"result",
"=",
"new",
"ParameterizedType",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"setType",
"(",
"(",
"Type",
")",
"(",
"(",
"ASTNode",
")",
"getType",
"(",
")",
")",
".",
"clone",
"(",
"target",
")",
")",
";",
"result",
".",
"typeArguments",
"(",
")",
".",
"addAll",
"(",
"ASTNode",
".",
"copySubtrees",
"(",
"target",
",",
"typeArguments",
"(",
")",
")",
")",
";",
"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",
"(",
")",
")",
";",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"typeArguments",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"public",
"Type",
"getType",
"(",
")",
"{",
"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",
")",
"{",
"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",
"typeArguments",
"(",
")",
"{",
"return",
"this",
".",
"typeArguments",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"BASE_NODE_SIZE",
"+",
"3",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"type",
"==",
"null",
"?",
"0",
":",
"getType",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"this",
".",
"typeArguments",
".",
"listSize",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,379 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"AbstractList",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Collections",
";",
"import",
"java",
".",
"util",
".",
"HashMap",
";",
"import",
"java",
".",
"util",
".",
"Iterator",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"dom",
".",
"NaiveASTFlattener",
";",
"public",
"abstract",
"class",
"ASTNode",
"{",
"public",
"static",
"final",
"int",
"ANONYMOUS_CLASS_DECLARATION",
"=",
"1",
";",
"public",
"static",
"final",
"int",
"ARRAY_ACCESS",
"=",
"2",
";",
"public",
"static",
"final",
"int",
"ARRAY_CREATION",
"=",
"3",
";",
"public",
"static",
"final",
"int",
"ARRAY_INITIALIZER",
"=",
"4",
";",
"public",
"static",
"final",
"int",
"ARRAY_TYPE",
"=",
"5",
";",
"public",
"static",
"final",
"int",
"ASSERT_STATEMENT",
"=",
"6",
";",
"public",
"static",
"final",
"int",
"ASSIGNMENT",
"=",
"7",
";",
"public",
"static",
"final",
"int",
"BLOCK",
"=",
"8",
";",
"public",
"static",
"final",
"int",
"BOOLEAN_LITERAL",
"=",
"9",
";",
"public",
"static",
"final",
"int",
"BREAK_STATEMENT",
"=",
"10",
";",
"public",
"static",
"final",
"int",
"CAST_EXPRESSION",
"=",
"11",
";",
"public",
"static",
"final",
"int",
"CATCH_CLAUSE",
"=",
"12",
";",
"public",
"static",
"final",
"int",
"CHARACTER_LITERAL",
"=",
"13",
";",
"public",
"static",
"final",
"int",
"CLASS_INSTANCE_CREATION",
"=",
"14",
";",
"public",
"static",
"final",
"int",
"COMPILATION_UNIT",
"=",
"15",
";",
"public",
"static",
"final",
"int",
"CONDITIONAL_EXPRESSION",
"=",
"16",
";",
"public",
"static",
"final",
"int",
"CONSTRUCTOR_INVOCATION",
"=",
"17",
";",
"public",
"static",
"final",
"int",
"CONTINUE_STATEMENT",
"=",
"18",
";",
"public",
"static",
"final",
"int",
"DO_STATEMENT",
"=",
"19",
";",
"public",
"static",
"final",
"int",
"EMPTY_STATEMENT",
"=",
"20",
";",
"public",
"static",
"final",
"int",
"EXPRESSION_STATEMENT",
"=",
"21",
";",
"public",
"static",
"final",
"int",
"FIELD_ACCESS",
"=",
"22",
";",
"public",
"static",
"final",
"int",
"FIELD_DECLARATION",
"=",
"23",
";",
"public",
"static",
"final",
"int",
"FOR_STATEMENT",
"=",
"24",
";",
"public",
"static",
"final",
"int",
"IF_STATEMENT",
"=",
"25",
";",
"public",
"static",
"final",
"int",
"IMPORT_DECLARATION",
"=",
"26",
";",
"public",
"static",
"final",
"int",
"INFIX_EXPRESSION",
"=",
"27",
";",
"public",
"static",
"final",
"int",
"INITIALIZER",
"=",
"28",
";",
"public",
"static",
"final",
"int",
"JAVADOC",
"=",
"29",
";",
"public",
"static",
"final",
"int",
"LABELED_STATEMENT",
"=",
"30",
";",
"public",
"static",
"final",
"int",
"METHOD_DECLARATION",
"=",
"31",
";",
"public",
"static",
"final",
"int",
"METHOD_INVOCATION",
"=",
"32",
";",
"public",
"static",
"final",
"int",
"NULL_LITERAL",
"=",
"33",
";",
"public",
"static",
"final",
"int",
"NUMBER_LITERAL",
"=",
"34",
";",
"public",
"static",
"final",
"int",
"PACKAGE_DECLARATION",
"=",
"35",
";",
"public",
"static",
"final",
"int",
"PARENTHESIZED_EXPRESSION",
"=",
"36",
";",
"public",
"static",
"final",
"int",
"POSTFIX_EXPRESSION",
"=",
"37",
";",
"public",
"static",
"final",
"int",
"PREFIX_EXPRESSION",
"=",
"38",
";",
"public",
"static",
"final",
"int",
"PRIMITIVE_TYPE",
"=",
"39",
";",
"public",
"static",
"final",
"int",
"QUALIFIED_NAME",
"=",
"40",
";",
"public",
"static",
"final",
"int",
"RETURN_STATEMENT",
"=",
"41",
";",
"public",
"static",
"final",
"int",
"SIMPLE_NAME",
"=",
"42",
";",
"public",
"static",
"final",
"int",
"SIMPLE_TYPE",
"=",
"43",
";",
"public",
"static",
"final",
"int",
"SINGLE_VARIABLE_DECLARATION",
"=",
"44",
";",
"public",
"static",
"final",
"int",
"STRING_LITERAL",
"=",
"45",
";",
"public",
"static",
"final",
"int",
"SUPER_CONSTRUCTOR_INVOCATION",
"=",
"46",
";",
"public",
"static",
"final",
"int",
"SUPER_FIELD_ACCESS",
"=",
"47",
";",
"public",
"static",
"final",
"int",
"SUPER_METHOD_INVOCATION",
"=",
"48",
";",
"public",
"static",
"final",
"int",
"SWITCH_CASE",
"=",
"49",
";",
"public",
"static",
"final",
"int",
"SWITCH_STATEMENT",
"=",
"50",
";",
"public",
"static",
"final",
"int",
"SYNCHRONIZED_STATEMENT",
"=",
"51",
";",
"public",
"static",
"final",
"int",
"THIS_EXPRESSION",
"=",
"52",
";",
"public",
"static",
"final",
"int",
"THROW_STATEMENT",
"=",
"53",
";",
"public",
"static",
"final",
"int",
"TRY_STATEMENT",
"=",
"54",
";",
"public",
"static",
"final",
"int",
"TYPE_DECLARATION",
"=",
"55",
";",
"public",
"static",
"final",
"int",
"TYPE_DECLARATION_STATEMENT",
"=",
"56",
";",
"public",
"static",
"final",
"int",
"TYPE_LITERAL",
"=",
"57",
";",
"public",
"static",
"final",
"int",
"VARIABLE_DECLARATION_EXPRESSION",
"=",
"58",
";",
"public",
"static",
"final",
"int",
"VARIABLE_DECLARATION_FRAGMENT",
"=",
"59",
";",
"public",
"static",
"final",
"int",
"VARIABLE_DECLARATION_STATEMENT",
"=",
"60",
";",
"public",
"static",
"final",
"int",
"WHILE_STATEMENT",
"=",
"61",
";",
"public",
"static",
"final",
"int",
"INSTANCEOF_EXPRESSION",
"=",
"62",
";",
"public",
"static",
"final",
"int",
"LINE_COMMENT",
"=",
"63",
";",
"public",
"static",
"final",
"int",
"BLOCK_COMMENT",
"=",
"64",
";",
"public",
"static",
"final",
"int",
"TAG_ELEMENT",
"=",
"65",
";",
"public",
"static",
"final",
"int",
"TEXT_ELEMENT",
"=",
"66",
";",
"public",
"static",
"final",
"int",
"MEMBER_REF",
"=",
"67",
";",
"public",
"static",
"final",
"int",
"METHOD_REF",
"=",
"68",
";",
"public",
"static",
"final",
"int",
"METHOD_REF_PARAMETER",
"=",
"69",
";",
"public",
"static",
"final",
"int",
"ENHANCED_FOR_STATEMENT",
"=",
"70",
";",
"public",
"static",
"final",
"int",
"ENUM_DECLARATION",
"=",
"71",
";",
"public",
"static",
"final",
"int",
"ENUM_CONSTANT_DECLARATION",
"=",
"72",
";",
"public",
"static",
"final",
"int",
"TYPE_PARAMETER",
"=",
"73",
";",
"public",
"static",
"final",
"int",
"PARAMETERIZED_TYPE",
"=",
"74",
";",
"public",
"static",
"final",
"int",
"QUALIFIED_TYPE",
"=",
"75",
";",
"public",
"static",
"final",
"int",
"WILDCARD_TYPE",
"=",
"76",
";",
"public",
"static",
"final",
"int",
"NORMAL_ANNOTATION",
"=",
"77",
";",
"public",
"static",
"final",
"int",
"MARKER_ANNOTATION",
"=",
"78",
";",
"public",
"static",
"final",
"int",
"SINGLE_MEMBER_ANNOTATION",
"=",
"79",
";",
"public",
"static",
"final",
"int",
"MEMBER_VALUE_PAIR",
"=",
"80",
";",
"public",
"static",
"final",
"int",
"ANNOTATION_TYPE_DECLARATION",
"=",
"81",
";",
"public",
"static",
"final",
"int",
"ANNOTATION_TYPE_MEMBER_DECLARATION",
"=",
"82",
";",
"public",
"static",
"final",
"int",
"MODIFIER",
"=",
"83",
";",
"public",
"static",
"final",
"int",
"UNION_TYPE",
"=",
"84",
";",
"public",
"static",
"Class",
"nodeClassForType",
"(",
"int",
"nodeType",
")",
"{",
"switch",
"(",
"nodeType",
")",
"{",
"case",
"ANNOTATION_TYPE_DECLARATION",
":",
"return",
"AnnotationTypeDeclaration",
".",
"class",
";",
"case",
"ANNOTATION_TYPE_MEMBER_DECLARATION",
":",
"return",
"AnnotationTypeMemberDeclaration",
".",
"class",
";",
"case",
"ANONYMOUS_CLASS_DECLARATION",
":",
"return",
"AnonymousClassDeclaration",
".",
"class",
";",
"case",
"ARRAY_ACCESS",
":",
"return",
"ArrayAccess",
".",
"class",
";",
"case",
"ARRAY_CREATION",
":",
"return",
"ArrayCreation",
".",
"class",
";",
"case",
"ARRAY_INITIALIZER",
":",
"return",
"ArrayInitializer",
".",
"class",
";",
"case",
"ARRAY_TYPE",
":",
"return",
"ArrayType",
".",
"class",
";",
"case",
"ASSERT_STATEMENT",
":",
"return",
"AssertStatement",
".",
"class",
";",
"case",
"ASSIGNMENT",
":",
"return",
"Assignment",
".",
"class",
";",
"case",
"BLOCK",
":",
"return",
"Block",
".",
"class",
";",
"case",
"BLOCK_COMMENT",
":",
"return",
"BlockComment",
".",
"class",
";",
"case",
"BOOLEAN_LITERAL",
":",
"return",
"BooleanLiteral",
".",
"class",
";",
"case",
"BREAK_STATEMENT",
":",
"return",
"BreakStatement",
".",
"class",
";",
"case",
"CAST_EXPRESSION",
":",
"return",
"CastExpression",
".",
"class",
";",
"case",
"CATCH_CLAUSE",
":",
"return",
"CatchClause",
".",
"class",
";",
"case",
"CHARACTER_LITERAL",
":",
"return",
"CharacterLiteral",
".",
"class",
";",
"case",
"CLASS_INSTANCE_CREATION",
":",
"return",
"ClassInstanceCreation",
".",
"class",
";",
"case",
"COMPILATION_UNIT",
":",
"return",
"CompilationUnit",
".",
"class",
";",
"case",
"CONDITIONAL_EXPRESSION",
":",
"return",
"ConditionalExpression",
".",
"class",
";",
"case",
"CONSTRUCTOR_INVOCATION",
":",
"return",
"ConstructorInvocation",
".",
"class",
";",
"case",
"CONTINUE_STATEMENT",
":",
"return",
"ContinueStatement",
".",
"class",
";",
"case",
"UNION_TYPE",
":",
"return",
"UnionType",
".",
"class",
";",
"case",
"DO_STATEMENT",
":",
"return",
"DoStatement",
".",
"class",
";",
"case",
"EMPTY_STATEMENT",
":",
"return",
"EmptyStatement",
".",
"class",
";",
"case",
"ENHANCED_FOR_STATEMENT",
":",
"return",
"EnhancedForStatement",
".",
"class",
";",
"case",
"ENUM_CONSTANT_DECLARATION",
":",
"return",
"EnumConstantDeclaration",
".",
"class",
";",
"case",
"ENUM_DECLARATION",
":",
"return",
"EnumDeclaration",
".",
"class",
";",
"case",
"EXPRESSION_STATEMENT",
":",
"return",
"ExpressionStatement",
".",
"class",
";",
"case",
"FIELD_ACCESS",
":",
"return",
"FieldAccess",
".",
"class",
";",
"case",
"FIELD_DECLARATION",
":",
"return",
"FieldDeclaration",
".",
"class",
";",
"case",
"FOR_STATEMENT",
":",
"return",
"ForStatement",
".",
"class",
";",
"case",
"IF_STATEMENT",
":",
"return",
"IfStatement",
".",
"class",
";",
"case",
"IMPORT_DECLARATION",
":",
"return",
"ImportDeclaration",
".",
"class",
";",
"case",
"INFIX_EXPRESSION",
":",
"return",
"InfixExpression",
".",
"class",
";",
"case",
"INITIALIZER",
":",
"return",
"Initializer",
".",
"class",
";",
"case",
"INSTANCEOF_EXPRESSION",
":",
"return",
"InstanceofExpression",
".",
"class",
";",
"case",
"JAVADOC",
":",
"return",
"Javadoc",
".",
"class",
";",
"case",
"LABELED_STATEMENT",
":",
"return",
"LabeledStatement",
".",
"class",
";",
"case",
"LINE_COMMENT",
":",
"return",
"LineComment",
".",
"class",
";",
"case",
"MARKER_ANNOTATION",
":",
"return",
"MarkerAnnotation",
".",
"class",
";",
"case",
"MEMBER_REF",
":",
"return",
"MemberRef",
".",
"class",
";",
"case",
"MEMBER_VALUE_PAIR",
":",
"return",
"MemberValuePair",
".",
"class",
";",
"case",
"METHOD_DECLARATION",
":",
"return",
"MethodDeclaration",
".",
"class",
";",
"case",
"METHOD_INVOCATION",
":",
"return",
"MethodInvocation",
".",
"class",
";",
"case",
"METHOD_REF",
":",
"return",
"MethodRef",
".",
"class",
";",
"case",
"METHOD_REF_PARAMETER",
":",
"return",
"MethodRefParameter",
".",
"class",
";",
"case",
"MODIFIER",
":",
"return",
"Modifier",
".",
"class",
";",
"case",
"NORMAL_ANNOTATION",
":",
"return",
"NormalAnnotation",
".",
"class",
";",
"case",
"NULL_LITERAL",
":",
"return",
"NullLiteral",
".",
"class",
";",
"case",
"NUMBER_LITERAL",
":",
"return",
"NumberLiteral",
".",
"class",
";",
"case",
"PACKAGE_DECLARATION",
":",
"return",
"PackageDeclaration",
".",
"class",
";",
"case",
"PARAMETERIZED_TYPE",
":",
"return",
"ParameterizedType",
".",
"class",
";",
"case",
"PARENTHESIZED_EXPRESSION",
":",
"return",
"ParenthesizedExpression",
".",
"class",
";",
"case",
"POSTFIX_EXPRESSION",
":",
"return",
"PostfixExpression",
".",
"class",
";",
"case",
"PREFIX_EXPRESSION",
":",
"return",
"PrefixExpression",
".",
"class",
";",
"case",
"PRIMITIVE_TYPE",
":",
"return",
"PrimitiveType",
".",
"class",
";",
"case",
"QUALIFIED_NAME",
":",
"return",
"QualifiedName",
".",
"class",
";",
"case",
"QUALIFIED_TYPE",
":",
"return",
"QualifiedType",
".",
"class",
";",
"case",
"RETURN_STATEMENT",
":",
"return",
"ReturnStatement",
".",
"class",
";",
"case",
"SIMPLE_NAME",
":",
"return",
"SimpleName",
".",
"class",
";",
"case",
"SIMPLE_TYPE",
":",
"return",
"SimpleType",
".",
"class",
";",
"case",
"SINGLE_MEMBER_ANNOTATION",
":",
"return",
"SingleMemberAnnotation",
".",
"class",
";",
"case",
"SINGLE_VARIABLE_DECLARATION",
":",
"return",
"SingleVariableDeclaration",
".",
"class",
";",
"case",
"STRING_LITERAL",
":",
"return",
"StringLiteral",
".",
"class",
";",
"case",
"SUPER_CONSTRUCTOR_INVOCATION",
":",
"return",
"SuperConstructorInvocation",
".",
"class",
";",
"case",
"SUPER_FIELD_ACCESS",
":",
"return",
"SuperFieldAccess",
".",
"class",
";",
"case",
"SUPER_METHOD_INVOCATION",
":",
"return",
"SuperMethodInvocation",
".",
"class",
";",
"case",
"SWITCH_CASE",
":",
"return",
"SwitchCase",
".",
"class",
";",
"case",
"SWITCH_STATEMENT",
":",
"return",
"SwitchStatement",
".",
"class",
";",
"case",
"SYNCHRONIZED_STATEMENT",
":",
"return",
"SynchronizedStatement",
".",
"class",
";",
"case",
"TAG_ELEMENT",
":",
"return",
"TagElement",
".",
"class",
";",
"case",
"TEXT_ELEMENT",
":",
"return",
"TextElement",
".",
"class",
";",
"case",
"THIS_EXPRESSION",
":",
"return",
"ThisExpression",
".",
"class",
";",
"case",
"THROW_STATEMENT",
":",
"return",
"ThrowStatement",
".",
"class",
";",
"case",
"TRY_STATEMENT",
":",
"return",
"TryStatement",
".",
"class",
";",
"case",
"TYPE_DECLARATION",
":",
"return",
"TypeDeclaration",
".",
"class",
";",
"case",
"TYPE_DECLARATION_STATEMENT",
":",
"return",
"TypeDeclarationStatement",
".",
"class",
";",
"case",
"TYPE_LITERAL",
":",
"return",
"TypeLiteral",
".",
"class",
";",
"case",
"TYPE_PARAMETER",
":",
"return",
"TypeParameter",
".",
"class",
";",
"case",
"VARIABLE_DECLARATION_EXPRESSION",
":",
"return",
"VariableDeclarationExpression",
".",
"class",
";",
"case",
"VARIABLE_DECLARATION_FRAGMENT",
":",
"return",
"VariableDeclarationFragment",
".",
"class",
";",
"case",
"VARIABLE_DECLARATION_STATEMENT",
":",
"return",
"VariableDeclarationStatement",
".",
"class",
";",
"case",
"WHILE_STATEMENT",
":",
"return",
"WhileStatement",
".",
"class",
";",
"case",
"WILDCARD_TYPE",
":",
"return",
"WildcardType",
".",
"class",
";",
"}",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"final",
"AST",
"ast",
";",
"private",
"ASTNode",
"parent",
"=",
"null",
";",
"private",
"static",
"final",
"Map",
"UNMODIFIABLE_EMPTY_MAP",
"=",
"Collections",
".",
"unmodifiableMap",
"(",
"new",
"HashMap",
"(",
"1",
")",
")",
";",
"private",
"Object",
"property1",
"=",
"null",
";",
"private",
"Object",
"property2",
"=",
"null",
";",
"private",
"int",
"startPosition",
"=",
"-",
"1",
";",
"private",
"int",
"length",
"=",
"0",
";",
"public",
"static",
"final",
"int",
"MALFORMED",
"=",
"1",
";",
"public",
"static",
"final",
"int",
"ORIGINAL",
"=",
"2",
";",
"public",
"static",
"final",
"int",
"PROTECT",
"=",
"4",
";",
"public",
"static",
"final",
"int",
"RECOVERED",
"=",
"8",
";",
"int",
"typeAndFlags",
"=",
"0",
";",
"private",
"StructuralPropertyDescriptor",
"location",
"=",
"null",
";",
"static",
"final",
"boolean",
"CYCLE_RISK",
"=",
"true",
";",
"static",
"final",
"boolean",
"NO_CYCLE_RISK",
"=",
"false",
";",
"static",
"final",
"boolean",
"MANDATORY",
"=",
"true",
";",
"static",
"final",
"boolean",
"OPTIONAL",
"=",
"false",
";",
"class",
"NodeList",
"extends",
"AbstractList",
"{",
"ArrayList",
"store",
"=",
"new",
"ArrayList",
"(",
"0",
")",
";",
"ChildListPropertyDescriptor",
"propertyDescriptor",
";",
"class",
"Cursor",
"implements",
"Iterator",
"{",
"private",
"int",
"position",
"=",
"0",
";",
"public",
"boolean",
"hasNext",
"(",
")",
"{",
"return",
"this",
".",
"position",
"<",
"NodeList",
".",
"this",
".",
"store",
".",
"size",
"(",
")",
";",
"}",
"public",
"Object",
"next",
"(",
")",
"{",
"Object",
"result",
"=",
"NodeList",
".",
"this",
".",
"store",
".",
"get",
"(",
"this",
".",
"position",
")",
";",
"this",
".",
"position",
"++",
";",
"return",
"result",
";",
"}",
"public",
"void",
"remove",
"(",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}",
"void",
"update",
"(",
"int",
"index",
",",
"int",
"delta",
")",
"{",
"if",
"(",
"this",
".",
"position",
">",
"index",
")",
"{",
"this",
".",
"position",
"+=",
"delta",
";",
"}",
"}",
"}",
"private",
"List",
"cursors",
"=",
"null",
";",
"NodeList",
"(",
"ChildListPropertyDescriptor",
"property",
")",
"{",
"super",
"(",
")",
";",
"this",
".",
"propertyDescriptor",
"=",
"property",
";",
"}",
"public",
"int",
"size",
"(",
")",
"{",
"return",
"this",
".",
"store",
".",
"size",
"(",
")",
";",
"}",
"public",
"Object",
"get",
"(",
"int",
"index",
")",
"{",
"return",
"this",
".",
"store",
".",
"get",
"(",
"index",
")",
";",
"}",
"public",
"Object",
"set",
"(",
"int",
"index",
",",
"Object",
"element",
")",
"{",
"if",
"(",
"element",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"(",
"ASTNode",
".",
"this",
".",
"typeAndFlags",
"&",
"PROTECT",
")",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"ASTNode",
"newChild",
"=",
"(",
"ASTNode",
")",
"element",
";",
"ASTNode",
"oldChild",
"=",
"(",
"ASTNode",
")",
"this",
".",
"store",
".",
"get",
"(",
"index",
")",
";",
"if",
"(",
"oldChild",
"==",
"newChild",
")",
"{",
"return",
"oldChild",
";",
"}",
"if",
"(",
"(",
"oldChild",
".",
"typeAndFlags",
"&",
"PROTECT",
")",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"ASTNode",
".",
"checkNewChild",
"(",
"ASTNode",
".",
"this",
",",
"newChild",
",",
"this",
".",
"propertyDescriptor",
".",
"cycleRisk",
",",
"this",
".",
"propertyDescriptor",
".",
"elementType",
")",
";",
"ASTNode",
".",
"this",
".",
"ast",
".",
"preReplaceChildEvent",
"(",
"ASTNode",
".",
"this",
",",
"oldChild",
",",
"newChild",
",",
"this",
".",
"propertyDescriptor",
")",
";",
"Object",
"result",
"=",
"this",
".",
"store",
".",
"set",
"(",
"index",
",",
"newChild",
")",
";",
"oldChild",
".",
"setParent",
"(",
"null",
",",
"null",
")",
";",
"newChild",
".",
"setParent",
"(",
"ASTNode",
".",
"this",
",",
"this",
".",
"propertyDescriptor",
")",
";",
"ASTNode",
".",
"this",
".",
"ast",
".",
"postReplaceChildEvent",
"(",
"ASTNode",
".",
"this",
",",
"oldChild",
",",
"newChild",
",",
"this",
".",
"propertyDescriptor",
")",
";",
"return",
"result",
";",
"}",
"public",
"void",
"add",
"(",
"int",
"index",
",",
"Object",
"element",
")",
"{",
"if",
"(",
"element",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"(",
"ASTNode",
".",
"this",
".",
"typeAndFlags",
"&",
"PROTECT",
")",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"ASTNode",
"newChild",
"=",
"(",
"ASTNode",
")",
"element",
";",
"ASTNode",
".",
"checkNewChild",
"(",
"ASTNode",
".",
"this",
",",
"newChild",
",",
"this",
".",
"propertyDescriptor",
".",
"cycleRisk",
",",
"this",
".",
"propertyDescriptor",
".",
"elementType",
")",
";",
"ASTNode",
".",
"this",
".",
"ast",
".",
"preAddChildEvent",
"(",
"ASTNode",
".",
"this",
",",
"newChild",
",",
"this",
".",
"propertyDescriptor",
")",
";",
"this",
".",
"store",
".",
"add",
"(",
"index",
",",
"element",
")",
";",
"updateCursors",
"(",
"index",
",",
"+",
"1",
")",
";",
"newChild",
".",
"setParent",
"(",
"ASTNode",
".",
"this",
",",
"this",
".",
"propertyDescriptor",
")",
";",
"ASTNode",
".",
"this",
".",
"ast",
".",
"postAddChildEvent",
"(",
"ASTNode",
".",
"this",
",",
"newChild",
",",
"this",
".",
"propertyDescriptor",
")",
";",
"}",
"public",
"Object",
"remove",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"(",
"ASTNode",
".",
"this",
".",
"typeAndFlags",
"&",
"PROTECT",
")",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"ASTNode",
"oldChild",
"=",
"(",
"ASTNode",
")",
"this",
".",
"store",
".",
"get",
"(",
"index",
")",
";",
"if",
"(",
"(",
"oldChild",
".",
"typeAndFlags",
"&",
"PROTECT",
")",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"ASTNode",
".",
"this",
".",
"ast",
".",
"preRemoveChildEvent",
"(",
"ASTNode",
".",
"this",
",",
"oldChild",
",",
"this",
".",
"propertyDescriptor",
")",
";",
"oldChild",
".",
"setParent",
"(",
"null",
",",
"null",
")",
";",
"Object",
"result",
"=",
"this",
".",
"store",
".",
"remove",
"(",
"index",
")",
";",
"updateCursors",
"(",
"index",
",",
"-",
"1",
")",
";",
"ASTNode",
".",
"this",
".",
"ast",
".",
"postRemoveChildEvent",
"(",
"ASTNode",
".",
"this",
",",
"oldChild",
",",
"this",
".",
"propertyDescriptor",
")",
";",
"return",
"result",
";",
"}",
"Cursor",
"newCursor",
"(",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"cursors",
"==",
"null",
")",
"{",
"this",
".",
"cursors",
"=",
"new",
"ArrayList",
"(",
"1",
")",
";",
"}",
"Cursor",
"result",
"=",
"new",
"Cursor",
"(",
")",
";",
"this",
".",
"cursors",
".",
"add",
"(",
"result",
")",
";",
"return",
"result",
";",
"}",
"}",
"void",
"releaseCursor",
"(",
"Cursor",
"cursor",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"this",
".",
"cursors",
".",
"remove",
"(",
"cursor",
")",
";",
"if",
"(",
"this",
".",
"cursors",
".",
"isEmpty",
"(",
")",
")",
"{",
"this",
".",
"cursors",
"=",
"null",
";",
"}",
"}",
"}",
"private",
"synchronized",
"void",
"updateCursors",
"(",
"int",
"index",
",",
"int",
"delta",
")",
"{",
"if",
"(",
"this",
".",
"cursors",
"==",
"null",
")",
"{",
"return",
";",
"}",
"for",
"(",
"Iterator",
"it",
"=",
"this",
".",
"cursors",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"Cursor",
"c",
"=",
"(",
"Cursor",
")",
"it",
".",
"next",
"(",
")",
";",
"c",
".",
"update",
"(",
"index",
",",
"delta",
")",
";",
"}",
"}",
"int",
"memSize",
"(",
")",
"{",
"int",
"result",
"=",
"HEADERS",
"+",
"5",
"*",
"4",
";",
"result",
"+=",
"HEADERS",
"+",
"2",
"*",
"4",
";",
"result",
"+=",
"HEADERS",
"+",
"4",
"*",
"size",
"(",
")",
";",
"return",
"result",
";",
"}",
"int",
"listSize",
"(",
")",
"{",
"int",
"result",
"=",
"memSize",
"(",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"ASTNode",
"child",
"=",
"(",
"ASTNode",
")",
"it",
".",
"next",
"(",
")",
";",
"result",
"+=",
"child",
".",
"treeSize",
"(",
")",
";",
"}",
"return",
"result",
";",
"}",
"}",
"ASTNode",
"(",
"AST",
"ast",
")",
"{",
"if",
"(",
"ast",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"this",
".",
"ast",
"=",
"ast",
";",
"setNodeType",
"(",
"getNodeType0",
"(",
")",
")",
";",
"setFlags",
"(",
"ast",
".",
"getDefaultNodeFlag",
"(",
")",
")",
";",
"}",
"public",
"final",
"AST",
"getAST",
"(",
")",
"{",
"return",
"this",
".",
"ast",
";",
"}",
"public",
"final",
"ASTNode",
"getParent",
"(",
")",
"{",
"return",
"this",
".",
"parent",
";",
"}",
"public",
"final",
"StructuralPropertyDescriptor",
"getLocationInParent",
"(",
")",
"{",
"return",
"this",
".",
"location",
";",
"}",
"public",
"final",
"ASTNode",
"getRoot",
"(",
")",
"{",
"ASTNode",
"candidate",
"=",
"this",
";",
"while",
"(",
"true",
")",
"{",
"ASTNode",
"p",
"=",
"candidate",
".",
"getParent",
"(",
")",
";",
"if",
"(",
"p",
"==",
"null",
")",
"{",
"return",
"candidate",
";",
"}",
"candidate",
"=",
"p",
";",
"}",
"}",
"public",
"final",
"Object",
"getStructuralProperty",
"(",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"property",
"instanceof",
"SimplePropertyDescriptor",
")",
"{",
"SimplePropertyDescriptor",
"p",
"=",
"(",
"SimplePropertyDescriptor",
")",
"property",
";",
"if",
"(",
"p",
".",
"getValueType",
"(",
")",
"==",
"int",
".",
"class",
")",
"{",
"int",
"result",
"=",
"internalGetSetIntProperty",
"(",
"p",
",",
"true",
",",
"0",
")",
";",
"return",
"new",
"Integer",
"(",
"result",
")",
";",
"}",
"else",
"if",
"(",
"p",
".",
"getValueType",
"(",
")",
"==",
"boolean",
".",
"class",
")",
"{",
"boolean",
"result",
"=",
"internalGetSetBooleanProperty",
"(",
"p",
",",
"true",
",",
"false",
")",
";",
"return",
"Boolean",
".",
"valueOf",
"(",
"result",
")",
";",
"}",
"else",
"{",
"return",
"internalGetSetObjectProperty",
"(",
"p",
",",
"true",
",",
"null",
")",
";",
"}",
"}",
"if",
"(",
"property",
"instanceof",
"ChildPropertyDescriptor",
")",
"{",
"return",
"internalGetSetChildProperty",
"(",
"(",
"ChildPropertyDescriptor",
")",
"property",
",",
"true",
",",
"null",
")",
";",
"}",
"if",
"(",
"property",
"instanceof",
"ChildListPropertyDescriptor",
")",
"{",
"return",
"internalGetChildListProperty",
"(",
"(",
"ChildListPropertyDescriptor",
")",
"property",
")",
";",
"}",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"public",
"final",
"void",
"setStructuralProperty",
"(",
"StructuralPropertyDescriptor",
"property",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"property",
"instanceof",
"SimplePropertyDescriptor",
")",
"{",
"SimplePropertyDescriptor",
"p",
"=",
"(",
"SimplePropertyDescriptor",
")",
"property",
";",
"if",
"(",
"p",
".",
"getValueType",
"(",
")",
"==",
"int",
".",
"class",
")",
"{",
"int",
"arg",
"=",
"(",
"(",
"Integer",
")",
"value",
")",
".",
"intValue",
"(",
")",
";",
"internalGetSetIntProperty",
"(",
"p",
",",
"false",
",",
"arg",
")",
";",
"return",
";",
"}",
"else",
"if",
"(",
"p",
".",
"getValueType",
"(",
")",
"==",
"boolean",
".",
"class",
")",
"{",
"boolean",
"arg",
"=",
"(",
"(",
"Boolean",
")",
"value",
")",
".",
"booleanValue",
"(",
")",
";",
"internalGetSetBooleanProperty",
"(",
"p",
",",
"false",
",",
"arg",
")",
";",
"return",
";",
"}",
"else",
"{",
"if",
"(",
"value",
"==",
"null",
"&&",
"p",
".",
"isMandatory",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"internalGetSetObjectProperty",
"(",
"p",
",",
"false",
",",
"value",
")",
";",
"return",
";",
"}",
"}",
"if",
"(",
"property",
"instanceof",
"ChildPropertyDescriptor",
")",
"{",
"ChildPropertyDescriptor",
"p",
"=",
"(",
"ChildPropertyDescriptor",
")",
"property",
";",
"ASTNode",
"child",
"=",
"(",
"ASTNode",
")",
"value",
";",
"if",
"(",
"child",
"==",
"null",
"&&",
"p",
".",
"isMandatory",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"internalGetSetChildProperty",
"(",
"p",
",",
"false",
",",
"child",
")",
";",
"return",
";",
"}",
"if",
"(",
"property",
"instanceof",
"ChildListPropertyDescriptor",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"}",
"int",
"internalGetSetIntProperty",
"(",
"SimplePropertyDescriptor",
"property",
",",
"boolean",
"get",
",",
"int",
"value",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"\"",
")",
";",
"}",
"boolean",
"internalGetSetBooleanProperty",
"(",
"SimplePropertyDescriptor",
"property",
",",
"boolean",
"get",
",",
"boolean",
"value",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"\"",
")",
";",
"}",
"Object",
"internalGetSetObjectProperty",
"(",
"SimplePropertyDescriptor",
"property",
",",
"boolean",
"get",
",",
"Object",
"value",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"\"",
")",
";",
"}",
"ASTNode",
"internalGetSetChildProperty",
"(",
"ChildPropertyDescriptor",
"property",
",",
"boolean",
"get",
",",
"ASTNode",
"child",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"\"",
")",
";",
"}",
"List",
"internalGetChildListProperty",
"(",
"ChildListPropertyDescriptor",
"property",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"\"",
")",
";",
"}",
"public",
"final",
"List",
"structuralPropertiesForType",
"(",
")",
"{",
"return",
"internalStructuralPropertiesForType",
"(",
"this",
".",
"ast",
".",
"apiLevel",
")",
";",
"}",
"abstract",
"List",
"internalStructuralPropertiesForType",
"(",
"int",
"apiLevel",
")",
";",
"static",
"void",
"createPropertyList",
"(",
"Class",
"nodeClass",
",",
"List",
"propertyList",
")",
"{",
"propertyList",
".",
"add",
"(",
"nodeClass",
")",
";",
"}",
"static",
"void",
"addProperty",
"(",
"StructuralPropertyDescriptor",
"property",
",",
"List",
"propertyList",
")",
"{",
"Class",
"nodeClass",
"=",
"(",
"Class",
")",
"propertyList",
".",
"get",
"(",
"0",
")",
";",
"if",
"(",
"property",
".",
"getNodeClass",
"(",
")",
"!=",
"nodeClass",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"\"\"",
")",
";",
"}",
"propertyList",
".",
"add",
"(",
"property",
")",
";",
"}",
"static",
"List",
"reapPropertyList",
"(",
"List",
"propertyList",
")",
"{",
"propertyList",
".",
"remove",
"(",
"0",
")",
";",
"ArrayList",
"a",
"=",
"new",
"ArrayList",
"(",
"propertyList",
".",
"size",
"(",
")",
")",
";",
"a",
".",
"addAll",
"(",
"propertyList",
")",
";",
"return",
"Collections",
".",
"unmodifiableList",
"(",
"a",
")",
";",
"}",
"final",
"void",
"unsupportedIn2",
"(",
")",
"{",
"if",
"(",
"this",
".",
"ast",
".",
"apiLevel",
"==",
"AST",
".",
"JLS2_INTERNAL",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"\"",
")",
";",
"}",
"}",
"final",
"void",
"unsupportedIn2_3",
"(",
")",
"{",
"if",
"(",
"this",
".",
"ast",
".",
"apiLevel",
"<=",
"AST",
".",
"JLS3",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"\"",
")",
";",
"}",
"}",
"final",
"void",
"supportedOnlyIn2",
"(",
")",
"{",
"if",
"(",
"this",
".",
"ast",
".",
"apiLevel",
"!=",
"AST",
".",
"JLS2_INTERNAL",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"\"",
")",
";",
"}",
"}",
"final",
"void",
"setParent",
"(",
"ASTNode",
"parent",
",",
"StructuralPropertyDescriptor",
"property",
")",
"{",
"this",
".",
"ast",
".",
"modifying",
"(",
")",
";",
"this",
".",
"parent",
"=",
"parent",
";",
"this",
".",
"location",
"=",
"property",
";",
"}",
"public",
"final",
"void",
"delete",
"(",
")",
"{",
"StructuralPropertyDescriptor",
"p",
"=",
"getLocationInParent",
"(",
")",
";",
"if",
"(",
"p",
"==",
"null",
")",
"{",
"return",
";",
"}",
"if",
"(",
"p",
".",
"isChildProperty",
"(",
")",
")",
"{",
"getParent",
"(",
")",
".",
"setStructuralProperty",
"(",
"this",
".",
"location",
",",
"null",
")",
";",
"return",
";",
"}",
"if",
"(",
"p",
".",
"isChildListProperty",
"(",
")",
")",
"{",
"List",
"l",
"=",
"(",
"List",
")",
"getParent",
"(",
")",
".",
"getStructuralProperty",
"(",
"this",
".",
"location",
")",
";",
"l",
".",
"remove",
"(",
"this",
")",
";",
"}",
"}",
"static",
"void",
"checkNewChild",
"(",
"ASTNode",
"node",
",",
"ASTNode",
"newChild",
",",
"boolean",
"cycleCheck",
",",
"Class",
"nodeType",
")",
"{",
"if",
"(",
"newChild",
".",
"ast",
"!=",
"node",
".",
"ast",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"newChild",
".",
"getParent",
"(",
")",
"!=",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"cycleCheck",
"&&",
"newChild",
"==",
"node",
".",
"getRoot",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"Class",
"childClass",
"=",
"newChild",
".",
"getClass",
"(",
")",
";",
"if",
"(",
"nodeType",
"!=",
"null",
"&&",
"!",
"nodeType",
".",
"isAssignableFrom",
"(",
"childClass",
")",
")",
"{",
"throw",
"new",
"ClassCastException",
"(",
")",
";",
"}",
"if",
"(",
"(",
"newChild",
".",
"typeAndFlags",
"&",
"PROTECT",
")",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"}",
"final",
"void",
"preReplaceChild",
"(",
"ASTNode",
"oldChild",
",",
"ASTNode",
"newChild",
",",
"ChildPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"(",
"this",
".",
"typeAndFlags",
"&",
"PROTECT",
")",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"if",
"(",
"newChild",
"!=",
"null",
")",
"{",
"checkNewChild",
"(",
"this",
",",
"newChild",
",",
"property",
".",
"cycleRisk",
",",
"null",
")",
";",
"}",
"if",
"(",
"oldChild",
"!=",
"null",
")",
"{",
"if",
"(",
"(",
"oldChild",
".",
"typeAndFlags",
"&",
"PROTECT",
")",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"if",
"(",
"newChild",
"!=",
"null",
")",
"{",
"this",
".",
"ast",
".",
"preReplaceChildEvent",
"(",
"this",
",",
"oldChild",
",",
"newChild",
",",
"property",
")",
";",
"}",
"else",
"{",
"this",
".",
"ast",
".",
"preRemoveChildEvent",
"(",
"this",
",",
"oldChild",
",",
"property",
")",
";",
"}",
"oldChild",
".",
"setParent",
"(",
"null",
",",
"null",
")",
";",
"}",
"else",
"{",
"if",
"(",
"newChild",
"!=",
"null",
")",
"{",
"this",
".",
"ast",
".",
"preAddChildEvent",
"(",
"this",
",",
"newChild",
",",
"property",
")",
";",
"}",
"}",
"if",
"(",
"newChild",
"!=",
"null",
")",
"{",
"newChild",
".",
"setParent",
"(",
"this",
",",
"property",
")",
";",
"}",
"}",
"final",
"void",
"postReplaceChild",
"(",
"ASTNode",
"oldChild",
",",
"ASTNode",
"newChild",
",",
"ChildPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"newChild",
"!=",
"null",
")",
"{",
"if",
"(",
"oldChild",
"!=",
"null",
")",
"{",
"this",
".",
"ast",
".",
"postReplaceChildEvent",
"(",
"this",
",",
"oldChild",
",",
"newChild",
",",
"property",
")",
";",
"}",
"else",
"{",
"this",
".",
"ast",
".",
"postAddChildEvent",
"(",
"this",
",",
"newChild",
",",
"property",
")",
";",
"}",
"}",
"else",
"{",
"this",
".",
"ast",
".",
"postRemoveChildEvent",
"(",
"this",
",",
"oldChild",
",",
"property",
")",
";",
"}",
"}",
"final",
"void",
"preValueChange",
"(",
"SimplePropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"(",
"this",
".",
"typeAndFlags",
"&",
"PROTECT",
")",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"this",
".",
"ast",
".",
"preValueChangeEvent",
"(",
"this",
",",
"property",
")",
";",
"this",
".",
"ast",
".",
"modifying",
"(",
")",
";",
"}",
"final",
"void",
"postValueChange",
"(",
"SimplePropertyDescriptor",
"property",
")",
"{",
"this",
".",
"ast",
".",
"postValueChangeEvent",
"(",
"this",
",",
"property",
")",
";",
"}",
"final",
"void",
"checkModifiable",
"(",
")",
"{",
"if",
"(",
"(",
"this",
".",
"typeAndFlags",
"&",
"PROTECT",
")",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"\"",
")",
";",
"}",
"this",
".",
"ast",
".",
"modifying",
"(",
")",
";",
"}",
"final",
"void",
"preLazyInit",
"(",
")",
"{",
"this",
".",
"ast",
".",
"disableEvents",
"(",
")",
";",
"}",
"final",
"void",
"postLazyInit",
"(",
"ASTNode",
"newChild",
",",
"ChildPropertyDescriptor",
"property",
")",
"{",
"newChild",
".",
"setParent",
"(",
"this",
",",
"property",
")",
";",
"this",
".",
"ast",
".",
"reenableEvents",
"(",
")",
";",
"}",
"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",
"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",
"Map",
"properties",
"(",
")",
"{",
"if",
"(",
"this",
".",
"property1",
"==",
"null",
")",
"{",
"return",
"UNMODIFIABLE_EMPTY_MAP",
";",
"}",
"if",
"(",
"this",
".",
"property1",
"instanceof",
"String",
")",
"{",
"return",
"Collections",
".",
"singletonMap",
"(",
"this",
".",
"property1",
",",
"this",
".",
"property2",
")",
";",
"}",
"if",
"(",
"this",
".",
"property2",
"==",
"null",
")",
"{",
"this",
".",
"property2",
"=",
"Collections",
".",
"unmodifiableMap",
"(",
"(",
"Map",
")",
"this",
".",
"property1",
")",
";",
"}",
"return",
"(",
"Map",
")",
"this",
".",
"property2",
";",
"}",
"public",
"final",
"int",
"getFlags",
"(",
")",
"{",
"return",
"this",
".",
"typeAndFlags",
"&",
"0xFFFF",
";",
"}",
"public",
"final",
"void",
"setFlags",
"(",
"int",
"flags",
")",
"{",
"this",
".",
"ast",
".",
"modifying",
"(",
")",
";",
"int",
"old",
"=",
"this",
".",
"typeAndFlags",
"&",
"0xFFFF0000",
";",
"this",
".",
"typeAndFlags",
"=",
"old",
"|",
"(",
"flags",
"&",
"0xFFFF",
")",
";",
"}",
"public",
"final",
"int",
"getNodeType",
"(",
")",
"{",
"return",
"this",
".",
"typeAndFlags",
">>>",
"16",
";",
"}",
"private",
"void",
"setNodeType",
"(",
"int",
"nodeType",
")",
"{",
"int",
"old",
"=",
"this",
".",
"typeAndFlags",
"&",
"0xFFFF0000",
";",
"this",
".",
"typeAndFlags",
"=",
"old",
"|",
"(",
"nodeType",
"<<",
"16",
")",
";",
"}",
"abstract",
"int",
"getNodeType0",
"(",
")",
";",
"public",
"final",
"boolean",
"equals",
"(",
"Object",
"obj",
")",
"{",
"return",
"this",
"==",
"obj",
";",
"}",
"public",
"final",
"int",
"hashCode",
"(",
")",
"{",
"return",
"super",
".",
"hashCode",
"(",
")",
";",
"}",
"public",
"final",
"boolean",
"subtreeMatch",
"(",
"ASTMatcher",
"matcher",
",",
"Object",
"other",
")",
"{",
"return",
"subtreeMatch0",
"(",
"matcher",
",",
"other",
")",
";",
"}",
"abstract",
"boolean",
"subtreeMatch0",
"(",
"ASTMatcher",
"matcher",
",",
"Object",
"other",
")",
";",
"public",
"static",
"ASTNode",
"copySubtree",
"(",
"AST",
"target",
",",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"target",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"target",
".",
"apiLevel",
"(",
")",
"!=",
"node",
".",
"getAST",
"(",
")",
".",
"apiLevel",
"(",
")",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
")",
";",
"}",
"ASTNode",
"newNode",
"=",
"node",
".",
"clone",
"(",
"target",
")",
";",
"return",
"newNode",
";",
"}",
"public",
"static",
"List",
"copySubtrees",
"(",
"AST",
"target",
",",
"List",
"nodes",
")",
"{",
"List",
"result",
"=",
"new",
"ArrayList",
"(",
"nodes",
".",
"size",
"(",
")",
")",
";",
"for",
"(",
"Iterator",
"it",
"=",
"nodes",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"ASTNode",
"oldNode",
"=",
"(",
"ASTNode",
")",
"it",
".",
"next",
"(",
")",
";",
"ASTNode",
"newNode",
"=",
"oldNode",
".",
"clone",
"(",
"target",
")",
";",
"result",
".",
"add",
"(",
"newNode",
")",
";",
"}",
"return",
"result",
";",
"}",
"final",
"ASTNode",
"clone",
"(",
"AST",
"target",
")",
"{",
"this",
".",
"ast",
".",
"preCloneNodeEvent",
"(",
"this",
")",
";",
"ASTNode",
"c",
"=",
"clone0",
"(",
"target",
")",
";",
"this",
".",
"ast",
".",
"postCloneNodeEvent",
"(",
"this",
",",
"c",
")",
";",
"return",
"c",
";",
"}",
"abstract",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
";",
"public",
"final",
"void",
"accept",
"(",
"ASTVisitor",
"visitor",
")",
"{",
"if",
"(",
"visitor",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"visitor",
".",
"preVisit2",
"(",
"this",
")",
")",
"{",
"accept0",
"(",
"visitor",
")",
";",
"}",
"visitor",
".",
"postVisit",
"(",
"this",
")",
";",
"}",
"abstract",
"void",
"accept0",
"(",
"ASTVisitor",
"visitor",
")",
";",
"final",
"void",
"acceptChild",
"(",
"ASTVisitor",
"visitor",
",",
"ASTNode",
"child",
")",
"{",
"if",
"(",
"child",
"==",
"null",
")",
"{",
"return",
";",
"}",
"child",
".",
"accept",
"(",
"visitor",
")",
";",
"}",
"final",
"void",
"acceptChildren",
"(",
"ASTVisitor",
"visitor",
",",
"ASTNode",
".",
"NodeList",
"children",
")",
"{",
"NodeList",
".",
"Cursor",
"cursor",
"=",
"children",
".",
"newCursor",
"(",
")",
";",
"try",
"{",
"while",
"(",
"cursor",
".",
"hasNext",
"(",
")",
")",
"{",
"ASTNode",
"child",
"=",
"(",
"ASTNode",
")",
"cursor",
".",
"next",
"(",
")",
";",
"child",
".",
"accept",
"(",
"visitor",
")",
";",
"}",
"}",
"finally",
"{",
"children",
".",
"releaseCursor",
"(",
"cursor",
")",
";",
"}",
"}",
"public",
"final",
"int",
"getStartPosition",
"(",
")",
"{",
"return",
"this",
".",
"startPosition",
";",
"}",
"public",
"final",
"int",
"getLength",
"(",
")",
"{",
"return",
"this",
".",
"length",
";",
"}",
"public",
"final",
"void",
"setSourceRange",
"(",
"int",
"startPosition",
",",
"int",
"length",
")",
"{",
"if",
"(",
"startPosition",
">=",
"0",
"&&",
"length",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"startPosition",
"<",
"0",
"&&",
"length",
"!=",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"checkModifiable",
"(",
")",
";",
"this",
".",
"startPosition",
"=",
"startPosition",
";",
"this",
".",
"length",
"=",
"length",
";",
"}",
"public",
"final",
"String",
"toString",
"(",
")",
"{",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"int",
"p",
"=",
"buffer",
".",
"length",
"(",
")",
";",
"try",
"{",
"appendDebugString",
"(",
"buffer",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"buffer",
".",
"setLength",
"(",
"p",
")",
";",
"buffer",
".",
"append",
"(",
"\"!\"",
")",
";",
"buffer",
".",
"append",
"(",
"standardToString",
"(",
")",
")",
";",
"}",
"return",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"final",
"String",
"standardToString",
"(",
")",
"{",
"return",
"super",
".",
"toString",
"(",
")",
";",
"}",
"void",
"appendDebugString",
"(",
"StringBuffer",
"buffer",
")",
"{",
"appendPrintString",
"(",
"buffer",
")",
";",
"}",
"final",
"void",
"appendPrintString",
"(",
"StringBuffer",
"buffer",
")",
"{",
"NaiveASTFlattener",
"printer",
"=",
"new",
"NaiveASTFlattener",
"(",
")",
";",
"accept",
"(",
"printer",
")",
";",
"buffer",
".",
"append",
"(",
"printer",
".",
"getResult",
"(",
")",
")",
";",
"}",
"static",
"final",
"int",
"HEADERS",
"=",
"12",
";",
"static",
"final",
"int",
"BASE_NODE_SIZE",
"=",
"HEADERS",
"+",
"7",
"*",
"4",
";",
"static",
"int",
"stringSize",
"(",
"String",
"string",
")",
"{",
"int",
"size",
"=",
"0",
";",
"if",
"(",
"string",
"!=",
"null",
")",
"{",
"size",
"+=",
"HEADERS",
"+",
"4",
"*",
"4",
";",
"size",
"+=",
"HEADERS",
"+",
"2",
"*",
"string",
".",
"length",
"(",
")",
";",
"}",
"return",
"size",
";",
"}",
"public",
"final",
"int",
"subtreeBytes",
"(",
")",
"{",
"return",
"treeSize",
"(",
")",
";",
"}",
"abstract",
"int",
"treeSize",
"(",
")",
";",
"abstract",
"int",
"memSize",
"(",
")",
";",
"}",
"</s>"
] |
4,380 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"public",
"interface",
"IExtendedModifier",
"{",
"public",
"boolean",
"isModifier",
"(",
")",
";",
"public",
"boolean",
"isAnnotation",
"(",
")",
";",
"}",
"</s>"
] |
4,381 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ICompilationUnit",
";",
"public",
"abstract",
"class",
"ASTRequestor",
"{",
"CompilationUnitResolver",
"compilationUnitResolver",
"=",
"null",
";",
"protected",
"ASTRequestor",
"(",
")",
"{",
"}",
"public",
"void",
"acceptAST",
"(",
"ICompilationUnit",
"source",
",",
"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,382 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"public",
"interface",
"IAnnotationBinding",
"extends",
"IBinding",
"{",
"IMemberValuePairBinding",
"[",
"]",
"getAllMemberValuePairs",
"(",
")",
";",
"ITypeBinding",
"getAnnotationType",
"(",
")",
";",
"IMemberValuePairBinding",
"[",
"]",
"getDeclaredMemberValuePairs",
"(",
")",
";",
"public",
"String",
"getName",
"(",
")",
";",
"}",
"</s>"
] |
4,383 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"ConditionalExpression",
"extends",
"Expression",
"{",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"EXPRESSION_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"ConditionalExpression",
".",
"class",
",",
"\"expression\"",
",",
"Expression",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"THEN_EXPRESSION_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"ConditionalExpression",
".",
"class",
",",
"\"\"",
",",
"Expression",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"ELSE_EXPRESSION_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"ConditionalExpression",
".",
"class",
",",
"\"\"",
",",
"Expression",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"properyList",
"=",
"new",
"ArrayList",
"(",
"4",
")",
";",
"createPropertyList",
"(",
"ConditionalExpression",
".",
"class",
",",
"properyList",
")",
";",
"addProperty",
"(",
"EXPRESSION_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"THEN_EXPRESSION_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"ELSE_EXPRESSION_PROPERTY",
",",
"properyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"properyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"Expression",
"conditionExpression",
"=",
"null",
";",
"private",
"Expression",
"thenExpression",
"=",
"null",
";",
"private",
"Expression",
"elseExpression",
"=",
"null",
";",
"ConditionalExpression",
"(",
"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_EXPRESSION_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getThenExpression",
"(",
")",
";",
"}",
"else",
"{",
"setThenExpression",
"(",
"(",
"Expression",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"if",
"(",
"property",
"==",
"ELSE_EXPRESSION_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getElseExpression",
"(",
")",
";",
"}",
"else",
"{",
"setElseExpression",
"(",
"(",
"Expression",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"return",
"super",
".",
"internalGetSetChildProperty",
"(",
"property",
",",
"get",
",",
"child",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"CONDITIONAL_EXPRESSION",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"ConditionalExpression",
"result",
"=",
"new",
"ConditionalExpression",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"setExpression",
"(",
"(",
"Expression",
")",
"getExpression",
"(",
")",
".",
"clone",
"(",
"target",
")",
")",
";",
"result",
".",
"setThenExpression",
"(",
"(",
"Expression",
")",
"getThenExpression",
"(",
")",
".",
"clone",
"(",
"target",
")",
")",
";",
"result",
".",
"setElseExpression",
"(",
"(",
"Expression",
")",
"getElseExpression",
"(",
")",
".",
"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",
",",
"getThenExpression",
"(",
")",
")",
";",
"acceptChild",
"(",
"visitor",
",",
"getElseExpression",
"(",
")",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"public",
"Expression",
"getExpression",
"(",
")",
"{",
"if",
"(",
"this",
".",
"conditionExpression",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"conditionExpression",
"==",
"null",
")",
"{",
"preLazyInit",
"(",
")",
";",
"this",
".",
"conditionExpression",
"=",
"new",
"SimpleName",
"(",
"this",
".",
"ast",
")",
";",
"postLazyInit",
"(",
"this",
".",
"conditionExpression",
",",
"EXPRESSION_PROPERTY",
")",
";",
"}",
"}",
"}",
"return",
"this",
".",
"conditionExpression",
";",
"}",
"public",
"void",
"setExpression",
"(",
"Expression",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"ASTNode",
"oldChild",
"=",
"this",
".",
"conditionExpression",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"EXPRESSION_PROPERTY",
")",
";",
"this",
".",
"conditionExpression",
"=",
"expression",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"EXPRESSION_PROPERTY",
")",
";",
"}",
"public",
"Expression",
"getThenExpression",
"(",
")",
"{",
"if",
"(",
"this",
".",
"thenExpression",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"thenExpression",
"==",
"null",
")",
"{",
"preLazyInit",
"(",
")",
";",
"this",
".",
"thenExpression",
"=",
"new",
"SimpleName",
"(",
"this",
".",
"ast",
")",
";",
"postLazyInit",
"(",
"this",
".",
"thenExpression",
",",
"THEN_EXPRESSION_PROPERTY",
")",
";",
"}",
"}",
"}",
"return",
"this",
".",
"thenExpression",
";",
"}",
"public",
"void",
"setThenExpression",
"(",
"Expression",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"ASTNode",
"oldChild",
"=",
"this",
".",
"thenExpression",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"THEN_EXPRESSION_PROPERTY",
")",
";",
"this",
".",
"thenExpression",
"=",
"expression",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"THEN_EXPRESSION_PROPERTY",
")",
";",
"}",
"public",
"Expression",
"getElseExpression",
"(",
")",
"{",
"if",
"(",
"this",
".",
"elseExpression",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"elseExpression",
"==",
"null",
")",
"{",
"preLazyInit",
"(",
")",
";",
"this",
".",
"elseExpression",
"=",
"new",
"SimpleName",
"(",
"this",
".",
"ast",
")",
";",
"postLazyInit",
"(",
"this",
".",
"elseExpression",
",",
"ELSE_EXPRESSION_PROPERTY",
")",
";",
"}",
"}",
"}",
"return",
"this",
".",
"elseExpression",
";",
"}",
"public",
"void",
"setElseExpression",
"(",
"Expression",
"expression",
")",
"{",
"if",
"(",
"expression",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"ASTNode",
"oldChild",
"=",
"this",
".",
"elseExpression",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"ELSE_EXPRESSION_PROPERTY",
")",
";",
"this",
".",
"elseExpression",
"=",
"expression",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"ELSE_EXPRESSION_PROPERTY",
")",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"BASE_NODE_SIZE",
"+",
"3",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"conditionExpression",
"==",
"null",
"?",
"0",
":",
"getExpression",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"thenExpression",
"==",
"null",
"?",
"0",
":",
"getThenExpression",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"elseExpression",
"==",
"null",
"?",
"0",
":",
"getElseExpression",
"(",
")",
".",
"treeSize",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
4,384 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"MemberRef",
"extends",
"ASTNode",
"implements",
"IDocElement",
"{",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"QUALIFIER_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"MemberRef",
".",
"class",
",",
"\"qualifier\"",
",",
"Name",
".",
"class",
",",
"OPTIONAL",
",",
"NO_CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"NAME_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"MemberRef",
".",
"class",
",",
"\"name\"",
",",
"SimpleName",
".",
"class",
",",
"MANDATORY",
",",
"NO_CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"propertyList",
"=",
"new",
"ArrayList",
"(",
"3",
")",
";",
"createPropertyList",
"(",
"MemberRef",
".",
"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",
"memberName",
"=",
"null",
";",
"MemberRef",
"(",
"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",
"MEMBER_REF",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"MemberRef",
"result",
"=",
"new",
"MemberRef",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"setQualifier",
"(",
"(",
"Name",
")",
"ASTNode",
".",
"copySubtree",
"(",
"target",
",",
"getQualifier",
"(",
")",
")",
")",
";",
"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",
",",
"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",
".",
"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",
"name",
")",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"ASTNode",
"oldChild",
"=",
"this",
".",
"memberName",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"name",
",",
"NAME_PROPERTY",
")",
";",
"this",
".",
"memberName",
"=",
"name",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"name",
",",
"NAME_PROPERTY",
")",
";",
"}",
"public",
"final",
"IBinding",
"resolveBinding",
"(",
")",
"{",
"return",
"this",
".",
"ast",
".",
"getBindingResolver",
"(",
")",
".",
"resolveReference",
"(",
"this",
")",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"BASE_NODE_SIZE",
"+",
"2",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"optionalQualifier",
"==",
"null",
"?",
"0",
":",
"getQualifier",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"memberName",
"==",
"null",
"?",
"0",
":",
"getName",
"(",
")",
".",
"treeSize",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
4,385 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"final",
"class",
"NormalAnnotation",
"extends",
"Annotation",
"{",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"TYPE_NAME_PROPERTY",
"=",
"internalTypeNamePropertyFactory",
"(",
"NormalAnnotation",
".",
"class",
")",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"VALUES_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"NormalAnnotation",
".",
"class",
",",
"\"values\"",
",",
"MemberValuePair",
".",
"class",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"propertyList",
"=",
"new",
"ArrayList",
"(",
"3",
")",
";",
"createPropertyList",
"(",
"NormalAnnotation",
".",
"class",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"TYPE_NAME_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"VALUES_PROPERTY",
",",
"propertyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"propertyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"ASTNode",
".",
"NodeList",
"values",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"VALUES_PROPERTY",
")",
";",
"NormalAnnotation",
"(",
"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",
"List",
"internalGetChildListProperty",
"(",
"ChildListPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"property",
"==",
"VALUES_PROPERTY",
")",
"{",
"return",
"values",
"(",
")",
";",
"}",
"return",
"super",
".",
"internalGetChildListProperty",
"(",
"property",
")",
";",
"}",
"final",
"ChildPropertyDescriptor",
"internalTypeNameProperty",
"(",
")",
"{",
"return",
"TYPE_NAME_PROPERTY",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"NORMAL_ANNOTATION",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"NormalAnnotation",
"result",
"=",
"new",
"NormalAnnotation",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"setTypeName",
"(",
"(",
"Name",
")",
"ASTNode",
".",
"copySubtree",
"(",
"target",
",",
"getTypeName",
"(",
")",
")",
")",
";",
"result",
".",
"values",
"(",
")",
".",
"addAll",
"(",
"ASTNode",
".",
"copySubtrees",
"(",
"target",
",",
"values",
"(",
")",
")",
")",
";",
"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",
"(",
")",
")",
";",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"values",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"public",
"List",
"values",
"(",
")",
"{",
"return",
"this",
".",
"values",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"super",
".",
"memSize",
"(",
")",
"+",
"1",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"typeName",
"==",
"null",
"?",
"0",
":",
"getTypeName",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"this",
".",
"values",
".",
"listSize",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,386 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"Block",
"extends",
"Statement",
"{",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"STATEMENTS_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"Block",
".",
"class",
",",
"\"statements\"",
",",
"Statement",
".",
"class",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"properyList",
"=",
"new",
"ArrayList",
"(",
"2",
")",
";",
"createPropertyList",
"(",
"Block",
".",
"class",
",",
"properyList",
")",
";",
"addProperty",
"(",
"STATEMENTS_PROPERTY",
",",
"properyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"properyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"ASTNode",
".",
"NodeList",
"statements",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"STATEMENTS_PROPERTY",
")",
";",
"Block",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"}",
"final",
"List",
"internalStructuralPropertiesForType",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"propertyDescriptors",
"(",
"apiLevel",
")",
";",
"}",
"final",
"List",
"internalGetChildListProperty",
"(",
"ChildListPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"property",
"==",
"STATEMENTS_PROPERTY",
")",
"{",
"return",
"statements",
"(",
")",
";",
"}",
"return",
"super",
".",
"internalGetChildListProperty",
"(",
"property",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"BLOCK",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"Block",
"result",
"=",
"new",
"Block",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"copyLeadingComment",
"(",
"this",
")",
";",
"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",
")",
"{",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"statements",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"public",
"List",
"statements",
"(",
")",
"{",
"return",
"this",
".",
"statements",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"super",
".",
"memSize",
"(",
")",
"+",
"1",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"this",
".",
"statements",
".",
"listSize",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,387 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ASTVisitor",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ConstructorDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"FieldDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Initializer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"MethodDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"TypeDeclaration",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ClassScope",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"CompilationUnitScope",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"MethodScope",
";",
"class",
"NodeSearcher",
"extends",
"ASTVisitor",
"{",
"public",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"ASTNode",
"found",
";",
"public",
"TypeDeclaration",
"enclosingType",
";",
"public",
"int",
"position",
";",
"NodeSearcher",
"(",
"int",
"position",
")",
"{",
"this",
".",
"position",
"=",
"position",
";",
"}",
"public",
"boolean",
"visit",
"(",
"ConstructorDeclaration",
"constructorDeclaration",
",",
"ClassScope",
"scope",
")",
"{",
"if",
"(",
"constructorDeclaration",
".",
"declarationSourceStart",
"<=",
"this",
".",
"position",
"&&",
"this",
".",
"position",
"<=",
"constructorDeclaration",
".",
"declarationSourceEnd",
")",
"{",
"this",
".",
"found",
"=",
"constructorDeclaration",
";",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"FieldDeclaration",
"fieldDeclaration",
",",
"MethodScope",
"scope",
")",
"{",
"if",
"(",
"fieldDeclaration",
".",
"declarationSourceStart",
"<=",
"this",
".",
"position",
"&&",
"this",
".",
"position",
"<=",
"fieldDeclaration",
".",
"declarationSourceEnd",
")",
"{",
"this",
".",
"found",
"=",
"fieldDeclaration",
";",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"Initializer",
"initializer",
",",
"MethodScope",
"scope",
")",
"{",
"if",
"(",
"initializer",
".",
"declarationSourceStart",
"<=",
"this",
".",
"position",
"&&",
"this",
".",
"position",
"<=",
"initializer",
".",
"declarationSourceEnd",
")",
"{",
"this",
".",
"found",
"=",
"initializer",
";",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeDeclaration",
"memberTypeDeclaration",
",",
"ClassScope",
"scope",
")",
"{",
"if",
"(",
"memberTypeDeclaration",
".",
"declarationSourceStart",
"<=",
"this",
".",
"position",
"&&",
"this",
".",
"position",
"<=",
"memberTypeDeclaration",
".",
"declarationSourceEnd",
")",
"{",
"this",
".",
"enclosingType",
"=",
"memberTypeDeclaration",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"visit",
"(",
"MethodDeclaration",
"methodDeclaration",
",",
"ClassScope",
"scope",
")",
"{",
"if",
"(",
"methodDeclaration",
".",
"declarationSourceStart",
"<=",
"this",
".",
"position",
"&&",
"this",
".",
"position",
"<=",
"methodDeclaration",
".",
"declarationSourceEnd",
")",
"{",
"this",
".",
"found",
"=",
"methodDeclaration",
";",
"return",
"false",
";",
"}",
"return",
"true",
";",
"}",
"public",
"boolean",
"visit",
"(",
"TypeDeclaration",
"typeDeclaration",
",",
"CompilationUnitScope",
"scope",
")",
"{",
"if",
"(",
"typeDeclaration",
".",
"declarationSourceStart",
"<=",
"this",
".",
"position",
"&&",
"this",
".",
"position",
"<=",
"typeDeclaration",
".",
"declarationSourceEnd",
")",
"{",
"this",
".",
"enclosingType",
"=",
"typeDeclaration",
";",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"}",
"</s>"
] |
4,388 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaCore",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"StringLiteral",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"Wildcard",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"classfmt",
".",
"ClassFileConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ArrayBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"BaseTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"Binding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"CaptureBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"FieldBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"LocalTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"MethodBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"PackageBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ParameterizedTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"RawTypeBinding",
";",
"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",
".",
"TypeVariableBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"WildcardBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"problem",
".",
"AbortCompilation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"SuffixConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"JavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"PackageFragment",
";",
"class",
"TypeBinding",
"implements",
"ITypeBinding",
"{",
"private",
"static",
"final",
"StringLiteral",
"EXPRESSION",
"=",
"new",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"ast",
".",
"StringLiteral",
"(",
"0",
",",
"0",
")",
";",
"protected",
"static",
"final",
"IMethodBinding",
"[",
"]",
"NO_METHOD_BINDINGS",
"=",
"new",
"IMethodBinding",
"[",
"0",
"]",
";",
"private",
"static",
"final",
"String",
"NO_NAME",
"=",
"\"\"",
";",
"protected",
"static",
"final",
"ITypeBinding",
"[",
"]",
"NO_TYPE_BINDINGS",
"=",
"new",
"ITypeBinding",
"[",
"0",
"]",
";",
"protected",
"static",
"final",
"IVariableBinding",
"[",
"]",
"NO_VARIABLE_BINDINGS",
"=",
"new",
"IVariableBinding",
"[",
"0",
"]",
";",
"private",
"static",
"final",
"int",
"VALID_MODIFIERS",
"=",
"Modifier",
".",
"PUBLIC",
"|",
"Modifier",
".",
"PROTECTED",
"|",
"Modifier",
".",
"PRIVATE",
"|",
"Modifier",
".",
"ABSTRACT",
"|",
"Modifier",
".",
"STATIC",
"|",
"Modifier",
".",
"FINAL",
"|",
"Modifier",
".",
"STRICTFP",
";",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"binding",
";",
"private",
"String",
"key",
";",
"private",
"BindingResolver",
"resolver",
";",
"private",
"IVariableBinding",
"[",
"]",
"fields",
";",
"private",
"IAnnotationBinding",
"[",
"]",
"annotations",
";",
"private",
"IMethodBinding",
"[",
"]",
"methods",
";",
"private",
"ITypeBinding",
"[",
"]",
"members",
";",
"private",
"ITypeBinding",
"[",
"]",
"interfaces",
";",
"private",
"ITypeBinding",
"[",
"]",
"typeArguments",
";",
"private",
"ITypeBinding",
"[",
"]",
"bounds",
";",
"private",
"ITypeBinding",
"[",
"]",
"typeParameters",
";",
"public",
"TypeBinding",
"(",
"BindingResolver",
"resolver",
",",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"binding",
")",
"{",
"this",
".",
"binding",
"=",
"binding",
";",
"this",
".",
"resolver",
"=",
"resolver",
";",
"}",
"public",
"ITypeBinding",
"createArrayType",
"(",
"int",
"dimension",
")",
"{",
"int",
"realDimensions",
"=",
"dimension",
";",
"realDimensions",
"+=",
"getDimensions",
"(",
")",
";",
"if",
"(",
"realDimensions",
"<",
"1",
"||",
"realDimensions",
">",
"255",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"return",
"this",
".",
"resolver",
".",
"resolveArrayType",
"(",
"this",
",",
"dimension",
")",
";",
"}",
"public",
"IAnnotationBinding",
"[",
"]",
"getAnnotations",
"(",
")",
"{",
"if",
"(",
"this",
".",
"annotations",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"annotations",
";",
"}",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ReferenceBinding",
"refType",
"=",
"null",
";",
"if",
"(",
"this",
".",
"binding",
"instanceof",
"ParameterizedTypeBinding",
")",
"{",
"refType",
"=",
"(",
"(",
"ParameterizedTypeBinding",
")",
"this",
".",
"binding",
")",
".",
"genericType",
"(",
")",
";",
"}",
"else",
"if",
"(",
"this",
".",
"binding",
".",
"isAnnotationType",
"(",
")",
"||",
"this",
".",
"binding",
".",
"isClass",
"(",
")",
"||",
"this",
".",
"binding",
".",
"isEnum",
"(",
")",
"||",
"this",
".",
"binding",
".",
"isInterface",
"(",
")",
")",
"{",
"refType",
"=",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"}",
"if",
"(",
"refType",
"!=",
"null",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"AnnotationBinding",
"[",
"]",
"internalAnnotations",
"=",
"refType",
".",
"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",
"]",
";",
"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",
"String",
"getBinaryName",
"(",
")",
"{",
"if",
"(",
"this",
".",
"binding",
".",
"isCapture",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"else",
"if",
"(",
"this",
".",
"binding",
".",
"isTypeVariable",
"(",
")",
")",
"{",
"TypeVariableBinding",
"typeVariableBinding",
"=",
"(",
"TypeVariableBinding",
")",
"this",
".",
"binding",
";",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"Binding",
"declaring",
"=",
"typeVariableBinding",
".",
"declaringElement",
";",
"StringBuffer",
"binaryName",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"switch",
"(",
"declaring",
".",
"kind",
"(",
")",
")",
"{",
"case",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"Binding",
".",
"METHOD",
":",
"MethodBinding",
"methodBinding",
"=",
"(",
"MethodBinding",
")",
"declaring",
";",
"char",
"[",
"]",
"constantPoolName",
"=",
"methodBinding",
".",
"declaringClass",
".",
"constantPoolName",
"(",
")",
";",
"if",
"(",
"constantPoolName",
"==",
"null",
")",
"return",
"null",
";",
"binaryName",
".",
"append",
"(",
"CharOperation",
".",
"replaceOnCopy",
"(",
"constantPoolName",
",",
"'/'",
",",
"'.'",
")",
")",
".",
"append",
"(",
"'$'",
")",
".",
"append",
"(",
"methodBinding",
".",
"signature",
"(",
")",
")",
".",
"append",
"(",
"'$'",
")",
".",
"append",
"(",
"typeVariableBinding",
".",
"sourceName",
")",
";",
"break",
";",
"default",
":",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"typeBinding",
"=",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
")",
"declaring",
";",
"constantPoolName",
"=",
"typeBinding",
".",
"constantPoolName",
"(",
")",
";",
"if",
"(",
"constantPoolName",
"==",
"null",
")",
"return",
"null",
";",
"binaryName",
".",
"append",
"(",
"CharOperation",
".",
"replaceOnCopy",
"(",
"constantPoolName",
",",
"'/'",
",",
"'.'",
")",
")",
".",
"append",
"(",
"'$'",
")",
".",
"append",
"(",
"typeVariableBinding",
".",
"sourceName",
")",
";",
"}",
"return",
"String",
".",
"valueOf",
"(",
"binaryName",
")",
";",
"}",
"char",
"[",
"]",
"constantPoolName",
"=",
"this",
".",
"binding",
".",
"constantPoolName",
"(",
")",
";",
"if",
"(",
"constantPoolName",
"==",
"null",
")",
"return",
"null",
";",
"char",
"[",
"]",
"dotSeparated",
"=",
"CharOperation",
".",
"replaceOnCopy",
"(",
"constantPoolName",
",",
"'/'",
",",
"'.'",
")",
";",
"return",
"new",
"String",
"(",
"dotSeparated",
")",
";",
"}",
"public",
"ITypeBinding",
"getBound",
"(",
")",
"{",
"switch",
"(",
"this",
".",
"binding",
".",
"kind",
"(",
")",
")",
"{",
"case",
"Binding",
".",
"WILDCARD_TYPE",
":",
"case",
"Binding",
".",
"INTERSECTION_TYPE",
":",
"WildcardBinding",
"wildcardBinding",
"=",
"(",
"WildcardBinding",
")",
"this",
".",
"binding",
";",
"if",
"(",
"wildcardBinding",
".",
"bound",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"wildcardBinding",
".",
"bound",
")",
";",
"}",
"break",
";",
"}",
"return",
"null",
";",
"}",
"public",
"ITypeBinding",
"getGenericTypeOfWildcardType",
"(",
")",
"{",
"switch",
"(",
"this",
".",
"binding",
".",
"kind",
"(",
")",
")",
"{",
"case",
"Binding",
".",
"WILDCARD_TYPE",
":",
"WildcardBinding",
"wildcardBinding",
"=",
"(",
"WildcardBinding",
")",
"this",
".",
"binding",
";",
"if",
"(",
"wildcardBinding",
".",
"genericType",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"wildcardBinding",
".",
"genericType",
")",
";",
"}",
"break",
";",
"}",
"return",
"null",
";",
"}",
"public",
"int",
"getRank",
"(",
")",
"{",
"switch",
"(",
"this",
".",
"binding",
".",
"kind",
"(",
")",
")",
"{",
"case",
"Binding",
".",
"WILDCARD_TYPE",
":",
"case",
"Binding",
".",
"INTERSECTION_TYPE",
":",
"WildcardBinding",
"wildcardBinding",
"=",
"(",
"WildcardBinding",
")",
"this",
".",
"binding",
";",
"return",
"wildcardBinding",
".",
"rank",
";",
"default",
":",
"return",
"-",
"1",
";",
"}",
"}",
"public",
"ITypeBinding",
"getComponentType",
"(",
")",
"{",
"if",
"(",
"!",
"isArray",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"ArrayBinding",
"arrayBinding",
"=",
"(",
"ArrayBinding",
")",
"this",
".",
"binding",
";",
"return",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"arrayBinding",
".",
"elementsType",
"(",
")",
")",
";",
"}",
"public",
"synchronized",
"IVariableBinding",
"[",
"]",
"getDeclaredFields",
"(",
")",
"{",
"if",
"(",
"this",
".",
"fields",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"fields",
";",
"}",
"try",
"{",
"if",
"(",
"isClass",
"(",
")",
"||",
"isInterface",
"(",
")",
"||",
"isEnum",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"FieldBinding",
"[",
"]",
"fieldBindings",
"=",
"referenceBinding",
".",
"availableFields",
"(",
")",
";",
"int",
"length",
"=",
"fieldBindings",
".",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"convertedFieldCount",
"=",
"0",
";",
"IVariableBinding",
"[",
"]",
"newFields",
"=",
"new",
"IVariableBinding",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"FieldBinding",
"fieldBinding",
"=",
"fieldBindings",
"[",
"i",
"]",
";",
"IVariableBinding",
"variableBinding",
"=",
"this",
".",
"resolver",
".",
"getVariableBinding",
"(",
"fieldBinding",
")",
";",
"if",
"(",
"variableBinding",
"!=",
"null",
")",
"{",
"newFields",
"[",
"convertedFieldCount",
"++",
"]",
"=",
"variableBinding",
";",
"}",
"}",
"if",
"(",
"convertedFieldCount",
"!=",
"length",
")",
"{",
"if",
"(",
"convertedFieldCount",
"==",
"0",
")",
"{",
"return",
"this",
".",
"fields",
"=",
"NO_VARIABLE_BINDINGS",
";",
"}",
"System",
".",
"arraycopy",
"(",
"newFields",
",",
"0",
",",
"(",
"newFields",
"=",
"new",
"IVariableBinding",
"[",
"convertedFieldCount",
"]",
")",
",",
"0",
",",
"convertedFieldCount",
")",
";",
"}",
"return",
"this",
".",
"fields",
"=",
"newFields",
";",
"}",
"}",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"return",
"this",
".",
"fields",
"=",
"NO_VARIABLE_BINDINGS",
";",
"}",
"public",
"synchronized",
"IMethodBinding",
"[",
"]",
"getDeclaredMethods",
"(",
")",
"{",
"if",
"(",
"this",
".",
"methods",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"methods",
";",
"}",
"try",
"{",
"if",
"(",
"isClass",
"(",
")",
"||",
"isInterface",
"(",
")",
"||",
"isEnum",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"MethodBinding",
"[",
"]",
"internalMethods",
"=",
"referenceBinding",
".",
"availableMethods",
"(",
")",
";",
"int",
"length",
"=",
"internalMethods",
".",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"int",
"convertedMethodCount",
"=",
"0",
";",
"IMethodBinding",
"[",
"]",
"newMethods",
"=",
"new",
"IMethodBinding",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"MethodBinding",
"methodBinding",
"=",
"internalMethods",
"[",
"i",
"]",
";",
"if",
"(",
"methodBinding",
".",
"isDefaultAbstract",
"(",
")",
"||",
"methodBinding",
".",
"isSynthetic",
"(",
")",
"||",
"(",
"methodBinding",
".",
"isConstructor",
"(",
")",
"&&",
"isInterface",
"(",
")",
")",
")",
"{",
"continue",
";",
"}",
"IMethodBinding",
"methodBinding2",
"=",
"this",
".",
"resolver",
".",
"getMethodBinding",
"(",
"methodBinding",
")",
";",
"if",
"(",
"methodBinding2",
"!=",
"null",
")",
"{",
"newMethods",
"[",
"convertedMethodCount",
"++",
"]",
"=",
"methodBinding2",
";",
"}",
"}",
"if",
"(",
"convertedMethodCount",
"!=",
"length",
")",
"{",
"if",
"(",
"convertedMethodCount",
"==",
"0",
")",
"{",
"return",
"this",
".",
"methods",
"=",
"NO_METHOD_BINDINGS",
";",
"}",
"System",
".",
"arraycopy",
"(",
"newMethods",
",",
"0",
",",
"(",
"newMethods",
"=",
"new",
"IMethodBinding",
"[",
"convertedMethodCount",
"]",
")",
",",
"0",
",",
"convertedMethodCount",
")",
";",
"}",
"return",
"this",
".",
"methods",
"=",
"newMethods",
";",
"}",
"}",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"return",
"this",
".",
"methods",
"=",
"NO_METHOD_BINDINGS",
";",
"}",
"public",
"int",
"getDeclaredModifiers",
"(",
")",
"{",
"return",
"getModifiers",
"(",
")",
";",
"}",
"public",
"synchronized",
"ITypeBinding",
"[",
"]",
"getDeclaredTypes",
"(",
")",
"{",
"if",
"(",
"this",
".",
"members",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"members",
";",
"}",
"try",
"{",
"if",
"(",
"isClass",
"(",
")",
"||",
"isInterface",
"(",
")",
"||",
"isEnum",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"ReferenceBinding",
"[",
"]",
"internalMembers",
"=",
"referenceBinding",
".",
"memberTypes",
"(",
")",
";",
"int",
"length",
"=",
"internalMembers",
".",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"ITypeBinding",
"[",
"]",
"newMembers",
"=",
"new",
"ITypeBinding",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"ITypeBinding",
"typeBinding",
"=",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"internalMembers",
"[",
"i",
"]",
")",
";",
"if",
"(",
"typeBinding",
"==",
"null",
")",
"{",
"return",
"this",
".",
"members",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"newMembers",
"[",
"i",
"]",
"=",
"typeBinding",
";",
"}",
"return",
"this",
".",
"members",
"=",
"newMembers",
";",
"}",
"}",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"return",
"this",
".",
"members",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"public",
"synchronized",
"IMethodBinding",
"getDeclaringMethod",
"(",
")",
"{",
"if",
"(",
"this",
".",
"binding",
"instanceof",
"LocalTypeBinding",
")",
"{",
"LocalTypeBinding",
"localTypeBinding",
"=",
"(",
"LocalTypeBinding",
")",
"this",
".",
"binding",
";",
"MethodBinding",
"methodBinding",
"=",
"localTypeBinding",
".",
"enclosingMethod",
";",
"if",
"(",
"methodBinding",
"!=",
"null",
")",
"{",
"try",
"{",
"return",
"this",
".",
"resolver",
".",
"getMethodBinding",
"(",
"localTypeBinding",
".",
"enclosingMethod",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"this",
".",
"binding",
".",
"isTypeVariable",
"(",
")",
")",
"{",
"TypeVariableBinding",
"typeVariableBinding",
"=",
"(",
"TypeVariableBinding",
")",
"this",
".",
"binding",
";",
"Binding",
"declaringElement",
"=",
"typeVariableBinding",
".",
"declaringElement",
";",
"if",
"(",
"declaringElement",
"instanceof",
"MethodBinding",
")",
"{",
"try",
"{",
"return",
"this",
".",
"resolver",
".",
"getMethodBinding",
"(",
"(",
"MethodBinding",
")",
"declaringElement",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"synchronized",
"ITypeBinding",
"getDeclaringClass",
"(",
")",
"{",
"if",
"(",
"isClass",
"(",
")",
"||",
"isInterface",
"(",
")",
"||",
"isEnum",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"if",
"(",
"referenceBinding",
".",
"isNestedType",
"(",
")",
")",
"{",
"try",
"{",
"return",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"referenceBinding",
".",
"enclosingType",
"(",
")",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"}",
"}",
"else",
"if",
"(",
"this",
".",
"binding",
".",
"isTypeVariable",
"(",
")",
")",
"{",
"TypeVariableBinding",
"typeVariableBinding",
"=",
"(",
"TypeVariableBinding",
")",
"this",
".",
"binding",
";",
"Binding",
"declaringElement",
"=",
"typeVariableBinding",
".",
"isCapture",
"(",
")",
"?",
"(",
"(",
"CaptureBinding",
")",
"typeVariableBinding",
")",
".",
"sourceType",
":",
"typeVariableBinding",
".",
"declaringElement",
";",
"if",
"(",
"declaringElement",
"instanceof",
"ReferenceBinding",
")",
"{",
"try",
"{",
"return",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"(",
"ReferenceBinding",
")",
"declaringElement",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"}",
"}",
"return",
"null",
";",
"}",
"public",
"int",
"getDimensions",
"(",
")",
"{",
"if",
"(",
"!",
"isArray",
"(",
")",
")",
"{",
"return",
"0",
";",
"}",
"ArrayBinding",
"arrayBinding",
"=",
"(",
"ArrayBinding",
")",
"this",
".",
"binding",
";",
"return",
"arrayBinding",
".",
"dimensions",
";",
"}",
"public",
"ITypeBinding",
"getElementType",
"(",
")",
"{",
"if",
"(",
"!",
"isArray",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"ArrayBinding",
"arrayBinding",
"=",
"(",
"ArrayBinding",
")",
"this",
".",
"binding",
";",
"return",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"arrayBinding",
".",
"leafComponentType",
")",
";",
"}",
"public",
"ITypeBinding",
"getTypeDeclaration",
"(",
")",
"{",
"if",
"(",
"this",
".",
"binding",
"instanceof",
"ParameterizedTypeBinding",
")",
"return",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"(",
"(",
"ParameterizedTypeBinding",
")",
"this",
".",
"binding",
")",
".",
"genericType",
"(",
")",
")",
";",
"return",
"this",
";",
"}",
"public",
"ITypeBinding",
"getErasure",
"(",
")",
"{",
"return",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"this",
".",
"binding",
".",
"erasure",
"(",
")",
")",
";",
"}",
"public",
"synchronized",
"ITypeBinding",
"[",
"]",
"getInterfaces",
"(",
")",
"{",
"if",
"(",
"this",
".",
"interfaces",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"interfaces",
";",
"}",
"if",
"(",
"this",
".",
"binding",
"==",
"null",
")",
"return",
"this",
".",
"interfaces",
"=",
"NO_TYPE_BINDINGS",
";",
"switch",
"(",
"this",
".",
"binding",
".",
"kind",
"(",
")",
")",
"{",
"case",
"Binding",
".",
"ARRAY_TYPE",
":",
"case",
"Binding",
".",
"BASE_TYPE",
":",
"return",
"this",
".",
"interfaces",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"ReferenceBinding",
"[",
"]",
"internalInterfaces",
"=",
"null",
";",
"try",
"{",
"internalInterfaces",
"=",
"referenceBinding",
".",
"superInterfaces",
"(",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"}",
"int",
"length",
"=",
"internalInterfaces",
"==",
"null",
"?",
"0",
":",
"internalInterfaces",
".",
"length",
";",
"if",
"(",
"length",
"!=",
"0",
")",
"{",
"ITypeBinding",
"[",
"]",
"newInterfaces",
"=",
"new",
"ITypeBinding",
"[",
"length",
"]",
";",
"int",
"interfacesCounter",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"ITypeBinding",
"typeBinding",
"=",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"internalInterfaces",
"[",
"i",
"]",
")",
";",
"if",
"(",
"typeBinding",
"==",
"null",
")",
"{",
"continue",
";",
"}",
"newInterfaces",
"[",
"interfacesCounter",
"++",
"]",
"=",
"typeBinding",
";",
"}",
"if",
"(",
"length",
"!=",
"interfacesCounter",
")",
"{",
"System",
".",
"arraycopy",
"(",
"newInterfaces",
",",
"0",
",",
"(",
"newInterfaces",
"=",
"new",
"ITypeBinding",
"[",
"interfacesCounter",
"]",
")",
",",
"0",
",",
"interfacesCounter",
")",
";",
"}",
"return",
"this",
".",
"interfaces",
"=",
"newInterfaces",
";",
"}",
"return",
"this",
".",
"interfaces",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"public",
"IJavaElement",
"getJavaElement",
"(",
")",
"{",
"JavaElement",
"element",
"=",
"getUnresolvedJavaElement",
"(",
")",
";",
"if",
"(",
"element",
"!=",
"null",
")",
"return",
"element",
".",
"resolved",
"(",
"this",
".",
"binding",
")",
";",
"if",
"(",
"isRecovered",
"(",
")",
")",
"{",
"IPackageBinding",
"packageBinding",
"=",
"getPackage",
"(",
")",
";",
"if",
"(",
"packageBinding",
"!=",
"null",
")",
"{",
"final",
"IJavaElement",
"javaElement",
"=",
"packageBinding",
".",
"getJavaElement",
"(",
")",
";",
"if",
"(",
"javaElement",
"!=",
"null",
"&&",
"javaElement",
".",
"getElementType",
"(",
")",
"==",
"IJavaElement",
".",
"PACKAGE_FRAGMENT",
")",
"{",
"return",
"(",
"(",
"PackageFragment",
")",
"javaElement",
")",
".",
"getCompilationUnit",
"(",
"new",
"String",
"(",
"this",
".",
"binding",
".",
"sourceName",
"(",
")",
")",
"+",
"SuffixConstants",
".",
"SUFFIX_STRING_java",
")",
".",
"getType",
"(",
"this",
".",
"getName",
"(",
")",
")",
";",
"}",
"}",
"return",
"null",
";",
"}",
"return",
"null",
";",
"}",
"private",
"JavaElement",
"getUnresolvedJavaElement",
"(",
")",
"{",
"return",
"getUnresolvedJavaElement",
"(",
"this",
".",
"binding",
")",
";",
"}",
"private",
"JavaElement",
"getUnresolvedJavaElement",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"typeBinding",
")",
"{",
"if",
"(",
"JavaCore",
".",
"getPlugin",
"(",
")",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"this",
".",
"resolver",
"instanceof",
"DefaultBindingResolver",
")",
"{",
"DefaultBindingResolver",
"defaultBindingResolver",
"=",
"(",
"DefaultBindingResolver",
")",
"this",
".",
"resolver",
";",
"if",
"(",
"!",
"defaultBindingResolver",
".",
"fromJavaProject",
")",
"return",
"null",
";",
"return",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"getUnresolvedJavaElement",
"(",
"typeBinding",
",",
"defaultBindingResolver",
".",
"workingCopyOwner",
",",
"defaultBindingResolver",
".",
"getBindingsToNodesMap",
"(",
")",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"String",
"getKey",
"(",
")",
"{",
"if",
"(",
"this",
".",
"key",
"==",
"null",
")",
"{",
"this",
".",
"key",
"=",
"new",
"String",
"(",
"this",
".",
"binding",
".",
"computeUniqueKey",
"(",
")",
")",
";",
"}",
"return",
"this",
".",
"key",
";",
"}",
"public",
"int",
"getKind",
"(",
")",
"{",
"return",
"IBinding",
".",
"TYPE",
";",
"}",
"public",
"int",
"getModifiers",
"(",
")",
"{",
"if",
"(",
"isClass",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"final",
"int",
"accessFlags",
"=",
"referenceBinding",
".",
"getAccessFlags",
"(",
")",
"&",
"VALID_MODIFIERS",
";",
"if",
"(",
"referenceBinding",
".",
"isAnonymousType",
"(",
")",
")",
"{",
"return",
"accessFlags",
"&",
"~",
"Modifier",
".",
"FINAL",
";",
"}",
"return",
"accessFlags",
";",
"}",
"else",
"if",
"(",
"isAnnotation",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"final",
"int",
"accessFlags",
"=",
"referenceBinding",
".",
"getAccessFlags",
"(",
")",
"&",
"VALID_MODIFIERS",
";",
"return",
"accessFlags",
"&",
"~",
"(",
"ClassFileConstants",
".",
"AccAbstract",
"|",
"ClassFileConstants",
".",
"AccInterface",
"|",
"ClassFileConstants",
".",
"AccAnnotation",
")",
";",
"}",
"else",
"if",
"(",
"isInterface",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"final",
"int",
"accessFlags",
"=",
"referenceBinding",
".",
"getAccessFlags",
"(",
")",
"&",
"VALID_MODIFIERS",
";",
"return",
"accessFlags",
"&",
"~",
"(",
"ClassFileConstants",
".",
"AccAbstract",
"|",
"ClassFileConstants",
".",
"AccInterface",
")",
";",
"}",
"else",
"if",
"(",
"isEnum",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"final",
"int",
"accessFlags",
"=",
"referenceBinding",
".",
"getAccessFlags",
"(",
")",
"&",
"VALID_MODIFIERS",
";",
"return",
"accessFlags",
"&",
"~",
"ClassFileConstants",
".",
"AccEnum",
";",
"}",
"else",
"{",
"return",
"Modifier",
".",
"NONE",
";",
"}",
"}",
"public",
"String",
"getName",
"(",
")",
"{",
"StringBuffer",
"buffer",
";",
"switch",
"(",
"this",
".",
"binding",
".",
"kind",
"(",
")",
")",
"{",
"case",
"Binding",
".",
"WILDCARD_TYPE",
":",
"case",
"Binding",
".",
"INTERSECTION_TYPE",
":",
"WildcardBinding",
"wildcardBinding",
"=",
"(",
"WildcardBinding",
")",
"this",
".",
"binding",
";",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"TypeConstants",
".",
"WILDCARD_NAME",
")",
";",
"if",
"(",
"wildcardBinding",
".",
"bound",
"!=",
"null",
")",
"{",
"switch",
"(",
"wildcardBinding",
".",
"boundKind",
")",
"{",
"case",
"Wildcard",
".",
"SUPER",
":",
"buffer",
".",
"append",
"(",
"TypeConstants",
".",
"WILDCARD_SUPER",
")",
";",
"break",
";",
"case",
"Wildcard",
".",
"EXTENDS",
":",
"buffer",
".",
"append",
"(",
"TypeConstants",
".",
"WILDCARD_EXTENDS",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"getBound",
"(",
")",
".",
"getName",
"(",
")",
")",
";",
"}",
"return",
"String",
".",
"valueOf",
"(",
"buffer",
")",
";",
"case",
"Binding",
".",
"TYPE_PARAMETER",
":",
"if",
"(",
"isCapture",
"(",
")",
")",
"{",
"return",
"NO_NAME",
";",
"}",
"TypeVariableBinding",
"typeVariableBinding",
"=",
"(",
"TypeVariableBinding",
")",
"this",
".",
"binding",
";",
"return",
"new",
"String",
"(",
"typeVariableBinding",
".",
"sourceName",
")",
";",
"case",
"Binding",
".",
"PARAMETERIZED_TYPE",
":",
"ParameterizedTypeBinding",
"parameterizedTypeBinding",
"=",
"(",
"ParameterizedTypeBinding",
")",
"this",
".",
"binding",
";",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"parameterizedTypeBinding",
".",
"sourceName",
"(",
")",
")",
";",
"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",
"Binding",
".",
"RAW_TYPE",
":",
"return",
"getTypeDeclaration",
"(",
")",
".",
"getName",
"(",
")",
";",
"case",
"Binding",
".",
"ARRAY_TYPE",
":",
"ITypeBinding",
"elementType",
"=",
"getElementType",
"(",
")",
";",
"if",
"(",
"elementType",
".",
"isLocal",
"(",
")",
"||",
"elementType",
".",
"isAnonymous",
"(",
")",
"||",
"elementType",
".",
"isCapture",
"(",
")",
")",
"{",
"return",
"NO_NAME",
";",
"}",
"int",
"dimensions",
"=",
"getDimensions",
"(",
")",
";",
"char",
"[",
"]",
"brackets",
"=",
"new",
"char",
"[",
"dimensions",
"*",
"2",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"dimensions",
"*",
"2",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"-=",
"2",
")",
"{",
"brackets",
"[",
"i",
"]",
"=",
"']'",
";",
"brackets",
"[",
"i",
"-",
"1",
"]",
"=",
"'['",
";",
"}",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"elementType",
".",
"getName",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"brackets",
")",
";",
"return",
"String",
".",
"valueOf",
"(",
"buffer",
")",
";",
"default",
":",
"if",
"(",
"isPrimitive",
"(",
")",
"||",
"isNullType",
"(",
")",
")",
"{",
"BaseTypeBinding",
"baseTypeBinding",
"=",
"(",
"BaseTypeBinding",
")",
"this",
".",
"binding",
";",
"return",
"new",
"String",
"(",
"baseTypeBinding",
".",
"simpleName",
")",
";",
"}",
"if",
"(",
"isAnonymous",
"(",
")",
")",
"{",
"return",
"NO_NAME",
";",
"}",
"return",
"new",
"String",
"(",
"this",
".",
"binding",
".",
"sourceName",
"(",
")",
")",
";",
"}",
"}",
"public",
"IPackageBinding",
"getPackage",
"(",
")",
"{",
"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",
";",
"}",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"return",
"this",
".",
"resolver",
".",
"getPackageBinding",
"(",
"referenceBinding",
".",
"getPackage",
"(",
")",
")",
";",
"}",
"public",
"String",
"getQualifiedName",
"(",
")",
"{",
"StringBuffer",
"buffer",
";",
"switch",
"(",
"this",
".",
"binding",
".",
"kind",
"(",
")",
")",
"{",
"case",
"Binding",
".",
"WILDCARD_TYPE",
":",
"case",
"Binding",
".",
"INTERSECTION_TYPE",
":",
"WildcardBinding",
"wildcardBinding",
"=",
"(",
"WildcardBinding",
")",
"this",
".",
"binding",
";",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"TypeConstants",
".",
"WILDCARD_NAME",
")",
";",
"final",
"ITypeBinding",
"bound",
"=",
"getBound",
"(",
")",
";",
"if",
"(",
"bound",
"!=",
"null",
")",
"{",
"switch",
"(",
"wildcardBinding",
".",
"boundKind",
")",
"{",
"case",
"Wildcard",
".",
"SUPER",
":",
"buffer",
".",
"append",
"(",
"TypeConstants",
".",
"WILDCARD_SUPER",
")",
";",
"break",
";",
"case",
"Wildcard",
".",
"EXTENDS",
":",
"buffer",
".",
"append",
"(",
"TypeConstants",
".",
"WILDCARD_EXTENDS",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"bound",
".",
"getQualifiedName",
"(",
")",
")",
";",
"}",
"return",
"String",
".",
"valueOf",
"(",
"buffer",
")",
";",
"case",
"Binding",
".",
"RAW_TYPE",
":",
"return",
"getTypeDeclaration",
"(",
")",
".",
"getQualifiedName",
"(",
")",
";",
"case",
"Binding",
".",
"ARRAY_TYPE",
":",
"ITypeBinding",
"elementType",
"=",
"getElementType",
"(",
")",
";",
"if",
"(",
"elementType",
".",
"isLocal",
"(",
")",
"||",
"elementType",
".",
"isAnonymous",
"(",
")",
"||",
"elementType",
".",
"isCapture",
"(",
")",
")",
"{",
"return",
"elementType",
".",
"getQualifiedName",
"(",
")",
";",
"}",
"final",
"int",
"dimensions",
"=",
"getDimensions",
"(",
")",
";",
"char",
"[",
"]",
"brackets",
"=",
"new",
"char",
"[",
"dimensions",
"*",
"2",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"dimensions",
"*",
"2",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"-=",
"2",
")",
"{",
"brackets",
"[",
"i",
"]",
"=",
"']'",
";",
"brackets",
"[",
"i",
"-",
"1",
"]",
"=",
"'['",
";",
"}",
"buffer",
"=",
"new",
"StringBuffer",
"(",
"elementType",
".",
"getQualifiedName",
"(",
")",
")",
";",
"buffer",
".",
"append",
"(",
"brackets",
")",
";",
"return",
"String",
".",
"valueOf",
"(",
"buffer",
")",
";",
"case",
"Binding",
".",
"TYPE_PARAMETER",
":",
"if",
"(",
"isCapture",
"(",
")",
")",
"{",
"return",
"NO_NAME",
";",
"}",
"TypeVariableBinding",
"typeVariableBinding",
"=",
"(",
"TypeVariableBinding",
")",
"this",
".",
"binding",
";",
"return",
"new",
"String",
"(",
"typeVariableBinding",
".",
"sourceName",
")",
";",
"case",
"Binding",
".",
"PARAMETERIZED_TYPE",
":",
"if",
"(",
"this",
".",
"binding",
".",
"isLocalType",
"(",
")",
")",
"{",
"return",
"NO_NAME",
";",
"}",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"isMember",
"(",
")",
")",
"{",
"buffer",
".",
"append",
"(",
"getDeclaringClass",
"(",
")",
".",
"getQualifiedName",
"(",
")",
")",
".",
"append",
"(",
"'.'",
")",
";",
"ParameterizedTypeBinding",
"parameterizedTypeBinding",
"=",
"(",
"ParameterizedTypeBinding",
")",
"this",
".",
"binding",
";",
"buffer",
".",
"append",
"(",
"parameterizedTypeBinding",
".",
"sourceName",
"(",
")",
")",
";",
"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",
"]",
".",
"getQualifiedName",
"(",
")",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"'>'",
")",
";",
"}",
"return",
"String",
".",
"valueOf",
"(",
"buffer",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"getTypeDeclaration",
"(",
")",
".",
"getQualifiedName",
"(",
")",
")",
";",
"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",
"]",
".",
"getQualifiedName",
"(",
")",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"'>'",
")",
";",
"}",
"return",
"String",
".",
"valueOf",
"(",
"buffer",
")",
";",
"default",
":",
"if",
"(",
"isAnonymous",
"(",
")",
"||",
"this",
".",
"binding",
".",
"isLocalType",
"(",
")",
")",
"{",
"return",
"NO_NAME",
";",
"}",
"if",
"(",
"isPrimitive",
"(",
")",
"||",
"isNullType",
"(",
")",
")",
"{",
"BaseTypeBinding",
"baseTypeBinding",
"=",
"(",
"BaseTypeBinding",
")",
"this",
".",
"binding",
";",
"return",
"new",
"String",
"(",
"baseTypeBinding",
".",
"simpleName",
")",
";",
"}",
"if",
"(",
"isMember",
"(",
")",
")",
"{",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"getDeclaringClass",
"(",
")",
".",
"getQualifiedName",
"(",
")",
")",
".",
"append",
"(",
"'.'",
")",
";",
"buffer",
".",
"append",
"(",
"getName",
"(",
")",
")",
";",
"return",
"String",
".",
"valueOf",
"(",
"buffer",
")",
";",
"}",
"PackageBinding",
"packageBinding",
"=",
"this",
".",
"binding",
".",
"getPackage",
"(",
")",
";",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"packageBinding",
"!=",
"null",
"&&",
"packageBinding",
".",
"compoundName",
"!=",
"CharOperation",
".",
"NO_CHAR_CHAR",
")",
"{",
"buffer",
".",
"append",
"(",
"CharOperation",
".",
"concatWith",
"(",
"packageBinding",
".",
"compoundName",
",",
"'.'",
")",
")",
".",
"append",
"(",
"'.'",
")",
";",
"}",
"buffer",
".",
"append",
"(",
"getName",
"(",
")",
")",
";",
"return",
"String",
".",
"valueOf",
"(",
"buffer",
")",
";",
"}",
"}",
"public",
"synchronized",
"ITypeBinding",
"getSuperclass",
"(",
")",
"{",
"if",
"(",
"this",
".",
"binding",
"==",
"null",
")",
"return",
"null",
";",
"switch",
"(",
"this",
".",
"binding",
".",
"kind",
"(",
")",
")",
"{",
"case",
"Binding",
".",
"ARRAY_TYPE",
":",
"case",
"Binding",
".",
"BASE_TYPE",
":",
"return",
"null",
";",
"default",
":",
"if",
"(",
"this",
".",
"binding",
".",
"isInterface",
"(",
")",
")",
"return",
"null",
";",
"}",
"ReferenceBinding",
"superclass",
"=",
"null",
";",
"try",
"{",
"superclass",
"=",
"(",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
")",
".",
"superclass",
"(",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"log",
"(",
"e",
",",
"\"\"",
")",
";",
"return",
"this",
".",
"resolver",
".",
"resolveWellKnownType",
"(",
"\"\"",
")",
";",
"}",
"if",
"(",
"superclass",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"superclass",
")",
";",
"}",
"public",
"ITypeBinding",
"[",
"]",
"getTypeArguments",
"(",
")",
"{",
"if",
"(",
"this",
".",
"typeArguments",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"typeArguments",
";",
"}",
"if",
"(",
"this",
".",
"binding",
".",
"isParameterizedTypeWithActualArguments",
"(",
")",
")",
"{",
"ParameterizedTypeBinding",
"parameterizedTypeBinding",
"=",
"(",
"ParameterizedTypeBinding",
")",
"this",
".",
"binding",
";",
"final",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"[",
"]",
"arguments",
"=",
"parameterizedTypeBinding",
".",
"arguments",
";",
"int",
"argumentsLength",
"=",
"arguments",
".",
"length",
";",
"ITypeBinding",
"[",
"]",
"newTypeArguments",
"=",
"new",
"ITypeBinding",
"[",
"argumentsLength",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"argumentsLength",
";",
"i",
"++",
")",
"{",
"ITypeBinding",
"typeBinding",
"=",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"arguments",
"[",
"i",
"]",
")",
";",
"if",
"(",
"typeBinding",
"==",
"null",
")",
"{",
"return",
"this",
".",
"typeArguments",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"newTypeArguments",
"[",
"i",
"]",
"=",
"typeBinding",
";",
"}",
"return",
"this",
".",
"typeArguments",
"=",
"newTypeArguments",
";",
"}",
"return",
"this",
".",
"typeArguments",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"public",
"ITypeBinding",
"[",
"]",
"getTypeBounds",
"(",
")",
"{",
"if",
"(",
"this",
".",
"bounds",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"bounds",
";",
"}",
"if",
"(",
"this",
".",
"binding",
"instanceof",
"TypeVariableBinding",
")",
"{",
"TypeVariableBinding",
"typeVariableBinding",
"=",
"(",
"TypeVariableBinding",
")",
"this",
".",
"binding",
";",
"ReferenceBinding",
"varSuperclass",
"=",
"typeVariableBinding",
".",
"superclass",
"(",
")",
";",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"firstClassOrArrayBound",
"=",
"typeVariableBinding",
".",
"firstBound",
";",
"int",
"boundsLength",
"=",
"0",
";",
"if",
"(",
"firstClassOrArrayBound",
"!=",
"null",
")",
"{",
"if",
"(",
"firstClassOrArrayBound",
"==",
"varSuperclass",
")",
"{",
"boundsLength",
"++",
";",
"}",
"else",
"if",
"(",
"firstClassOrArrayBound",
".",
"isArrayType",
"(",
")",
")",
"{",
"boundsLength",
"++",
";",
"}",
"else",
"{",
"firstClassOrArrayBound",
"=",
"null",
";",
"}",
"}",
"ReferenceBinding",
"[",
"]",
"superinterfaces",
"=",
"typeVariableBinding",
".",
"superInterfaces",
"(",
")",
";",
"int",
"superinterfacesLength",
"=",
"0",
";",
"if",
"(",
"superinterfaces",
"!=",
"null",
")",
"{",
"superinterfacesLength",
"=",
"superinterfaces",
".",
"length",
";",
"boundsLength",
"+=",
"superinterfacesLength",
";",
"}",
"if",
"(",
"boundsLength",
"!=",
"0",
")",
"{",
"ITypeBinding",
"[",
"]",
"typeBounds",
"=",
"new",
"ITypeBinding",
"[",
"boundsLength",
"]",
";",
"int",
"boundsIndex",
"=",
"0",
";",
"if",
"(",
"firstClassOrArrayBound",
"!=",
"null",
")",
"{",
"ITypeBinding",
"typeBinding",
"=",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"firstClassOrArrayBound",
")",
";",
"if",
"(",
"typeBinding",
"==",
"null",
")",
"{",
"return",
"this",
".",
"bounds",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"typeBounds",
"[",
"boundsIndex",
"++",
"]",
"=",
"typeBinding",
";",
"}",
"if",
"(",
"superinterfaces",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"superinterfacesLength",
";",
"i",
"++",
",",
"boundsIndex",
"++",
")",
"{",
"ITypeBinding",
"typeBinding",
"=",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"superinterfaces",
"[",
"i",
"]",
")",
";",
"if",
"(",
"typeBinding",
"==",
"null",
")",
"{",
"return",
"this",
".",
"bounds",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"typeBounds",
"[",
"boundsIndex",
"]",
"=",
"typeBinding",
";",
"}",
"}",
"return",
"this",
".",
"bounds",
"=",
"typeBounds",
";",
"}",
"}",
"return",
"this",
".",
"bounds",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"public",
"ITypeBinding",
"[",
"]",
"getTypeParameters",
"(",
")",
"{",
"if",
"(",
"this",
".",
"typeParameters",
"!=",
"null",
")",
"{",
"return",
"this",
".",
"typeParameters",
";",
"}",
"switch",
"(",
"this",
".",
"binding",
".",
"kind",
"(",
")",
")",
"{",
"case",
"Binding",
".",
"RAW_TYPE",
":",
"case",
"Binding",
".",
"PARAMETERIZED_TYPE",
":",
"return",
"this",
".",
"typeParameters",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"TypeVariableBinding",
"[",
"]",
"typeVariableBindings",
"=",
"this",
".",
"binding",
".",
"typeVariables",
"(",
")",
";",
"int",
"typeVariableBindingsLength",
"=",
"typeVariableBindings",
"==",
"null",
"?",
"0",
":",
"typeVariableBindings",
".",
"length",
";",
"if",
"(",
"typeVariableBindingsLength",
"!=",
"0",
")",
"{",
"ITypeBinding",
"[",
"]",
"newTypeParameters",
"=",
"new",
"ITypeBinding",
"[",
"typeVariableBindingsLength",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"typeVariableBindingsLength",
";",
"i",
"++",
")",
"{",
"ITypeBinding",
"typeBinding",
"=",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"typeVariableBindings",
"[",
"i",
"]",
")",
";",
"if",
"(",
"typeBinding",
"==",
"null",
")",
"{",
"return",
"this",
".",
"typeParameters",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"newTypeParameters",
"[",
"i",
"]",
"=",
"typeBinding",
";",
"}",
"return",
"this",
".",
"typeParameters",
"=",
"newTypeParameters",
";",
"}",
"return",
"this",
".",
"typeParameters",
"=",
"NO_TYPE_BINDINGS",
";",
"}",
"public",
"ITypeBinding",
"getWildcard",
"(",
")",
"{",
"if",
"(",
"this",
".",
"binding",
"instanceof",
"CaptureBinding",
")",
"{",
"CaptureBinding",
"captureBinding",
"=",
"(",
"CaptureBinding",
")",
"this",
".",
"binding",
";",
"return",
"this",
".",
"resolver",
".",
"getTypeBinding",
"(",
"captureBinding",
".",
"wildcard",
")",
";",
"}",
"return",
"null",
";",
"}",
"public",
"boolean",
"isGenericType",
"(",
")",
"{",
"if",
"(",
"isRawType",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"TypeVariableBinding",
"[",
"]",
"typeVariableBindings",
"=",
"this",
".",
"binding",
".",
"typeVariables",
"(",
")",
";",
"return",
"(",
"typeVariableBindings",
"!=",
"null",
"&&",
"typeVariableBindings",
".",
"length",
">",
"0",
")",
";",
"}",
"public",
"boolean",
"isAnnotation",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"isAnnotationType",
"(",
")",
";",
"}",
"public",
"boolean",
"isAnonymous",
"(",
")",
"{",
"if",
"(",
"isClass",
"(",
")",
"||",
"isInterface",
"(",
")",
"||",
"isEnum",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"return",
"referenceBinding",
".",
"isAnonymousType",
"(",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"isArray",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"isArrayType",
"(",
")",
";",
"}",
"public",
"boolean",
"isAssignmentCompatible",
"(",
"ITypeBinding",
"type",
")",
"{",
"try",
"{",
"if",
"(",
"this",
"==",
"type",
")",
"return",
"true",
";",
"if",
"(",
"!",
"(",
"type",
"instanceof",
"TypeBinding",
")",
")",
"return",
"false",
";",
"TypeBinding",
"other",
"=",
"(",
"TypeBinding",
")",
"type",
";",
"Scope",
"scope",
"=",
"this",
".",
"resolver",
".",
"scope",
"(",
")",
";",
"if",
"(",
"scope",
"==",
"null",
")",
"return",
"false",
";",
"return",
"this",
".",
"binding",
".",
"isCompatibleWith",
"(",
"other",
".",
"binding",
")",
"||",
"scope",
".",
"isBoxingCompatibleWith",
"(",
"this",
".",
"binding",
",",
"other",
".",
"binding",
")",
";",
"}",
"catch",
"(",
"AbortCompilation",
"e",
")",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"boolean",
"isCapture",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"isCapture",
"(",
")",
";",
"}",
"public",
"boolean",
"isCastCompatible",
"(",
"ITypeBinding",
"type",
")",
"{",
"try",
"{",
"Scope",
"scope",
"=",
"this",
".",
"resolver",
".",
"scope",
"(",
")",
";",
"if",
"(",
"scope",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"!",
"(",
"type",
"instanceof",
"TypeBinding",
")",
")",
"return",
"false",
";",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"expressionType",
"=",
"(",
"(",
"TypeBinding",
")",
"type",
")",
".",
"binding",
";",
"expressionType",
"=",
"expressionType",
".",
"capture",
"(",
"scope",
",",
"0",
")",
";",
"return",
"TypeBinding",
".",
"EXPRESSION",
".",
"checkCastTypesCompatibility",
"(",
"scope",
",",
"this",
".",
"binding",
",",
"expressionType",
",",
"null",
")",
";",
"}",
"catch",
"(",
"AbortCompilation",
"e",
")",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"boolean",
"isClass",
"(",
")",
"{",
"switch",
"(",
"this",
".",
"binding",
".",
"kind",
"(",
")",
")",
"{",
"case",
"Binding",
".",
"TYPE_PARAMETER",
":",
"case",
"Binding",
".",
"WILDCARD_TYPE",
":",
"case",
"Binding",
".",
"INTERSECTION_TYPE",
":",
"return",
"false",
";",
"}",
"return",
"this",
".",
"binding",
".",
"isClass",
"(",
")",
";",
"}",
"public",
"boolean",
"isDeprecated",
"(",
")",
"{",
"if",
"(",
"isClass",
"(",
")",
"||",
"isInterface",
"(",
")",
"||",
"isEnum",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"return",
"referenceBinding",
".",
"isDeprecated",
"(",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"isEnum",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"isEnum",
"(",
")",
";",
"}",
"public",
"boolean",
"isEqualTo",
"(",
"IBinding",
"other",
")",
"{",
"if",
"(",
"other",
"==",
"this",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"other",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"(",
"other",
"instanceof",
"TypeBinding",
")",
")",
"{",
"return",
"false",
";",
"}",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"otherBinding",
"=",
"(",
"(",
"TypeBinding",
")",
"other",
")",
".",
"binding",
";",
"return",
"BindingComparator",
".",
"isEqual",
"(",
"this",
".",
"binding",
",",
"otherBinding",
")",
";",
"}",
"public",
"boolean",
"isFromSource",
"(",
")",
"{",
"if",
"(",
"isClass",
"(",
")",
"||",
"isInterface",
"(",
")",
"||",
"isEnum",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"if",
"(",
"referenceBinding",
".",
"isRawType",
"(",
")",
")",
"{",
"return",
"!",
"(",
"(",
"RawTypeBinding",
")",
"referenceBinding",
")",
".",
"genericType",
"(",
")",
".",
"isBinaryBinding",
"(",
")",
";",
"}",
"else",
"if",
"(",
"referenceBinding",
".",
"isParameterizedType",
"(",
")",
")",
"{",
"ParameterizedTypeBinding",
"parameterizedTypeBinding",
"=",
"(",
"ParameterizedTypeBinding",
")",
"referenceBinding",
";",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"erasure",
"=",
"parameterizedTypeBinding",
".",
"erasure",
"(",
")",
";",
"if",
"(",
"erasure",
"instanceof",
"ReferenceBinding",
")",
"{",
"return",
"!",
"(",
"(",
"ReferenceBinding",
")",
"erasure",
")",
".",
"isBinaryBinding",
"(",
")",
";",
"}",
"return",
"false",
";",
"}",
"else",
"{",
"return",
"!",
"referenceBinding",
".",
"isBinaryBinding",
"(",
")",
";",
"}",
"}",
"else",
"if",
"(",
"isTypeVariable",
"(",
")",
")",
"{",
"final",
"TypeVariableBinding",
"typeVariableBinding",
"=",
"(",
"TypeVariableBinding",
")",
"this",
".",
"binding",
";",
"final",
"Binding",
"declaringElement",
"=",
"typeVariableBinding",
".",
"declaringElement",
";",
"if",
"(",
"declaringElement",
"instanceof",
"MethodBinding",
")",
"{",
"MethodBinding",
"methodBinding",
"=",
"(",
"MethodBinding",
")",
"declaringElement",
";",
"return",
"!",
"methodBinding",
".",
"declaringClass",
".",
"isBinaryBinding",
"(",
")",
";",
"}",
"else",
"{",
"final",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"typeBinding",
"=",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
")",
"declaringElement",
";",
"if",
"(",
"typeBinding",
"instanceof",
"ReferenceBinding",
")",
"{",
"return",
"!",
"(",
"(",
"ReferenceBinding",
")",
"typeBinding",
")",
".",
"isBinaryBinding",
"(",
")",
";",
"}",
"else",
"if",
"(",
"typeBinding",
"instanceof",
"ArrayBinding",
")",
"{",
"final",
"ArrayBinding",
"arrayBinding",
"=",
"(",
"ArrayBinding",
")",
"typeBinding",
";",
"final",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
"leafComponentType",
"=",
"arrayBinding",
".",
"leafComponentType",
";",
"if",
"(",
"leafComponentType",
"instanceof",
"ReferenceBinding",
")",
"{",
"return",
"!",
"(",
"(",
"ReferenceBinding",
")",
"leafComponentType",
")",
".",
"isBinaryBinding",
"(",
")",
";",
"}",
"}",
"}",
"}",
"else",
"if",
"(",
"isCapture",
"(",
")",
")",
"{",
"CaptureBinding",
"captureBinding",
"=",
"(",
"CaptureBinding",
")",
"this",
".",
"binding",
";",
"return",
"!",
"captureBinding",
".",
"sourceType",
".",
"isBinaryBinding",
"(",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"isInterface",
"(",
")",
"{",
"switch",
"(",
"this",
".",
"binding",
".",
"kind",
"(",
")",
")",
"{",
"case",
"Binding",
".",
"TYPE_PARAMETER",
":",
"case",
"Binding",
".",
"WILDCARD_TYPE",
":",
"case",
"Binding",
".",
"INTERSECTION_TYPE",
":",
"return",
"false",
";",
"}",
"return",
"this",
".",
"binding",
".",
"isInterface",
"(",
")",
";",
"}",
"public",
"boolean",
"isLocal",
"(",
")",
"{",
"if",
"(",
"isClass",
"(",
")",
"||",
"isInterface",
"(",
")",
"||",
"isEnum",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"return",
"referenceBinding",
".",
"isLocalType",
"(",
")",
"&&",
"!",
"referenceBinding",
".",
"isMemberType",
"(",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"isMember",
"(",
")",
"{",
"if",
"(",
"isClass",
"(",
")",
"||",
"isInterface",
"(",
")",
"||",
"isEnum",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"return",
"referenceBinding",
".",
"isMemberType",
"(",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"isNested",
"(",
")",
"{",
"if",
"(",
"isClass",
"(",
")",
"||",
"isInterface",
"(",
")",
"||",
"isEnum",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"return",
"referenceBinding",
".",
"isNestedType",
"(",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"isNullType",
"(",
")",
"{",
"return",
"this",
".",
"binding",
"==",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeBinding",
".",
"NULL",
";",
"}",
"public",
"boolean",
"isParameterizedType",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"isParameterizedTypeWithActualArguments",
"(",
")",
";",
"}",
"public",
"boolean",
"isPrimitive",
"(",
")",
"{",
"return",
"!",
"isNullType",
"(",
")",
"&&",
"this",
".",
"binding",
".",
"isBaseType",
"(",
")",
";",
"}",
"public",
"boolean",
"isRawType",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"isRawType",
"(",
")",
";",
"}",
"public",
"boolean",
"isRecovered",
"(",
")",
"{",
"return",
"(",
"this",
".",
"binding",
".",
"tagBits",
"&",
"TagBits",
".",
"HasMissingType",
")",
"!=",
"0",
";",
"}",
"public",
"boolean",
"isSubTypeCompatible",
"(",
"ITypeBinding",
"type",
")",
"{",
"try",
"{",
"if",
"(",
"this",
"==",
"type",
")",
"return",
"true",
";",
"if",
"(",
"this",
".",
"binding",
".",
"isBaseType",
"(",
")",
")",
"return",
"false",
";",
"if",
"(",
"!",
"(",
"type",
"instanceof",
"TypeBinding",
")",
")",
"return",
"false",
";",
"TypeBinding",
"other",
"=",
"(",
"TypeBinding",
")",
"type",
";",
"if",
"(",
"other",
".",
"binding",
".",
"isBaseType",
"(",
")",
")",
"return",
"false",
";",
"return",
"this",
".",
"binding",
".",
"isCompatibleWith",
"(",
"other",
".",
"binding",
")",
";",
"}",
"catch",
"(",
"AbortCompilation",
"e",
")",
"{",
"return",
"false",
";",
"}",
"}",
"public",
"boolean",
"isSynthetic",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"isTopLevel",
"(",
")",
"{",
"if",
"(",
"isClass",
"(",
")",
"||",
"isInterface",
"(",
")",
"||",
"isEnum",
"(",
")",
")",
"{",
"ReferenceBinding",
"referenceBinding",
"=",
"(",
"ReferenceBinding",
")",
"this",
".",
"binding",
";",
"return",
"!",
"referenceBinding",
".",
"isNestedType",
"(",
")",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"isTypeVariable",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"isTypeVariable",
"(",
")",
"&&",
"!",
"this",
".",
"binding",
".",
"isCapture",
"(",
")",
";",
"}",
"public",
"boolean",
"isUpperbound",
"(",
")",
"{",
"switch",
"(",
"this",
".",
"binding",
".",
"kind",
"(",
")",
")",
"{",
"case",
"Binding",
".",
"WILDCARD_TYPE",
":",
"return",
"(",
"(",
"WildcardBinding",
")",
"this",
".",
"binding",
")",
".",
"boundKind",
"==",
"Wildcard",
".",
"EXTENDS",
";",
"case",
"Binding",
".",
"INTERSECTION_TYPE",
":",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}",
"public",
"boolean",
"isWildcardType",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"isWildcard",
"(",
")",
";",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,389 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"Arrays",
";",
"import",
"java",
".",
"util",
".",
"Collections",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"java",
".",
"util",
".",
"Map",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ITypeRoot",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"IProblem",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"parser",
".",
"Scanner",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"import",
"org",
".",
"eclipse",
".",
"jface",
".",
"text",
".",
"IDocument",
";",
"import",
"org",
".",
"eclipse",
".",
"text",
".",
"edits",
".",
"TextEdit",
";",
"public",
"class",
"CompilationUnit",
"extends",
"ASTNode",
"{",
"private",
"static",
"final",
"Message",
"[",
"]",
"EMPTY_MESSAGES",
"=",
"new",
"Message",
"[",
"0",
"]",
";",
"private",
"static",
"final",
"IProblem",
"[",
"]",
"EMPTY_PROBLEMS",
"=",
"new",
"IProblem",
"[",
"0",
"]",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"IMPORTS_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"CompilationUnit",
".",
"class",
",",
"\"imports\"",
",",
"ImportDeclaration",
".",
"class",
",",
"NO_CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"PACKAGE_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"CompilationUnit",
".",
"class",
",",
"\"package\"",
",",
"PackageDeclaration",
".",
"class",
",",
"OPTIONAL",
",",
"NO_CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"TYPES_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"CompilationUnit",
".",
"class",
",",
"\"types\"",
",",
"AbstractTypeDeclaration",
".",
"class",
",",
"CYCLE_RISK",
")",
";",
"static",
"{",
"List",
"properyList",
"=",
"new",
"ArrayList",
"(",
"4",
")",
";",
"createPropertyList",
"(",
"CompilationUnit",
".",
"class",
",",
"properyList",
")",
";",
"addProperty",
"(",
"PACKAGE_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"IMPORTS_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"TYPES_PROPERTY",
",",
"properyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"properyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"DefaultCommentMapper",
"commentMapper",
"=",
"null",
";",
"private",
"ITypeRoot",
"typeRoot",
"=",
"null",
";",
"private",
"ASTNode",
".",
"NodeList",
"imports",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"IMPORTS_PROPERTY",
")",
";",
"private",
"int",
"[",
"]",
"lineEndTable",
"=",
"Util",
".",
"EMPTY_INT_ARRAY",
";",
"private",
"Message",
"[",
"]",
"messages",
";",
"private",
"List",
"optionalCommentList",
"=",
"null",
";",
"Comment",
"[",
"]",
"optionalCommentTable",
"=",
"null",
";",
"private",
"PackageDeclaration",
"optionalPackageDeclaration",
"=",
"null",
";",
"private",
"IProblem",
"[",
"]",
"problems",
"=",
"EMPTY_PROBLEMS",
";",
"private",
"Object",
"statementsRecoveryData",
";",
"private",
"ASTNode",
".",
"NodeList",
"types",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"TYPES_PROPERTY",
")",
";",
"protected",
"CompilationUnit",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"}",
"protected",
"void",
"accept0",
"(",
"ASTVisitor",
"visitor",
")",
"{",
"boolean",
"visitChildren",
"=",
"visitor",
".",
"visit",
"(",
"this",
")",
";",
"if",
"(",
"visitChildren",
")",
"{",
"acceptChild",
"(",
"visitor",
",",
"getPackage",
"(",
")",
")",
";",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"imports",
")",
";",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"types",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"CompilationUnit",
"result",
"=",
"new",
"CompilationUnit",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"setPackage",
"(",
"(",
"PackageDeclaration",
")",
"ASTNode",
".",
"copySubtree",
"(",
"target",
",",
"getPackage",
"(",
")",
")",
")",
";",
"result",
".",
"imports",
"(",
")",
".",
"addAll",
"(",
"ASTNode",
".",
"copySubtrees",
"(",
"target",
",",
"imports",
"(",
")",
")",
")",
";",
"result",
".",
"types",
"(",
")",
".",
"addAll",
"(",
"ASTNode",
".",
"copySubtrees",
"(",
"target",
",",
"types",
"(",
")",
")",
")",
";",
"return",
"result",
";",
"}",
"public",
"int",
"getColumnNumber",
"(",
"final",
"int",
"position",
")",
"{",
"if",
"(",
"this",
".",
"lineEndTable",
"==",
"null",
")",
"return",
"-",
"2",
";",
"final",
"int",
"line",
"=",
"getLineNumber",
"(",
"position",
")",
";",
"if",
"(",
"line",
"==",
"-",
"1",
")",
"{",
"return",
"-",
"1",
";",
"}",
"if",
"(",
"line",
"==",
"1",
")",
"{",
"if",
"(",
"position",
">=",
"getStartPosition",
"(",
")",
"+",
"getLength",
"(",
")",
")",
"return",
"-",
"1",
";",
"return",
"position",
";",
"}",
"int",
"length",
"=",
"this",
".",
"lineEndTable",
".",
"length",
";",
"final",
"int",
"previousLineOffset",
"=",
"this",
".",
"lineEndTable",
"[",
"line",
"-",
"2",
"]",
";",
"final",
"int",
"offsetForLine",
"=",
"previousLineOffset",
"+",
"1",
";",
"final",
"int",
"currentLineEnd",
"=",
"line",
"==",
"length",
"+",
"1",
"?",
"getStartPosition",
"(",
")",
"+",
"getLength",
"(",
")",
"-",
"1",
":",
"this",
".",
"lineEndTable",
"[",
"line",
"-",
"1",
"]",
";",
"if",
"(",
"offsetForLine",
">",
"currentLineEnd",
")",
"{",
"return",
"-",
"1",
";",
"}",
"else",
"{",
"return",
"position",
"-",
"offsetForLine",
";",
"}",
"}",
"public",
"ASTNode",
"findDeclaringNode",
"(",
"IBinding",
"binding",
")",
"{",
"return",
"this",
".",
"ast",
".",
"getBindingResolver",
"(",
")",
".",
"findDeclaringNode",
"(",
"binding",
")",
";",
"}",
"public",
"ASTNode",
"findDeclaringNode",
"(",
"String",
"key",
")",
"{",
"return",
"this",
".",
"ast",
".",
"getBindingResolver",
"(",
")",
".",
"findDeclaringNode",
"(",
"key",
")",
";",
"}",
"public",
"List",
"getCommentList",
"(",
")",
"{",
"return",
"this",
".",
"optionalCommentList",
";",
"}",
"DefaultCommentMapper",
"getCommentMapper",
"(",
")",
"{",
"return",
"this",
".",
"commentMapper",
";",
"}",
"public",
"int",
"getExtendedLength",
"(",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"commentMapper",
"==",
"null",
"||",
"node",
".",
"getAST",
"(",
")",
"!=",
"getAST",
"(",
")",
")",
"{",
"return",
"node",
".",
"getLength",
"(",
")",
";",
"}",
"else",
"{",
"return",
"this",
".",
"commentMapper",
".",
"getExtendedLength",
"(",
"node",
")",
";",
"}",
"}",
"public",
"int",
"getExtendedStartPosition",
"(",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"commentMapper",
"==",
"null",
"||",
"node",
".",
"getAST",
"(",
")",
"!=",
"getAST",
"(",
")",
")",
"{",
"return",
"node",
".",
"getStartPosition",
"(",
")",
";",
"}",
"else",
"{",
"return",
"this",
".",
"commentMapper",
".",
"getExtendedStartPosition",
"(",
"node",
")",
";",
"}",
"}",
"public",
"IJavaElement",
"getJavaElement",
"(",
")",
"{",
"return",
"this",
".",
"typeRoot",
";",
"}",
"public",
"Message",
"[",
"]",
"getMessages",
"(",
")",
"{",
"if",
"(",
"this",
".",
"messages",
"==",
"null",
")",
"{",
"int",
"problemLength",
"=",
"this",
".",
"problems",
".",
"length",
";",
"if",
"(",
"problemLength",
"==",
"0",
")",
"{",
"this",
".",
"messages",
"=",
"EMPTY_MESSAGES",
";",
"}",
"else",
"{",
"this",
".",
"messages",
"=",
"new",
"Message",
"[",
"problemLength",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"problemLength",
";",
"i",
"++",
")",
"{",
"IProblem",
"problem",
"=",
"this",
".",
"problems",
"[",
"i",
"]",
";",
"int",
"start",
"=",
"problem",
".",
"getSourceStart",
"(",
")",
";",
"int",
"end",
"=",
"problem",
".",
"getSourceEnd",
"(",
")",
";",
"this",
".",
"messages",
"[",
"i",
"]",
"=",
"new",
"Message",
"(",
"problem",
".",
"getMessage",
"(",
")",
",",
"start",
",",
"end",
"-",
"start",
"+",
"1",
")",
";",
"}",
"}",
"}",
"return",
"this",
".",
"messages",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"COMPILATION_UNIT",
";",
"}",
"public",
"PackageDeclaration",
"getPackage",
"(",
")",
"{",
"return",
"this",
".",
"optionalPackageDeclaration",
";",
"}",
"public",
"int",
"getPosition",
"(",
"int",
"line",
",",
"int",
"column",
")",
"{",
"if",
"(",
"this",
".",
"lineEndTable",
"==",
"null",
")",
"return",
"-",
"2",
";",
"if",
"(",
"line",
"<",
"1",
"||",
"column",
"<",
"0",
")",
"return",
"-",
"1",
";",
"int",
"length",
";",
"if",
"(",
"(",
"length",
"=",
"this",
".",
"lineEndTable",
".",
"length",
")",
"==",
"0",
")",
"{",
"if",
"(",
"line",
"!=",
"1",
")",
"return",
"-",
"1",
";",
"return",
"column",
">=",
"getStartPosition",
"(",
")",
"+",
"getLength",
"(",
")",
"?",
"-",
"1",
":",
"column",
";",
"}",
"if",
"(",
"line",
"==",
"1",
")",
"{",
"final",
"int",
"endOfLine",
"=",
"this",
".",
"lineEndTable",
"[",
"0",
"]",
";",
"return",
"column",
">",
"endOfLine",
"?",
"-",
"1",
":",
"column",
";",
"}",
"else",
"if",
"(",
"line",
">",
"length",
"+",
"1",
")",
"{",
"return",
"-",
"1",
";",
"}",
"final",
"int",
"previousLineOffset",
"=",
"this",
".",
"lineEndTable",
"[",
"line",
"-",
"2",
"]",
";",
"final",
"int",
"offsetForLine",
"=",
"previousLineOffset",
"+",
"1",
";",
"final",
"int",
"currentLineEnd",
"=",
"line",
"==",
"length",
"+",
"1",
"?",
"getStartPosition",
"(",
")",
"+",
"getLength",
"(",
")",
"-",
"1",
":",
"this",
".",
"lineEndTable",
"[",
"line",
"-",
"1",
"]",
";",
"if",
"(",
"(",
"offsetForLine",
"+",
"column",
")",
">",
"currentLineEnd",
")",
"{",
"return",
"-",
"1",
";",
"}",
"else",
"{",
"return",
"offsetForLine",
"+",
"column",
";",
"}",
"}",
"public",
"IProblem",
"[",
"]",
"getProblems",
"(",
")",
"{",
"return",
"this",
".",
"problems",
";",
"}",
"public",
"Object",
"getStatementsRecoveryData",
"(",
")",
"{",
"return",
"this",
".",
"statementsRecoveryData",
";",
"}",
"public",
"ITypeRoot",
"getTypeRoot",
"(",
")",
"{",
"return",
"this",
".",
"typeRoot",
";",
"}",
"public",
"List",
"imports",
"(",
")",
"{",
"return",
"this",
".",
"imports",
";",
"}",
"public",
"int",
"firstLeadingCommentIndex",
"(",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"commentMapper",
"==",
"null",
"||",
"node",
".",
"getAST",
"(",
")",
"!=",
"getAST",
"(",
")",
")",
"{",
"return",
"-",
"1",
";",
"}",
"return",
"this",
".",
"commentMapper",
".",
"firstLeadingCommentIndex",
"(",
"node",
")",
";",
"}",
"public",
"int",
"lastTrailingCommentIndex",
"(",
"ASTNode",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"if",
"(",
"this",
".",
"commentMapper",
"==",
"null",
"||",
"node",
".",
"getAST",
"(",
")",
"!=",
"getAST",
"(",
")",
")",
"{",
"return",
"-",
"1",
";",
"}",
"return",
"this",
".",
"commentMapper",
".",
"lastTrailingCommentIndex",
"(",
"node",
")",
";",
"}",
"void",
"initCommentMapper",
"(",
"Scanner",
"scanner",
")",
"{",
"this",
".",
"commentMapper",
"=",
"new",
"DefaultCommentMapper",
"(",
"this",
".",
"optionalCommentTable",
")",
";",
"this",
".",
"commentMapper",
".",
"initialize",
"(",
"this",
",",
"scanner",
")",
";",
"}",
"final",
"List",
"internalGetChildListProperty",
"(",
"ChildListPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"property",
"==",
"IMPORTS_PROPERTY",
")",
"{",
"return",
"imports",
"(",
")",
";",
"}",
"if",
"(",
"property",
"==",
"TYPES_PROPERTY",
")",
"{",
"return",
"types",
"(",
")",
";",
"}",
"return",
"super",
".",
"internalGetChildListProperty",
"(",
"property",
")",
";",
"}",
"final",
"ASTNode",
"internalGetSetChildProperty",
"(",
"ChildPropertyDescriptor",
"property",
",",
"boolean",
"get",
",",
"ASTNode",
"child",
")",
"{",
"if",
"(",
"property",
"==",
"PACKAGE_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getPackage",
"(",
")",
";",
"}",
"else",
"{",
"setPackage",
"(",
"(",
"PackageDeclaration",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"return",
"super",
".",
"internalGetSetChildProperty",
"(",
"property",
",",
"get",
",",
"child",
")",
";",
"}",
"final",
"List",
"internalStructuralPropertiesForType",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"propertyDescriptors",
"(",
"apiLevel",
")",
";",
"}",
"public",
"int",
"lineNumber",
"(",
"int",
"position",
")",
"{",
"int",
"lineNumber",
"=",
"getLineNumber",
"(",
"position",
")",
";",
"return",
"lineNumber",
"<",
"1",
"?",
"1",
":",
"lineNumber",
";",
"}",
"public",
"int",
"getLineNumber",
"(",
"int",
"position",
")",
"{",
"if",
"(",
"this",
".",
"lineEndTable",
"==",
"null",
")",
"return",
"-",
"2",
";",
"int",
"length",
";",
"if",
"(",
"(",
"length",
"=",
"this",
".",
"lineEndTable",
".",
"length",
")",
"==",
"0",
")",
"{",
"if",
"(",
"position",
">=",
"getStartPosition",
"(",
")",
"+",
"getLength",
"(",
")",
")",
"{",
"return",
"-",
"1",
";",
"}",
"return",
"1",
";",
"}",
"int",
"low",
"=",
"0",
";",
"if",
"(",
"position",
"<",
"0",
")",
"{",
"return",
"-",
"1",
";",
"}",
"if",
"(",
"position",
"<=",
"this",
".",
"lineEndTable",
"[",
"low",
"]",
")",
"{",
"return",
"1",
";",
"}",
"int",
"hi",
"=",
"length",
"-",
"1",
";",
"if",
"(",
"position",
">",
"this",
".",
"lineEndTable",
"[",
"hi",
"]",
")",
"{",
"if",
"(",
"position",
">=",
"getStartPosition",
"(",
")",
"+",
"getLength",
"(",
")",
")",
"{",
"return",
"-",
"1",
";",
"}",
"else",
"{",
"return",
"length",
"+",
"1",
";",
"}",
"}",
"while",
"(",
"true",
")",
"{",
"if",
"(",
"low",
"+",
"1",
"==",
"hi",
")",
"{",
"return",
"low",
"+",
"2",
";",
"}",
"int",
"mid",
"=",
"low",
"+",
"(",
"hi",
"-",
"low",
")",
"/",
"2",
";",
"if",
"(",
"position",
"<=",
"this",
".",
"lineEndTable",
"[",
"mid",
"]",
")",
"{",
"hi",
"=",
"mid",
";",
"}",
"else",
"{",
"low",
"=",
"mid",
";",
"}",
"}",
"}",
"int",
"memSize",
"(",
")",
"{",
"int",
"size",
"=",
"BASE_NODE_SIZE",
"+",
"8",
"*",
"4",
";",
"if",
"(",
"this",
".",
"lineEndTable",
"!=",
"null",
")",
"{",
"size",
"+=",
"HEADERS",
"+",
"4",
"*",
"this",
".",
"lineEndTable",
".",
"length",
";",
"}",
"if",
"(",
"this",
".",
"optionalCommentTable",
"!=",
"null",
")",
"{",
"size",
"+=",
"HEADERS",
"+",
"4",
"*",
"this",
".",
"optionalCommentTable",
".",
"length",
";",
"}",
"return",
"size",
";",
"}",
"public",
"void",
"recordModifications",
"(",
")",
"{",
"getAST",
"(",
")",
".",
"recordModifications",
"(",
"this",
")",
";",
"}",
"public",
"TextEdit",
"rewrite",
"(",
"IDocument",
"document",
",",
"Map",
"options",
")",
"{",
"return",
"getAST",
"(",
")",
".",
"rewrite",
"(",
"document",
",",
"options",
")",
";",
"}",
"void",
"setCommentTable",
"(",
"Comment",
"[",
"]",
"commentTable",
")",
"{",
"if",
"(",
"commentTable",
"==",
"null",
")",
"{",
"this",
".",
"optionalCommentList",
"=",
"null",
";",
"this",
".",
"optionalCommentTable",
"=",
"null",
";",
"}",
"else",
"{",
"int",
"nextAvailablePosition",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"commentTable",
".",
"length",
";",
"i",
"++",
")",
"{",
"Comment",
"comment",
"=",
"commentTable",
"[",
"i",
"]",
";",
"if",
"(",
"comment",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"int",
"start",
"=",
"comment",
".",
"getStartPosition",
"(",
")",
";",
"int",
"length",
"=",
"comment",
".",
"getLength",
"(",
")",
";",
"if",
"(",
"start",
"<",
"0",
"||",
"length",
"<",
"0",
"||",
"start",
"<",
"nextAvailablePosition",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"nextAvailablePosition",
"=",
"comment",
".",
"getStartPosition",
"(",
")",
"+",
"comment",
".",
"getLength",
"(",
")",
";",
"}",
"this",
".",
"optionalCommentTable",
"=",
"commentTable",
";",
"List",
"commentList",
"=",
"Arrays",
".",
"asList",
"(",
"commentTable",
")",
";",
"this",
".",
"optionalCommentList",
"=",
"Collections",
".",
"unmodifiableList",
"(",
"commentList",
")",
";",
"}",
"}",
"void",
"setTypeRoot",
"(",
"ITypeRoot",
"typeRoot",
")",
"{",
"this",
".",
"typeRoot",
"=",
"typeRoot",
";",
"}",
"void",
"setLineEndTable",
"(",
"int",
"[",
"]",
"lineEndTable",
")",
"{",
"if",
"(",
"lineEndTable",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"checkModifiable",
"(",
")",
";",
"this",
".",
"lineEndTable",
"=",
"lineEndTable",
";",
"}",
"public",
"void",
"setPackage",
"(",
"PackageDeclaration",
"pkgDecl",
")",
"{",
"ASTNode",
"oldChild",
"=",
"this",
".",
"optionalPackageDeclaration",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"pkgDecl",
",",
"PACKAGE_PROPERTY",
")",
";",
"this",
".",
"optionalPackageDeclaration",
"=",
"pkgDecl",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"pkgDecl",
",",
"PACKAGE_PROPERTY",
")",
";",
"}",
"void",
"setProblems",
"(",
"IProblem",
"[",
"]",
"problems",
")",
"{",
"if",
"(",
"problems",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"this",
".",
"problems",
"=",
"problems",
";",
"}",
"void",
"setStatementsRecoveryData",
"(",
"Object",
"data",
")",
"{",
"this",
".",
"statementsRecoveryData",
"=",
"data",
";",
"}",
"final",
"boolean",
"subtreeMatch0",
"(",
"ASTMatcher",
"matcher",
",",
"Object",
"other",
")",
"{",
"return",
"matcher",
".",
"match",
"(",
"this",
",",
"other",
")",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"int",
"size",
"=",
"memSize",
"(",
")",
";",
"if",
"(",
"this",
".",
"optionalPackageDeclaration",
"!=",
"null",
")",
"{",
"size",
"+=",
"getPackage",
"(",
")",
".",
"treeSize",
"(",
")",
";",
"}",
"size",
"+=",
"this",
".",
"imports",
".",
"listSize",
"(",
")",
";",
"size",
"+=",
"this",
".",
"types",
".",
"listSize",
"(",
")",
";",
"if",
"(",
"this",
".",
"optionalCommentList",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"this",
".",
"optionalCommentList",
".",
"size",
"(",
")",
";",
"i",
"++",
")",
"{",
"Comment",
"comment",
"=",
"(",
"Comment",
")",
"this",
".",
"optionalCommentList",
".",
"get",
"(",
"i",
")",
";",
"if",
"(",
"comment",
"!=",
"null",
"&&",
"comment",
".",
"getParent",
"(",
")",
"==",
"null",
")",
"{",
"size",
"+=",
"comment",
".",
"treeSize",
"(",
")",
";",
"}",
"}",
"}",
"return",
"size",
";",
"}",
"public",
"List",
"types",
"(",
")",
"{",
"return",
"this",
".",
"types",
";",
"}",
"}",
"</s>"
] |
4,390 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"MemberValuePair",
"extends",
"ASTNode",
"{",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"NAME_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"MemberValuePair",
".",
"class",
",",
"\"name\"",
",",
"SimpleName",
".",
"class",
",",
"MANDATORY",
",",
"NO_CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"VALUE_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"MemberValuePair",
".",
"class",
",",
"\"value\"",
",",
"Expression",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"propertyList",
"=",
"new",
"ArrayList",
"(",
"3",
")",
";",
"createPropertyList",
"(",
"MemberValuePair",
".",
"class",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"NAME_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"VALUE_PROPERTY",
",",
"propertyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"propertyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"SimpleName",
"name",
"=",
"null",
";",
"private",
"Expression",
"value",
"=",
"null",
";",
"MemberValuePair",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"unsupportedIn2",
"(",
")",
";",
"}",
"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",
"==",
"VALUE_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getValue",
"(",
")",
";",
"}",
"else",
"{",
"setValue",
"(",
"(",
"Expression",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"return",
"super",
".",
"internalGetSetChildProperty",
"(",
"property",
",",
"get",
",",
"child",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"MEMBER_VALUE_PAIR",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"MemberValuePair",
"result",
"=",
"new",
"MemberValuePair",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"setName",
"(",
"(",
"SimpleName",
")",
"ASTNode",
".",
"copySubtree",
"(",
"target",
",",
"getName",
"(",
")",
")",
")",
";",
"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",
",",
"getName",
"(",
")",
")",
";",
"acceptChild",
"(",
"visitor",
",",
"getValue",
"(",
")",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"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",
"final",
"IMemberValuePairBinding",
"resolveMemberValuePairBinding",
"(",
")",
"{",
"return",
"this",
".",
"ast",
".",
"getBindingResolver",
"(",
")",
".",
"resolveMemberValuePair",
"(",
"this",
")",
";",
"}",
"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",
")",
";",
"}",
"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",
"BASE_NODE_SIZE",
"+",
"2",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"name",
"==",
"null",
"?",
"0",
":",
"getName",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"value",
"==",
"null",
"?",
"0",
":",
"getValue",
"(",
")",
".",
"treeSize",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
4,391 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"Iterator",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"IStatus",
";",
"import",
"org",
".",
"eclipse",
".",
"core",
".",
"runtime",
".",
"Status",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"ICompilationUnit",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IJavaElement",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IPackageFragment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"IPackageFragmentRoot",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaCore",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"JavaModelException",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"compiler",
".",
"CharOperation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryAnnotation",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"IBinaryType",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"INameEnvironment",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"env",
".",
"NameEnvironmentAnswer",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"BinaryTypeBinding",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"TypeConstants",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"util",
".",
"Util",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"NameLookup",
";",
"import",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"SearchableEnvironment",
";",
"class",
"PackageBinding",
"implements",
"IPackageBinding",
"{",
"private",
"static",
"final",
"String",
"[",
"]",
"NO_NAME_COMPONENTS",
"=",
"CharOperation",
".",
"NO_STRINGS",
";",
"private",
"static",
"final",
"String",
"UNNAMED",
"=",
"Util",
".",
"EMPTY_STRING",
";",
"private",
"static",
"final",
"char",
"PACKAGE_NAME_SEPARATOR",
"=",
"'.'",
";",
"private",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"PackageBinding",
"binding",
";",
"private",
"String",
"name",
";",
"private",
"BindingResolver",
"resolver",
";",
"private",
"String",
"[",
"]",
"components",
";",
"PackageBinding",
"(",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"PackageBinding",
"binding",
",",
"BindingResolver",
"resolver",
")",
"{",
"this",
".",
"binding",
"=",
"binding",
";",
"this",
".",
"resolver",
"=",
"resolver",
";",
"}",
"public",
"IAnnotationBinding",
"[",
"]",
"getAnnotations",
"(",
")",
"{",
"try",
"{",
"INameEnvironment",
"nameEnvironment",
"=",
"this",
".",
"binding",
".",
"environment",
".",
"nameEnvironment",
";",
"if",
"(",
"!",
"(",
"nameEnvironment",
"instanceof",
"SearchableEnvironment",
")",
")",
"return",
"AnnotationBinding",
".",
"NoAnnotations",
";",
"NameLookup",
"nameLookup",
"=",
"(",
"(",
"SearchableEnvironment",
")",
"nameEnvironment",
")",
".",
"nameLookup",
";",
"if",
"(",
"nameLookup",
"==",
"null",
")",
"return",
"AnnotationBinding",
".",
"NoAnnotations",
";",
"final",
"String",
"pkgName",
"=",
"getName",
"(",
")",
";",
"IPackageFragment",
"[",
"]",
"pkgs",
"=",
"nameLookup",
".",
"findPackageFragments",
"(",
"pkgName",
",",
"false",
")",
";",
"if",
"(",
"pkgs",
"==",
"null",
")",
"return",
"AnnotationBinding",
".",
"NoAnnotations",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"len",
"=",
"pkgs",
".",
"length",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"int",
"fragType",
"=",
"pkgs",
"[",
"i",
"]",
".",
"getKind",
"(",
")",
";",
"switch",
"(",
"fragType",
")",
"{",
"case",
"IPackageFragmentRoot",
".",
"K_SOURCE",
":",
"String",
"unitName",
"=",
"\"\"",
";",
"ICompilationUnit",
"unit",
"=",
"pkgs",
"[",
"i",
"]",
".",
"getCompilationUnit",
"(",
"unitName",
")",
";",
"if",
"(",
"unit",
"!=",
"null",
"&&",
"unit",
".",
"exists",
"(",
")",
")",
"{",
"ASTParser",
"p",
"=",
"ASTParser",
".",
"newParser",
"(",
"AST",
".",
"JLS3",
")",
";",
"p",
".",
"setSource",
"(",
"unit",
")",
";",
"p",
".",
"setResolveBindings",
"(",
"true",
")",
";",
"p",
".",
"setUnitName",
"(",
"unitName",
")",
";",
"p",
".",
"setFocalPosition",
"(",
"0",
")",
";",
"p",
".",
"setKind",
"(",
"ASTParser",
".",
"K_COMPILATION_UNIT",
")",
";",
"CompilationUnit",
"domUnit",
"=",
"(",
"CompilationUnit",
")",
"p",
".",
"createAST",
"(",
"null",
")",
";",
"PackageDeclaration",
"pkgDecl",
"=",
"domUnit",
".",
"getPackage",
"(",
")",
";",
"if",
"(",
"pkgDecl",
"!=",
"null",
")",
"{",
"List",
"annos",
"=",
"pkgDecl",
".",
"annotations",
"(",
")",
";",
"if",
"(",
"annos",
"==",
"null",
"||",
"annos",
".",
"isEmpty",
"(",
")",
")",
"return",
"AnnotationBinding",
".",
"NoAnnotations",
";",
"IAnnotationBinding",
"[",
"]",
"result",
"=",
"new",
"IAnnotationBinding",
"[",
"annos",
".",
"size",
"(",
")",
"]",
";",
"int",
"index",
"=",
"0",
";",
"for",
"(",
"Iterator",
"it",
"=",
"annos",
".",
"iterator",
"(",
")",
";",
"it",
".",
"hasNext",
"(",
")",
";",
"index",
"++",
")",
"{",
"result",
"[",
"index",
"]",
"=",
"(",
"(",
"Annotation",
")",
"it",
".",
"next",
"(",
")",
")",
".",
"resolveAnnotationBinding",
"(",
")",
";",
"if",
"(",
"result",
"[",
"index",
"]",
"==",
"null",
")",
"return",
"AnnotationBinding",
".",
"NoAnnotations",
";",
"}",
"return",
"result",
";",
"}",
"}",
"break",
";",
"case",
"IPackageFragmentRoot",
".",
"K_BINARY",
":",
"NameEnvironmentAnswer",
"answer",
"=",
"nameEnvironment",
".",
"findType",
"(",
"TypeConstants",
".",
"PACKAGE_INFO_NAME",
",",
"this",
".",
"binding",
".",
"compoundName",
")",
";",
"if",
"(",
"answer",
"!=",
"null",
"&&",
"answer",
".",
"isBinaryType",
"(",
")",
")",
"{",
"IBinaryType",
"type",
"=",
"answer",
".",
"getBinaryType",
"(",
")",
";",
"char",
"[",
"]",
"[",
"]",
"[",
"]",
"missingTypeNames",
"=",
"type",
".",
"getMissingTypeNames",
"(",
")",
";",
"IBinaryAnnotation",
"[",
"]",
"binaryAnnotations",
"=",
"type",
".",
"getAnnotations",
"(",
")",
";",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"AnnotationBinding",
"[",
"]",
"binaryInstances",
"=",
"BinaryTypeBinding",
".",
"createAnnotations",
"(",
"binaryAnnotations",
",",
"this",
".",
"binding",
".",
"environment",
",",
"missingTypeNames",
")",
";",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"AnnotationBinding",
"[",
"]",
"allInstances",
"=",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"AnnotationBinding",
".",
"addStandardAnnotations",
"(",
"binaryInstances",
",",
"type",
".",
"getTagBits",
"(",
")",
",",
"this",
".",
"binding",
".",
"environment",
")",
";",
"int",
"total",
"=",
"allInstances",
".",
"length",
";",
"IAnnotationBinding",
"[",
"]",
"domInstances",
"=",
"new",
"AnnotationBinding",
"[",
"total",
"]",
";",
"for",
"(",
"int",
"a",
"=",
"0",
";",
"a",
"<",
"total",
";",
"a",
"++",
")",
"{",
"final",
"IAnnotationBinding",
"annotationInstance",
"=",
"this",
".",
"resolver",
".",
"getAnnotationInstance",
"(",
"allInstances",
"[",
"a",
"]",
")",
";",
"if",
"(",
"annotationInstance",
"==",
"null",
")",
"{",
"return",
"AnnotationBinding",
".",
"NoAnnotations",
";",
"}",
"domInstances",
"[",
"a",
"]",
"=",
"annotationInstance",
";",
"}",
"return",
"domInstances",
";",
"}",
"}",
"}",
"}",
"catch",
"(",
"JavaModelException",
"e",
")",
"{",
"return",
"AnnotationBinding",
".",
"NoAnnotations",
";",
"}",
"return",
"AnnotationBinding",
".",
"NoAnnotations",
";",
"}",
"public",
"String",
"getName",
"(",
")",
"{",
"if",
"(",
"this",
".",
"name",
"==",
"null",
")",
"{",
"computeNameAndComponents",
"(",
")",
";",
"}",
"return",
"this",
".",
"name",
";",
"}",
"public",
"boolean",
"isUnnamed",
"(",
")",
"{",
"return",
"getName",
"(",
")",
".",
"equals",
"(",
"UNNAMED",
")",
";",
"}",
"public",
"String",
"[",
"]",
"getNameComponents",
"(",
")",
"{",
"if",
"(",
"this",
".",
"components",
"==",
"null",
")",
"{",
"computeNameAndComponents",
"(",
")",
";",
"}",
"return",
"this",
".",
"components",
";",
"}",
"public",
"int",
"getKind",
"(",
")",
"{",
"return",
"IBinding",
".",
"PACKAGE",
";",
"}",
"public",
"int",
"getModifiers",
"(",
")",
"{",
"return",
"Modifier",
".",
"NONE",
";",
"}",
"public",
"boolean",
"isDeprecated",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"isRecovered",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"boolean",
"isSynthetic",
"(",
")",
"{",
"return",
"false",
";",
"}",
"public",
"IJavaElement",
"getJavaElement",
"(",
")",
"{",
"INameEnvironment",
"nameEnvironment",
"=",
"this",
".",
"binding",
".",
"environment",
".",
"nameEnvironment",
";",
"if",
"(",
"!",
"(",
"nameEnvironment",
"instanceof",
"SearchableEnvironment",
")",
")",
"return",
"null",
";",
"NameLookup",
"nameLookup",
"=",
"(",
"(",
"SearchableEnvironment",
")",
"nameEnvironment",
")",
".",
"nameLookup",
";",
"if",
"(",
"nameLookup",
"==",
"null",
")",
"return",
"null",
";",
"IJavaElement",
"[",
"]",
"pkgs",
"=",
"nameLookup",
".",
"findPackageFragments",
"(",
"getName",
"(",
")",
",",
"false",
")",
";",
"if",
"(",
"pkgs",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"pkgs",
".",
"length",
"==",
"0",
")",
"{",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"core",
".",
"util",
".",
"Util",
".",
"log",
"(",
"new",
"Status",
"(",
"IStatus",
".",
"WARNING",
",",
"JavaCore",
".",
"PLUGIN_ID",
",",
"\"\"",
"+",
"getName",
"(",
")",
"+",
"\"\"",
")",
")",
";",
"return",
"null",
";",
"}",
"return",
"pkgs",
"[",
"0",
"]",
";",
"}",
"public",
"String",
"getKey",
"(",
")",
"{",
"return",
"new",
"String",
"(",
"this",
".",
"binding",
".",
"computeUniqueKey",
"(",
")",
")",
";",
"}",
"public",
"boolean",
"isEqualTo",
"(",
"IBinding",
"other",
")",
"{",
"if",
"(",
"other",
"==",
"this",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"other",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"!",
"(",
"other",
"instanceof",
"PackageBinding",
")",
")",
"{",
"return",
"false",
";",
"}",
"org",
".",
"eclipse",
".",
"jdt",
".",
"internal",
".",
"compiler",
".",
"lookup",
".",
"PackageBinding",
"packageBinding2",
"=",
"(",
"(",
"PackageBinding",
")",
"other",
")",
".",
"binding",
";",
"return",
"CharOperation",
".",
"equals",
"(",
"this",
".",
"binding",
".",
"compoundName",
",",
"packageBinding2",
".",
"compoundName",
")",
";",
"}",
"private",
"void",
"computeNameAndComponents",
"(",
")",
"{",
"char",
"[",
"]",
"[",
"]",
"compoundName",
"=",
"this",
".",
"binding",
".",
"compoundName",
";",
"if",
"(",
"compoundName",
"==",
"CharOperation",
".",
"NO_CHAR_CHAR",
"||",
"compoundName",
"==",
"null",
")",
"{",
"this",
".",
"name",
"=",
"UNNAMED",
";",
"this",
".",
"components",
"=",
"NO_NAME_COMPONENTS",
";",
"}",
"else",
"{",
"int",
"length",
"=",
"compoundName",
".",
"length",
";",
"this",
".",
"components",
"=",
"new",
"String",
"[",
"length",
"]",
";",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
"-",
"1",
";",
"i",
"++",
")",
"{",
"this",
".",
"components",
"[",
"i",
"]",
"=",
"new",
"String",
"(",
"compoundName",
"[",
"i",
"]",
")",
";",
"buffer",
".",
"append",
"(",
"compoundName",
"[",
"i",
"]",
")",
".",
"append",
"(",
"PACKAGE_NAME_SEPARATOR",
")",
";",
"}",
"this",
".",
"components",
"[",
"length",
"-",
"1",
"]",
"=",
"new",
"String",
"(",
"compoundName",
"[",
"length",
"-",
"1",
"]",
")",
";",
"buffer",
".",
"append",
"(",
"compoundName",
"[",
"length",
"-",
"1",
"]",
")",
";",
"this",
".",
"name",
"=",
"buffer",
".",
"toString",
"(",
")",
";",
"}",
"}",
"public",
"String",
"toString",
"(",
")",
"{",
"return",
"this",
".",
"binding",
".",
"toString",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,392 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"AssertStatement",
"extends",
"Statement",
"{",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"EXPRESSION_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"AssertStatement",
".",
"class",
",",
"\"expression\"",
",",
"Expression",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"MESSAGE_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"AssertStatement",
".",
"class",
",",
"\"message\"",
",",
"Expression",
".",
"class",
",",
"OPTIONAL",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"properyList",
"=",
"new",
"ArrayList",
"(",
"3",
")",
";",
"createPropertyList",
"(",
"AssertStatement",
".",
"class",
",",
"properyList",
")",
";",
"addProperty",
"(",
"EXPRESSION_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"MESSAGE_PROPERTY",
",",
"properyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"properyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"Expression",
"expression",
"=",
"null",
";",
"private",
"Expression",
"optionalMessageExpression",
"=",
"null",
";",
"AssertStatement",
"(",
"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",
"==",
"MESSAGE_PROPERTY",
")",
"{",
"if",
"(",
"get",
")",
"{",
"return",
"getMessage",
"(",
")",
";",
"}",
"else",
"{",
"setMessage",
"(",
"(",
"Expression",
")",
"child",
")",
";",
"return",
"null",
";",
"}",
"}",
"return",
"super",
".",
"internalGetSetChildProperty",
"(",
"property",
",",
"get",
",",
"child",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"ASSERT_STATEMENT",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"AssertStatement",
"result",
"=",
"new",
"AssertStatement",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"copyLeadingComment",
"(",
"this",
")",
";",
"result",
".",
"setExpression",
"(",
"(",
"Expression",
")",
"ASTNode",
".",
"copySubtree",
"(",
"target",
",",
"getExpression",
"(",
")",
")",
")",
";",
"result",
".",
"setMessage",
"(",
"(",
"Expression",
")",
"ASTNode",
".",
"copySubtree",
"(",
"target",
",",
"getMessage",
"(",
")",
")",
")",
";",
"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",
",",
"getMessage",
"(",
")",
")",
";",
"}",
"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",
"Expression",
"getMessage",
"(",
")",
"{",
"return",
"this",
".",
"optionalMessageExpression",
";",
"}",
"public",
"void",
"setMessage",
"(",
"Expression",
"expression",
")",
"{",
"ASTNode",
"oldChild",
"=",
"this",
".",
"optionalMessageExpression",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"MESSAGE_PROPERTY",
")",
";",
"this",
".",
"optionalMessageExpression",
"=",
"expression",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"expression",
",",
"MESSAGE_PROPERTY",
")",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"super",
".",
"memSize",
"(",
")",
"+",
"2",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"expression",
"==",
"null",
"?",
"0",
":",
"getExpression",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"optionalMessageExpression",
"==",
"null",
"?",
"0",
":",
"getMessage",
"(",
")",
".",
"treeSize",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
4,393 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"EnumDeclaration",
"extends",
"AbstractTypeDeclaration",
"{",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"JAVADOC_PROPERTY",
"=",
"internalJavadocPropertyFactory",
"(",
"EnumDeclaration",
".",
"class",
")",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"MODIFIERS2_PROPERTY",
"=",
"internalModifiers2PropertyFactory",
"(",
"EnumDeclaration",
".",
"class",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"NAME_PROPERTY",
"=",
"internalNamePropertyFactory",
"(",
"EnumDeclaration",
".",
"class",
")",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"SUPER_INTERFACE_TYPES_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"EnumDeclaration",
".",
"class",
",",
"\"\"",
",",
"Type",
".",
"class",
",",
"NO_CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"ENUM_CONSTANTS_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"EnumDeclaration",
".",
"class",
",",
"\"\"",
",",
"EnumConstantDeclaration",
".",
"class",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"BODY_DECLARATIONS_PROPERTY",
"=",
"internalBodyDeclarationPropertyFactory",
"(",
"EnumDeclaration",
".",
"class",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"properyList",
"=",
"new",
"ArrayList",
"(",
"6",
")",
";",
"createPropertyList",
"(",
"EnumDeclaration",
".",
"class",
",",
"properyList",
")",
";",
"addProperty",
"(",
"JAVADOC_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"MODIFIERS2_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"NAME_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"SUPER_INTERFACE_TYPES_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"ENUM_CONSTANTS_PROPERTY",
",",
"properyList",
")",
";",
"addProperty",
"(",
"BODY_DECLARATIONS_PROPERTY",
",",
"properyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"properyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"ASTNode",
".",
"NodeList",
"superInterfaceTypes",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"SUPER_INTERFACE_TYPES_PROPERTY",
")",
";",
"private",
"ASTNode",
".",
"NodeList",
"enumConstants",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"ENUM_CONSTANTS_PROPERTY",
")",
";",
"EnumDeclaration",
"(",
"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",
"==",
"SUPER_INTERFACE_TYPES_PROPERTY",
")",
"{",
"return",
"superInterfaceTypes",
"(",
")",
";",
"}",
"if",
"(",
"property",
"==",
"ENUM_CONSTANTS_PROPERTY",
")",
"{",
"return",
"enumConstants",
"(",
")",
";",
"}",
"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",
"ENUM_DECLARATION",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"EnumDeclaration",
"result",
"=",
"new",
"EnumDeclaration",
"(",
"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",
".",
"superInterfaceTypes",
"(",
")",
".",
"addAll",
"(",
"ASTNode",
".",
"copySubtrees",
"(",
"target",
",",
"superInterfaceTypes",
"(",
")",
")",
")",
";",
"result",
".",
"enumConstants",
"(",
")",
".",
"addAll",
"(",
"ASTNode",
".",
"copySubtrees",
"(",
"target",
",",
"enumConstants",
"(",
")",
")",
")",
";",
"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",
".",
"superInterfaceTypes",
")",
";",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"enumConstants",
")",
";",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"bodyDeclarations",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"public",
"List",
"superInterfaceTypes",
"(",
")",
"{",
"return",
"this",
".",
"superInterfaceTypes",
";",
"}",
"public",
"List",
"enumConstants",
"(",
")",
"{",
"return",
"this",
".",
"enumConstants",
";",
"}",
"ITypeBinding",
"internalResolveBinding",
"(",
")",
"{",
"return",
"this",
".",
"ast",
".",
"getBindingResolver",
"(",
")",
".",
"resolveType",
"(",
"this",
")",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"super",
".",
"memSize",
"(",
")",
"+",
"2",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"optionalDocComment",
"==",
"null",
"?",
"0",
":",
"getJavadoc",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"this",
".",
"modifiers",
".",
"listSize",
"(",
")",
"+",
"(",
"this",
".",
"typeName",
"==",
"null",
"?",
"0",
":",
"getName",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"this",
".",
"superInterfaceTypes",
".",
"listSize",
"(",
")",
"+",
"this",
".",
"enumConstants",
".",
"listSize",
"(",
")",
"+",
"this",
".",
"bodyDeclarations",
".",
"listSize",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,394 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"public",
"abstract",
"class",
"Type",
"extends",
"ASTNode",
"{",
"Type",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"}",
"public",
"final",
"boolean",
"isPrimitiveType",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"PrimitiveType",
")",
";",
"}",
"public",
"final",
"boolean",
"isSimpleType",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"SimpleType",
")",
";",
"}",
"public",
"final",
"boolean",
"isArrayType",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"ArrayType",
")",
";",
"}",
"public",
"final",
"boolean",
"isParameterizedType",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"ParameterizedType",
")",
";",
"}",
"public",
"final",
"boolean",
"isQualifiedType",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"QualifiedType",
")",
";",
"}",
"public",
"final",
"boolean",
"isUnionType",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"UnionType",
")",
";",
"}",
"public",
"final",
"boolean",
"isWildcardType",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"WildcardType",
")",
";",
"}",
"public",
"final",
"ITypeBinding",
"resolveBinding",
"(",
")",
"{",
"return",
"this",
".",
"ast",
".",
"getBindingResolver",
"(",
")",
".",
"resolveType",
"(",
"this",
")",
";",
"}",
"}",
"</s>"
] |
4,395 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"public",
"interface",
"IMethodBinding",
"extends",
"IBinding",
"{",
"public",
"boolean",
"isConstructor",
"(",
")",
";",
"public",
"boolean",
"isDefaultConstructor",
"(",
")",
";",
"public",
"String",
"getName",
"(",
")",
";",
"public",
"ITypeBinding",
"getDeclaringClass",
"(",
")",
";",
"public",
"Object",
"getDefaultValue",
"(",
")",
";",
"public",
"IAnnotationBinding",
"[",
"]",
"getParameterAnnotations",
"(",
"int",
"paramIndex",
")",
";",
"public",
"ITypeBinding",
"[",
"]",
"getParameterTypes",
"(",
")",
";",
"public",
"ITypeBinding",
"getReturnType",
"(",
")",
";",
"public",
"ITypeBinding",
"[",
"]",
"getExceptionTypes",
"(",
")",
";",
"public",
"ITypeBinding",
"[",
"]",
"getTypeParameters",
"(",
")",
";",
"public",
"boolean",
"isAnnotationMember",
"(",
")",
";",
"public",
"boolean",
"isGenericMethod",
"(",
")",
";",
"public",
"boolean",
"isParameterizedMethod",
"(",
")",
";",
"public",
"ITypeBinding",
"[",
"]",
"getTypeArguments",
"(",
")",
";",
"public",
"IMethodBinding",
"getMethodDeclaration",
"(",
")",
";",
"public",
"boolean",
"isRawMethod",
"(",
")",
";",
"public",
"boolean",
"isSubsignature",
"(",
"IMethodBinding",
"otherMethod",
")",
";",
"public",
"boolean",
"isVarargs",
"(",
")",
";",
"public",
"boolean",
"overrides",
"(",
"IMethodBinding",
"method",
")",
";",
"}",
"</s>"
] |
4,396 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"TypeParameter",
"extends",
"ASTNode",
"{",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"NAME_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"TypeParameter",
".",
"class",
",",
"\"name\"",
",",
"SimpleName",
".",
"class",
",",
"MANDATORY",
",",
"NO_CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildListPropertyDescriptor",
"TYPE_BOUNDS_PROPERTY",
"=",
"new",
"ChildListPropertyDescriptor",
"(",
"TypeParameter",
".",
"class",
",",
"\"typeBounds\"",
",",
"Type",
".",
"class",
",",
"NO_CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"propertyList",
"=",
"new",
"ArrayList",
"(",
"3",
")",
";",
"createPropertyList",
"(",
"TypeParameter",
".",
"class",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"NAME_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"TYPE_BOUNDS_PROPERTY",
",",
"propertyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"propertyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"SimpleName",
"typeVariableName",
"=",
"null",
";",
"private",
"ASTNode",
".",
"NodeList",
"typeBounds",
"=",
"new",
"ASTNode",
".",
"NodeList",
"(",
"TYPE_BOUNDS_PROPERTY",
")",
";",
"TypeParameter",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"unsupportedIn2",
"(",
")",
";",
"}",
"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",
";",
"}",
"}",
"return",
"super",
".",
"internalGetSetChildProperty",
"(",
"property",
",",
"get",
",",
"child",
")",
";",
"}",
"final",
"List",
"internalGetChildListProperty",
"(",
"ChildListPropertyDescriptor",
"property",
")",
"{",
"if",
"(",
"property",
"==",
"TYPE_BOUNDS_PROPERTY",
")",
"{",
"return",
"typeBounds",
"(",
")",
";",
"}",
"return",
"super",
".",
"internalGetChildListProperty",
"(",
"property",
")",
";",
"}",
"final",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"TYPE_PARAMETER",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"TypeParameter",
"result",
"=",
"new",
"TypeParameter",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"setName",
"(",
"(",
"SimpleName",
")",
"(",
"(",
"ASTNode",
")",
"getName",
"(",
")",
")",
".",
"clone",
"(",
"target",
")",
")",
";",
"result",
".",
"typeBounds",
"(",
")",
".",
"addAll",
"(",
"ASTNode",
".",
"copySubtrees",
"(",
"target",
",",
"typeBounds",
"(",
")",
")",
")",
";",
"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",
"(",
")",
")",
";",
"acceptChildren",
"(",
"visitor",
",",
"this",
".",
"typeBounds",
")",
";",
"}",
"visitor",
".",
"endVisit",
"(",
"this",
")",
";",
"}",
"public",
"SimpleName",
"getName",
"(",
")",
"{",
"if",
"(",
"this",
".",
"typeVariableName",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"typeVariableName",
"==",
"null",
")",
"{",
"preLazyInit",
"(",
")",
";",
"this",
".",
"typeVariableName",
"=",
"new",
"SimpleName",
"(",
"this",
".",
"ast",
")",
";",
"postLazyInit",
"(",
"this",
".",
"typeVariableName",
",",
"NAME_PROPERTY",
")",
";",
"}",
"}",
"}",
"return",
"this",
".",
"typeVariableName",
";",
"}",
"public",
"final",
"ITypeBinding",
"resolveBinding",
"(",
")",
"{",
"return",
"this",
".",
"ast",
".",
"getBindingResolver",
"(",
")",
".",
"resolveTypeParameter",
"(",
"this",
")",
";",
"}",
"public",
"void",
"setName",
"(",
"SimpleName",
"typeName",
")",
"{",
"if",
"(",
"typeName",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"ASTNode",
"oldChild",
"=",
"this",
".",
"typeVariableName",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"typeName",
",",
"NAME_PROPERTY",
")",
";",
"this",
".",
"typeVariableName",
"=",
"typeName",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"typeName",
",",
"NAME_PROPERTY",
")",
";",
"}",
"public",
"List",
"typeBounds",
"(",
")",
"{",
"return",
"this",
".",
"typeBounds",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"BASE_NODE_SIZE",
"+",
"2",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"typeVariableName",
"==",
"null",
"?",
"0",
":",
"getName",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"this",
".",
"typeBounds",
".",
"listSize",
"(",
")",
";",
"}",
"}",
"</s>"
] |
4,397 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"import",
"java",
".",
"util",
".",
"ArrayList",
";",
"import",
"java",
".",
"util",
".",
"List",
";",
"public",
"class",
"QualifiedType",
"extends",
"Type",
"{",
"int",
"index",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"QUALIFIER_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"QualifiedType",
".",
"class",
",",
"\"qualifier\"",
",",
"Type",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"NAME_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"QualifiedType",
".",
"class",
",",
"\"name\"",
",",
"SimpleName",
".",
"class",
",",
"MANDATORY",
",",
"NO_CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"propertyList",
"=",
"new",
"ArrayList",
"(",
"3",
")",
";",
"createPropertyList",
"(",
"QualifiedType",
".",
"class",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"QUALIFIER_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"NAME_PROPERTY",
",",
"propertyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"propertyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"Type",
"qualifier",
"=",
"null",
";",
"private",
"SimpleName",
"name",
"=",
"null",
";",
"QualifiedType",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"unsupportedIn2",
"(",
")",
";",
"}",
"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",
"(",
"(",
"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",
"int",
"getNodeType0",
"(",
")",
"{",
"return",
"QUALIFIED_TYPE",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"QualifiedType",
"result",
"=",
"new",
"QualifiedType",
"(",
"target",
")",
";",
"result",
".",
"setSourceRange",
"(",
"getStartPosition",
"(",
")",
",",
"getLength",
"(",
")",
")",
";",
"result",
".",
"setQualifier",
"(",
"(",
"Type",
")",
"(",
"(",
"ASTNode",
")",
"getQualifier",
"(",
")",
")",
".",
"clone",
"(",
"target",
")",
")",
";",
"result",
".",
"setName",
"(",
"(",
"SimpleName",
")",
"(",
"(",
"ASTNode",
")",
"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",
"Type",
"getQualifier",
"(",
")",
"{",
"if",
"(",
"this",
".",
"qualifier",
"==",
"null",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"this",
".",
"qualifier",
"==",
"null",
")",
"{",
"preLazyInit",
"(",
")",
";",
"this",
".",
"qualifier",
"=",
"new",
"SimpleType",
"(",
"this",
".",
"ast",
")",
";",
"postLazyInit",
"(",
"this",
".",
"qualifier",
",",
"QUALIFIER_PROPERTY",
")",
";",
"}",
"}",
"}",
"return",
"this",
".",
"qualifier",
";",
"}",
"public",
"void",
"setQualifier",
"(",
"Type",
"type",
")",
"{",
"if",
"(",
"type",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"}",
"ASTNode",
"oldChild",
"=",
"this",
".",
"qualifier",
";",
"preReplaceChild",
"(",
"oldChild",
",",
"type",
",",
"QUALIFIER_PROPERTY",
")",
";",
"this",
".",
"qualifier",
"=",
"type",
";",
"postReplaceChild",
"(",
"oldChild",
",",
"type",
",",
"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",
")",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"BASE_NODE_SIZE",
"+",
"3",
"*",
"4",
";",
"}",
"int",
"treeSize",
"(",
")",
"{",
"return",
"memSize",
"(",
")",
"+",
"(",
"this",
".",
"qualifier",
"==",
"null",
"?",
"0",
":",
"getQualifier",
"(",
")",
".",
"treeSize",
"(",
")",
")",
"+",
"(",
"this",
".",
"name",
"==",
"null",
"?",
"0",
":",
"getName",
"(",
")",
".",
"treeSize",
"(",
")",
")",
";",
"}",
"}",
"</s>"
] |
4,398 |
[
"<s>",
"package",
"org",
".",
"eclipse",
".",
"jdt",
".",
"core",
".",
"dom",
";",
"public",
"abstract",
"class",
"Comment",
"extends",
"ASTNode",
"{",
"private",
"ASTNode",
"alternateRoot",
"=",
"null",
";",
"Comment",
"(",
"AST",
"ast",
")",
"{",
"super",
"(",
"ast",
")",
";",
"}",
"public",
"final",
"boolean",
"isBlockComment",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"BlockComment",
")",
";",
"}",
"public",
"final",
"boolean",
"isLineComment",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"LineComment",
")",
";",
"}",
"public",
"final",
"boolean",
"isDocComment",
"(",
")",
"{",
"return",
"(",
"this",
"instanceof",
"Javadoc",
")",
";",
"}",
"public",
"final",
"ASTNode",
"getAlternateRoot",
"(",
")",
"{",
"return",
"this",
".",
"alternateRoot",
";",
"}",
"public",
"final",
"void",
"setAlternateRoot",
"(",
"ASTNode",
"root",
")",
"{",
"checkModifiable",
"(",
")",
";",
"this",
".",
"alternateRoot",
"=",
"root",
";",
"}",
"int",
"memSize",
"(",
")",
"{",
"return",
"BASE_NODE_SIZE",
"+",
"1",
"*",
"4",
";",
"}",
"}",
"</s>"
] |
4,399 |
[
"<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",
"PrefixExpression",
"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",
"(",
"\"--\"",
")",
";",
"public",
"static",
"final",
"Operator",
"PLUS",
"=",
"new",
"Operator",
"(",
"\"+\"",
")",
";",
"public",
"static",
"final",
"Operator",
"MINUS",
"=",
"new",
"Operator",
"(",
"\"-\"",
")",
";",
"public",
"static",
"final",
"Operator",
"COMPLEMENT",
"=",
"new",
"Operator",
"(",
"\"~\"",
")",
";",
"public",
"static",
"final",
"Operator",
"NOT",
"=",
"new",
"Operator",
"(",
"\"!\"",
")",
";",
"private",
"static",
"final",
"Map",
"CODES",
";",
"static",
"{",
"CODES",
"=",
"new",
"HashMap",
"(",
"20",
")",
";",
"Operator",
"[",
"]",
"ops",
"=",
"{",
"INCREMENT",
",",
"DECREMENT",
",",
"PLUS",
",",
"MINUS",
",",
"COMPLEMENT",
",",
"NOT",
",",
"}",
";",
"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",
"(",
"PrefixExpression",
".",
"class",
",",
"\"operator\"",
",",
"PrefixExpression",
".",
"Operator",
".",
"class",
",",
"MANDATORY",
")",
";",
"public",
"static",
"final",
"ChildPropertyDescriptor",
"OPERAND_PROPERTY",
"=",
"new",
"ChildPropertyDescriptor",
"(",
"PrefixExpression",
".",
"class",
",",
"\"operand\"",
",",
"Expression",
".",
"class",
",",
"MANDATORY",
",",
"CYCLE_RISK",
")",
";",
"private",
"static",
"final",
"List",
"PROPERTY_DESCRIPTORS",
";",
"static",
"{",
"List",
"propertyList",
"=",
"new",
"ArrayList",
"(",
"3",
")",
";",
"createPropertyList",
"(",
"PrefixExpression",
".",
"class",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"OPERATOR_PROPERTY",
",",
"propertyList",
")",
";",
"addProperty",
"(",
"OPERAND_PROPERTY",
",",
"propertyList",
")",
";",
"PROPERTY_DESCRIPTORS",
"=",
"reapPropertyList",
"(",
"propertyList",
")",
";",
"}",
"public",
"static",
"List",
"propertyDescriptors",
"(",
"int",
"apiLevel",
")",
"{",
"return",
"PROPERTY_DESCRIPTORS",
";",
"}",
"private",
"PrefixExpression",
".",
"Operator",
"operator",
"=",
"PrefixExpression",
".",
"Operator",
".",
"PLUS",
";",
"private",
"Expression",
"operand",
"=",
"null",
";",
"PrefixExpression",
"(",
"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",
"PREFIX_EXPRESSION",
";",
"}",
"ASTNode",
"clone0",
"(",
"AST",
"target",
")",
"{",
"PrefixExpression",
"result",
"=",
"new",
"PrefixExpression",
"(",
"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",
"PrefixExpression",
".",
"Operator",
"getOperator",
"(",
")",
"{",
"return",
"this",
".",
"operator",
";",
"}",
"public",
"void",
"setOperator",
"(",
"PrefixExpression",
".",
"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>"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.